aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-05-01 13:15:49 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-05-01 13:15:49 +0000
commit16e50db4baf39877fe3e02a13dfc57983b12f414 (patch)
treed0056ef4cc56c15ed361d39dea5093fb30cd1989 /phpBB/includes/functions_user.php
parentbe3bdf61d778928916942c07c6d60968fddf9d18 (diff)
downloadforums-16e50db4baf39877fe3e02a13dfc57983b12f414.tar
forums-16e50db4baf39877fe3e02a13dfc57983b12f414.tar.gz
forums-16e50db4baf39877fe3e02a13dfc57983b12f414.tar.bz2
forums-16e50db4baf39877fe3e02a13dfc57983b12f414.tar.xz
forums-16e50db4baf39877fe3e02a13dfc57983b12f414.zip
- some private message fixes
git-svn-id: file:///svn/phpbb/trunk@5139 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 413814f958..c2146d2e5a 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1077,7 +1077,7 @@ function group_create($group_id, $type, $name, $desc)
'group_type' => (int) $type,
);
- $attribute_ary = array('group_colour' => 'string', 'group_rank' => 'int', 'group_avatar' => 'string', 'group_avatar_type' => 'int', 'group_avatar_width' => 'int', 'group_avatar_height' => 'int', 'group_receive_pm' => 'int', 'group_message_limit' => 'int');
+ $attribute_ary = array('group_colour' => 'string', 'group_rank' => 'int', 'group_avatar' => 'string', 'group_avatar_type' => 'int', 'group_avatar_width' => 'int', 'group_avatar_height' => 'int');
$i = 4;
foreach ($attribute_ary as $attribute => $type)
@@ -1091,6 +1091,19 @@ function group_create($group_id, $type, $name, $desc)
$i++;
}
+ $group_only_ary = array('group_receive_pm' => 'int', 'group_message_limit' => 'int');
+
+ foreach ($group_only_ary as $attribute => $type)
+ {
+ if (func_num_args() > $i && ($value = func_get_arg($i)) !== false)
+ {
+ settype($value, $type);
+
+ $sql_ary[$attribute] = $value;
+ }
+ $i++;
+ }
+
$sql = ($group_id) ? 'UPDATE ' . GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE group_id = $group_id" : 'INSERT INTO ' . GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);