redirectToUrl('modules.php?module=admin&what=extensions&edited=' . countPostSelection());
} else {
// Edit selected entries
- $SW = 2; $OUT = '';
+ $OUT = '';
foreach (postRequestParameter('sel') as $ext_id => $sel) {
// Edit this extension?
if (($sel == 'Y') || ($sel != 'Y')) {
// Prepare data for the row template
$content = array(
- 'sw' => $SW,
'id' => $ext_id,
'name' => getExtensionName($ext_id),
'active' => addSelectionBox('yn', $active, 'active', $ext_id),
// Load row template and switch color
$OUT .= loadTemplate('admin_extensions_edit_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - if
} // END - foreach
// Load template
}
} elseif ((isPostRequestParameterSet('delete')) && (countPostSelection() > 0) && (!isDemoModeActive())) {
// List extensions and when verbose is enabled SQL statements which will be executed
- $OUT = ''; $SW = 2;
+ $OUT = '';
foreach (postRequestParameter('sel') as $ext_id => $sel) {
// Init variables
$VERBOSE_OUT = '';
// Prepare data for the row template
$content = array(
- 'sw' => $SW,
'id' => $ext_id,
'ext_name' => $ext_name,
'ext_ver' => getExtensionVersion($ext_name),
} else {
// Prepare data for the row template
$content = array(
- 'sw' => $SW,
'id' => $ext_id
);
// Not valid!
$OUT .= loadTemplate('admin_extensions_delete_row_404', true, $content);
}
- $SW = 3 - $SW;
} // END - foreach
// Load template
case 'overview': // List all registered extensions
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
// Load extension data with CSS informations
- $result = SQL_QUERY("SELECT `id` AS ext_id, `ext_name`, `ext_active`, `ext_has_css` AS ext_css, `ext_version`
-FROM `{?_MYSQL_PREFIX?}_extensions`
+ $result = SQL_QUERY("SELECT
+ `id` AS ext_id, `ext_name`, `ext_active`, `ext_has_css` AS ext_css, `ext_version`
+FROM
+ `{?_MYSQL_PREFIX?}_extensions`
".$where."
-ORDER BY `ext_name` ASC", __FILE__, __LINE__);
+ORDER BY
+ `ext_name` ASC", __FILE__, __LINE__);
} else {
// Load extension data without CSS informations
- $result = SQL_QUERY("SELECT `id` AS ext_id, `ext_name`, `ext_active`, `id`, `ext_version`
-FROM `{?_MYSQL_PREFIX?}_extensions`
+ $result = SQL_QUERY("SELECT
+ `id` AS ext_id, `ext_name`, `ext_active, `ext_version`
+FROM
+ `{?_MYSQL_PREFIX?}_extensions`
".$where."
-ORDER BY `ext_name` ASC", __FILE__, __LINE__);
+ORDER BY
+ `ext_name` ASC", __FILE__, __LINE__);
}
// Are there some entries?
if (SQL_NUMROWS($result) > 0) {
// Extensions are registered
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Prepare CSS selection output
$cssSelection = '---';
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $cssSelection = translateYesNo($content['ext_css']);
// Prepare data for the row template
- // @TODO Rewrite in template: id->ext_id,name->ext_name,active->ext_active,ver->ext_ver
- $content = array(
- 'sw' => $SW,
- 'id' => $content['ext_id'],
- 'name' => $content['ext_name'],
- 'active' => translateYesNo($content['ext_active']),
- 'act_val' => $content['ext_active'],
- 'css' => $cssSelection,
- 'ver' => $content['ext_version'],
- );
+ $content['ext_css'] = $cssSelection;
// Load row template and switch color
$OUT .= loadTemplate('admin_extensions_row', true, $content);
- $SW = 3 - $SW;
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);