From: Roland Häder Date: Tue, 10 Nov 2009 00:31:36 +0000 (+0000) Subject: Some code 'beatuified', config in templates surfbar_stopped.tpl X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=d52beaaad0b8388fec7f9f3cece88ef98a833751 Some code 'beatuified', config in templates surfbar_stopped.tpl --- diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index f06f15b5f8..e1ccca57d1 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -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 diff --git a/inc/filters.php b/inc/filters.php index 1033083dab..8970f8ea32 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -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 diff --git a/inc/functions.php b/inc/functions.php index f3aecaf590..d077a3c7a8 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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 diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 6c186eac85..6430ed3f4b 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -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; diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index 4e2339b720..fc7d134b71 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -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 diff --git a/inc/stats-functions.php b/inc/stats-functions.php index f22bc6300e..e38e6114b7 100644 --- a/inc/stats-functions.php +++ b/inc/stats-functions.php @@ -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 diff --git a/surfbar.php b/surfbar.php index c8a8c9d00d..2249305aaa 100644 --- a/surfbar.php +++ b/surfbar.php @@ -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' ); diff --git a/templates/de/html/surfbar/surfbar_stopped.tpl b/templates/de/html/surfbar/surfbar_stopped.tpl index 1ad55aa937..398edf4619 100644 --- a/templates/de/html/surfbar/surfbar_stopped.tpl +++ b/templates/de/html/surfbar/surfbar_stopped.tpl @@ -11,5 +11,5 @@ -