Esempio n. 1
0
     * @param User $user
     * @param User $userdst
     * @return bool
     */
    public static function eventlogPiggybackLogOut($user, $userdst)
    {
        self::log("piggyback", "logout", $user->getID(), $user->getName(), $userdst->getID(), $userdst->getName());
        return true;
    }
    /**
     * @static
     * @param Block $block instance of Block class includes/Block.php
     * @param User $user instance of User class includes/User.php
     * @return bool true 'cause it's a hook
     */
    public static function eventlogBlockIp($block, $user)
    {
        self::log("block", "block", $user->getID(), $user->getName(), $block->getBlocker(), $block->getTarget(), $block->mReason);
        return true;
    }
    public static function eventlogWFPublicStatusChange($cityStatus, $cityId, $reason)
    {
        global $wgUser;
        $comment = wfMsgForContent('stafflog-wiki-status-change', RenameUserLogFormatter::getCommunityUser($wgUser->getName()), RenameUserLogFormatter::getCityLink($cityId), $cityStatus, $reason);
        // sadly, $type and $action have 10-character limit, hence 'wikifactor' and 'pubstatus'.
        self::log('wikifactor', 'pubstatus', $wgUser->getID(), $wgUser->getName(), '', '', $comment);
        return true;
    }
}
StaffLogger::setupStafflog();