public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
- function staticGet($k,$v=NULL) {
+ static function getKV($k,$v=NULL) {
+ // TODO: This must probably be turned into a non-static call
$i = DB_DataObject::staticGet('Status_network',$k,$v);
// Don't use local process cache; if we're fetching multiple
* @param string $dbname
* @param array $servers memcached servers to use for caching config info
*/
- static function setupDB($dbhost, $dbuser, $dbpass, $dbname, $servers)
+ static function setupDB($dbhost, $dbuser, $dbpass, $dbname, array $servers)
{
global $config;
static function memGet($k, $v)
{
if (!self::$cache) {
- return self::staticGet($k, $v);
+ return self::getKV($k, $v);
}
$ck = self::cacheKey($k, $v);
$sn = self::$cache->get($ck);
if (empty($sn)) {
- $sn = self::staticGet($k, $v);
+ $sn = self::getKV($k, $v);
if (!empty($sn)) {
self::$cache->set($ck, clone($sn));
}
}
}
- function update($orig=null)
+ function update($dataObject=false)
{
- if (is_object($orig)) {
- $orig->decache(); # might be different keys
+ if (is_object($dataObject)) {
+ $dataObject->decache(); # might be different keys
}
- return parent::update($orig);
+ return parent::update($dataObject);
}
/**
return $result;
}
- function delete()
+ function delete($useWhere=false)
{
$this->decache(); # while we still have the values!
- return parent::delete();
+ return parent::delete($useWhere);
}
/**
*/
function getTags()
{
- $result = Status_network_tag::getTags($this->site_id);
-
- // XXX : for backwards compatibility
- if (empty($result)) {
- return explode('|', $this->tags);
- }
-
- return $result;
+ return Status_network_tag::getTags($this->site_id);
}
/**
* @param array tags
* @fixme only add/remove differentials
*/
- function setTags($tags)
+ function setTags(array $tags)
{
$this->clearTags();
foreach ($tags as $tag) {