$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
// 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!
// 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
$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
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
$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
$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;
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
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
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');
} 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'
);
</div>
</div>
-<script src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&restart=$content[restart]&autostart=$content[autostart]"
+<script src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&restart={?surfbar_restart_time?}&autostart=$content[autostart]"
type="text/javascript"></script>