From c4be539d249046d6d64d2181c3a1e898fe9a64f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 31 May 2016 10:27:58 +0200 Subject: [PATCH] Continued a bit: - renamed templates as shortening is not wanted here - renamed variable (was all upper-case) - fixed tpzo ... --- inc/language/de.php | 2 +- inc/modules/admin/what-list_cats.php | 31 ++++++++++--------- ...min_add_cat.tpl => admin_add_category.tpl} | 0 ...e_cats.tpl => admin_delete_categories.tpl} | 0 ...ow.tpl => admin_delete_categories_row.tpl} | 0 ...dit_cats.tpl => admin_edit_categories.tpl} | 0 ..._row.tpl => admin_edit_categories_row.tpl} | 0 ...ist_cats.tpl => admin_list_categories.tpl} | 0 ..._row.tpl => admin_list_categories_row.tpl} | 0 9 files changed, 17 insertions(+), 16 deletions(-) rename templates/de/html/admin/{admin_add_cat.tpl => admin_add_category.tpl} (100%) rename templates/de/html/admin/{admin_delete_cats.tpl => admin_delete_categories.tpl} (100%) rename templates/de/html/admin/{admin_delete_cats_row.tpl => admin_delete_categories_row.tpl} (100%) rename templates/de/html/admin/{admin_edit_cats.tpl => admin_edit_categories.tpl} (100%) rename templates/de/html/admin/{admin_edit_cats_row.tpl => admin_edit_categories_row.tpl} (100%) rename templates/de/html/admin/{admin_list_cats.tpl => admin_list_categories.tpl} (100%) rename templates/de/html/admin/{admin_list_cats_row.tpl => admin_list_categories_row.tpl} (100%) diff --git a/inc/language/de.php b/inc/language/de.php index 47bc860585..4a0ad9c8ce 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1017,7 +1017,7 @@ addMessages(array( 'ADMIN_CONFIG_SECURE_TITLE' => "Sicherheitseinstellungen:", 'ADMIN_CONFIG_MINIMUM_PASSWORD_LENGTH_LEGEND' => "Minimale Passwort/Saltlängen:", 'ADMIN_CONFIG_MINIMUM_PASSWORD_LENGTH' => "Minimale Passwortlänge:", - 'ADMIN_CONFIG_SALT_LENGTH' => "Länge des "Salz-Hhashes" für alle Passwörter:", + 'ADMIN_CONFIG_SALT_LENGTH' => "Länge des "Salz-Hashes" für alle Passwörter:", 'ADMIN_CONFIG_MINIMUM_PASSWORD_SCORE' => "Minimale Sicherheitsstufe aller Passwörter:", 'ADMIN_CONFIG_SECURE_NOTICE' => "Um für alle Accounts (Mitglieder/Admins derzeit) neue Passwörter zu generieren, lassen Sie das Eingabefeld {--ADMIN_CONFIG_SALT_LENGTH--} leer oder geben Sie eine 0 ein! Vorsicht! Sie müssen sich dann anschliessend erneut einloggen. Sie sollten die minimale Passwortstärke nie unter {--PASSWORD_SCORE_3--} stellen, da diese dann zu schach und somit leicht "erratbar" sind (Brute-Force-Attacke).", diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index de20d59bf1..9c170d0f5c 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -44,9 +44,6 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -// Init variable to avoid a notice -$CATS = ''; - if (isFormSent('add')) { // Default message $content = '{--CATEGORY_ALREADY_EXISTS--}'; @@ -117,11 +114,11 @@ if (isFormSent('add')) { $OUT = ''; foreach (postRequestElement('sel') as $id => $value) { // Load row template and switch colors - $OUT .= loadTemplate('admin_delete_cats_row', TRUE, $id); + $OUT .= loadTemplate('admin_delete_categories_row', TRUE, $id); } // END - foreach // Load main template - loadTemplate('admin_delete_cats', FALSE, $OUT); + loadTemplate('admin_delete_categories', FALSE, $OUT); } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit categories $OUT = ''; @@ -138,14 +135,14 @@ if (isFormSent('add')) { $content['visible_selection'] = addSelectionBox('yn', $content['visible'], 'visible', $content['id']); // Load row template and switch colors - $OUT .= loadTemplate('admin_edit_cats_row', TRUE, $content); + $OUT .= loadTemplate('admin_edit_categories_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_edit_cats', FALSE, $OUT); + loadTemplate('admin_edit_categories', FALSE, $OUT); } else { // Init variable here - $CATS = ''; + $categoryOptions = ''; // Load all categories $result = sqlQuery("SELECT @@ -164,26 +161,30 @@ ORDER BY // List already existing categories for editing while ($content = sqlFetchArray($result)) { - // Put cat descriptions into variable for the selection box - if (strlen($content['cat']) > 40) $content['cat'] = substr($content['cat'], 0, 37) . '...'; - $CATS .= ''; + // Is the category's name to long? + if (strlen($content['cat']) > 40) { + // Put cat descriptions into variable for the selection box + $content['cat'] = substr($content['cat'], 0, 37) . '...'; + } // END - if + + $categoryOptions .= ''; // Load row template and switch color - $OUT .= loadTemplate('admin_list_cats_row', TRUE, $content); + $OUT .= loadTemplate('admin_list_categories_row', TRUE, $content); } // END - while // Free memory sqlFreeResult($result); // Load main template - loadTemplate('admin_list_cats', FALSE, $OUT); + loadTemplate('admin_list_categories', FALSE, $OUT); } // END - if // Remember in array - $content['cats'] = $CATS; + $content['cats'] = $categoryOptions; // Form to add a new category - loadTemplate('admin_add_cat', FALSE, $content); + loadTemplate('admin_add_category', FALSE, $content); } // [EOF] diff --git a/templates/de/html/admin/admin_add_cat.tpl b/templates/de/html/admin/admin_add_category.tpl similarity index 100% rename from templates/de/html/admin/admin_add_cat.tpl rename to templates/de/html/admin/admin_add_category.tpl diff --git a/templates/de/html/admin/admin_delete_cats.tpl b/templates/de/html/admin/admin_delete_categories.tpl similarity index 100% rename from templates/de/html/admin/admin_delete_cats.tpl rename to templates/de/html/admin/admin_delete_categories.tpl diff --git a/templates/de/html/admin/admin_delete_cats_row.tpl b/templates/de/html/admin/admin_delete_categories_row.tpl similarity index 100% rename from templates/de/html/admin/admin_delete_cats_row.tpl rename to templates/de/html/admin/admin_delete_categories_row.tpl diff --git a/templates/de/html/admin/admin_edit_cats.tpl b/templates/de/html/admin/admin_edit_categories.tpl similarity index 100% rename from templates/de/html/admin/admin_edit_cats.tpl rename to templates/de/html/admin/admin_edit_categories.tpl diff --git a/templates/de/html/admin/admin_edit_cats_row.tpl b/templates/de/html/admin/admin_edit_categories_row.tpl similarity index 100% rename from templates/de/html/admin/admin_edit_cats_row.tpl rename to templates/de/html/admin/admin_edit_categories_row.tpl diff --git a/templates/de/html/admin/admin_list_cats.tpl b/templates/de/html/admin/admin_list_categories.tpl similarity index 100% rename from templates/de/html/admin/admin_list_cats.tpl rename to templates/de/html/admin/admin_list_categories.tpl diff --git a/templates/de/html/admin/admin_list_cats_row.tpl b/templates/de/html/admin/admin_list_categories_row.tpl similarity index 100% rename from templates/de/html/admin/admin_list_cats_row.tpl rename to templates/de/html/admin/admin_list_categories_row.tpl -- 2.39.5