Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/query/PhrictionDocumentQuery.php
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | if ($this->parentPaths !== null || $this->ancestorPaths !== null) { | ||||
if ($max !== null) { | if ($max !== null) { | ||||
$parts[] = qsprintf( | $parts[] = qsprintf( | ||||
$conn, | $conn, | ||||
'd.depth <= %d', | 'd.depth <= %d', | ||||
$max); | $max); | ||||
} | } | ||||
$path_clauses[] = '('.implode(') AND (', $parts).')'; | if ($parts) { | ||||
$path_clauses[] = qsprintf($conn, '%LA', $parts); | |||||
} | |||||
} | } | ||||
$where[] = '('.implode(') OR (', $path_clauses).')'; | if ($path_clauses) { | ||||
$where[] = qsprintf($conn, '%LO', $path_clauses); | |||||
} | |||||
} | } | ||||
return $where; | return $where; | ||||
} | } | ||||
public function getBuiltinOrders() { | public function getBuiltinOrders() { | ||||
return parent::getBuiltinOrders() + array( | return parent::getBuiltinOrders() + array( | ||||
self::ORDER_HIERARCHY => array( | self::ORDER_HIERARCHY => array( | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |