]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/register_functions.php
More references to removed (still some left)
[mailer.git] / inc / libs / register_functions.php
index 042ed73134df4c3254d764034aef68745b2d7ad2..1d36cd12a4ef0a28ea38fe35c27e3369fb50b7f8 100644 (file)
@@ -102,9 +102,7 @@ function REGISTER_OUTPUT_REQUIRE_CHECK(&$array)
        SQL_FREERESULT($result);
 }
 //
-function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
-{
-       global $_POST, $_CONFIG;
+function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
        $OUT = "";
 
        // Guests are mostly not interested in how many members has
@@ -114,13 +112,11 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
        // Admins are allowed to see every category...
        if (IS_ADMIN()) $AND = "";
        $result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // List alle visible modules (or all to the admin)
                $SW = 2;
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
-               while (list($id, $cat, $visible) = SQL_FETCHROW($result))
-               {
+               while (list($id, $cat, $visible) = SQL_FETCHROW($result)) {
                        if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = "";
                        // Prepare array for the template
                        $content = array(
@@ -145,20 +141,15 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
 
                // Free memory
                SQL_FREERESULT($result);
-       }
-        else
-       {
+       } else {
                // No categories setted up so far...
-               $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, NO_CATEGORIES_VISIBLE);
+               $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_CATEGORIES_VISIBLE'));
        }
 
-       if ($return)
-       {
+       if ($return) {
                // Return generated HTML code
                return $OUT;
-       }
-        else
-       {
+       } else {
                // Output directly (default)
                OUTPUT_HTML($OUT);
        }