1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

remove global and change $user-> to phpbb::$user->

git-svn-id: file:///svn/phpbb/trunk@9334 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-02-22 15:29:18 +00:00
parent 7aced345c5
commit 794c574969
107 changed files with 3120 additions and 3644 deletions

View File

@@ -28,11 +28,9 @@ if (!defined('IN_PHPBB'))
*/
function init_apache()
{
global $user;
if (!isset($_SERVER['PHP_AUTH_USER']) || $user->data['username'] !== $_SERVER['PHP_AUTH_USER'])
if (!isset($_SERVER['PHP_AUTH_USER']) || phpbb::$user->data['username'] !== $_SERVER['PHP_AUTH_USER'])
{
return $user->lang['APACHE_SETUP_BEFORE_USE'];
return phpbb::$user->lang['APACHE_SETUP_BEFORE_USE'];
}
return false;
}
@@ -42,8 +40,6 @@ function init_apache()
*/
function login_apache(&$username, &$password)
{
global $db;
// do not allow empty password
if (!$password)
{
@@ -136,8 +132,6 @@ function login_apache(&$username, &$password)
*/
function autologin_apache()
{
global $db;
if (!isset($_SERVER['PHP_AUTH_USER']))
{
return array();
@@ -192,7 +186,6 @@ function autologin_apache()
*/
function user_row_apache($username, $password)
{
global $db, $user;
// first retrieve default group id
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
@@ -214,7 +207,7 @@ function user_row_apache($username, $password)
'user_email' => '',
'group_id' => (int) $row['group_id'],
'user_type' => phpbb::USER_NORMAL,
'user_ip' => $user->ip,
'user_ip' => phpbb::$user->ip,
);
}