1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 09:16:55 +02:00

merging... again

git-svn-id: file:///svn/phpbb/trunk@8452 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-03-18 14:47:43 +00:00
parent c34599126f
commit 02a5032a52
11 changed files with 64 additions and 16 deletions

View File

@@ -947,6 +947,7 @@ class acp_attachments
AND is_orphan = 1';
$result = $db->sql_query($sql);
$files_added = $space_taken = 0;
while ($row = $db->sql_fetchrow($result))
{
$post_row = $post_info[$upload_list[$row['attach_id']]];
@@ -986,9 +987,18 @@ class acp_attachments
WHERE topic_id = ' . $post_row['topic_id'];
$db->sql_query($sql);
$space_taken += $row['filesize'];
$files_added++;
add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
}
$db->sql_freeresult($result);
if ($files_added)
{
set_config('upload_dir_size', $config['upload_dir_size'] + $space_taken, true);
set_config('num_files', $config['num_files'] + $files_added, true);
}
}
}

View File

@@ -48,8 +48,18 @@ function login_apache(&$username, &$password)
if (!$password)
{
return array(
'status' => LOGIN_BREAK,
'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED',
'user_row' => array('user_id' => ANONYMOUS),
);
}
if (!$username)
{
return array(
'status' => LOGIN_ERROR_USERNAME,
'error_msg' => 'LOGIN_ERROR_USERNAME',
'user_row' => array('user_id' => ANONYMOUS),
);
}

View File

@@ -32,8 +32,18 @@ function login_db(&$username, &$password)
if (!$password)
{
return array(
'status' => LOGIN_BREAK,
'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED',
'user_row' => array('user_id' => ANONYMOUS),
);
}
if (!$username)
{
return array(
'status' => LOGIN_ERROR_USERNAME,
'error_msg' => 'LOGIN_ERROR_USERNAME',
'user_row' => array('user_id' => ANONYMOUS),
);
}

View File

@@ -104,8 +104,18 @@ function login_ldap(&$username, &$password)
if (!$password)
{
return array(
'status' => LOGIN_BREAK,
'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED',
'user_row' => array('user_id' => ANONYMOUS),
);
}
if (!$username)
{
return array(
'status' => LOGIN_ERROR_USERNAME,
'error_msg' => 'LOGIN_ERROR_USERNAME',
'user_row' => array('user_id' => ANONYMOUS),
);
}

View File

@@ -2658,7 +2658,7 @@ function get_preg_expression($mode)
switch ($mode)
{
case 'email':
return '[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
return '(?:[a-z0-9\'\.\-_\+\|]|&)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
break;
case 'bbcode_htm':

View File

@@ -1056,8 +1056,7 @@ class smtp_class
global $user;
$err_msg = '';
$local_host = php_uname('n');
$local_host = (empty($local_host)) ? 'localhost' : $local_host;
$local_host = (function_exists('php_uname')) ? php_uname('n') : $user->host;
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated
@@ -1332,7 +1331,7 @@ class smtp_class
// Realm
if (empty($tokens['realm']))
{
$tokens['realm'] = php_uname('n');
$tokens['realm'] = (function_exists('php_uname')) ? php_uname('n') : $user->host;
}
// Maxbuf

View File

@@ -1121,16 +1121,15 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
// Get banned User ID's
$sql = 'SELECT ban_userid
FROM ' . BANLIST_TABLE;
FROM ' . BANLIST_TABLE . '
WHERE ban_userid <> 0
AND ban_exclude <> 1';
$result = $db->sql_query($sql);
$sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id'];
while ($row = $db->sql_fetchrow($result))
{
if (isset($row['ban_userid']))
{
$sql_ignore_users .= ', ' . $row['ban_userid'];
}
$sql_ignore_users .= ', ' . (int) $row['ban_userid'];
}
$db->sql_freeresult($result);