Some no more needed variable rewritten
authorRoland Häder <roland@mxchange.org>
Sat, 24 Nov 2012 23:44:18 +0000 (23:44 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 24 Nov 2012 23:44:18 +0000 (23:44 +0000)
inc/modules/admin/what-list_cats.php

index 48069a94b8185ed3801d9f30ce978bbd456e1003..7f687ad36ad23661d5e1fb7689d50056a060f269 100644 (file)
@@ -153,9 +153,8 @@ if (isFormSent('add')) {
                // List already existing categories for editing
                while ($content = SQL_FETCHARRAY($result)) {
                        // Put cat descriptions into variable for the selection box
-                       $cat = $content['cat'];
-                       if (strlen($cat) > 40) $cat = substr($cat, 0, 37) . '...';
-                       $CATS .= '<option value="' . $content['sort'] . '">' . $cat . '</option>';
+                       if (strlen($content['cat']) > 40) $content['cat'] = substr($content['cat'], 0, 37) . '...';
+                       $CATS .= '<option value="' . $content['sort'] . '">' . $content['cat'] . '</option>';
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_list_cats_row', TRUE, $content);