}
function toEventString() {
- return $this->name;
+ $c = $this->client();
+ return ($c->id ? $c->toEventString() : '??'). ':' . $this->name;
}
/**
}
if (!empty($q['query']['distinct_client_id'])) {
+ // DB_DataObjecT::debuglevel(1);
$this->selectAdd();
$this->selectAdd('distinct(client_id)');
+ $this->selectAs(DB_DataObject::factory('Companies'), 'client_id_%s','join_client_id_id');
$this->groupBy('client_id');
-
+
}
// this is clipping related.. -- we should have an API for addons like this.. (and docs)
}
- function toRooArray($f='%s') {
- $ret = parent::toArray($f);
+ function toRooArray($req= array()) {
+ $ret = parent::toArray();
// sor tout
$ret['countrylist'] = $this->I18toArray('c',$ret['countries']);
$ret['languagelist'] = $this->I18toArray('l',$ret['languages']);
}
+ function client()
+ {
+ $c = DB_DataObject::factory('Companies');
+ $c->get($this->client_id);
+ return $c;
+ }
+
/**
* check who is trying to access this. false == access denied..
*/