Wikka Mod 009

Type: Feature Addition

Credit:

SticK
WakkaAdminHack Warning: don't go to original site or follow links on SticK's page: infected!
and
SilBaer
PsudoAdminUser @ WakkaWiki


Added the ability to have admin users. Admin users can override things such as the ACL lists and have the ability to delete pages and comments.

Instructions to add admin users:
e.g., "admin_users" => "JsnX, HendrikMans, AnotherCoolAdmin",

Modified files:
/wakka.php
actions/footer.php

There is a bug in Stick's instructions. The admin user list is not trimmed correctly. Modified the function to read as follows.....

    //returns true if user is listed in configuration list as admin
    function IsAdmin() {
        $adminstring = $this->config["admin_users"];
        $adminarray = explode(',' , $adminstring);
   
        foreach ($adminarray as $admin) {
            if (trim($admin) == $this->GetUserName()) return true;
        }
    }
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki