/** * Creates the initial permission list for the specified gallery * $param int Gallery ID * @return boolean True if succesfull, false if not. */ function createDefaultPermissions($gallery_id) { $database =& JFactory::getDBO(); $parent_id = galleryUtils::getParentId($gallery_id); $sql = "INSERT INTO {$this->_table} " . "(gallery_id, parent_id) VALUES " . "('{$gallery_id}','{$parent_id}')"; $database->setQuery($sql); if ($database->query()) { return true; } else { return false; } }