Some code beaty applied
[mailer.git] / inc / mysql-manager.php
index 9bfcadd5bf1e94799eb0ecab569989d633793bf8..457ae0b6afa98134e99b540c8a96375f96b451df 100644 (file)
@@ -205,7 +205,7 @@ ORDER BY
        `sort` ASC",
                array($mode), __FUNCTION__, __LINE__);
 
-       //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.':'.getWhat().'*');
+       //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . ':' . getWhat() . '*');
        if (!SQL_HASZERONUMS($result_main)) {
                // There are menus available, so we simply display them... :)
                $GLOBALS['rows'] = '';
@@ -305,12 +305,12 @@ ORDER BY
                                if (isFileReadable($INC)) {
                                        // Load include file
                                        if ((!isExtensionActive($content['action'])) || ($content['action'] == 'online')) $GLOBALS['rows'] .= loadTemplate('menu_what_begin', true, $mode);
-                                       //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.getWhat().'*');
+                                       //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . '/' . $content['action'] . '/' . getWhat().'*');
                                        loadInclude($INC);
-                                       //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.getWhat().'*');
+                                       //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . '/' . $content['action'] . '/' . getWhat() . '*');
                                        if ((!isExtensionActive($content['action'])) || ($content['action'] == 'online')) $GLOBALS['rows'] .= loadTemplate('menu_what_end', true, $mode);
                                }
-                               //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat().'*');
+                               //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . '/' . $content['action'] . '/' . $content['sub_what'] . ':' . getWhat() . '*');
                        }
 
                        // Free result
@@ -319,7 +319,7 @@ ORDER BY
                        // Count one up
                        $main_cnt++;
 
-                       //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.':'.getWhat().'*');
+                       //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . ':' . getWhat() . '*');
                        if (SQL_NUMROWS($result_main) > $main_cnt) {
                                // Add seperator
                                $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode);
@@ -354,7 +354,7 @@ ORDER BY
                );
 
                // Load main template
-               //* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat().'*');
+               //* DEBUG: */ debugOutput(__LINE__ . '/' . $main_cnt . '/' . $content['action'] . '/' . $content['sub_what'] . ':' . getWhat() . '*');
                loadTemplate('menu_table', false, $content);
        } // END - if
 }
@@ -366,7 +366,9 @@ function isMember () {
 
        // Fix missing 'last_online' array, damn stupid code :(((
        // @TODO Try to rewrite this to one or more functions
-       if ((!isset($GLOBALS['last_online'])) || (!is_array($GLOBALS['last_online']))) $GLOBALS['last_online'] = array();
+       if ((!isset($GLOBALS['last_online'])) || (!is_array($GLOBALS['last_online']))) {
+               $GLOBALS['last_online'] = array();
+       } // END - if
 
        // Is the cache entry there?
        if (isset($GLOBALS[__FUNCTION__])) {
@@ -656,7 +658,7 @@ function isMenuActionValid ($mode, $action, $what, $updateEntry=false) {
        $add = '';
        if ((!isAdmin()) && ($mode != 'admin')) $add = " AND `locked`='N'";
 
-       //* DEBUG: */ debugOutput(__LINE__.':'.$mode.'/'.$action.'/'.$what.'*');
+       //* DEBUG: */ debugOutput(__LINE__ . ':' . $mode . '/' . $action . '/' . $what . '*');
        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",