// This is a 'what file'!
$type = 'what';
$search = substr($file, 5);
- $ADD = " AND `visible`='Y' AND `locked`='N'";
// Get access level from it
$modCheck = getModuleFromFileName($file, $accessLevel);
// Do we have admin? Then display all
- if (isAdmin()) $ADD = '';
+ $ADD = " AND `visible`='Y' AND `locked`='N'";
+ if (isAdmin()) {
+ // Display all!
+ $ADD = '';
+ } // END - if
$dummy = substr($search, 0, -4);
$ADD .= sprintf(" AND `action`='%s'", getActionFromModuleWhat($accessLevel, $dummy));
$OUT .= '<a name="menu" class="menu_blur" href="{%url=modules.php?module=' . getModule() . '&what=' . $content['sub_what'] . '%}" target="_self">';
} else {
// Not found - open
- $OUT .= '<em style="cursor:help" class="notice" title="{%message,ADMIN_MENU_WHAT_404=' . $content['sub_what'] . '%}">';
+ $OUT .= '<em style="cursor:help" class="notice" title="{%message,ADMIN_MENU_WHAT_404_TITLE=' . $content['sub_what'] . '%}">';
}
// Menu title
if (!isset($GLOBALS['ref_level'])) {
// Initialialize referal system
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ' Referal system initialized!');
- $GLOBALS['ref_level'] = '0';
+ $GLOBALS['ref_level'] = NULL;
} else {
// Increase referal level
$GLOBALS['ref_level']++;
$pointsColumn,
$ref_points,
bigintval($userid),
- bigintval($GLOBALS['ref_level'])
+ makeZeroToNull($GLOBALS['ref_level'])
), __FUNCTION__, __LINE__);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pointsColumn='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - UPDATE! ('.SQL_AFFECTEDROWS().')');
array(
$pointsColumn,
bigintval($userid),
- bigintval($GLOBALS['ref_level']),
+ makeZeroToNull($GLOBALS['ref_level']),
$ref_points
), __FUNCTION__, __LINE__);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'data='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - INSERTED! ('.SQL_AFFECTEDROWS().')');
array(implode(',', $userids), count($userids)), __FUNCTION__, __LINE__);
} else {
// Nothing deleted
- displayMessage(getMaskedMessage('ADMIN_MAIL_NOTHING_DELETED', $id));
+ displayMessage('{%message,ADMIN_MAIL_NOTHING_DELETED=' . $id . '%}');
}
} // END - if