diff options
author | Thomas Lange <code@nerdmind.de> | 2021-06-13 16:45:06 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-06-13 16:45:06 +0200 |
commit | 8115f8611ac16133b5cc70bdb99513b2ca0ff921 (patch) | |
tree | a848439b80fde3e61739fda93883af97359579e4 /core | |
parent | e5da1f532334a265e1b1c88d2a942e92654370d6 (diff) | |
download | blog-8115f8611ac16133b5cc70bdb99513b2ca0ff921.tar.gz blog-8115f8611ac16133b5cc70bdb99513b2ca0ff921.tar.xz blog-8115f8611ac16133b5cc70bdb99513b2ca0ff921.zip |
Add configuration settings (admin prefixes)
Introduce the following configuration settings to make it possible to
use different settings for the number of displayed items and ordering
on the administration areas overview pages.
ADMIN.PAGE.LIST_SIZE
ADMIN.POST.LIST_SIZE
ADMIN.USER.LIST_SIZE
ADMIN.PAGE.LIST_SORT
ADMIN.POST.LIST_SORT
ADMIN.USER.LIST_SORT
Diffstat (limited to 'core')
-rw-r--r-- | core/application.php | 14 |
1 files changed, 14 insertions, 0 deletions
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'; |