aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-07-12 16:14:07 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-07-12 16:14:07 +0000
commit002dd8155708415b3c1c828789feccbfc087a387 (patch)
tree9c7ec297cc23082f2b5894cd28657f5e7b2492fb
parent2ba03a411e561cb943f8ec8f11afc51eaa720275 (diff)
downloadforums-002dd8155708415b3c1c828789feccbfc087a387.tar
forums-002dd8155708415b3c1c828789feccbfc087a387.tar.gz
forums-002dd8155708415b3c1c828789feccbfc087a387.tar.bz2
forums-002dd8155708415b3c1c828789feccbfc087a387.tar.xz
forums-002dd8155708415b3c1c828789feccbfc087a387.zip
some more fixes
git-svn-id: file:///svn/phpbb/trunk@7875 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/style/acp_php_info.html2
-rw-r--r--phpBB/adm/style/admin.css13
-rw-r--r--phpBB/docs/CHANGELOG.html4
-rw-r--r--phpBB/download.php19
-rw-r--r--phpBB/includes/message_parser.php5
-rw-r--r--phpBB/includes/session.php12
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php20
-rw-r--r--phpBB/install/database_update.php8
-rwxr-xr-xphpBB/install/install_install.php2
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/styles/prosilver/template/jumpbox.html2
11 files changed, 79 insertions, 9 deletions
diff --git a/phpBB/adm/style/acp_php_info.html b/phpBB/adm/style/acp_php_info.html
index e1d4731c64..de065c4896 100644
--- a/phpBB/adm/style/acp_php_info.html
+++ b/phpBB/adm/style/acp_php_info.html
@@ -6,7 +6,7 @@
<p>{L_ACP_PHP_INFO_EXPLAIN}</p>
-<div style="overflow: auto; width: 99%;">
+<div class="phpinfo">
{PHPINFO}
</div>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index b127462814..76875bf412 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1602,3 +1602,16 @@ fieldset.permissions .permissions-switch {
margin: 0;
padding: 0;
}
+
+/* Classes for additional tasks
+---------------------------------------- */
+
+.phpinfo {
+ overflow: auto;
+ width: 99%;
+ direction: ltr;
+}
+
+.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 {
+ text-align: left;
+}
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 38189bc446..37d548f3ec 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -216,6 +216,10 @@ p a {
<li>[Fix] Correctly hide post/reply buttons if permissions are not given (related to Bug #12809)</li>
<li>[Fix] Remove orphan/wrong permission entries for non-existent forums - self-repairing permissions if conversions went &quot;crazy&quot;</li>
<li>[Feature] Allow &quot;older&quot; updates applied with the automatic updater. This allows people using it for updating, say, from 3.0.0 to 3.0.1 (with the correct package of course) and then from 3.0.1 to 3.0.2 if the latest version at this time is 3.0.2. These changes take effect beginning with RC4 or people replacing install/install_update.php manually prior doing the updates.</li>
+ <li>[Fix] Present correct error message if user tries to edit already read private message (Bug #13271)</li>
+ <li>[Fix] Also display board disabled notice for admins/mods if board got disabled due to exceeding the load limit (Bug #13267)</li>
+ <li>[Fix] Correctly deliver avatar if readfile function has been disabled (Bug #13309)</li>
+ <li>[Fix] Display php information page with the correct direction (Bug #12557)</li>
</ul>
diff --git a/phpBB/download.php b/phpBB/download.php
index 382c528db9..a1ee73f808 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -322,7 +322,20 @@ function send_avatar_to_browser($file)
header("Content-Length: $size");
}
- readfile($file_path);
+ if (@readfile($file_path) === false)
+ {
+ $fp = @fopen($file_path, 'rb');
+
+ if ($fp !== false)
+ {
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+ }
+
flush();
}
else
@@ -447,6 +460,10 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
fclose($fp);
}
+ else
+ {
+ @readfile($filename);
+ }
flush();
exit;
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 3579467bff..e7b7edc169 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1228,6 +1228,11 @@ class parse_message extends bbcode_firstpass
while ($row = $db->sql_fetchrow($result))
{
+ if (empty($row['code']))
+ {
+ continue;
+ }
+
// (assertion)
$match[] = '(?<=^|[\n .])' . preg_quote($row['code'], '#') . '(?![^<>]*>)';
$replace[] = '<!-- s' . $row['code'] . ' --><img src="{SMILIES_PATH}/' . $row['smiley_url'] . '" alt="' . $row['code'] . '" title="' . $row['emotion'] . '" /><!-- s' . $row['code'] . ' -->';
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 8a9021b573..9a98f442d4 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1506,10 +1506,16 @@ class user extends session
// Is load exceeded?
if ($config['limit_load'] && $this->load !== false)
{
- if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN'))
{
- header('HTTP/1.1 503 Service Unavailable');
- trigger_error('BOARD_UNAVAILABLE');
+ // Set board disabled to true to let the admins/mods get the proper notification
+ $config['board_disable'] = '1';
+
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ header('HTTP/1.1 503 Service Unavailable');
+ trigger_error('BOARD_UNAVAILABLE');
+ }
}
}
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index e296ad12b1..56a11afe33 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -208,12 +208,30 @@ function compose_pm($id, $mode, $action)
if ($sql)
{
- $result = $db->sql_query_limit($sql, 1);
+ $result = $db->sql_query($sql);
$post = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$post)
{
+ // If editing it could be the recipient already read the message...
+ if ($action == 'edit')
+ {
+ $sql = 'SELECT p.*, t.folder_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p
+ WHERE t.user_id = ' . $user->data['user_id'] . "
+ AND t.msg_id = $msg_id
+ AND t.msg_id = p.msg_id";
+ $result = $db->sql_query($sql);
+ $post = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($post)
+ {
+ trigger_error('NO_EDIT_READ_MESSAGE');
+ }
+ }
+
trigger_error('NO_MESSAGE');
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index dfd9a02b3c..8862cf3991 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -661,13 +661,15 @@ if (version_compare($current_version, '3.0.RC2', '<='))
{
continue;
}
+
$new_code = str_replace('&amp;', '&', $code);
$new_code = str_replace('&lt;', '<', $new_code);
$new_code = str_replace('&gt;', '>', $new_code);
$new_code = utf8_htmlspecialchars($new_code);
+
$sql = 'UPDATE ' . SMILIES_TABLE . '
SET code = \'' . $db->sql_escape($new_code) . '\'
- WHERE smiley_id = ' . (int)$id;
+ WHERE smiley_id = ' . (int) $id;
$db->sql_query($sql);
}
@@ -761,6 +763,10 @@ if (version_compare($current_version, '3.0.RC3', '<='))
}
}
+ // Make sure empty smiley codes do not exist
+ $sql = 'DELETE FROM ' . SMILIES_TABLE . "
+ WHERE code = ''";
+ $db->sql_query($sql);
}
_write_result($no_updates, $errored, $error_ary);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 621c91f8cc..68bf1f9a84 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -10,7 +10,7 @@
/**
* @todo: check for those functions being 'available'? Though not able to check with function_exists, we need to create test cases
-* ini_get(), glob, getimagesize, fsockopen...
+* ini_get(), glob, getimagesize, fsockopen, readfile
*/
/**
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index b41d43e8e5..a5576a9890 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -288,6 +288,7 @@ $lang = array_merge($lang, array(
'NO_BCC_RECIPIENT' => 'None',
'NO_BOOKMARKS' => 'You have no bookmarks.',
'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.',
+ 'NO_EDIT_READ_MESSAGE' => 'Private message cannot be edited because it has already been read.',
'NO_EMAIL_USER' => 'The e-mail/username information submitted could not be found.',
'NO_FOES' => 'No foes currently defined',
'NO_FRIENDS' => 'No friends currently defined',
diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html
index 369321f36d..637e5c7e9a 100644
--- a/phpBB/styles/prosilver/template/jumpbox.html
+++ b/phpBB/styles/prosilver/template/jumpbox.html
@@ -9,7 +9,7 @@
<!-- ELSEIF SEARCH_TOPIC -->
<p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
<!-- ELSEIF S_SEARCH_ACTION -->
- <p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO} {L_SEARCH_ADV}</a></p>
+ <p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->
<!-- IF $CUSTOM_FIELDSET_CLASS -->