aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-08-28 15:50:33 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-08-28 15:50:33 +0000
commit1d37b69ddd79d9d6bc1346f3761a899d20305636 (patch)
tree7b795bcfea4d119c86b59a7471be36504b4f9c1b
parent902285684d08394437650174fa9bdfe6904db85c (diff)
downloadforums-1d37b69ddd79d9d6bc1346f3761a899d20305636.tar
forums-1d37b69ddd79d9d6bc1346f3761a899d20305636.tar.gz
forums-1d37b69ddd79d9d6bc1346f3761a899d20305636.tar.bz2
forums-1d37b69ddd79d9d6bc1346f3761a899d20305636.tar.xz
forums-1d37b69ddd79d9d6bc1346f3761a899d20305636.zip
- some bugfixes
- using E_USER_WARNING if an error occurred within the ACP (sadly not able to use it as a default for trigger_error - it seems to be hardcoded in PHP) git-svn-id: file:///svn/phpbb/trunk@6320 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/style/acp_profile.html2
-rw-r--r--phpBB/adm/style/message_body.html2
-rw-r--r--phpBB/includes/acp/acp_attachments.php12
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php8
-rw-r--r--phpBB/includes/acp/acp_board.php7
-rw-r--r--phpBB/includes/acp/acp_bots.php6
-rw-r--r--phpBB/includes/acp/acp_captcha.php6
-rw-r--r--phpBB/includes/acp/acp_database.php4
-rw-r--r--phpBB/includes/acp/acp_disallow.php6
-rw-r--r--phpBB/includes/acp/acp_email.php5
-rw-r--r--phpBB/includes/acp/acp_forums.php51
-rw-r--r--phpBB/includes/acp/acp_groups.php24
-rw-r--r--phpBB/includes/acp/acp_icons.php6
-rw-r--r--phpBB/includes/acp/acp_jabber.php6
-rw-r--r--phpBB/includes/acp/acp_language.php40
-rw-r--r--phpBB/includes/acp/acp_main.php16
-rw-r--r--phpBB/includes/acp/acp_modules.php16
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php19
-rw-r--r--phpBB/includes/acp/acp_permissions.php27
-rw-r--r--phpBB/includes/acp/acp_php_info.php2
-rw-r--r--phpBB/includes/acp/acp_profile.php14
-rw-r--r--phpBB/includes/acp/acp_prune.php2
-rw-r--r--phpBB/includes/acp/acp_ranks.php4
-rw-r--r--phpBB/includes/acp/acp_reasons.php6
-rw-r--r--phpBB/includes/acp/acp_search.php13
-rw-r--r--phpBB/includes/acp/acp_styles.php44
-rw-r--r--phpBB/includes/acp/acp_users.php28
-rw-r--r--phpBB/includes/acp/acp_words.php6
-rw-r--r--phpBB/includes/constants.php1
-rw-r--r--phpBB/includes/functions.php31
-rw-r--r--phpBB/includes/functions_posting.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php4
-rw-r--r--phpBB/install/schemas/schema_data.sql1
-rw-r--r--phpBB/language/en/acp/attachments.php2
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/styles/subSilver/template/posting_body.html4
-rw-r--r--phpBB/styles/subSilver/template/ucp_pm_viewmessage.html4
-rw-r--r--phpBB/styles/subSilver/template/viewforum_body.html8
-rw-r--r--phpBB/styles/subSilver/template/viewtopic_body.html2
-rw-r--r--phpBB/viewforum.php3
-rw-r--r--phpBB/viewtopic.php42
41 files changed, 296 insertions, 194 deletions
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
index 809eb46bda..5f7c87432c 100644
--- a/phpBB/adm/style/acp_profile.html
+++ b/phpBB/adm/style/acp_profile.html
@@ -170,7 +170,7 @@
<td>{fields.FIELD_IDENT}</td>
<td>{fields.FIELD_TYPE}</td>
- <td><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_EDIT}"><span style="color:red;">{L_EDIT}</span><!-- ENDIF --></td>
+ <td><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_EDIT}" style="color: red;">{L_EDIT}</a><!-- ENDIF --></td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not fields.S_FIRST_ROW --><a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
diff --git a/phpBB/adm/style/message_body.html b/phpBB/adm/style/message_body.html
index 17db5aca37..5d907e911c 100644
--- a/phpBB/adm/style/message_body.html
+++ b/phpBB/adm/style/message_body.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<div class="successbox">
+<div <!-- IF S_USER_NOTICE -->class="successbox"<!-- ELSE -->class="errorbox"<!-- ENDIF -->>
<h3>{MESSAGE_TITLE}</h3>
<p>{MESSAGE_TEXT}</p>
</div>
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 1089a06152..0b3e9dda0a 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -46,7 +46,8 @@ class acp_attachments
break;
default:
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
}
$this->tpl_name = 'acp_attachments';
@@ -102,6 +103,7 @@ class acp_attachments
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
@@ -403,12 +405,12 @@ class acp_attachments
if ($action != 'add' && $action != 'edit')
{
- trigger_error('WRONG_MODE');
+ trigger_error('WRONG_MODE', E_USER_WARNING);
}
if (!$group_id && $action == 'edit')
{
- trigger_error('NO_EXT_GROUP_SPECIFIED');
+ trigger_error('NO_EXT_GROUP_SPECIFIED', E_USER_WARNING);
}
if ($group_id)
@@ -578,7 +580,7 @@ class acp_attachments
if (!$group_id)
{
- trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -770,7 +772,7 @@ class acp_attachments
if (!$group_id)
{
- trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index cdfe8e42eb..f37d9b1aef 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -47,7 +47,7 @@ class acp_bbcodes
if (!$row)
{
- trigger_error('BBCODE_NOT_EXIST');
+ trigger_error('BBCODE_NOT_EXIST', E_USER_WARNING);
}
$bbcode_match = $row['bbcode_match'];
@@ -66,7 +66,7 @@ class acp_bbcodes
if (!$row)
{
- trigger_error('BBCODE_NOT_EXIST');
+ trigger_error('BBCODE_NOT_EXIST', E_USER_WARNING);
}
// No break here
@@ -129,7 +129,7 @@ class acp_bbcodes
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
{
- trigger_error('BBCODE_INVALID_TAG_NAME');
+ trigger_error('BBCODE_INVALID_TAG_NAME', E_USER_WARNING);
}
}
@@ -170,7 +170,7 @@ class acp_bbcodes
if ($bbcode_id > 1511)
{
- trigger_error('TOO_MANY_BBCODES');
+ trigger_error('TOO_MANY_BBCODES', E_USER_WARNING);
}
$sql_ary['bbcode_id'] = (int) $bbcode_id;
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 49e4b1eb1c..5f5cf6cd99 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -335,7 +335,8 @@ class acp_board
break;
default:
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
}
if (isset($display_vars['lang']))
@@ -448,14 +449,14 @@ class acp_board
{
set_config($config_name, $config_value);
}
- trigger_error($error . adm_back_link($this->u_action));
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
set_config('auth_method', $cfg_array['auth_method']);
}
else
{
- trigger_error('NO_AUTH_PLUGIN');
+ trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
}
}
}
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index f24a6b7b12..fcee10fde5 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -159,7 +159,7 @@ class acp_bots
if (!$group_row)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$user_id = user_add(array(
@@ -197,7 +197,7 @@ class acp_bots
if (!$row)
{
- trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
@@ -237,7 +237,7 @@ class acp_bots
if (!$bot_row)
{
- trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$bot_row['bot_lang'] = $bot_row['user_lang'];
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 3ac354004a..2ae65b7687 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -86,17 +86,17 @@ class acp_captcha
if (!@extension_loaded('gd'))
{
- trigger_error($user->lang['NO_GD']);
+ trigger_error($user->lang['NO_GD'], E_USER_WARNING);
}
if (!($policy === 'policy_entropy' || $policy === 'policy_3dbitmap') && (!function_exists('imagettfbbox') || !function_exists('imagettftext')))
{
- trigger_error($user->lang['NO_TTF']);
+ trigger_error($user->lang['NO_TTF'], E_USER_WARNING);
}
if (!in_array($policy, $policy_modules))
{
- trigger_error($user->lang['BAD_POLICY']);
+ trigger_error($user->lang['BAD_POLICY'], E_USER_WARNING);
}
$user->add_lang('ucp');
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 00ffebc6e5..265f73114e 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -113,7 +113,7 @@ class acp_database
if (!$fp)
{
- trigger_error('Unable to write temporary file to storage folder');
+ trigger_error('Unable to write temporary file to storage folder', E_USER_ERROR);
}
}
@@ -1194,7 +1194,7 @@ class acp_database
if (!(file_exists($file_name) && is_readable($file_name)))
{
- trigger_error($user->lang['BACKUP_INVALID']);
+ trigger_error($user->lang['BACKUP_INVALID'], E_USER_WARNING);
}
if ($delete)
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index 1fdc2f8551..b42eb190d7 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -37,7 +37,7 @@ class acp_disallow
if (!$disallowed_user)
{
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
@@ -54,7 +54,7 @@ class acp_disallow
if (!$disallowed_id)
{
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
@@ -63,7 +63,7 @@ class acp_disallow
add_log('admin', 'LOG_DISALLOW_DELETE');
- trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Grab the current list of disallowed usernames...
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index c20640bd54..c977d405cc 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -87,7 +87,7 @@ class acp_email
if (!$row)
{
$db->sql_freeresult($result);
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$i = $j = 0;
@@ -185,12 +185,13 @@ class acp_email
if (!$errored)
{
$message = ($use_queue) ? $user->lang['EMAIL_SENT_QUEUE'] : $user->lang['EMAIL_SENT'];
+ trigger_error($message . adm_back_link($this->u_action));
}
else
{
$message = sprintf($user->lang['EMAIL_SEND_ERROR'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=critical') . '">', '</a>');
+ trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
}
- trigger_error($message . adm_back_link($this->u_action));
}
}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 5964a285e7..e9e75ed57d 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -40,7 +40,7 @@ class acp_forums
if (!$auth->acl_get('a_forumdel'))
{
- trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -49,7 +49,7 @@ class acp_forums
if (!$auth->acl_get('a_forumadd'))
{
- trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -265,7 +265,7 @@ class acp_forums
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -277,7 +277,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$move_forum_name = $this->move_forum_by($row, $action, 1);
@@ -293,7 +293,7 @@ class acp_forums
case 'sync':
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT forum_name, forum_type
@@ -305,7 +305,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
sync('forum', 'forum_id', $forum_id);
@@ -560,7 +560,7 @@ class acp_forums
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$forum_data = $this->get_forum_info($forum_id);
@@ -821,7 +821,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id));
+ trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . FORUMS_TABLE . '
@@ -885,7 +885,8 @@ class acp_forums
return array($user->lang['NO_FORUM_ACTION']);
}
- $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = 0;
+ $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
+ $forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
}
if (sizeof($errors))
@@ -1018,7 +1019,7 @@ class acp_forums
{
global $db;
- $table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ $table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
@@ -1121,6 +1122,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
}
else if ($action_subforums == 'move')
{
@@ -1167,6 +1176,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
}
}
@@ -1181,6 +1198,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
}
// Resync tree
@@ -1365,18 +1390,18 @@ class acp_forums
foreach ($tables as $table)
{
- $db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $id_list));
+ $db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $ids));
}
}
}
while ($row);
}
- unset($ids, $id_list);
+ unset($ids);
break;
}
- $table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
+ $table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 9f7e68bfe5..1443cf476a 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -52,7 +52,7 @@ class acp_groups
if (!$group_row)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -64,7 +64,7 @@ class acp_groups
case 'promote':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Approve, demote or promote
@@ -91,7 +91,7 @@ class acp_groups
case 'default':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -155,7 +155,7 @@ class acp_groups
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = '';
@@ -165,7 +165,7 @@ class acp_groups
case 'delete':
if (!$auth->acl_get('a_groupdel'))
{
- trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = group_delete($group_id, $group_row['group_name']);
@@ -180,7 +180,7 @@ class acp_groups
if ($error)
{
- trigger_error($user->lang[$error] . adm_back_link($back_link));
+ trigger_error($user->lang[$error] . adm_back_link($back_link), E_USER_WARNING);
}
$message = ($action == 'delete') ? 'GROUP_DELETED' : 'GROUP_USERS_REMOVE';
@@ -201,12 +201,12 @@ class acp_groups
case 'addusers':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$name_ary)
{
- trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
+ trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
}
$name_ary = array_unique(explode("\n", $name_ary));
@@ -214,7 +214,7 @@ class acp_groups
// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_row['group_name'], $default, $leader, 0, $group_row))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
}
$message = ($action == 'addleaders') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
@@ -228,12 +228,12 @@ class acp_groups
if ($action == 'edit' && !$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
{
- trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = array();
@@ -542,7 +542,7 @@ class acp_groups
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'GROUP_MEMBERS';
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 8c846d28ab..f49338e8f1 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -363,7 +363,7 @@ class acp_icons
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
- trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
foreach ($pak_ary as $pak_entry)
@@ -374,7 +374,7 @@ class acp_icons
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
(sizeof($data[1]) != 6 && $mode == 'smilies'))
{
- trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Stripslash here because it got addslashed before... (on export)
@@ -523,7 +523,7 @@ class acp_icons
}
else
{
- trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 7c7e4586e0..b55ac27fea 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -65,7 +65,7 @@ class acp_jabber
{
if (!$jabber->connect())
{
- trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// First we'll try to authorise using this account, if that fails we'll try to create it.
@@ -94,12 +94,12 @@ class acp_jabber
{
if (!$jabber->connect())
{
- trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$jabber->send_auth())
{
- trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->send_presence(NULL, NULL, 'online');
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index e2431749d1..423ced43e0 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -76,7 +76,8 @@ class acp_language
break;
default:
- trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ break;
}
$test_connection = $transfer->open_session();
@@ -124,7 +125,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -155,12 +156,12 @@ class acp_language
if (!$lang_id || !isset($_POST['entry']) || !is_array($_POST['entry']))
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$this->language_file || (!$this->language_directory && !in_array($this->language_file, $this->main_files)))
{
- trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -187,7 +188,7 @@ class acp_language
{
if (!@mkdir($dir, 0777))
{
- trigger_error("Could not create directory $dir");
+ trigger_error("Could not create directory $dir", E_USER_ERROR);
}
@chmod($dir, 0777);
}
@@ -200,7 +201,7 @@ class acp_language
if (!$fp)
{
- trigger_error($user->lang['UNABLE_TO_WRITE_FILE']);
+ trigger_error($user->lang['UNABLE_TO_WRITE_FILE'], E_USER_WARNING);
}
if ($this->language_directory == 'email')
@@ -301,12 +302,13 @@ class acp_language
break;
default:
- trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ break;
}
if (($result = $transfer->open_session()) !== true)
{
- trigger_error($user->lang[$result] . adm_back_link($this->u_action));
+ trigger_error($user->lang[$result] . adm_back_link($this->u_action), E_USER_WARNING);
}
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
@@ -329,7 +331,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'LANGUAGE_PACK_DETAILS';
@@ -362,28 +364,28 @@ class acp_language
case 'email':
if (!in_array($this->language_file, $email_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
case 'acp':
if (!in_array($this->language_file, $acp_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
case 'mods':
if (!in_array($this->language_file, $mods_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
default:
if (!in_array($this->language_file, $this->main_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
}
@@ -644,7 +646,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -656,7 +658,7 @@ class acp_language
if ($row['lang_iso'] == $config['default_lang'])
{
- trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
@@ -677,7 +679,7 @@ class acp_language
if (!$lang_iso || !file_exists("{$phpbb_root_path}language/$lang_iso/iso.txt"))
{
- trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$file = file("{$phpbb_root_path}language/$lang_iso/iso.txt");
@@ -697,13 +699,13 @@ class acp_language
if ($row = $db->sql_fetchrow($result))
{
- trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
if (!$lang_pack['name'] || !$lang_pack['local_name'])
{
- trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Add language pack
@@ -727,7 +729,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index bab08bc0ff..93f8733daa 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -32,7 +32,7 @@ class acp_main
if (!$auth->acl_get('a_user'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT username
@@ -65,7 +65,7 @@ class acp_main
{
if (!$auth->acl_get('a_userdel'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
@@ -81,12 +81,12 @@ class acp_main
case 'remind':
if (!$auth->acl_get('a_user'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
if (empty($config['email_enable']))
{
- trigger_error($user->lang['EMAIL_DISABLED']);
+ trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
@@ -144,7 +144,7 @@ class acp_main
case 'online':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
set_config('record_online_users', 1, true);
@@ -155,7 +155,7 @@ class acp_main
case 'stats':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT COUNT(post_id) AS stat
@@ -205,7 +205,7 @@ class acp_main
case 'user':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
@@ -227,7 +227,7 @@ class acp_main
case 'date':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
set_config('board_startdate', time() - 1);
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 7c72a1ca6b..e8d12b9d93 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -61,7 +61,7 @@ class acp_modules
case 'delete':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
if (confirm_box(true))
@@ -91,7 +91,7 @@ class acp_modules
case 'disable':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . '
@@ -108,7 +108,7 @@ class acp_modules
case 'move_down':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -121,7 +121,7 @@ class acp_modules
if (!$row)
{
- trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
$move_module_name = $this->move_module_by($row, $action, 1);
@@ -190,7 +190,7 @@ class acp_modules
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
$module_row = $this->get_module_row($module_id);
@@ -228,7 +228,7 @@ class acp_modules
{
if (!$module_data['module_langname'])
{
- trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id), E_USER_WARNING);
}
$module_type = request_var('module_type', 'category');
@@ -476,7 +476,7 @@ class acp_modules
if (!$row)
{
- trigger_error($user->lang['NO_MODULE']);
+ trigger_error($user->lang['NO_MODULE'], E_USER_WARNING);
}
return $row;
@@ -721,7 +721,7 @@ class acp_modules
return 'PARENT_NO_EXIST';
}
- trigger_error($user->lang['PARENT_NO_EXIST']);
+ trigger_error($user->lang['PARENT_NO_EXIST'], E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . "
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 2026aebaf0..be69618516 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -58,7 +58,8 @@ class acp_permission_roles
break;
default:
- trigger_error('INVALID_MODE');
+ trigger_error('INVALID_MODE', E_USER_ERROR);
+ break;
}
$template->assign_vars(array(
@@ -75,7 +76,7 @@ class acp_permission_roles
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -87,7 +88,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -112,7 +113,7 @@ class acp_permission_roles
case 'edit':
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Get role we edit
@@ -125,7 +126,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// no break;
@@ -138,7 +139,7 @@ class acp_permission_roles
if (!$role_name)
{
- trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// if we add/edit a role we check the name to be unique among the settings...
@@ -153,7 +154,7 @@ class acp_permission_roles
// Make sure we only print out the error if we add the role or change it's name
if ($row && ($mode == 'add' || ($mode == 'edit' && strtolower($role_row['role_name']) != strtolower($role_name))))
{
- trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action));
+ trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -252,7 +253,7 @@ class acp_permission_roles
{
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -279,7 +280,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_PRESET_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index ee4b2a1ade..fe244b7175 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -47,7 +47,7 @@ class acp_permissions
return;
}
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
}
// Set some vars
@@ -98,7 +98,7 @@ class acp_permissions
if (!sizeof($user_id))
{
- trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
unset($username);
@@ -190,7 +190,8 @@ class acp_permissions
break;
default:
- trigger_error('INVALID_MODE');
+ trigger_error('INVALID_MODE', E_USER_ERROR);
+ break;
}
$template->assign_vars(array(
@@ -203,7 +204,7 @@ class acp_permissions
if (!in_array($permission_type, $this->permission_dropdown))
{
- trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -237,14 +238,14 @@ class acp_permissions
}
else
{
- trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
case 'apply_permissions':
if (!isset($_POST['setting']))
{
- trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -253,7 +254,7 @@ class acp_permissions
case 'apply_all_permissions':
if (!isset($_POST['setting']))
{
- trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_all_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -436,7 +437,7 @@ class acp_permissions
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
{
- trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
@@ -566,7 +567,7 @@ class acp_permissions
if (!sizeof($ids))
{
- trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -585,7 +586,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$ug_id = $forum_id = 0;
@@ -664,7 +665,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array();
@@ -769,7 +770,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
@@ -888,7 +889,7 @@ class acp_permissions
if (!$userdata)
{
- trigger_error('NO_USERS');
+ trigger_error('NO_USERS', E_USER_ERROR);
}
$forum_name = false;
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 44917bd8fc..fe223b623e 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -22,7 +22,7 @@ class acp_php_info
if ($mode != 'info')
{
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
}
$this->tpl_name = 'acp_php_info';
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 5ab70f609f..756a94cb2c 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -91,7 +91,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -192,7 +192,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT lang_id
@@ -204,7 +204,7 @@ class acp_profile
if (!in_array($default_lang_id, $lang_defs['entry'][$field_id]))
{
- trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -229,7 +229,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -275,7 +275,7 @@ class acp_profile
{
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT l.*, f.*
@@ -289,7 +289,7 @@ class acp_profile
if (!$field_row)
{
- trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_type = $field_row['field_type'];
@@ -319,7 +319,7 @@ class acp_profile
if (!$field_type)
{
- trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_row = array_merge($default_values[$field_type], array(
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 4752e7bafe..0214a252d0 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -155,7 +155,7 @@ class acp_prune
if (!$row)
{
$db->sql_freeresult($result);
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$forum_list = $s_hidden_fields = '';
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index 59505c34c2..7b5789cb30 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -48,7 +48,7 @@ class acp_ranks
if (!$rank_title)
{
- trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -96,7 +96,7 @@ class acp_ranks
}
else
{
- trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 402663ad90..2234871bce 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -137,7 +137,7 @@ class acp_reasons
if (!$reason_row)
{
- trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -180,12 +180,12 @@ class acp_reasons
if (!$reason_row)
{
- trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($reason_row['reason_title'] == 'other')
{
- trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Let the deletion be confirmed...
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index b7c37772ed..b3caae028e 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -152,7 +152,7 @@ class acp_search
}
else
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
}
else
@@ -168,7 +168,7 @@ class acp_search
}
else
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
}
@@ -228,7 +228,8 @@ class acp_search
break;
default:
- trigger_error('NO_ACTION');
+ trigger_error('NO_ACTION', E_USER_ERROR);
+ break;
}
if (empty($this->state[0]))
@@ -240,7 +241,7 @@ class acp_search
$error = false;
if ($this->init_search($this->state[0], $this->search, $error))
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
$action = &$this->state[1];
@@ -262,7 +263,7 @@ class acp_search
{
$this->state = array('');
$this->save_state();
- trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
@@ -314,7 +315,7 @@ class acp_search
{
$this->state = array('');
$this->save_state();
- trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 48277dc487..fd8500d68f 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -191,7 +191,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if ($style_id == $config['default_style'])
{
- trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . STYLES_TABLE . '
@@ -234,7 +234,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$template_row)
{
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -311,7 +311,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$theme_row)
{
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$theme_row['theme_storedb'])
@@ -369,7 +369,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$imageset_row)
{
- trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -605,7 +605,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($template_info = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -621,7 +621,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen($file, 'wb')))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
fwrite($fp, $template_data);
fclose($fp);
@@ -674,7 +674,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($template_path . "/$template_file") || !($template_data = file_get_contents($template_path . "/$template_file")))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
}
}
@@ -804,7 +804,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($template_row = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -941,7 +941,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($theme_info = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -951,7 +951,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($stylesheet_path) || !($stylesheet = file_get_contents($stylesheet_path)))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
}
else
@@ -1030,7 +1030,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!isset($matches[1]))
{
- trigger_error($user->lang['NO_CLASS']);
+ trigger_error($user->lang['NO_CLASS'], E_USER_WARNING);
}
$css_data = implode(";\n", array_diff(array_map('trim', explode("\n", preg_replace("#;[\n]*#s", "\n", $matches[1]))), array('')));
@@ -1262,7 +1262,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// check whether the custom class name is valid
if (!preg_match('/^[a-z0-9#:.\- ]+$/i', $add_custom))
{
- trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows"));
+ trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows"), E_USER_WARNING);
}
else
{
@@ -1278,7 +1278,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// write stylesheet to file
if (!($fp = fopen($stylesheet_path, 'wb')))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
fwrite($fp, $stylesheet);
fclose($fp);
@@ -1355,7 +1355,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!extract($db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_IMAGESET']);
+ trigger_error($user->lang['NO_IMAGESET'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -1540,7 +1540,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = "SELECT {$mode}_id, {$mode}_name
@@ -1561,7 +1561,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
- trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -1719,7 +1719,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright');
@@ -1951,7 +1951,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = $l_prefix . '_EXPORT';
@@ -2021,7 +2021,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0;
@@ -2331,7 +2331,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
{
- trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file");
+ trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
}
$template_data = fread($fp, filesize("{$phpbb_root_path}styles/$template_path$pathfile$file"));
fclose($fp);
@@ -2396,7 +2396,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($dp = @opendir("{$phpbb_root_path}cache")))
{
- trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ']);
+ trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ'], E_USER_ERROR);
}
$file_ary = array();
@@ -2538,7 +2538,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['store_db'] = request_var('store_db', 0);
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index fa4327c169..bd4b0b1407 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -92,7 +92,7 @@ class acp_users
if (!$user_id)
{
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -108,7 +108,7 @@ class acp_users
if (!$user_row)
{
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Generate overall "header" for user admin
@@ -139,7 +139,7 @@ class acp_users
// Prevent normal users/admins change/view founders if they are not a founder by themselves
if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER)
{
- trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
switch ($mode)
@@ -157,18 +157,18 @@ class acp_users
{
if (!$auth->acl_get('a_userdel'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
// Check if the user wants to remove himself or the guest user account
if ($user_id == ANONYMOUS)
{
- trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if (confirm_box(true))
@@ -201,7 +201,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
$ban = array();
@@ -252,7 +252,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if ($config['email_enable'])
@@ -307,7 +307,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
// It is only deactivation since the user is already activated (else he would not have reached this page)
- trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
user_active_flip($user_id, $user_row['user_type'], false, $user_row['username']);
@@ -707,7 +707,7 @@ class acp_users
}
else
{
- trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
}
}
@@ -1775,12 +1775,12 @@ class acp_users
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if ($error = group_user_del($group_id, $user_id))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
$error = array();
@@ -1804,13 +1804,13 @@ class acp_users
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
// Add user/s to group
if ($error = group_user_add($group_id, $user_id))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
$error = array();
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index cacea98d97..dc5a694d0a 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -40,7 +40,7 @@ class acp_words
if (!$word_id)
{
- trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -74,7 +74,7 @@ class acp_words
if (!$word || !$replacement)
{
- trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -107,7 +107,7 @@ class acp_words
if (!$word_id)
{
- trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT word
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 61016b5b31..55c7ec7428 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -130,6 +130,7 @@ define('FIELD_BOOL', 4);
define('FIELD_DROPDOWN', 5);
define('FIELD_DATE', 6);
+
// Additional constants
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 349719af57..4227a8a9a3 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1131,6 +1131,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
* @param int $f_mark_time the forums last mark time if user is registered and load_db_lastread enabled
* @param int $mark_time_forum false if the mark time needs to be obtained, else the last users forum mark time
*
+* @return true if complete forum got marked read, else false.
*/
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
{
@@ -1225,7 +1226,10 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
if (!$row)
{
markread('topics', $forum_id);
+ return true;
}
+
+ return false;
}
// Pagination functions
@@ -2645,7 +2649,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
case E_USER_NOTICE:
define('IN_ERROR_HANDLER', true);
-
+
if (empty($user->data))
{
$user->session_begin();
@@ -2679,8 +2683,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
);
$template->assign_vars(array(
- 'MESSAGE_TITLE' => $msg_title,
- 'MESSAGE_TEXT' => $msg_text)
+ 'MESSAGE_TITLE' => $msg_title,
+ 'MESSAGE_TEXT' => $msg_text,
+ 'S_USER_WARNING' => ($errno == E_USER_WARNING) ? true : false,
+ 'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
);
// We do not want the cron script to be called on error messages
@@ -2793,7 +2799,12 @@ function page_header($page_title = '', $display_online_list = true)
{
if ($row['user_colour'])
{
- $row['username'] = '<b style="color:#' . $row['user_colour'] . '">' . $row['username'] . '</b>';
+ $user_colour = ' style="color:#' . $row['user_colour'] . '"';
+ $row['username'] = '<strong>' . $row['username'] . '</strong>';
+ }
+ else
+ {
+ $user_colour = '';
}
if ($row['user_allow_viewonline'] && $row['session_viewonline'])
@@ -2803,13 +2814,21 @@ function page_header($page_title = '', $display_online_list = true)
}
else
{
- $user_online_link = '<i>' . $row['username'] . '</i>';
+ $user_online_link = '<em>' . $row['username'] . '</em>';
$logged_hidden_online++;
}
if (($row['user_allow_viewonline'] && $row['session_viewonline']) || $auth->acl_get('u_viewonline'))
{
- $user_online_link = ($row['user_type'] <> USER_IGNORE) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $user_online_link . '</a>' : $user_online_link;
+ if ($row['user_type'] <> USER_IGNORE)
+ {
+ $user_online_link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '"' . $user_colour . '>' . $user_online_link . '</a>';
+ }
+ else
+ {
+ $user_online_link = ($user_colour) ? '<span' . $user_colour . '>' . $user_online_link . '</span>' : $user_online_link;
+ }
+
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
}
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e54c27ed53..2ac732746e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -423,8 +423,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
*/
function get_img_size_format($width, $height)
{
+ global $config;
+
// Maximum Width the Image can take
- $max_width = 400;
+ $max_width = ($config['img_max_thumb_width']) ? $config['img_max_thumb_width'] : 400;
if ($width > $height)
{
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 91a44c31c1..ab5318f9d8 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -164,7 +164,9 @@ function view_folder($id, $mode, $folder_id, $folder)
{
foreach ($id_ary as $ug_id => $_id)
{
- $address_list[$message_id][] = (($type == 'u') ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $ug_id) . '">' : '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $ug_id) . '">') . (($recipient_list[$type][$ug_id]['colour']) ? '<span style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '">' : '<span>') . $recipient_list[$type][$ug_id]['name'] . '</span></a>';
+ $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : '';
+
+ $address_list[$message_id][] = (($type == 'u') ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $ug_id) . '"' . $user_colour . '>' : '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $ug_id) . '"' . $user_colour . '>') . $recipient_list[$type][$ug_id]['name'] . '</a>';
}
}
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index b40061c912..ee40c0ff2c 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -95,6 +95,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_imagick', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_height', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_thumb_width', '400');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 4d49e1c8c3..407de35837 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -99,6 +99,8 @@ $lang = array_merge($lang, array(
'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize',
'MAX_IMAGE_SIZE' => 'Maximum Image Dimensions',
'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments, 0px by 0px disables image attachments.',
+ 'MAX_THUMB_WIDTH' => 'Maximum thumbnail width in pixel',
+ 'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here',
'MIN_THUMB_FILESIZE' => 'Minimum thumbnail filesize',
'MIN_THUMB_FILESIZE_EXPLAIN' => 'Do not create a thumbnail for images smaller than this.',
'MODE_INLINE' => 'Inline',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 246d1afc14..9d1146c13b 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -325,10 +325,12 @@ $lang = array_merge($lang, array(
'NO_NEW_POSTS' => 'No new posts',
'NO_ONLINE_USERS' => 'No registered users',
'NO_POSTS' => 'No posts',
+ 'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn\'t exist',
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods',
'NO_TOPIC' => 'The requested topic does not exist.',
'NO_TOPICS' => 'There are no topics or posts in this forum.',
+ 'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.',
'NO_UNREAD_PM' => '<strong>0</strong> unread messages',
'NO_USER' => 'The requested user does not exist.',
'NO_USERS' => 'The requested users do not exist',
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html
index d9924ddcc6..36df9cd268 100644
--- a/phpBB/styles/subSilver/template/posting_body.html
+++ b/phpBB/styles/subSilver/template/posting_body.html
@@ -194,7 +194,7 @@ function checkForm()
<td class="row2">
<!-- BEGIN to_recipient -->
<span class="genmed">
- <a href="{to_recipient.U_VIEW}"><!-- IF to_recipient.COLOUR --><b style="color:#{to_recipient.COLOUR}"><!-- ELSE --><b<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</b></a>&nbsp;</span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" />&nbsp;<!-- ENDIF -->
+ <a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{to_recipient.NAME}</b></a>&nbsp;</span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" />&nbsp;<!-- ENDIF -->
<!-- BEGINELSE -->
<span class="genmed">{L_NO_TO_RECIPIENT}</span>
<!-- END to_recipient -->
@@ -205,7 +205,7 @@ function checkForm()
<td class="row2">
<!-- BEGIN bcc_recipient -->
<span class="genmed">
- <a href="{bcc_recipient.U_VIEW}"><!-- IF bcc_recipient.COLOUR --><b style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><b<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</b></a>&nbsp;</span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" />&nbsp;<!-- ENDIF -->
+ <a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{bcc_recipient.NAME}</b></a>&nbsp;</span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" />&nbsp;<!-- ENDIF -->
<!-- BEGINELSE -->
<span class="genmed">{L_NO_BCC_RECIPIENT}</span>
<!-- END bcc_recipient -->
diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
index 8fcc265860..868cb063c9 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
@@ -27,7 +27,7 @@
<td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td>
<td class="gen">
<!-- BEGIN to_recipient -->
- <a href="{to_recipient.U_VIEW}"><!-- IF to_recipient.COLOUR --><span style="color:#{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span></a>&nbsp;
+ <a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{to_recipient.NAME}</a>&nbsp;
<!-- END to_recipient -->
</td>
</tr>
@@ -38,7 +38,7 @@
<td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td>
<td class="gen">
<!-- BEGIN bcc_recipient -->
- <a href="{bcc_recipient.U_VIEW}"><!-- IF bcc_recipient.COLOUR --><span style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span></a>&nbsp;
+ <a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{bcc_recipient.NAME}</a>&nbsp;
<!-- END bcc_recipient -->
</td>
</tr>
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 4fdf762baf..9783f9f29e 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -67,9 +67,9 @@
<tr>
<!-- IF S_TOPIC_ICONS -->
- <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
+ <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
<!-- ELSE -->
- <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
+ <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
<!-- ENDIF -->
</tr>
<!-- END topicrow -->
@@ -188,9 +188,9 @@
<tr>
<!-- IF S_TOPIC_ICONS -->
- <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
+ <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
<!-- ELSE -->
- <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
+ <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
<!-- ENDIF -->
</tr>
<!-- END topicrow -->
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 61d63c3d9c..6e523b5cc1 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -52,7 +52,7 @@
<!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
<!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
</td>
- <td class="nav" align="right" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
+ <td class="nav" align="right" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a><!-- IF U_VIEW_UNREAD_POST --> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a><!-- ENDIF --> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
</tr>
</table>
</td>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 6c85ed7ffe..156540b5a7 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -210,6 +210,9 @@ if ($sort_days)
$start = 0;
}
$sql_limit_time = "AND t.topic_last_post_time >= $min_post_time";
+
+ // Make sure we have information about day selection ready
+ $template->assign_var('S_SORT_DAYS', true);
}
else
{
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 14ab1f69ee..f05030493c 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -550,7 +550,6 @@ $template->assign_vars(array(
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&amp;t=$topic_id",
'U_FORUM' => $server_path,
- 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => $viewtopic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=previous"),
@@ -828,7 +827,14 @@ $db->sql_freeresult($result);
if (!sizeof($post_list))
{
- trigger_error('NO_TOPIC');
+ if ($sort_days)
+ {
+ trigger_error('NO_POSTS_TIME_FRAME');
+ }
+ else
+ {
+ trigger_error('NO_TOPIC');
+ }
}
// Holding maximum post time for marking topic read
@@ -1490,7 +1496,37 @@ if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'
markread('topic', $forum_id, $topic_id, $max_post_time);
// Update forum info
- update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+ $all_marked_read = update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+}
+else
+{
+ $all_marked_read = true;
+}
+
+// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link
+if ($all_marked_read && $post_unread)
+{
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+}
+else if (!$all_marked_read)
+{
+ $last_page = ((floor($start / $config['posts_per_page']) + 1) == max(ceil($total_posts / $config['posts_per_page']), 1)) ? true : false;
+
+ // What can happen is that we are at the last displayed page. If so, we also display the #unread link based in $post_unread
+ if ($last_page && $post_unread)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+ }
+ else if (!$last_page)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ ));
+ }
}
// Change encoding if appropriate