Page MenuHomePhabricator

D21636.diff
No OneTemporary

D21636.diff

diff --git a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php
--- a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php
+++ b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php
@@ -71,6 +71,7 @@
protected function getBuiltinQueryNames() {
$names = array(
+ 'active' => pht('Active Devices'),
'all' => pht('All Devices'),
);
@@ -78,11 +79,13 @@
}
public function buildSavedQueryFromBuiltin($query_key) {
-
$query = $this->newSavedQuery();
$query->setQueryKey($query_key);
switch ($query_key) {
+ case 'active':
+ $active_statuses = AlmanacDeviceStatus::getActiveStatusList();
+ return $query->setParameter('statuses', $active_statuses);
case 'all':
return $query;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 5:42 PM (5 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6992668
Default Alt Text
D21636.diff (854 B)

Event Timeline