summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIndividual IT Services <info@individual-it.net>2015-09-25 15:43:12 +0545
committerIndividual IT Services <info@individual-it.net>2015-09-25 15:43:12 +0545
commitdb84791bb00b62aba0bab23b4998ee055e0a1cb2 (patch)
tree003586f891c083d09e9938064eac2f37493090e8
parent2e42f99d007f9897cb6a7d017dce91bd8b1a6546 (diff)
downloadnextcloud-server-db84791bb00b62aba0bab23b4998ee055e0a1cb2.tar.gz
nextcloud-server-db84791bb00b62aba0bab23b4998ee055e0a1cb2.zip
Todo for myself to eliminate double code
This will be in a new PR
-rw-r--r--lib/private/util.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 9702f38a48f..a18fa1463f9 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -444,6 +444,7 @@ class OC_Util {
*/
public static function addScript($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'js', $file);
+ //TODO eliminate double code
if (!in_array($path, self::$scripts)) {
// core js files need separate handling
if ($application !== 'core' && $file !== null) {
@@ -468,6 +469,7 @@ class OC_Util {
*/
public static function addVendorScript($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'vendor', $file);
+ //TODO eliminate double code
if (! in_array ( $path, self::$scripts )) {
if ($prepend === true) {
array_unshift ( self::$scripts, $path );
@@ -493,6 +495,7 @@ class OC_Util {
} else {
$path = "l10n/$languageCode";
}
+ //TODO eliminate double code
if (!in_array($path, self::$scripts)) {
if ($prepend === true) {
array_unshift ( self::$scripts, $path );
@@ -512,6 +515,7 @@ class OC_Util {
*/
public static function addStyle($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'css', $file);
+ //TODO eliminate double code
if (!in_array($path, self::$styles)) {
if ($prepend === true) {
array_unshift ( self::$styles, $path );
@@ -531,6 +535,7 @@ class OC_Util {
*/
public static function addVendorStyle($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'vendor', $file);
+ //TODO eliminate double code
if (!in_array($path, self::$styles)) {
if ($prepend === true) {
array_unshift ( self::$styles, $path );