}
// Validate the given menu action
-function isMenuActionValid ($mode, $action, $what, $UPDATE=false) {
+function isMenuActionValid ($mode, $action, $what, $updateEntry=false) {
// Is the cache entry there and we shall not update?
- if ((isset($GLOBALS['action_valid'][$mode][$action][$what])) && ($UPDATE === false)) {
+ if ((isset($GLOBALS['action_valid'][$mode][$action][$what])) && ($updateEntry === false)) {
// Count cache hit
incrementStatsEntry('cache_hits');
if ((!isAdmin()) && ($mode != 'admin')) $add = " AND `locked`='N'";
//* DEBUG: */ outputHtml(__LINE__.':'.$mode.'/'.$action.'/'.$what."*<br />");
- if (($mode != 'admin') && ($UPDATE === true)) {
+ if (($mode != 'admin') && ($updateEntry === true)) {
// Update guest or member menu
$sql = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
array($mode, $action, $what), __FUNCTION__, __LINE__, false);
// Run SQL command
$result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
- if ($UPDATE === true) {
+ if ($updateEntry === true) {
// Check updated/affected rows
$ret = (SQL_AFFECTEDROWS() == 1);
} else {
} elseif ((!isExtensionInstalled('sql_patches')) && ($mode != 'admin')) {
// No sql_patches installed, but maybe we need to register an admin?
if (isAdminRegistered()) {
- // Redirect
- // @TODO Why does this lead into an endless loop but we still need it???
- // @TODO Commented out redirectToUrl('admin.php');
+ // Redirect to admin area
+ redirectToUrl('admin.php');
} // END - if
}
'subject' => $subject,
'userid' => $userid,
'points' => $points,
- 'notify' => $notify,
+ 'notify' => $sendNotify,
'rid' => $rid,
'locked' => $locked,
'mode' => 'add',