new SearchPropertyDefinition('{DAV:}getlastmodified', true, true, true, SearchPropertyDefinition::DATATYPE_DATETIME),
new SearchPropertyDefinition(FilesPlugin::SIZE_PROPERTYNAME, true, true, true, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
new SearchPropertyDefinition(TagsPlugin::FAVORITE_PROPERTYNAME, true, true, true, SearchPropertyDefinition::DATATYPE_BOOLEAN),
+ new SearchPropertyDefinition(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, true, true, false, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
// select only properties
new SearchPropertyDefinition('{DAV:}resourcetype', false, true, false),
new SearchPropertyDefinition(FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME, false, true, false),
new SearchPropertyDefinition(FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME, false, true, false),
new SearchPropertyDefinition(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, false, true, false, SearchPropertyDefinition::DATATYPE_BOOLEAN),
- new SearchPropertyDefinition(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, false, true, false, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
new SearchPropertyDefinition(FilesPlugin::FILEID_PROPERTYNAME, false, true, false, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
];
}
case Operator::OPERATION_IS_COLLECTION:
return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);
default:
- throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType. ' (' . $operator->type . ')');
+ throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')');
}
}
return 'favorite';
case TagsPlugin::TAGS_PROPERTYNAME:
return 'tagname';
+ case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME:
+ return 'fileid';
default:
throw new \InvalidArgumentException('Unsupported property for search or order: ' . $propertyName);
}
return 0 + $value;
}
$date = \DateTime::createFromFormat(\DateTime::ATOM, $value);
- return ($date instanceof \DateTime) ? $date->getTimestamp() : 0;
+ return ($date instanceof \DateTime) ? $date->getTimestamp() : 0;
default:
return $value;
}
'name' => 'string',
'size' => 'integer',
'tagname' => 'string',
- 'favorite' => 'boolean'
+ 'favorite' => 'boolean',
+ 'fileid' => 'integer'
];
$comparisons = [
'mimetype' => ['eq', 'like'],
'size' => ['eq', 'gt', 'lt', 'gte', 'lte'],
'tagname' => ['eq', 'like'],
'favorite' => ['eq'],
+ 'fileid' => ['eq']
];
if (!isset($types[$operator->getField()])) {