aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/page/search.php')
-rw-r--r--admin/page/search.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/admin/page/search.php b/admin/page/search.php
index eb57a7c..9f68b69 100644
--- a/admin/page/search.php
+++ b/admin/page/search.php
@@ -14,17 +14,15 @@ require '../../core/application.php';
# IF: Handle search request
#===============================================================================
if($search = HTTP::GET('q')) {
- if($pageIDs = Page\Item::getSearchResultIDs($search, $Database)) {
- foreach($pageIDs as $pageID) {
- try {
- $Page = Page\Factory::build($pageID);
- $User = User\Factory::build($Page->attr('user'));
+ foreach(Page\Item::getSearchResults($search, $Database) as $Attribute) {
+ try {
+ $Page = Page\Factory::buildByAttribute($Attribute);
+ $User = User\Factory::build($Page->attr('user'));
- $pages[] = generatePageItemTemplate($Page, $User);
- }
- catch(Page\Exception $Exception){}
- catch(User\Exception $Exception){}
+ $pages[] = generatePageItemTemplate($Page, $User);
}
+ catch(Page\Exception $Exception){}
+ catch(User\Exception $Exception){}
}
}