From ed9306dd4e2feecb157683f7d29f6f15df2b6b26 Mon Sep 17 00:00:00 2001 From: BaranekD <0Baranek.dominik0@gmail.com> Date: Fri, 10 May 2019 12:54:36 +0200 Subject: [PATCH] Using of short array syntax --- CHANGELOG.md | 1 + themes/bbmri/default/includes/header.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7086cb2..da391dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. - Changed code style to PSR-2 - addInstitution URL and email in disco-tpl.php are loaded from a config file - Templates are included from module perun +- Using of short array syntax (from array() to []) #### Fixed - Fixed the email address in footer diff --git a/themes/bbmri/default/includes/header.php b/themes/bbmri/default/includes/header.php index 0fb265a..da9744a 100644 --- a/themes/bbmri/default/includes/header.php +++ b/themes/bbmri/default/includes/header.php @@ -5,25 +5,25 @@ use SimpleSAML\Module; /** * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages. */ -$this->data['htmlinject'] = array( - 'htmlContentPre' => array(), - 'htmlContentPost' => array(), - 'htmlContentHead' => array(), -); +$this->data['htmlinject'] = [ + 'htmlContentPre' => [], + 'htmlContentPost' => [], + 'htmlContentHead' => [], +]; -$jquery = array(); +$jquery = []; if (array_key_exists('jquery', $this->data)) { $jquery = $this->data['jquery']; } if (array_key_exists('pageid', $this->data)) { - $hookinfo = array( + $hookinfo = [ 'pre' => &$this->data['htmlinject']['htmlContentPre'], 'post' => &$this->data['htmlinject']['htmlContentPost'], 'head' => &$this->data['htmlinject']['htmlContentHead'], 'jquery' => &$jquery, 'page' => $this->data['pageid'] - ); + ]; Module::callHooks('htmlinject', $hookinfo); } -- GitLab