Error(); if (!$Group || !is_object($Group)) { $this->setNotValidGroupObjectError(); return false; } if ($Group->isError()) { $this->setError('DocumentManager:: '. $Group->getErrorMessage()); return false; } $this->Group =& $Group; return true; } /** * getGroup - get the Group object this Document is associated with. * * @return Object The Group object. */ function &getGroup() { return $this->Group; } /** * getTrashID - the trash doc_group id for this DocumentManager. * * @return int The trash doc_group id. */ function getTrashID() { if (isset($this->data_array['trashid'])) return $this->data_array['trashid']; $res = db_query_params('SELECT doc_group from doc_groups WHERE groupname = $1 AND group_id = $2 AND stateid = $3', array('.trash', $this->Group->getID(), '2')); if (db_numrows($res) == 1) { $arr = db_fetch_array($res); $this->data_array['trashid'] = $arr['doc_group']; return $this->data_array['trashid']; } else { $this->setError('DocumentManager:: trash not found'); return -1; } } } ?>