summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-04 11:19:45 +0200
committerJulius Härtl <jus@bitgrid.net>2018-07-19 08:16:58 +0200
commita24cad1a1cdce76ae77af889181f20f6eb38b0c9 (patch)
tree56f14f822c22129241c1a3d26926eadbb378d51f /lib/private/legacy
parent9e5885963c5dc09c20183732f0f94ca01598530e (diff)
downloadnextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.tar.gz
nextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.zip
Fix accessibility invert
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/util.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index ab595d885cb..5e9a46d44a9 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -687,13 +687,20 @@ class OC_Util {
* @param string $tag tag name of the element
* @param array $attributes array of attributes for the element
* @param string $text the text content for the element
+ * @param bool $prepend prepend the header to the beginning of the list
*/
- public static function addHeader($tag, $attributes, $text=null) {
- self::$headers[] = array(
+ public static function addHeader($tag, $attributes, $text = null, $prepend = false) {
+ $header = array(
'tag' => $tag,
'attributes' => $attributes,
'text' => $text
);
+ if ($prepend === true) {
+ array_unshift (self::$headers, $header);
+
+ } else {
+ self::$headers[] = $header;
+ }
}
/**