Continued a bit:
authorRoland Häder <roland@mxchange.org>
Tue, 31 May 2016 08:27:58 +0000 (10:27 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 31 May 2016 08:44:59 +0000 (10:44 +0200)
- renamed templates as shortening is not wanted here
- renamed variable (was all upper-case)
- fixed tpzo ...

16 files changed:
inc/language/de.php
inc/modules/admin/what-list_cats.php
templates/de/html/admin/admin_add_cat.tpl [deleted file]
templates/de/html/admin/admin_add_category.tpl [new file with mode: 0644]
templates/de/html/admin/admin_delete_categories.tpl [new file with mode: 0644]
templates/de/html/admin/admin_delete_categories_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_delete_cats.tpl [deleted file]
templates/de/html/admin/admin_delete_cats_row.tpl [deleted file]
templates/de/html/admin/admin_edit_categories.tpl [new file with mode: 0644]
templates/de/html/admin/admin_edit_categories_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_edit_cats.tpl [deleted file]
templates/de/html/admin/admin_edit_cats_row.tpl [deleted file]
templates/de/html/admin/admin_list_categories.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_categories_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_cats.tpl [deleted file]
templates/de/html/admin/admin_list_cats_row.tpl [deleted file]

index 47bc860..4a0ad9c 100644 (file)
@@ -1017,7 +1017,7 @@ addMessages(array(
        'ADMIN_CONFIG_SECURE_TITLE' => "Sicherheitseinstellungen:",
        'ADMIN_CONFIG_MINIMUM_PASSWORD_LENGTH_LEGEND' => "Minimale Passwort/Saltl&auml;ngen:",
        'ADMIN_CONFIG_MINIMUM_PASSWORD_LENGTH' => "Minimale Passwortl&auml;nge:",
-       'ADMIN_CONFIG_SALT_LENGTH' => "L&auml;nge des &quot;Salz-Hhashes&quot; f&uuml;r alle Passw&ouml;rter:",
+       'ADMIN_CONFIG_SALT_LENGTH' => "L&auml;nge des &quot;Salz-Hashes&quot; f&uuml;r alle Passw&ouml;rter:",
        'ADMIN_CONFIG_MINIMUM_PASSWORD_SCORE' => "Minimale Sicherheitsstufe aller Passw&ouml;rter:",
        'ADMIN_CONFIG_SECURE_NOTICE' => "Um f&uuml;r alle Accounts (Mitglieder/Admins derzeit) neue Passw&ouml;rter zu generieren, lassen Sie das Eingabefeld <strong>{--ADMIN_CONFIG_SALT_LENGTH--}</strong> leer oder geben Sie eine <strong>0</strong> ein! <strong>Vorsicht!</strong> Sie m&uuml;ssen sich dann anschliessend erneut einloggen. Sie sollten die minimale Passwortst&auml;rke <u>nie</u> unter {--PASSWORD_SCORE_3--} stellen, da diese dann zu schach und somit leicht &quot;erratbar&quot; sind (Brute-Force-Attacke).",
 
index de20d59..9c170d0 100644 (file)
@@ -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 = '<span class="bad">{--CATEGORY_ALREADY_EXISTS--}</span>';
@@ -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 .= '<option value="' . $content['sort'] . '">' . $content['cat'] . '</option>';
+                       // 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 .= '<option value="' . $content['sort'] . '">' . $content['cat'] . '</option>';
 
                        // 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_cat.tpl
deleted file mode 100644 (file)
index 3851f93..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<div align="center">
-{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats%}
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td class="table_header bottom" align="center" colspan="2">
-                       <strong>{--ADMIN_ADD_NEW_CATEGORY_TITLE--}</strong>
-               </td>
-       </tr>
-
-       <tr>
-               <td align="right">
-                       {--ADMIN_ENTER_CATEGORY_NAME--}:
-               </td>
-               <td>
-                       <input type="text" class="form_field" name="catname" size="30" maxlength="255" />
-               </td>
-       </tr>
-
-       <tr>
-               <td align="right">
-                       {--ADMIN_SELECT_PARENT_CATEGORY--}
-               </td>
-               <td>
-                       <select name="parent" size="1" class="form_select">
-                               $content[cats]
-                               <option value="-1">{--IS_TOP_CATEGORY--}</option>
-                       </select>
-               </td>
-       </tr>
-
-       <tr>
-               <td class="bottom" align="right">
-                       {--ADMIN_CATEGORY_IS_VISIBLE--}
-               </td>
-               <td class="bottom">
-                       <input type="radio" class="form_field" name="visible" value="Y" checked="checked" /> {--YES--}<br />
-                       <input type="radio" class="form_field" name="visible" value="N" /> {--NO--}
-               </td>
-       </tr>
-
-       <tr>
-               <td class="table_footer" colspan="2">
-                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-                       <input type="submit" class="form_submit" name="add" value="{--ADMIN_ADD_NEW_CATEGORY--}" />
-               </td>
-       </tr>
-</table>
-{%form_close%}
-</div>
diff --git a/templates/de/html/admin/admin_add_category.tpl b/templates/de/html/admin/admin_add_category.tpl
new file mode 100644 (file)
index 0000000..3851f93
--- /dev/null
@@ -0,0 +1,49 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats%}
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td class="table_header bottom" align="center" colspan="2">
+                       <strong>{--ADMIN_ADD_NEW_CATEGORY_TITLE--}</strong>
+               </td>
+       </tr>
+
+       <tr>
+               <td align="right">
+                       {--ADMIN_ENTER_CATEGORY_NAME--}:
+               </td>
+               <td>
+                       <input type="text" class="form_field" name="catname" size="30" maxlength="255" />
+               </td>
+       </tr>
+
+       <tr>
+               <td align="right">
+                       {--ADMIN_SELECT_PARENT_CATEGORY--}
+               </td>
+               <td>
+                       <select name="parent" size="1" class="form_select">
+                               $content[cats]
+                               <option value="-1">{--IS_TOP_CATEGORY--}</option>
+                       </select>
+               </td>
+       </tr>
+
+       <tr>
+               <td class="bottom" align="right">
+                       {--ADMIN_CATEGORY_IS_VISIBLE--}
+               </td>
+               <td class="bottom">
+                       <input type="radio" class="form_field" name="visible" value="Y" checked="checked" /> {--YES--}<br />
+                       <input type="radio" class="form_field" name="visible" value="N" /> {--NO--}
+               </td>
+       </tr>
+
+       <tr>
+               <td class="table_footer" colspan="2">
+                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" class="form_submit" name="add" value="{--ADMIN_ADD_NEW_CATEGORY--}" />
+               </td>
+       </tr>
+</table>
+{%form_close%}
+</div>
diff --git a/templates/de/html/admin/admin_delete_categories.tpl b/templates/de/html/admin/admin_delete_categories.tpl
new file mode 100644 (file)
index 0000000..6dbe0f1
--- /dev/null
@@ -0,0 +1,17 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats&amp;do=del%}
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td align="center" class="table_header bottom">
+                       <strong>{--ADMIN_DELETE_CATEGORIES_TITLE--}:</strong>
+               </td>
+       </tr>
+       $content
+       <tr>
+               <td align="center" class="table_footer">
+                       <input type="submit" name="ok" class="form_delete" value="{--ADMIN_REMOVE_CATEGORIES--}" />
+               </td>
+       </tr>
+</table>
+{%form_close%}
+</div>
diff --git a/templates/de/html/admin/admin_delete_categories_row.tpl b/templates/de/html/admin/admin_delete_categories_row.tpl
new file mode 100644 (file)
index 0000000..a34fe8f
--- /dev/null
@@ -0,0 +1,11 @@
+<tr>
+       <td align="center" class="{%template,ColorSwitch%}">
+               <strong>{--ADMIN_CATEGORY_ID--} $content:</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom">
+               {%pipe,getCategory=$content%}
+               <input type="hidden" name="id[$content]" value="1" />
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_delete_cats.tpl b/templates/de/html/admin/admin_delete_cats.tpl
deleted file mode 100644 (file)
index 6dbe0f1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<div align="center">
-{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats&amp;do=del%}
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td align="center" class="table_header bottom">
-                       <strong>{--ADMIN_DELETE_CATEGORIES_TITLE--}:</strong>
-               </td>
-       </tr>
-       $content
-       <tr>
-               <td align="center" class="table_footer">
-                       <input type="submit" name="ok" class="form_delete" value="{--ADMIN_REMOVE_CATEGORIES--}" />
-               </td>
-       </tr>
-</table>
-{%form_close%}
-</div>
diff --git a/templates/de/html/admin/admin_delete_cats_row.tpl b/templates/de/html/admin/admin_delete_cats_row.tpl
deleted file mode 100644 (file)
index a34fe8f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<tr>
-       <td align="center" class="{%template,ColorSwitch%}">
-               <strong>{--ADMIN_CATEGORY_ID--} $content:</strong>
-       </td>
-</tr>
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} bottom">
-               {%pipe,getCategory=$content%}
-               <input type="hidden" name="id[$content]" value="1" />
-       </td>
-</tr>
diff --git a/templates/de/html/admin/admin_edit_categories.tpl b/templates/de/html/admin/admin_edit_categories.tpl
new file mode 100644 (file)
index 0000000..1ec7f76
--- /dev/null
@@ -0,0 +1,18 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats&amp;do=edit%}
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td align="center" colspan="2" class="table_header bottom">
+               <strong>{--ADMIN_EDIT_CATEGORIES_TITLE--}:</strong>
+       </td>
+</tr>
+$content
+<tr>
+       <td align="center" colspan="2" class="table_footer">
+               <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" class="form_submit" name="ok" value="{--ADMIN_CHANGE_CATEGORIES--}" />
+       </td>
+</tr>
+</table>
+{%form_close%}
+</div>
diff --git a/templates/de/html/admin/admin_edit_categories_row.tpl b/templates/de/html/admin/admin_edit_categories_row.tpl
new file mode 100644 (file)
index 0000000..f813ecd
--- /dev/null
@@ -0,0 +1,21 @@
+<tr>
+       <td colspan="2" align="left" class="table_header bottom">
+               <strong>{--ADMIN_CATEGORY_ID--} $content[id]:</strong>
+       </td>
+</tr>
+<tr>
+       <td align="right" class="{%template,ColorSwitch%}">{--ADMIN_CATEGORY_DESCRIPTION--}:&nbsp;</td>
+       <td class="{%template,ColorSwitch%}">
+               <input type="text" class="form_field" name="id[$content[id]]" value="{%pipe,getCategory=$content[id]%}" size="32" maxlength="255" />
+       </td>
+</tr>
+<tr>
+       <td class="{%template,ColorSwitch%}" align="right">{--ADMIN_CATEGORY_IS_VISIBLE--}&nbsp;</td>
+       <td class="{%template,ColorSwitch%}">$content[visible_selection]</td>
+</tr>
+<tr>
+       <td class="{%template,ColorSwitch%} bottom" align="right">{--ADMIN_ENTER_SORT_KEY--}:&nbsp;</td>
+       <td class="{%template,ColorSwitch%} bottom">
+               <input type="text" class="form_field" name="sort[$content[id]]" value="$content[sort]" size="3" maxlength="10" />
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_edit_cats.tpl b/templates/de/html/admin/admin_edit_cats.tpl
deleted file mode 100644 (file)
index 1ec7f76..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<div align="center">
-{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats&amp;do=edit%}
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-<tr>
-       <td align="center" colspan="2" class="table_header bottom">
-               <strong>{--ADMIN_EDIT_CATEGORIES_TITLE--}:</strong>
-       </td>
-</tr>
-$content
-<tr>
-       <td align="center" colspan="2" class="table_footer">
-               <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-               <input type="submit" class="form_submit" name="ok" value="{--ADMIN_CHANGE_CATEGORIES--}" />
-       </td>
-</tr>
-</table>
-{%form_close%}
-</div>
diff --git a/templates/de/html/admin/admin_edit_cats_row.tpl b/templates/de/html/admin/admin_edit_cats_row.tpl
deleted file mode 100644 (file)
index f813ecd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<tr>
-       <td colspan="2" align="left" class="table_header bottom">
-               <strong>{--ADMIN_CATEGORY_ID--} $content[id]:</strong>
-       </td>
-</tr>
-<tr>
-       <td align="right" class="{%template,ColorSwitch%}">{--ADMIN_CATEGORY_DESCRIPTION--}:&nbsp;</td>
-       <td class="{%template,ColorSwitch%}">
-               <input type="text" class="form_field" name="id[$content[id]]" value="{%pipe,getCategory=$content[id]%}" size="32" maxlength="255" />
-       </td>
-</tr>
-<tr>
-       <td class="{%template,ColorSwitch%}" align="right">{--ADMIN_CATEGORY_IS_VISIBLE--}&nbsp;</td>
-       <td class="{%template,ColorSwitch%}">$content[visible_selection]</td>
-</tr>
-<tr>
-       <td class="{%template,ColorSwitch%} bottom" align="right">{--ADMIN_ENTER_SORT_KEY--}:&nbsp;</td>
-       <td class="{%template,ColorSwitch%} bottom">
-               <input type="text" class="form_field" name="sort[$content[id]]" value="$content[sort]" size="3" maxlength="10" />
-       </td>
-</tr>
diff --git a/templates/de/html/admin/admin_list_categories.tpl b/templates/de/html/admin/admin_list_categories.tpl
new file mode 100644 (file)
index 0000000..37b1a49
--- /dev/null
@@ -0,0 +1,28 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats%}
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td align="center" colspan="4" class="table_header bottom">
+               <strong>{--ADMIN_CONFIG_CATEGORIES_TITLE--}</strong>
+       </td>
+</tr>
+
+<tr>
+       <td class="header_column bottom right" align="center" width="30"><strong>{--ID_SELECT--}</strong></td>
+       <td class="header_column bottom right" align="center"><strong>{--CATEGORY_NAME--}</strong></td>
+       <td class="header_column bottom right" align="center"><strong>{--ADMIN_IS_VISIBLE--}</strong></td>
+       <td class="header_column bottom" align="center"><strong>{--SORTING_KEY--}</strong></td>
+</tr>
+
+$content
+
+<tr>
+       <td class="table_footer" colspan="4">
+               <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
+               <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CATEGORIES--}" />
+               <input type="submit" class="form_delete" name="delete" value="{--ADMIN_DELETE_CATEGORIES--}" />
+       </td>
+</tr>
+</table>
+{%form_close%}
+</div>
diff --git a/templates/de/html/admin/admin_list_categories_row.tpl b/templates/de/html/admin/admin_list_categories_row.tpl
new file mode 100644 (file)
index 0000000..8f17ff1
--- /dev/null
@@ -0,0 +1,14 @@
+<tr>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               <input type="checkbox" class="form_field" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" />
+       </td>
+       <td class="bottom right {%template,ColorSwitch%}">
+               {%pipe,getCategory=$content[id]%}
+       </td>
+       <td align="center" class="bottom right {%template,ColorSwitch%}">
+               {%pipe,translateYesNo=$content[visible]%}
+       </td>
+       <td align="center" class="bottom {%template,ColorSwitch%}">
+               $content[sort]
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_list_cats.tpl b/templates/de/html/admin/admin_list_cats.tpl
deleted file mode 100644 (file)
index 37b1a49..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<div align="center">
-{%form,formMethodPost=modules.php?module=admin&amp;what=list_cats%}
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-<tr>
-       <td align="center" colspan="4" class="table_header bottom">
-               <strong>{--ADMIN_CONFIG_CATEGORIES_TITLE--}</strong>
-       </td>
-</tr>
-
-<tr>
-       <td class="header_column bottom right" align="center" width="30"><strong>{--ID_SELECT--}</strong></td>
-       <td class="header_column bottom right" align="center"><strong>{--CATEGORY_NAME--}</strong></td>
-       <td class="header_column bottom right" align="center"><strong>{--ADMIN_IS_VISIBLE--}</strong></td>
-       <td class="header_column bottom" align="center"><strong>{--SORTING_KEY--}</strong></td>
-</tr>
-
-$content
-
-<tr>
-       <td class="table_footer" colspan="4">
-               <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
-               <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CATEGORIES--}" />
-               <input type="submit" class="form_delete" name="delete" value="{--ADMIN_DELETE_CATEGORIES--}" />
-       </td>
-</tr>
-</table>
-{%form_close%}
-</div>
diff --git a/templates/de/html/admin/admin_list_cats_row.tpl b/templates/de/html/admin/admin_list_cats_row.tpl
deleted file mode 100644 (file)
index 8f17ff1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<tr>
-       <td align="center" class="bottom right {%template,ColorSwitch%}">
-               <input type="checkbox" class="form_field" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" />
-       </td>
-       <td class="bottom right {%template,ColorSwitch%}">
-               {%pipe,getCategory=$content[id]%}
-       </td>
-       <td align="center" class="bottom right {%template,ColorSwitch%}">
-               {%pipe,translateYesNo=$content[visible]%}
-       </td>
-       <td align="center" class="bottom {%template,ColorSwitch%}">
-               $content[sort]
-       </td>
-</tr>