diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-04 11:19:45 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-19 08:16:58 +0200 |
commit | a24cad1a1cdce76ae77af889181f20f6eb38b0c9 (patch) | |
tree | 56f14f822c22129241c1a3d26926eadbb378d51f /lib | |
parent | 9e5885963c5dc09c20183732f0f94ca01598530e (diff) | |
download | nextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.tar.gz nextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.zip |
Fix accessibility invert
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Template/IconsCacher.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php index 79c4b9d8ec0..c4d073156f1 100644 --- a/lib/private/Template/IconsCacher.php +++ b/lib/private/Template/IconsCacher.php @@ -45,7 +45,7 @@ class IconsCacher { protected $urlGenerator; /** @var string */ - private $iconVarRE = '/--([a-z0-9-]+): url\(["\']([a-z0-9-\/]+)[^;]+;/m'; + private $iconVarRE = '/--(icon-[a-z0-9-]+): url\(["\']([a-z0-9-\/]+)[^;]+;/m'; /** @var string */ private $fileName = 'icons-vars.css'; @@ -140,7 +140,7 @@ class IconsCacher { } } $linkToCSS = substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['appName' => 'icons', 'fileName' => $this->fileName]), strlen(\OC::$WEBROOT)); - \OCP\Util::addHeader('link', ['rel' => 'stylesheet', 'href' => $linkToCSS]); + \OC_Util::addHeader('link', ['rel' => 'stylesheet', 'href' => $linkToCSS], null, true); } }
\ No newline at end of file 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; + } } /** |