apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
/**
	 * Find file ids matching the given filter rules
	 *
	 * @param array $filterRules
	 * @return array array of unique file id results
	 *
	 * @throws TagNotFoundException whenever a tag was not found
	 */
Find file ids matching the given filter rules
@param array $filterRules
@return array array of unique file id results

@throws TagNotFoundException whenever a tag was not found
Find file ids matching the given filter rules @param array $filterRules @return array array of unique file id results @throws TagNotFoundException whenever a tag was not found
protected function processFilterRules($filterRules) {
		$ns = '{' . $this::NS_OWNCLOUD . '}';
		$resultFileIds = null;
		$systemTagIds = [];
		$favoriteFilter = null;
		foreach ($filterRules as $filterRule) {
			if ($filterRule['name'] === $ns . 'systemtag') {
				$systemTagIds[] = $filterRule['value'];
			}
			if ($filterRule['name'] === $ns . 'favorite') {
				$favoriteFilter = true;
			}
		}
		if ($favoriteFilter !== null) {
			$resultFileIds = $this->fileTagger->load('files')->getFavorites();
			if (empty($resultFileIds)) {
				return [];
			}
		}
		if (!empty($systemTagIds)) {
			$fileIds = $this->getSystemTagFileIds($systemTagIds);
			if (empty($resultFileIds)) {
				$resultFileIds = $fileIds;
			} else {
				$resultFileIds = array_intersect($fileIds, $resultFileIds);
			}
		}
		return $resultFileIds;
	}
protected function processFilterRules ( $ filterRules ) { $ ns = '{' . $ this :: NS_OWNCLOUD . '}' ; $ resultFileIds = null ; $ systemTagIds = [ ] ; $ favoriteFilter = null ; foreach ( $ filterRules as $ filterRule ) { if ( $ filterRule [ 'name' ] === $ ns . 'systemtag' ) { $ systemTagIds [ ] = $ filterRule [ 'value' ] ; } if ( $ filterRule [ 'name' ] === $ ns . 'favorite' ) { $ favoriteFilter = true ; } } if ( $ favoriteFilter !== null ) { $ resultFileIds = $ this -> fileTagger -> load ( 'files' ) -> getFavorites ( ) ; if ( empty ( $ resultFileIds ) ) { return [ ] ; } } if ( ! empty ( $ systemTagIds ) ) { $ fileIds = $ this -> getSystemTagFileIds ( $ systemTagIds ) ; if ( empty ( $ resultFileIds ) ) { $ resultFileIds = $ fileIds ; } else { $ resultFileIds = array_intersect ( $ fileIds , $ resultFileIds ) ; } } return $ resultFileIds ; }
Find file ids matching the given filter rules
 @param array $filterRules
 @return array array of unique file id results
Find file ids matching the given filter rules @param array $filterRules @return array array of unique file id results