From 4057b715fd9bf54939f1022d1904f272c1d27639 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 20 May 2006 22:23:21 +0000 Subject: [PATCH] r843: Use add_error() instead of accessing properties for $message --- editcomment.php | 2 +- newreport.php | 2 +- register.php | 4 ++-- userctrl.php | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/editcomment.php b/editcomment.php index dd06294..95feaee 100644 --- a/editcomment.php +++ b/editcomment.php @@ -65,7 +65,7 @@ if ($_POST['do'] == 'update') if ($bugsys->in['commentid'] == $bug['initialreport'] AND $bugsys->in['hidden']) { - $message->items[] = $lang->string('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.'); + $message->add_error($lang->string('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.')); } if (!$message->items) diff --git a/newreport.php b/newreport.php index 1158d10..ea89eaa 100755 --- a/newreport.php +++ b/newreport.php @@ -87,7 +87,7 @@ if ($_POST['do'] == 'insert') $pcv = parse_pcv_select($bugsys->in['pcv_select'], true); if (!$pcv) { - $message->items[] = $lang->string('Invalid product/component/version selected.'); + $message->add_error($lang->string('Invalid product/component/version selected.')); } $bug->set('productid', $pcv['product']); $bug->set('componentid', $pcv['component']); diff --git a/register.php b/register.php index 54521b6..26bdb48 100755 --- a/register.php +++ b/register.php @@ -46,12 +46,12 @@ if ($_POST['do'] == 'insert') if ($bugsys->in['email'] != $bugsys->in['confirmemail']) { - $message->items[] = $lang->string('The emails you entered do not match.'); + $message->add_error($lang->string('The emails you entered do not match.')); } if ($bugsys->in['password'] != $bugsys->in['confirmpassword']) { - $message->items[] = $lang->string('The passwords you entered did not match.'); + $message->add_error($lang->string('The passwords you entered did not match.')); } if (!$message->items) diff --git a/userctrl.php b/userctrl.php index 5d2b8fe..ca5f7c3 100644 --- a/userctrl.php +++ b/userctrl.php @@ -61,13 +61,13 @@ if ($_POST['do'] == 'update') { if (empty($bugsys->in['validate'])) { - $message->items[] = $lang->string('You need to enter your current password to change your email or password'); + $message->add_error($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->items[] = $lang->string('Your authentication password does not match the one in our records'); + $message->add_error($lang->string('Your authentication password does not match the one in our records')); } } } @@ -78,12 +78,12 @@ if ($_POST['do'] == 'update') { if (!empty($bugsys->in['email']) AND empty($bugsys->in['email_confirm'])) { - $message->items[] = $lang->string('You need to enter both the email and confirm email fields to change your address'); + $message->add_error($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->items[] = $lang->string('Your email and confirm email addresses do not match'); + $message->add_error($lang->string('Your email and confirm email addresses do not match')); } $userapi->set('email', $bugsys->in['email']); @@ -97,13 +97,13 @@ if ($_POST['do'] == 'update') { if (!empty($bugsys->in['password']) AND empty($bugsys->in['password_confirm'])) { - $message->items[] = $lang->string('You need to enter both the password and confirm password fields to change your password'); + $message->add_error($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->items[] = $lang->string('Your password and confirm password do not match'); + $message->add_error($lang->string('Your password and confirm password do not match')); } } -- 2.22.5