Skip to content
Snippets Groups Projects
Unverified Commit ed9306dd authored by Dominik Baránek's avatar Dominik Baránek Committed by Pavel Vyskočil
Browse files

Using of short array syntax

parent d3486124
No related branches found
No related tags found
1 merge request!11Using of short array syntax
......@@ -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
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment