Commit 127def77 authored by mku's avatar mku

ZP-380 #comment Implement DocumentLibrary in Search - prevent errors when...

ZP-380 #comment Implement DocumentLibrary in Search  - prevent errors when searching documents on android  #time 30m

git-svn-id: https://z-push.org/svn/z-push/trunk@1653 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent b1373928
......@@ -166,6 +166,27 @@ class Search extends RequestProcessor {
if(!self::$decoder->getElementEndTag()) // SYNC_SEARCH_AND
return false;
}
elseif (self::$decoder->getElementStartTag(SYNC_SEARCH_EQUALTO)) {
// linkid can be an empty tag as well as have value
if(self::$decoder->getElementStartTag(SYNC_DOCUMENTLIBRARY_LINKID)) {
if (($linkId = self::$decoder->getElementContent()) !== false) {
$cpo->SetLinkId($linkId);
if(!self::$decoder->getElementEndTag()) { // SYNC_DOCUMENTLIBRARY_LINKID
return false;
}
}
}
if(self::$decoder->getElementStartTag(SYNC_SEARCH_VALUE)) {
$searchvalue = self::$decoder->getElementContent();
$cpo->SetSearchValueLess($searchvalue);
if(!self::$decoder->getElementEndTag()) // SYNC_SEARCH_VALUE
return false;
}
if(!self::$decoder->getElementEndTag()) // SYNC_SEARCH_EQUALTO
return false;
}
if(!self::$decoder->getElementEndTag()) // SYNC_SEARCH_QUERY
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment