/** * set a custom search exclude option, can set these basied on user/group * @param (object) $query * @return (Object) $query */ protected function excludeList($query) { // default search // search fields: (must be prefixed with search_ ) $exclude = array(); foreach ($_REQUEST as $name => $value) { if (strpos($name, 'exclude_') === 0 && !empty($value)) { // 'start_date:LIKE' => $start_where.'%' $exclude[str_replace('exclude_', '', $name) . ':NOT LIKE'] = $value . '%'; } } if (count($exclude) > 0) { // @TODO verify that they are valid column fields - see: xPDOManager::getColumnDef() $query->where($exclude); } return $query; }
/** * @brief checks if an event was edited and dies if it was * @param (object) $vevent - vevent object of the event * @param (int) $lastmodified - time of last modification as unix timestamp * @return (bool) */ public static function isNotModified($vevent, $lastmodified) { $last_modified = $vevent->__get('LAST-MODIFIED'); if ($last_modified && $lastmodified != $last_modified->getDateTime()->format('U')) { OCP\JSON::error(array('modified' => true)); exit; } return true; }
/** * Update Dependants, children, parents, ect.. * @Override this method is meant to be overridden * @param (object) $item * @return Boolean */ public function updateDependants($item) { require_once $this->modx->radui->getConfig('raduiPath') . 'matericalizedpaths.class.php'; $paths = new MaterializedPaths($this->modx, $config = array()); $paths->buildTree(array('form_id' => $item->get('form_id'))); return TRUE; }