From 6e52ae176742cfe8072b7f0d854c52cf390ec350 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 15 Jan 2006 04:52:54 +0000 Subject: [PATCH] r719: Refactoring again.. this time to items --- includes/class_message_reporter.php | 8 ++++---- register.php | 18 +++++++++--------- userctrl.php | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/includes/class_message_reporter.php b/includes/class_message_reporter.php index 7698b25..c6a26df 100755 --- a/includes/class_message_reporter.php +++ b/includes/class_message_reporter.php @@ -28,7 +28,7 @@ class Message_Reporter * Phrase array; null by default * @var array */ - var $list = null; + var $items = null; /** * The processed text for a message @@ -46,7 +46,7 @@ class Message_Reporter global $bugsys; global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar; - if (count($this->list) > 0 AND empty($this->process)) + if (count($this->items) > 0 AND empty($this->process)) { trigger_error('Message_Reporter->phrase is an array so please use Message_Reporter::error_list_process() to prepare it', E_USER_ERROR); } @@ -64,13 +64,13 @@ class Message_Reporter */ function error_list_process() { - if (!is_array($this->list) OR count($this->list) < 1) + if (!is_array($this->items) OR count($this->items) < 1) { return; } $this->process = "\n\n
    "; - foreach ($this->list AS $phrase) + foreach ($this->items AS $phrase) { $this->process .= "\n\t
  1. " . $phrase . "
  2. "; } diff --git a/register.php b/register.php index 2c0798f..1d10eae 100755 --- a/register.php +++ b/register.php @@ -59,45 +59,45 @@ if ($_POST['do'] == 'insert') if ($bugsys->in['email'] != $bugsys->in['confirmemail']) { - $message->list[] = $lang->string('The emails you entered do not match.'); + $message->items[] = $lang->string('The emails you entered do not match.'); } if (!$bugsys->in['email']) { - $message->list[] = $lang->string('The email you specified was blank.'); + $message->items[] = $lang->string('The email you specified was blank.'); } if ($bugsys->in['password'] != $bugsys->in['confirmpassword']) { - $message->list[] = $lang->string('The passwords you entered did not match.'); + $message->items[] = $lang->string('The passwords you entered did not match.'); } if (!$bugsys->in['password']) { - $message->list[] = $lang->string('The password you specified was blank.'); + $message->items[] = $lang->string('The password you specified was blank.'); } if (!$bugsys->in['displayname']) { - $message->list[] = $lang->string('The display name you specified was blank.'); + $message->items[] = $lang->string('The display name you specified was blank.'); } if (!$funct->is_valid_email($bugsys->in['email'])) { - $message->list[] = $lang->string('The specified email is invalid.'); + $message->items[] = $lang->string('The specified email is invalid.'); } if (is_array($db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE email = '" . $bugsys->in['email'] . "'"))) { - $message->list[] = $lang->string('The specified email is already in use.'); + $message->items[] = $lang->string('The specified email is already in use.'); } if (is_array($db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE displayname = '" . $bugsys->in['displayname'] . "'"))) { - $message->list[] = $lang->string('That display name is already in use by another user.'); + $message->items[] = $lang->string('That display name is already in use by another user.'); } - if ($message->list) + if ($message->items) { $message->error_list_process(); $message->error(); diff --git a/userctrl.php b/userctrl.php index 112e87a..0b17434 100644 --- a/userctrl.php +++ b/userctrl.php @@ -43,7 +43,7 @@ if ($_POST['do'] == 'update') $count = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE displayname = '" . $bugsys->in['displayname'] . "' AND userid <> " . $bugsys->userinfo['userid']); if ($count) { - $message->list[] = $lang->string('That display name is already in use by another user'); + $message->items[] = $lang->string('That display name is already in use by another user'); } // ------------------------------------------------------------------- @@ -52,13 +52,13 @@ if ($_POST['do'] == 'update') { if (empty($bugsys->in['validate'])) { - $message->list[] = $lang->string('You need to enter your current password to change your email or password'); + $message->items[] = $lang->string('You need to enter your current password to change your email or password'); } else { if (md5(md5($bugsys->in['validate']) . md5($bugsys->userinfo['salt'])) != $bugsys->userinfo['password']) { - $message->list[] = $lang->string('Your authentication password does not match the one in our records'); + $message->items[] = $lang->string('Your authentication password does not match the one in our records'); } } } @@ -69,12 +69,12 @@ if ($_POST['do'] == 'update') { if (!empty($bugsys->in['email']) AND empty($bugsys->in['email_confirm'])) { - $message->list[] = $lang->string('You need to enter both the email and confirm email fields to change your address'); + $message->items[] = $lang->string('You need to enter both the email and confirm email fields to change your address'); } if ($bugsys->in['email'] != $bugsys->in['email_confirm']) { - $message->list[] = $lang->string('Your email and confirm email addresses do not match'); + $message->items[] = $lang->string('Your email and confirm email addresses do not match'); } if ($bugsys->in['email']) @@ -82,7 +82,7 @@ if ($_POST['do'] == 'update') $count = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE email = '" . $bugsys->in['email'] . "' AND userid <> " . $bugsys->userinfo['userid']); if ($count) { - $message->list[] = $lang->string('That email address is already in use'); + $message->items[] = $lang->string('That email address is already in use'); } } @@ -95,13 +95,13 @@ if ($_POST['do'] == 'update') { if (!empty($bugsys->in['password']) AND empty($bugsys->in['password_confirm'])) { - $message->list[] = $lang->string('You need to enter both the password and confirm password fields to change your password'); + $message->items[] = $lang->string('You need to enter both the password and confirm password fields to change your password'); } else { if ($bugsys->in['password'] != $bugsys->in['password_confirm']) { - $message->list[] = $lang->string('Your password and confirm password do not match'); + $message->items[] = $lang->string('Your password and confirm password do not match'); } } @@ -121,7 +121,7 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // error handling - if ($message->list) + if ($message->items) { $message->error_list_process(); -- 2.43.5