mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
some more fixes
git-svn-id: file:///svn/phpbb/trunk@7875 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2ba03a411e
commit
002dd81557
11 changed files with 79 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
<p>{L_ACP_PHP_INFO_EXPLAIN}</p>
|
||||
|
||||
<div style="overflow: auto; width: 99%;">
|
||||
<div class="phpinfo">
|
||||
{PHPINFO}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 "crazy"</li>
|
||||
<li>[Feature] Allow "older" 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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'] . ' -->';
|
||||
|
|
|
@ -1506,12 +1506,18 @@ 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'))
|
||||
{
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->data['session_viewonline']))
|
||||
{
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -661,13 +661,15 @@ if (version_compare($current_version, '3.0.RC2', '<='))
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$new_code = str_replace('&', '&', $code);
|
||||
$new_code = str_replace('<', '<', $new_code);
|
||||
$new_code = str_replace('>', '>', $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);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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 -->
|
||||
|
|
Loading…
Add table
Reference in a new issue