aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-13 16:45:06 +0200
committerThomas Lange <code@nerdmind.de>2021-06-13 16:45:06 +0200
commit8115f8611ac16133b5cc70bdb99513b2ca0ff921 (patch)
treea848439b80fde3e61739fda93883af97359579e4 /core
parente5da1f532334a265e1b1c88d2a942e92654370d6 (diff)
downloadblog-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.php14
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';