/** * Prepare security- and filter-based restrictions. * @access private */ protected function _prepare_restrictions() { parent::_prepare_restrictions(); if (!$this->_returns_no_data()) { include_once 'webcore/db/query_security.php'; $restriction = new QUERY_SECURITY_RESTRICTION($this, $this->_user); $sql = $restriction->as_sql(array(Privilege_set_folder, Privilege_set_entry, $this->_privilege_set)); if (!$sql) { $this->_set_returns_no_data(); } else { $this->_calculated_restrictions[] = $sql; } } }
/** * Perform any setup needed on each returned object. * Sets the parent folder for the object. * @param OBJECT_IN_FOLDER $obj * @access private */ protected function _prepare_object($obj) { parent::_prepare_object($obj); $obj->set_parent_folder($this->_folder); }
/** * Return the list of restrictions for calculating size. * @see _prepare_restrictions() * @return string[] * @access private */ protected function _count_restrictions() { $Result = parent::_count_restrictions(); $Result[] = $this->_usable_restriction; return $Result; }