diff options
-rw-r--r-- | admin/page/index.php | 4 | ||||
-rw-r--r-- | admin/post/index.php | 4 | ||||
-rw-r--r-- | admin/user/index.php | 4 | ||||
-rw-r--r-- | core/application.php | 14 |
4 files changed, 20 insertions, 6 deletions
diff --git a/admin/page/index.php b/admin/page/index.php index 090b31c..584ba48 100644 --- a/admin/page/index.php +++ b/admin/page/index.php @@ -13,8 +13,8 @@ require '../../core/application.php'; #=============================================================================== # Pagination #=============================================================================== -$site_size = Application::get('PAGE.LIST_SIZE'); -$site_sort = Application::get('PAGE.LIST_SORT'); +$site_size = Application::get('ADMIN.PAGE.LIST_SIZE'); +$site_sort = Application::get('ADMIN.PAGE.LIST_SORT'); $lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Page\Attribute::TABLE))->fetchColumn() / $site_size); diff --git a/admin/post/index.php b/admin/post/index.php index 15e2c17..7793c9b 100644 --- a/admin/post/index.php +++ b/admin/post/index.php @@ -13,8 +13,8 @@ require '../../core/application.php'; #=============================================================================== # Pagination #=============================================================================== -$site_size = Application::get('POST.LIST_SIZE'); -$site_sort = Application::get('POST.LIST_SORT'); +$site_size = Application::get('ADMIN.POST.LIST_SIZE'); +$site_sort = Application::get('ADMIN.POST.LIST_SORT'); $lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Post\Attribute::TABLE))->fetchColumn() / $site_size); diff --git a/admin/user/index.php b/admin/user/index.php index 6b3d726..223e83e 100644 --- a/admin/user/index.php +++ b/admin/user/index.php @@ -13,8 +13,8 @@ require '../../core/application.php'; #=============================================================================== # Pagination #=============================================================================== -$site_size = Application::get('POST.LIST_SIZE'); -$site_sort = Application::get('POST.LIST_SORT'); +$site_size = Application::get('ADMIN.POST.LIST_SIZE'); +$site_sort = Application::get('ADMIN.POST.LIST_SORT'); $lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', User\Attribute::TABLE))->fetchColumn() / $site_size); diff --git a/core/application.php b/core/application.php index 7179369..be70f92 100644 --- a/core/application.php +++ b/core/application.php @@ -92,6 +92,20 @@ foreach($configuration as $name => $value) { } #=============================================================================== +# Set default configuration (for admin prefixes) +#=============================================================================== +foreach([ + 'ADMIN.PAGE.LIST_SIZE' => Application::get('PAGE.LIST_SIZE'), + 'ADMIN.POST.LIST_SIZE' => Application::get('POST.LIST_SIZE'), + 'ADMIN.USER.LIST_SIZE' => Application::get('USER.LIST_SIZE'), + 'ADMIN.PAGE.LIST_SORT' => Application::get('PAGE.LIST_SORT'), + 'ADMIN.POST.LIST_SORT' => Application::get('POST.LIST_SORT'), + 'ADMIN.USER.LIST_SORT' => Application::get('USER.LIST_SORT') +] as $name => $value) { + Application::set($name, $value); +} + +#=============================================================================== # Include custom configuration #=============================================================================== require 'configuration.php'; |