} // END - if
// List all menu points and make them editable
-if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) {
+if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Edit menu entries
// @TODO Kill all constants in this file
$content['sub'] = $SUB;
// Load template
loadTemplate('admin_amenu_edit_form', false, $content);
-} elseif ((isFormSent('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) {
+} elseif ((isFormSent('del')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Prepare misc content
$content['sub'] = $SUB;
$content['chk'] = countPostSelection();
$content['sub'] = $SUB;
// Init variables
- $OUT = ''; $SW = 2; $cnt = '0';
+ $OUT = ''; $cnt = '0';
// Process all entries
while ($data = SQL_FETCHARRAY($result)) {
$data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>/<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
}
- // Fix empty elements for constant (fixes display bugs in Firefox)
- if (empty($data['action'])) $data['action'] = ' ';
- if (empty($data['what'])) $data['what'] = ' ';
- if (empty($data['title'])) $data['title'] = ' ';
-
// Add more data to $data
- $data['sw'] = $SW;
$data['mode'] = 'admin';
// Load row template and switch colors
$OUT .= loadTemplate('admin_menu_overview_row', true, $data);
- $SW = 3 - $SW;
} // END - switch
// Remember all rows