aboutsummaryrefslogtreecommitdiffstats
path: root/core/application.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-09-02 15:19:59 +0200
committerThomas Lange <code@nerdmind.de>2017-09-02 15:19:59 +0200
commitc503f83d169fe15e10e2d97fd4ece9cdc884e436 (patch)
tree681ed769e047a300a9b5a8bf9422caac95222e04 /core/application.php
parente12cea77d8dabaf8bcaa30a0efb6ad8be0a15260 (diff)
downloadblog-c503f83d169fe15e10e2d97fd4ece9cdc884e436.tar.gz
blog-c503f83d169fe15e10e2d97fd4ece9cdc884e436.tar.xz
blog-c503f83d169fe15e10e2d97fd4ece9cdc884e436.zip
Some code optimizations has been made in admin/index.php to prevent duplicate definitions of the same SQL query. Additionally, the default database fetch mode was changed to FETCH_ASSOC.
Diffstat (limited to 'core/application.php')
-rw-r--r--core/application.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/application.php b/core/application.php
index 7ba66fe..a575f9d 100644
--- a/core/application.php
+++ b/core/application.php
@@ -74,7 +74,7 @@ try {
$Language = Application::getLanguage();
$Database = Application::getDatabase();
- $Database->setAttribute($Database::ATTR_DEFAULT_FETCH_MODE, $Database::FETCH_OBJ);
+ $Database->setAttribute($Database::ATTR_DEFAULT_FETCH_MODE, $Database::FETCH_ASSOC);
$Database->setAttribute($Database::ATTR_ERRMODE, $Database::ERRMODE_EXCEPTION);
}
@@ -104,7 +104,7 @@ if(Application::get('CORE.SEND_304') === TRUE AND !defined('ADMINISTRATION')) {
#===========================================================================
# Define HTTP ETag header identifier
#===========================================================================
- $HTTP_ETAG_IDENTIFIER = md5(implode($Statement->fetch(PDO::FETCH_ASSOC)));
+ $HTTP_ETAG_IDENTIFIER = md5(implode($Statement->fetch()));
#===========================================================================
# Send ETag header within the HTTP response