aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-10-01 17:24:53 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-10-01 17:24:53 +0000
commit860dc47114dc71ea108465d2fd882d25714bbfa4 (patch)
tree91e63d2bd0c792a7c3cfda1552466c8df502a74f /phpBB/includes/functions_user.php
parent64177fa87e905cf11ad3ab91469dd99f5399cf2f (diff)
downloadforums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar
forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.gz
forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.bz2
forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.xz
forums-860dc47114dc71ea108465d2fd882d25714bbfa4.zip
Change in format of module db data, add zebra, many things probably "damaged goods" for now ... don't panic Mr. Mainwaring, don't panic
git-svn-id: file:///svn/phpbb/trunk@4522 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php33
1 files changed, 2 insertions, 31 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index f12bf21627..bf2eb2c4dd 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -14,29 +14,6 @@
//
// User functions
//
-function request_var($var_name, $default)
-{
- if (!isset($_REQUEST[$var_name]))
- {
- return $default;
- }
- else
- {
- $var = $_REQUEST[$var_name];
- $type = gettype($default);
- settype($var, $type);
-
- // Prevent use of &nbsp;, excess spaces or other html entity forms in profile strings,
- // not generally applicable elsewhere
- if ($type == 'string')
- {
- $var = trim(stripslashes(preg_replace(array("#[ \xFF]{2,}#s", "#[\r\n]{2,}#s"), array(' ', "\n"), strtr($var, array_flip(get_html_translation_table(HTML_ENTITIES))))));
- }
-
- return $var;
- }
-}
-
function validate_data($data, $val_ary)
{
$error = array();
@@ -460,14 +437,7 @@ function add_to_group($action, $group_id, $user_id_ary, $username_ary, $colour,
$user_id_ary = array($user_id_ary);
}
- $sql_in = array();
- foreach ($$which_ary as $v)
- {
- if ($v = trim($v))
- {
- $sql_in[] = ($which_ary == 'user_id_ary') ? $v : "'$v'";
- }
- }
+ $sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : preg_replace('#^[\s]*?(.*?)[\s]*?$#e', "\"'\" . \$db->sql_escape('\\1') . \"'\"", $$which_ary);
unset($$which_ary);
// Grab the user id/username records
@@ -539,6 +509,7 @@ function add_to_group($action, $group_id, $user_id_ary, $username_ary, $colour,
break;
case 'mssql':
+ case 'mssql-odbc':
case 'sqlite':
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . " (user_id, group_id, group_leader)
" . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', "(\\1, $group_id, $group_leader)", $add_id_ary));