1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-30 19:49:54 +02: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:
Meik Sievertsen
2006-08-28 15:50:33 +00:00
parent 902285684d
commit 1d37b69ddd
41 changed files with 296 additions and 194 deletions

View File

@@ -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(