aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/page')
-rw-r--r--core/include/page/list.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/include/page/list.php b/core/include/page/list.php
index 0165116..2bb2639 100644
--- a/core/include/page/list.php
+++ b/core/include/page/list.php
@@ -30,12 +30,12 @@ if(Application::get('PAGE.SINGLE_REDIRECT') === TRUE AND $count === '1') {
HTTP::redirect($Page->getURL());
}
-$execSQL = "SELECT id FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
-$pageIDs = $Database->query(sprintf($execSQL, Page\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN);
+$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
+$Statement = $Database->query(sprintf($execSQL, Page\Attribute::TABLE));
-foreach($pageIDs as $pageID) {
+while($Attribute = $Statement->fetchObject('Page\Attribute')) {
try {
- $Page = Page\Factory::build($pageID);
+ $Page = Page\Factory::buildByAttribute($Attribute);
$User = User\Factory::build($Page->attr('user'));
$ItemTemplate = generatePageItemTemplate($Page, $User);