aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:47:43 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-03-18 14:47:43 +0000
commit02a5032a52784339e75d0d3fc9c24e92e235c26b (patch)
tree7be064ec5e37c3a81e35971a7f7d8c5519388f6c
parentc34599126fe8a7d38b604ceb92136be6a6c89ee8 (diff)
downloadforums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.gz
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.bz2
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.tar.xz
forums-02a5032a52784339e75d0d3fc9c24e92e235c26b.zip
merging... again
git-svn-id: file:///svn/phpbb/trunk@8452 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html6
-rw-r--r--phpBB/includes/acp/acp_attachments.php10
-rw-r--r--phpBB/includes/auth/auth_apache.php12
-rw-r--r--phpBB/includes/auth/auth_db.php12
-rw-r--r--phpBB/includes/auth/auth_ldap.php12
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_messenger.php5
-rw-r--r--phpBB/includes/functions_posting.php9
-rwxr-xr-xphpBB/install/install_install.php2
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html8
11 files changed, 64 insertions, 16 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 154e93c928..e44e7781b2 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -138,6 +138,12 @@
<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] 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>
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 120c6a789f..d2beba55c5 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -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);
+ }
}
}
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
index 50a49ee21e..acdd4e3386 100644
--- a/phpBB/includes/auth/auth_apache.php
+++ b/phpBB/includes/auth/auth_apache.php
@@ -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),
);
}
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
index aa09710730..00dd438210 100644
--- a/phpBB/includes/auth/auth_db.php
+++ b/phpBB/includes/auth/auth_db.php
@@ -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),
);
}
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index 9507dc645a..3163153997 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -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),
);
}
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 7a6e4c656d..5005033166 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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\'\.\-_\+\|]|&amp;)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
break;
case 'bbcode_htm':
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 8aba4ed255..ef896f2c89 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -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
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 7eba43c955..a2482c64c4 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index e1eb249758..194d5ca705 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1715,7 +1715,7 @@ class install_install extends module
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_iso' => basename($path),
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 968ab322fd..dc74290fad 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1187,7 +1187,7 @@ switch ($mode)
'sd' => array('sd', 'a'),
'form' => array('form', ''),
'field' => array('field', ''),
- 'select_single' => array('select_single', 0),
+ 'select_single' => array('select_single', $select_single),
'username' => array('username', '', true),
'email' => array('email', ''),
'icq' => array('icq', ''),
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 6ec79dfb8b..459efc72b3 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -4,7 +4,7 @@
<!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS -->
<div class="column1">
- <!-- IF S_ALLOW_MASS_PM -->
+ <!-- IF not S_ALLOW_MASS_PM -->
<!-- IF .to_recipient -->
<dl>
<dt><label>{L_TO}:</label></dt>
@@ -29,15 +29,17 @@
</dd>
</dl>
<!-- ENDIF -->
+ <!-- IF not S_EDIT_POST -->
<dl class="pmlist">
<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><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>
</dl>
+ <!-- ENDIF -->
<!-- ELSE -->
<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 -->
<dd>
<!-- BEGIN to_recipient -->
@@ -48,7 +50,9 @@
</dd>
<!-- 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>
+ <!-- ENDIF -->
</dl>
<!-- ENDIF -->