mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
- 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
This commit is contained in:
parent
902285684d
commit
1d37b69ddd
41 changed files with 296 additions and 194 deletions
|
@ -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 -->
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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' => ' <span>[ <a href="' . $this->u_action . '&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 . '
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ class acp_bots
|
|||
|
||||
if (!$group_row)
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"));
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&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 . "&id=$bot_id&action=$action"));
|
||||
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&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 . "&id=$bot_id&action=$action"));
|
||||
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$bot_row['bot_lang'] = $bot_row['user_lang'];
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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...
|
||||
|
|
|
@ -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&mode=critical') . '">', '</a>');
|
||||
trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
trigger_error($message . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id));
|
||||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&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 . '&' . $this->parent_id));
|
||||
trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $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)
|
||||
{
|
||||
|
|
|
@ -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 . '&action=list&g=' . $group_id));
|
||||
trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&action=list&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 . '&action=list&g=' . $group_id));
|
||||
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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 . '&action=details&id=' . $lang_id));
|
||||
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&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 . '&action=details&id=' . $lang_id));
|
||||
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&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 . '&action=details&id=' . $lang_id));
|
||||
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&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 . '&action=details&id=' . $lang_id));
|
||||
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&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 *
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $parent_id));
|
||||
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&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 . "
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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...
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 . "&action=edit&id=$theme_id&text_rows=$text_rows"));
|
||||
trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&action=edit&id=$theme_id&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);
|
||||
|
|
|
@ -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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&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 . '&u=' . $user_id));
|
||||
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$error = array();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -130,6 +130,7 @@ define('FIELD_BOOL', 4);
|
|||
define('FIELD_DROPDOWN', 5);
|
||||
define('FIELD_DATE', 6);
|
||||
|
||||
|
||||
// Additional constants
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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&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&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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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&u=' . $ug_id) . '">' : '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&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&u=' . $ug_id) . '"' . $user_colour . '>' : '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $ug_id) . '"' . $user_colour . '>') . $recipient_list[$type][$ug_id]['name'] . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- 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> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- 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> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- 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> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<span class="genmed">{L_NO_BCC_RECIPIENT}</span>
|
||||
<!-- END bcc_recipient -->
|
||||
|
|
|
@ -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>
|
||||
<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>
|
||||
<!-- 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>
|
||||
<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>
|
||||
<!-- END bcc_recipient -->
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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> </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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -550,7 +550,6 @@ $template->assign_vars(array(
|
|||
|
||||
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id",
|
||||
'U_FORUM' => $server_path,
|
||||
'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&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&t=$topic_id&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&t=$topic_id&view=unread") . '#unread',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// Change encoding if appropriate
|
||||
|
|
Loading…
Add table
Reference in a new issue