aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/CSSResourceLocator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Template/CSSResourceLocator.php')
-rw-r--r--lib/private/Template/CSSResourceLocator.php47
1 files changed, 11 insertions, 36 deletions
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php
index 5047b3e906f..b501fd69874 100644
--- a/lib/private/Template/CSSResourceLocator.php
+++ b/lib/private/Template/CSSResourceLocator.php
@@ -1,33 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Axel Helmert <axel.helmert@luka.de>
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- * @author Kyle Fazzari <kyrofa@ubuntu.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author tux-rampage <tux-rampage@users.noreply.github.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Template;
@@ -43,9 +19,8 @@ class CSSResourceLocator extends ResourceLocator {
*/
public function doFind($style) {
$app = substr($style, 0, strpos($style, '/'));
- if (strpos($style, '3rdparty') === 0
- && $this->appendIfExist($this->serverroot, $style.'.css')
- || $this->appendIfExist($this->serverroot, 'core/'.$style.'.css')
+ if ($this->appendIfExist($this->serverroot, $style . '.css')
+ || $this->appendIfExist($this->serverroot, 'core/' . $style . '.css')
) {
return;
}
@@ -66,17 +41,17 @@ class CSSResourceLocator extends ResourceLocator {
// turned into cwd.
$app_path = realpath($app_path);
- $this->append($app_path, $style.'.css', $app_url);
+ $this->append($app_path, $style . '.css', $app_url);
}
/**
* @param string $style
*/
public function doFindTheme($style) {
- $theme_dir = 'themes/'.$this->theme.'/';
- $this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$style.'.css')
- || $this->appendIfExist($this->serverroot, $theme_dir.$style.'.css')
- || $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$style.'.css');
+ $theme_dir = 'themes/' . $this->theme . '/';
+ $this->appendIfExist($this->serverroot, $theme_dir . 'apps/' . $style . '.css')
+ || $this->appendIfExist($this->serverroot, $theme_dir . $style . '.css')
+ || $this->appendIfExist($this->serverroot, $theme_dir . 'core/' . $style . '.css');
}
public function append($root, $file, $webRoot = null, $throw = true, $scss = false) {