From 70f366ce1d102e4712af2408e6dcf5432b1926c2 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 21 Jun 2021 02:03:17 +0200 Subject: Use getEntityURL method of Application class This commit replaces all calls to "$Item->getURL()" with calls to the previously added "getEntityURL" method of the "Application" class. --- core/include/page/list.php | 2 +- core/include/page/main.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/include/page') diff --git a/core/include/page/list.php b/core/include/page/list.php index 0165116..42e887f 100644 --- a/core/include/page/list.php +++ b/core/include/page/list.php @@ -27,7 +27,7 @@ if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { if(Application::get('PAGE.SINGLE_REDIRECT') === TRUE AND $count === '1') { $Statement = $Database->query(sprintf('SELECT id FROM %s LIMIT 1', Page\Attribute::TABLE)); $Page = Page\Factory::build($Statement->fetchColumn()); - HTTP::redirect($Page->getURL()); + HTTP::redirect(Application::getEntityURL($Page)); } $execSQL = "SELECT id FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}"; diff --git a/core/include/page/main.php b/core/include/page/main.php index 955bb35..32a2ec4 100644 --- a/core/include/page/main.php +++ b/core/include/page/main.php @@ -70,7 +70,7 @@ catch(Page\Exception $Exception) { $Page = Page\Factory::build($param); } - HTTP::redirect($Page->getURL()); + HTTP::redirect(Application::getEntityURL($Page)); } catch(Page\Exception $Exception) { -- cgit v1.2.3