* Phrase array; null by default
* @var array
*/
- var $phrase = null;
+ var $list = null;
/**
* The processed text for a message
global $bugsys;
global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
- if (count($this->phrase) > 0 AND empty($this->process))
+ if (count($this->list) > 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);
}
*/
function error_list_process()
{
- if (!is_array($this->phrase) OR count($this->phrase) < 1)
+ if (!is_array($this->list) OR count($this->list) < 1)
{
return;
}
$this->process = "\n\n<ol style=\"list-style-type: decimal\">";
- foreach ($this->phrase AS $phrase)
+ foreach ($this->list AS $phrase)
{
$this->process .= "\n\t<li>" . $phrase . "</li>";
}
if ($bugsys->in['email'] != $bugsys->in['confirmemail'])
{
- $message->phrase[] = $lang->string('The emails you entered do not match.');
+ $message->list[] = $lang->string('The emails you entered do not match.');
}
if (!$bugsys->in['email'])
{
- $message->phrase[] = $lang->string('The email you specified was blank.');
+ $message->list[] = $lang->string('The email you specified was blank.');
}
if ($bugsys->in['password'] != $bugsys->in['confirmpassword'])
{
- $message->phrase[] = $lang->string('The passwords you entered did not match.');
+ $message->list[] = $lang->string('The passwords you entered did not match.');
}
if (!$bugsys->in['password'])
{
- $message->phrase[] = $lang->string('The password you specified was blank.');
+ $message->list[] = $lang->string('The password you specified was blank.');
}
if (!$bugsys->in['displayname'])
{
- $message->phrase[] = $lang->string('The display name you specified was blank.');
+ $message->list[] = $lang->string('The display name you specified was blank.');
}
if (!$funct->is_valid_email($bugsys->in['email']))
{
- $message->phrase[] = $lang->string('The specified email is invalid.');
+ $message->list[] = $lang->string('The specified email is invalid.');
}
if (is_array($db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE email = '" . $bugsys->in['email'] . "'")))
{
- $message->phrase[] = $lang->string('The specified email is already in use.');
+ $message->list[] = $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->phrase[] = $lang->string('That display name is already in use by another user.');
+ $message->list[] = $lang->string('That display name is already in use by another user.');
}
- if ($message->phrase)
+ if ($message->list)
{
$message->error_list_process();
$message->error();
$count = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE displayname = '" . $bugsys->in['displayname'] . "' AND userid <> " . $bugsys->userinfo['userid']);
if ($count)
{
- $message->phrase[] = $lang->string('That display name is already in use by another user');
+ $message->list[] = $lang->string('That display name is already in use by another user');
}
// -------------------------------------------------------------------
{
if (empty($bugsys->in['validate']))
{
- $message->phrase[] = $lang->string('You need to enter your current password to change your email or password');
+ $message->list[] = $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->phrase[] = $lang->string('Your authentication password does not match the one in our records');
+ $message->list[] = $lang->string('Your authentication password does not match the one in our records');
}
}
}
{
if (!empty($bugsys->in['email']) AND empty($bugsys->in['email_confirm']))
{
- $message->phrase[] = $lang->string('You need to enter both the email and confirm email fields to change your address');
+ $message->list[] = $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->phrase[] = $lang->string('Your email and confirm email addresses do not match');
+ $message->list[] = $lang->string('Your email and confirm email addresses do not match');
}
if ($bugsys->in['email'])
$count = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE email = '" . $bugsys->in['email'] . "' AND userid <> " . $bugsys->userinfo['userid']);
if ($count)
{
- $message->phrase[] = $lang->string('That email address is already in use');
+ $message->list[] = $lang->string('That email address is already in use');
}
}
{
if (!empty($bugsys->in['password']) AND empty($bugsys->in['password_confirm']))
{
- $message->phrase[] = $lang->string('You need to enter both the password and confirm password fields to change your password');
+ $message->list[] = $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->phrase[] = $lang->string('Your password and confirm password do not match');
+ $message->list[] = $lang->string('Your password and confirm password do not match');
}
}
// -------------------------------------------------------------------
// error handling
- if ($message->phrase)
+ if ($message->list)
{
$message->error_list_process();