Update OTS_Base_List.php

This commit is contained in:
tobi132 2019-12-03 03:10:53 +01:00
parent 56e9d85fc2
commit 6b931de37d

View File

@ -138,36 +138,6 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
$this->db = POT::getInstance()->getDBHandle();
}
/**
* Magic PHP5 method.
*
* <p>
* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
* </p>
*
* @version 0.1.3
* @param array $properties List of object properties.
*/
public static function __set_state($properties)
{
// deletes database handle
if( isset($properties['db']) )
{
unset($properties['db']);
}
// initializes new object with current database connection
$object = new self();
// loads properties
foreach($properties as $name => $value)
{
$object->$name = $value;
}
return $object;
}
/**
* Sets LIMIT clause.
*
@ -402,7 +372,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
}
// ORDER BY clause
if(isset($count) || empty($this->orderBy) )
if(empty($this->orderBy) )
{
$orderBy = '';
}