mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
NOISSUE, trivial code change
This commit is contained in:
parent
c30a6be738
commit
b3b7f0aed8
1 changed files with 13 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue