From a0f8e1323a0fb50e6a4b7449f93b493377eddd2c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 17 Apr 2006 13:09:50 +0000 Subject: - clean up marklist calls (global function) - added new feature: test out others permissions (admin permissions will not be copied) - changed attachment processing by directly using the template engine - fixed some attachment related bugs - additional tiny fixes git-svn-id: file:///svn/phpbb/trunk@5790 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 38e9448ecb..5ca15e493d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -147,23 +147,6 @@ function unique_id($extra = 0, $prefix = false) return uniqid(($prefix === false) ? mt_rand() : $prefix, true); } -/** -* Get userdata -* @param mixed $user user id or username -*/ -function get_userdata($user) -{ - global $db; - - $sql = 'SELECT * - FROM ' . USERS_TABLE . ' - WHERE '; - $sql .= ((is_integer($user)) ? "user_id = $user" : "username = '" . $db->sql_escape($user) . "'") . " AND user_id <> " . ANONYMOUS; - $result = $db->sql_query($sql); - - return ($row = $db->sql_fetchrow($result)) ? $row : false; -} - /** * Generate sort selection fields */ @@ -1654,10 +1637,11 @@ function decode_message(&$message, $bbcode_uid = '') '#.*?#', '#.*?#', '# "{$phpbb_root_path}ucp.$phpEx$SID&mode=delete_cookies", 'U_TEAM' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=leaders", + 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=restore_perm" : '', 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false, 'S_REGISTERED_USER' => $user->data['is_registered'], -- cgit v1.2.1