aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page
diff options
context:
space:
mode:
Diffstat (limited to 'admin/page')
-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 d97370d..0506a0d 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){}
}
}