$companies->insert();
$companies->onInsert(array(), $roo);
}
+
+ function owner()
+ {
+ if (empty($this->owner_id)) {
+ return false;
+ }
+ static $cache = false;
+ if ($cache !== false && isset($cache[$this->owner_id])) {
+ return $cache[$this->owner_id];
+ }
+ $o = DB_DataObject::factory('core_company');
+ if (!$o->get($this->owner_id)) {
+ return false;
+ }
+ $cache[$this->owner_id] = $o;
+ return $o;
+
+ }
+
+ /// look up the company which is the system owner...
static function lookupOwner()
{
static $cache = false;
}
if (strpos($id,':') > 0) { // id format tablename:id:-imgtype
-
+ //DB_DataObject::debugLevel(1);
if (!$this->authUser) {
$this->imgErr("not-authenticated-using-colon-format",$s);
}
$img->limit(1);
if (!$img->find(true)) {
+ die("HERE");
$this->imgErr("no images for that item: " . htmlspecialchars($id),$s);
}