]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fixed issues with themes
[mailer.git] / inc / mysql-manager.php
index 519d73c98abfb0717385ca8bd684ac55cefe06ff..9aa35d0f2d7b07d3d9e39e2b69fda346afd3902b 100644 (file)
@@ -253,7 +253,7 @@ function checkModulePermissions ($mod = '') {
 
                        // Destroy cache here
                        // @TODO Rewrite this to a filter
-                       if (getOutputMode() == '0') rebuildCacheFile('modules', 'modules');
+                       if (getOutputMode() == 0) rebuildCacheFile('modules', 'modules');
 
                        // And reload data
                        unset($GLOBALS['module_status'][$mod]);
@@ -386,7 +386,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
                                //* DEBUG: */ outputHtml(__LINE__.'+'.$type."+<br />");
                                // Add closing div and br-tag
                                $OUT .= "</div><br />\n";
-                               $GLOBALS['nav_depth'] = '0';
+                               $GLOBALS['nav_depth'] = 0;
 
                                // Run the filter chain
                                $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ""));
@@ -939,13 +939,6 @@ function sendModeMails ($mod, $modes) {
        loadTemplate('admin_settings_saved', false, $content);
 }
 
-// Update module counter
-function countModuleHit($mod) {
-       // Do count all other modules but not accesses on CSS file css.php!
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1",
-               array($mod), __FUNCTION__, __LINE__);
-}
-
 // Get action value from mode (admin/guest/member) and what-value
 function getModeAction ($mode, $what) {
        // Init status
@@ -995,9 +988,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
        }
 
@@ -1011,7 +1003,7 @@ function getCategory ($cid) {
        $ret = getMessage('_CATEGORY_404');
 
        // Is the category id set?
-       if ($cid == '0') {
+       if ($cid == 0) {
                // No category
                $ret = getMessage('_CATEGORY_NONE');
        } elseif ($cid > 0) {
@@ -1159,7 +1151,7 @@ function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatemen
                $ret = '0.00000';
        } elseif (''.$ret.'' == '') {
                // Fix empty result
-               $ret = '0';
+               $ret = 0;
        }
 
        // Return value
@@ -1213,13 +1205,13 @@ function getReferalLevelPercents ($level) {
  * add_mode    = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
  *               for default value will cause no referal will get points ever!!!)
  */
-function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = '0', $locked = false, $add_mode = 'ref') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = 0, $locked = false, $add_mode = 'ref') {
        //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
        // Convert mode to lower-case
        $add_mode = strtolower($add_mode);
 
        // When $userid = 0 add points to jackpot
-       if (($userid == '0') && (isExtensionActive('jackpot'))) {
+       if (($userid == 0) && (isExtensionActive('jackpot'))) {
                // Add points to jackpot
                addPointsToJackpot($points);
                return;
@@ -1230,7 +1222,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                'subject'  => $subject,
                'userid'   => $userid,
                'points'   => $points,
-               'notify'   => $notify,
+               'notify'   => $sendNotify,
                'rid'      => $rid,
                'locked'   => $locked,
                'mode'     => 'add',