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

@ -138,6 +138,12 @@
<li>[Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)</li> <li>[Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)</li>
<li>[Fix] Do not allow selecting non-authorized groups within memberlist by adjusting URL (Bug #22805 - patch provided by ToonArmy)</li> <li>[Fix] Do not allow selecting non-authorized groups within memberlist by adjusting URL (Bug #22805 - patch provided by ToonArmy)</li>
<li>[Fix] Correctly specify &quot;close report action&quot; (Bug #22685)</li> <li>[Fix] Correctly specify &quot;close report action&quot; (Bug #22685)</li>
<li>[Fix] Display &quot;empty password error&quot; within the login box instead of issuing a general error (Bug #22525)</li>
<li>[Fix] Pertain select single link on memberlist (Bug #23235 - patch provided by Schumi)</li>
<li>[Fix] Allow &amp; and | in local part of email addresses (Bug #22995)</li>
<li>[Fix] Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)</li>
<li>[Fix] Correctly obtain to be ignored users within topic/forum notification (Bug #21795 - patch provided by dr.death)</li>
<li>[Fix] Correctly update board statistics for attaching orphaned files to existing posts (Bug #20185)</li>
</ul> </ul>

View file

@ -947,6 +947,7 @@ class acp_attachments
AND is_orphan = 1'; AND is_orphan = 1';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$files_added = $space_taken = 0;
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$post_row = $post_info[$upload_list[$row['attach_id']]]; $post_row = $post_info[$upload_list[$row['attach_id']]];
@ -986,9 +987,18 @@ class acp_attachments
WHERE topic_id = ' . $post_row['topic_id']; WHERE topic_id = ' . $post_row['topic_id'];
$db->sql_query($sql); $db->sql_query($sql);
$space_taken += $row['filesize'];
$files_added++;
add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']); add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
} }
$db->sql_freeresult($result); $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) if (!$password)
{ {
return array( return array(
'status' => LOGIN_BREAK, 'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED', '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) if (!$password)
{ {
return array( return array(
'status' => LOGIN_BREAK, 'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED', '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) if (!$password)
{ {
return array( return array(
'status' => LOGIN_BREAK, 'status' => LOGIN_ERROR_PASSWORD,
'error_msg' => 'NO_PASSWORD_SUPPLIED', '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) switch ($mode)
{ {
case 'email': case 'email':
return '[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+'; return '(?:[a-z0-9\'\.\-_\+\|]|&amp;)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
break; break;
case 'bbcode_htm': case 'bbcode_htm':

View file

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

View file

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

View file

@ -1715,7 +1715,7 @@ class install_install extends module
if (is_dir($path) && file_exists($path . '/iso.txt')) if (is_dir($path) && file_exists($path . '/iso.txt'))
{ {
$lang_file = file("{$phpbb_root_path}language/$path/iso.txt"); $lang_file = file("$path/iso.txt");
$lang_pack = array( $lang_pack = array(
'lang_iso' => basename($path), 'lang_iso' => basename($path),

View file

@ -1187,7 +1187,7 @@ switch ($mode)
'sd' => array('sd', 'a'), 'sd' => array('sd', 'a'),
'form' => array('form', ''), 'form' => array('form', ''),
'field' => array('field', ''), 'field' => array('field', ''),
'select_single' => array('select_single', 0), 'select_single' => array('select_single', $select_single),
'username' => array('username', '', true), 'username' => array('username', '', true),
'email' => array('email', ''), 'email' => array('email', ''),
'icq' => array('icq', ''), 'icq' => array('icq', ''),

View file

@ -4,7 +4,7 @@
<!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS --> <!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS -->
<div class="column1"> <div class="column1">
<!-- IF S_ALLOW_MASS_PM --> <!-- IF not S_ALLOW_MASS_PM -->
<!-- IF .to_recipient --> <!-- IF .to_recipient -->
<dl> <dl>
<dt><label>{L_TO}:</label></dt> <dt><label>{L_TO}:</label></dt>
@ -29,15 +29,17 @@
</dd> </dd>
</dl> </dl>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF not S_EDIT_POST -->
<dl class="pmlist"> <dl class="pmlist">
<dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2"></textarea></dt> <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2"></textarea></dt>
<dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd> <dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd>
<dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd> <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
<dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" /></dd> <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" /></dd>
</dl> </dl>
<!-- ENDIF -->
<!-- ELSE --> <!-- ELSE -->
<dl> <dl>
<dt><label for="username_list">{L_TO}:</label><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span></dt> <dt><label for="username_list">{L_TO}:</label><!-- IF not S_EDIT_POST --><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span><!-- ENDIF --></dt>
<!-- IF .to_recipient --> <!-- IF .to_recipient -->
<dd> <dd>
<!-- BEGIN to_recipient --> <!-- BEGIN to_recipient -->
@ -48,7 +50,9 @@
</dd> </dd>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF not S_EDIT_POST -->
<dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd> <dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
<!-- ENDIF -->
</dl> </dl>
<!-- ENDIF --> <!-- ENDIF -->