NOISSUE, trivial code change

This commit is contained in:
ngleader 2013-11-25 22:06:23 +09:00
parent c30a6be738
commit b3b7f0aed8

View file

@ -96,9 +96,14 @@ class Object
*/
function setMessage($message = 'success')
{
if(Context::getLang($message))
$message = Context::getLang($message);
$this->message = $message;
if($str = Context::getLang($message))
{
$this->message = $str;
}
else
{
$this->message = $message;
}
// TODO This method always returns True. We'd better remove it
return TRUE;
@ -166,12 +171,11 @@ class Object
*/
function gets()
{
$num_args = func_num_args();
$args_list = func_get_args();
for($i = 0; $i < $num_args; $i++)
$args = func_get_args();
$output = new stdClass();
foreach($args as $arg)
{
$key = $args_list[$i];
$output->{$key} = $this->get($key);
$output->{$arg} = $this->get($arg);
}
return $output;
}
@ -209,7 +213,7 @@ class Object
function toBool()
{
// TODO This method is misleading in that it returns true if error is 0, which should be true in boolean representation.
return $this->error == 0 ? TRUE : FALSE;
return ($this->error == 0);
}
/**