]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Variable fixed
[mailer.git] / inc / mysql-manager.php
index a1e6936b581d54e24673ce44f1e4a209720ba02e..abcd20f7e55baeeec9d593f9df47c46634f3ea42 100644 (file)
@@ -766,9 +766,9 @@ function isEmailTaken ($email) {
 }
 
 // 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');
 
@@ -784,7 +784,7 @@ function isMenuActionValid ($mode, $action, $what, $UPDATE=false) {
        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);
@@ -800,7 +800,7 @@ function isMenuActionValid ($mode, $action, $what, $UPDATE=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 {
@@ -995,9 +995,8 @@ function getModeAction ($mode, $what) {
        } 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
        }
 
@@ -1230,7 +1229,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                'subject'  => $subject,
                'userid'   => $userid,
                'points'   => $points,
-               'notify'   => $notify,
+               'notify'   => $sendNotify,
                'rid'      => $rid,
                'locked'   => $locked,
                'mode'     => 'add',