Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 11:30:18 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 18:34:56 +0300
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/legacy/template/functions.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/legacy/template/functions.php')
-rw-r--r--lib/private/legacy/template/functions.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php
index d931e4d129f..9184da21bdb 100644
--- a/lib/private/legacy/template/functions.php
+++ b/lib/private/legacy/template/functions.php
@@ -196,11 +196,11 @@ function component($app, $file) {
if(is_array($file)) {
foreach($file as $f) {
$url = link_to($app, 'component/' . $f . '.html');
- OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
+ OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]);
}
} else {
$url = link_to($app, 'component/' . $file . '.html');
- OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
+ OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]);
}
}
@@ -213,7 +213,7 @@ function component($app, $file) {
*
* For further information have a look at \OCP\IURLGenerator::linkTo
*/
-function link_to( $app, $file, $args = array() ) {
+function link_to( $app, $file, $args = [] ) {
return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
}
@@ -305,9 +305,9 @@ function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false)
return $formatter->formatTimeSpan($timestamp, $fromTime);
}
-function html_select_options($options, $selected, $params=array()) {
+function html_select_options($options, $selected, $params=[]) {
if (!is_array($selected)) {
- $selected=array($selected);
+ $selected=[$selected];
}
if (isset($params['combine']) && $params['combine']) {
$options = array_combine($options, $options);