]> git.mxchange.org Git - mailer.git/commitdiff
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 f06f15b5f821b4372d7eb25543bb90833b335bbe..e1ccca57d11507a857823d0397eb97f0cadd86bb 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 1033083dabfb021f07a19c9d7490055c69e461e4..8970f8ea32a71dcd71a9f1ce51849a45709502db 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 f3aecaf590d36c57dfcff8b47fa7414902622cfe..d077a3c7a875919cf5f86af638de2b3b28272b8e 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 6c186eac852e989ddb905d84b9fe7dfc797a6d26..6430ed3f4becb4d9acdb8c55b9c6a854c47cc5d3 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 4e2339b7205e0a27345ea5f3014204746ebcc7a6..fc7d134b718a955f20454c7240eda10e94366f4d 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 f22bc6300e373dc1b0c7087c065903fbecd6eb29..e38e6114b7414ca749adc51428de4cfe25cea69c 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 c8a8c9d00d56be3de44763f5a6770a4581f46060..2249305aaae7ee7fc02f2e0c83d7768b226f80a4 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 1ad55aa9370bf7f7843d6ed2803b4f78f916775f..398edf46196c7822934bf2c7328d7edb11c158a0 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>