mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
some more fixes
git-svn-id: file:///svn/phpbb/trunk@7875 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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,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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user