diff --git a/account.php b/account.php index f57eefbf1a1774d253890efa4a61ee3bb01096af..947a4c36f3aa62d83d7fb15447f9c5aecf9967df 100644 --- a/account.php +++ b/account.php @@ -88,7 +88,8 @@ elseif ($_POST) { $errors['err'] = __('Unable to register account. See messages below'); else { if (!($acct = ClientAccount::createForUser($user))) - $errors['err'] = __('Internal error. Unable to create new account'); + $errors['err'] = __('Unable to create new account.') + .' '.__('Internal error occurred'); elseif (!$acct->update($_POST, $errors)) $errors['err'] = __('Errors configuring your profile. See messages below'); } diff --git a/include/ajax.search.php b/include/ajax.search.php index 3342ac46d2e69d7a3dd5023e873fc92989693b73..7e22a87901c5ab73ef9ac86b250ea48711651535 100644 --- a/include/ajax.search.php +++ b/include/ajax.search.php @@ -140,7 +140,7 @@ class SearchAjaxAPI extends AjaxController { elseif ($search->__new__) Http::response(400, 'A name is required'); if (!$search->save()) { - Http::response(500, 'Internal error. Unable to update search'); + Http::response(500, 'Unable to update search. Internal error occurred'); } Http::response(201, $this->encode(array( 'id' => $search->id, diff --git a/include/ajax.thread.php b/include/ajax.thread.php index 470f9276e24a6d3c4c15a7d054422799db70c9b1..f53a55182d86b0de6348ea6d5b00d815d2465966 100644 --- a/include/ajax.thread.php +++ b/include/ajax.thread.php @@ -123,7 +123,7 @@ class ThreadAjaxAPI extends AjaxController { if($errors && $errors['err']) { $info +=array('error' => $errors['err']); } else { - $info +=array('error' =>__('Unable to add collaborator. Internal error')); + $info +=array('error' =>__('Unable to add collaborator.').' '.__('Internal error occurred')); } return self::_addcollaborator($thread, $user, $form, $info); diff --git a/include/class.collaborator.php b/include/class.collaborator.php index 2d73efbfd26aa211dd0e45adfe6b3510e0730e69..0de95b6e48df9810e915dac35e2d61d802380773 100644 --- a/include/class.collaborator.php +++ b/include/class.collaborator.php @@ -147,7 +147,8 @@ implements EmailContact, ITicketUser { if ($collab->save(true)) return $collab; - $errors['err'] = __('Unable to add collaborator. Internal error'); + $errors['err'] = __('Unable to add collaborator.') + .' '.__('Internal error occurred'); return false; } diff --git a/include/class.dept.php b/include/class.dept.php index 93f92d754ad613b3afe4ad7b3b9655ba211b6d15..ba15038c2169f39ec64f243d9da3286e79d05bd7 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -613,7 +613,8 @@ implements TemplateVariable { $id = $this->id; if ($id && $id != $vars['id']) - $errors['err']=__('Missing or invalid Dept ID (internal error).'); + $errors['err']=__('Missing or invalid Dept ID.') + .' '.__('Internal error occurred'); if (!$vars['name']) { $errors['name']=__('Name required'); diff --git a/include/class.email.php b/include/class.email.php index 2b5f5e033973b65f0b9a5862e57af2311f6488db..2cd7fe3efd78f6ac310f7bb08b2c9e94d9643abb 100644 --- a/include/class.email.php +++ b/include/class.email.php @@ -248,7 +248,8 @@ class Email extends VerySimpleModel { $id = isset($this->email_id) ? $this->getId() : 0; if($id && $id!=$vars['id']) - $errors['err']=__('Internal error. Get technical help.'); + $errors['err']=__('Get technical help.') + .' '.__('Internal error occurred'); if(!$vars['email'] || !Validator::is_email($vars['email'])) { $errors['email']=__('Valid email required'); diff --git a/pwreset.php b/pwreset.php index e083d3956bd3cb0e5aa5ca4777342926e588b278..2461ec3cf6971a736cf5821099a890476963c39f 100644 --- a/pwreset.php +++ b/pwreset.php @@ -23,7 +23,8 @@ if($_POST) { $inc = 'pwreset.sent.php'; } else - $banner = __('Unable to send reset email. Internal error'); + $banner = __('Unable to send reset email.') + .' '.__('Internal error occurred'); } else $banner = sprintf(__('Unable to verify username %s'), diff --git a/scp/orgs.php b/scp/orgs.php index a58e985b522764863a9b43b239ed60e1b1f69623..d08400fc91f25da6cca5e99c4098e7b38c74e563 100644 --- a/scp/orgs.php +++ b/scp/orgs.php @@ -101,7 +101,8 @@ if ($_POST) { if (!($query=$_SESSION[':Q:orgs'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveOrganizations($query, __('organizations')."-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to export results'); + $errors['err'] = __('Unable to export results.') + .' '.__('Internal error occurred'); } $page = 'orgs.inc.php'; @@ -118,7 +119,8 @@ if ($org) { $filename = sprintf('%s-tickets-%s.csv', $org->getName(), strftime('%Y%m%d')); if (!Export::saveTickets($query, $filename, 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } break; } diff --git a/scp/profile.php b/scp/profile.php index cf77b05f00fc8197696aa5f781cb37fd09c946d4..0a46875e7f3ae2812c366facb72f27702e7eaebb 100644 --- a/scp/profile.php +++ b/scp/profile.php @@ -20,7 +20,8 @@ require_once(INCLUDE_DIR.'class.export.php'); // For paper sizes $msg=''; $staff=Staff::lookup($thisstaff->getId()); if($_POST && $_POST['id']!=$thisstaff->getId()) { //Check dummy ID used on the form. - $errors['err']=__('Internal Error. Action Denied'); + $errors['err']=__('Action Denied.') + .' '.__('Internal error occurred'); } elseif(!$errors && $_POST) { //Handle post if(!$staff) diff --git a/scp/tasks.php b/scp/tasks.php index a45635ea042efeaeb45d4bd10735e82231c57e53..327de9a268937bebc73453e777e97121fd7d2130 100644 --- a/scp/tasks.php +++ b/scp/tasks.php @@ -225,7 +225,8 @@ if($task) { // Auto add new fields to the entries foreach ($forms as $f) $f->addMissingFields(); } elseif($_REQUEST['a'] == 'print' && !$task->pdfExport($_REQUEST['psize'])) - $errors['err'] = __('Internal error: Unable to print to PDF'); + $errors['err'] = __('Unable to print to PDF.') + .' '.__('Internal error occurred'); } else { $inc = 'tasks.inc.php'; if ($_REQUEST['a']=='open' && @@ -236,7 +237,8 @@ if($task) { if (!($query=$_SESSION[':Q:tasks'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveTasks($query, "tasks-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } //Clear active submenu on search with no status diff --git a/scp/tickets.php b/scp/tickets.php index 0ad162b2947dcda98d9fc543b6bd659d8c4adfa7..8aeb537f52436d59d26f5fc58a6e4e9836453650 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -463,7 +463,8 @@ if($ticket) { $f->addMissingFields(); } } elseif($_REQUEST['a'] == 'print' && !$ticket->pdfExport($_REQUEST['psize'], $_REQUEST['notes'])) - $errors['err'] = __('Internal error: Unable to export the ticket to PDF for print.'); + $errors['err'] = __('Unable to export the ticket to PDF for print.') + .' '.__('Internal error occurred'); } else { $inc = 'tickets.inc.php'; if ($_REQUEST['a']=='open' && @@ -474,7 +475,8 @@ if($ticket) { if (!($query=$_SESSION[':Q:tickets'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveTickets($query, "tickets-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } //Clear active submenu on search with no status diff --git a/scp/users.php b/scp/users.php index c3525c4d1bb6292587c3782e62b8479a0b64526e..e4bee2dc861411dfc8fac4f69d6462b6343128c7 100644 --- a/scp/users.php +++ b/scp/users.php @@ -167,7 +167,8 @@ if ($_POST) { if (!($query=$_SESSION[':Q:users'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveUsers($query, __("users")."-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } $page = 'users.inc.php'; @@ -184,7 +185,8 @@ if ($user ) { $filename = sprintf('%s-tickets-%s.csv', $user->getName(), strftime('%Y%m%d')); if (!Export::saveTickets($query, $filename, 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } break; } diff --git a/tickets.php b/tickets.php index 5d2a07ffbdf4db5a3550ee04baa6a35cf911b2d2..5795925f4bdffdb051dabd64b2f033da0cbb2d4c 100644 --- a/tickets.php +++ b/tickets.php @@ -112,7 +112,8 @@ elseif (is_object($ticket) && $ticket->getId()) { switch(strtolower($_REQUEST['a'])) { case 'print': if (!$ticket || !$ticket->pdfExport($_REQUEST['psize'])) - $errors['err'] = __('Internal error: Unable to print to PDF'); + $errors['err'] = __('Unable to print to PDF.') + .' '.__('Internal error occurred'); break; } }