Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / libs / register_functions.php
index 1d36cd12a4ef0a28ea38fe35c27e3369fb50b7f8..5f82f17270d6a2f6d7502fff95c20887e477a1ab 100644 (file)
@@ -117,7 +117,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
                $SW = 2;
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
                while (list($id, $cat, $visible) = SQL_FETCHROW($result)) {
-                       if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = "";
+                       if (!REQUEST_ISSET_POST(('cat', $id))) REQUEST_POST('cat', $id) = "";
                        // Prepare array for the template
                        $content = array(
                                'sw'    => $SW,
@@ -127,7 +127,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
                                'id'    => $id,
                        );
 
-                       if (($_POST['cat'][$id] == "Y") || ((getConfig('register_default') == "Y") && (empty($_POST['cat'][$id])))) {
+                       if ((REQUEST_POST('cat', $id) == "Y") || ((getConfig('register_default') == "Y") && (!REQUEST_ISSET_POST(('cat', $id))))) {
                                $content['def_y'] = " checked=\"checked\"";
                        } else {
                                $content['def_n'] = " checked=\"checked\"";