mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00
Update OTS_Base_List.php
This commit is contained in:
parent
56e9d85fc2
commit
6b931de37d
@ -138,36 +138,6 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
$this->db = POT::getInstance()->getDBHandle();
|
$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.
|
* Sets LIMIT clause.
|
||||||
*
|
*
|
||||||
@ -402,7 +372,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ORDER BY clause
|
// ORDER BY clause
|
||||||
if(isset($count) || empty($this->orderBy) )
|
if(empty($this->orderBy) )
|
||||||
{
|
{
|
||||||
$orderBy = '';
|
$orderBy = '';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user