getDB(); $data = new ModuleInstance(); $data->site_id = $siteId; $data->instance = $name; $data->module = $module; $data->visible = in_array($access, array('none','user','all','acl')) ? $access : 'none'; $db->table(self::$TBL_INST)->insert($data); } /** * Removes the basic instance info rows of a module from the database. * * @param integer $siteId * the id of the site * @param string $name * the instance name */ public static function removeInstance($siteId, $name) { $db = System::getInstance()->getDB(); $search = array(); $search['site_id'] = $siteId; $search['instance'] = $name; ACLSvc::clearInstanceACL($siteId, $name); $db->table(self::$TBL_INST)->delete($search); } }