Search with desc order fixed.
This commit is contained in:
parent
b1c0f2c582
commit
89789aa3bf
|
@ -370,7 +370,10 @@ class DataEngine {
|
||||||
if (!is_array($orderbyQns)) {
|
if (!is_array($orderbyQns)) {
|
||||||
$orderbyQns = array($orderbyQns);
|
$orderbyQns = array($orderbyQns);
|
||||||
}
|
}
|
||||||
$desc = (isset($criteria['desc']) ? $criteria['desc'] : NULL);
|
$descA = (isset($criteria['desc']) ? $criteria['desc'] : NULL);
|
||||||
|
if (!is_array($descA)) {
|
||||||
|
$descA = array($descA);
|
||||||
|
}
|
||||||
$orderJoinSql = array();
|
$orderJoinSql = array();
|
||||||
$orderBySql = array();
|
$orderBySql = array();
|
||||||
foreach ($orderbyQns as $j => $orderbyQn) {
|
foreach ($orderbyQns as $j => $orderbyQn) {
|
||||||
|
@ -378,7 +381,7 @@ class DataEngine {
|
||||||
$obSplitQn = XML_Util::splitQualifiedName($orderbyQn);
|
$obSplitQn = XML_Util::splitQualifiedName($orderbyQn);
|
||||||
$obNs = $obSplitQn['namespace'];
|
$obNs = $obSplitQn['namespace'];
|
||||||
$obLp = $obSplitQn['localPart'];
|
$obLp = $obSplitQn['localPart'];
|
||||||
$desc = (isset($criteria['desc'][$i]) ? $criteria['desc'][$i] : NULL);
|
$desc = (isset($descA[$j]) ? $descA[$j] : NULL);
|
||||||
$retype = ($obLp == 'mtime' ? '::timestamp with time zone' : '' );
|
$retype = ($obLp == 'mtime' ? '::timestamp with time zone' : '' );
|
||||||
$orderJoinSql[] =
|
$orderJoinSql[] =
|
||||||
"LEFT JOIN {$this->mdataTable} m$i\n".
|
"LEFT JOIN {$this->mdataTable} m$i\n".
|
||||||
|
@ -440,10 +443,10 @@ class DataEngine {
|
||||||
'gunid' => $gunid,
|
'gunid' => $gunid,
|
||||||
'type' => $it['ftype'],
|
'type' => $it['ftype'],
|
||||||
'title' => $values['dc:title'],
|
'title' => $values['dc:title'],
|
||||||
'creator' => $values['dc:creator'],
|
'creator' => (isset($values['dc:creator']) ? $values['dc:creator'] : NULL ),
|
||||||
'duration' => $values['dcterms:extent'],
|
'duration' => $values['dcterms:extent'],
|
||||||
'length' => $values['dcterms:extent'],
|
'length' => $values['dcterms:extent'],
|
||||||
'source' => $values['dc:source'],
|
'source' => (isset($values['dc:source']) ? $values['dc:source'] : NULL ),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$eres[] = $it['txt'];
|
$eres[] = $it['txt'];
|
||||||
|
|
Loading…
Reference in New Issue