Some code 'beatuified', config in templates surfbar_stopped.tpl
authorRoland Häder <roland@mxchange.org>
Tue, 10 Nov 2009 00:31:36 +0000 (00:31 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 10 Nov 2009 00:31:36 +0000 (00:31 +0000)
inc/extensions-functions.php
inc/filters.php
inc/functions.php
inc/libs/network_functions.php
inc/loader/load_cache-admin.php
inc/stats-functions.php
surfbar.php
templates/de/html/surfbar/surfbar_stopped.tpl

index f06f15b..e1ccca5 100644 (file)
@@ -1451,7 +1451,7 @@ function removeExtensionFromArray () {
        $ext_name = getCurrentExtensionName();
 
        // Now loop through the whole cache
-       foreach ($GLOBALS['cache_array']['extension'] as $cacheName=>$cacheArray) {
+       foreach ($GLOBALS['cache_array']['extension'] as $cacheName => $cacheArray) {
                // Is it an element?
                if (isset($cacheArray[$ext_name])) {
                        // Array element
index 1033083..8970f8e 100644 (file)
@@ -343,7 +343,7 @@ function FILTER_REMOVE_UPDATES ($data) {
        // Do we need to remove update depency?
        if (countExtensionUpdateDependencies() > 0) {
                // Then find all updates we shall no longer execute
-               foreach (getExtensionUpdateDependencies() as $id=>$ext_name) {
+               foreach (getExtensionUpdateDependencies() as $id => $ext_name) {
                        // Shall we remove this update?
                        if (in_array($ext_name, getExtensionRemovalList())) {
                                // Then remove this extension!
@@ -856,7 +856,7 @@ function FILTER_FLUSH_TEMPLATE_CACHE () {
        // Do we have cached eval() data?
        if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) {
                // Now flush all
-               foreach ($GLOBALS['template_eval'] as $template=>$eval) {
+               foreach ($GLOBALS['template_eval'] as $template => $eval) {
                        // Flush the cache (if not yet found)
                        flushTemplateCache($template, $eval);
                } // END - if
index f3aecaf..d077a3c 100644 (file)
@@ -2488,7 +2488,7 @@ function getActualVersion ($type = 'Revision') {
                                        $new = true;
                                } else {
                                        // Generate fake cache entry
-                                       foreach ($mapper as $map=>$idx) {
+                                       foreach ($mapper as $map => $idx) {
                                                $GLOBALS['cache_array']['revision'][$map][0] = $ins_vers[$idx];
                                        } // END - foreach
 
index 6c186ea..6430ed3 100644 (file)
@@ -173,7 +173,7 @@ function doAdminNetworkProcessHandlenetworkForm () {
        if (countPostSelection() > 0) {
                // Something has been selected, so start displaying one by one
                $SW = 2; $OUT = '';
-               foreach (postRequestElement('sel') as $id=>$sel) {
+               foreach (postRequestElement('sel') as $id => $sel) {
                        // Is this selected?
                        if ($sel == 1) {
                                // Load this network's data
@@ -193,18 +193,20 @@ function doAdminNetworkProcessHandlenetworkForm () {
                                                        $networkData['network_request_type']
                                                );
 
-                                               // Add row template and switch color
+                                               // Add row template for editing
                                                $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData);
                                        } elseif (isPostRequestElementSet('del')) {
                                                // Translate the request type
                                                $networkData['network_request_type'] = getMessage('ADMIN_NETWORK_REQUEST_TYPE_' . $networkData['network_request_type']);
 
-                                               // Add row template and switch color
+                                               // Add row template for deleting
                                                $OUT .= loadTemplate('admin_del_networks_row', true, $networkData);
                                        } else {
                                                // Problem!
                                                debug_report_bug('Cannot detect edit/del.');
                                        }
+
+                                       // Switch colors
                                        $SW = 3 - $SW;
                                } // END - if
                        } // END - if
@@ -246,7 +248,7 @@ function doAdminNetworkProcessChangenetworkForm () {
                                $networkData = array();
 
                                // Transfer whole array, except 'sel'
-                               foreach (postRequestArray() as $key=>$entry) {
+                               foreach (postRequestArray() as $key => $entry) {
                                        // Skip 'sel' and submit button
                                        if (in_array($key, array('sel', 'change'))) continue;
 
index 4e2339b..fc7d134 100644 (file)
@@ -55,9 +55,9 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_ins
                if (count($GLOBALS['cache_array']['admin']['login']) == count($GLOBALS['cache_array']['admin']['admin_id'])) {
                        // Rewrite the cache
                        $admins = array();
-                       foreach ($GLOBALS['cache_array']['admin']['login'] as $idx=>$admin) {
+                       foreach ($GLOBALS['cache_array']['admin']['login'] as $idx => $admin) {
                                // Rewrite all entries
-                               foreach ($GLOBALS['cache_array']['admin'] as $key=>$entry) {
+                               foreach ($GLOBALS['cache_array']['admin'] as $key => $entry) {
                                        // Do we have login or regular entries?
                                        if ($key == 'login') {
                                                // Login, so use id
index f22bc63..e38e611 100644 (file)
@@ -162,7 +162,7 @@ function writeStatsTable () {
                date('Ymd', time()));
 
        // Add all entries to the final query
-       foreach ($GLOBALS['stats'] as $entry=>$value) {
+       foreach ($GLOBALS['stats'] as $entry => $value) {
                $sql .= sprintf("('%s', %s),", $entry, bigintval($value));
        } // END - foreach
 
index c8a8c9d..2249305 100644 (file)
@@ -105,13 +105,13 @@ SURFBAR_INIT();
 SURFBAR_HANDLE_SELF_MAINTENANCE();
 
 // Is there a check value?
-if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_array(getRequestElement('frame'), array('stop', 'stop', 'stats', 'textlinks'))))) {
+if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_array(getRequestElement('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
        // Reload-lock is full, surfbar stopped so...
        // Load header
        loadIncludeOnce('inc/header.php');
 
        // Load template
-       if (((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stop')) || (!isGetRequestElementSet('frame'))) {
+       if (((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stop2')) || (!isGetRequestElementSet('frame'))) {
                // Load template for "start" page
                loadTemplate('surfbar_frame_start');
 
@@ -150,7 +150,6 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_a
        } else {
                // Prepare content
                $content = array(
-                       'restart'   => getConfig('surfbar_restart_time'),
                        'start'     => str_repeat('X', strlen(getConfig('surfbar_restart_time'))),
                        'autostart' => (getConfig('surfbar_autostart') == 'Y') ? 'true' : 'false'
                );
index 1ad55aa..398edf4 100644 (file)
@@ -11,5 +11,5 @@
        </div>
 </div>
 
-<script src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&amp;restart=$content[restart]&amp;autostart=$content[autostart]"
+<script src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&amp;restart={?surfbar_restart_time?}&amp;autostart=$content[autostart]"
  type="text/javascript"></script>