diff options
author | Marco Michelino <michelinux@gmail.com> | 2011-04-19 12:32:37 +0200 |
---|---|---|
committer | Marco Michelino <michelinux@gmail.com> | 2011-04-19 12:32:37 +0200 |
commit | d1b4f74bc2108963c347a6fb2526e89bbfb5afeb (patch) | |
tree | cf55f5ae578f9b26f4759137354f0b39d72021fa /lib | |
parent | 3d5c13a3e16bedc7e8ce062c82e4ddb3b42d2318 (diff) | |
download | nextcloud-server-d1b4f74bc2108963c347a6fb2526e89bbfb5afeb.tar.gz nextcloud-server-d1b4f74bc2108963c347a6fb2526e89bbfb5afeb.zip |
Avoid // in URIs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 12 | ||||
-rw-r--r-- | lib/helper.php | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php index acdea093d91..324b2f7e0a0 100644 --- a/lib/base.php +++ b/lib/base.php @@ -204,7 +204,11 @@ class OC_UTIL { $file = $application; $application = ""; } - self::$scripts[] = "$application/js/$file"; + if( !empty( $application )){ + self::$scripts[] = "$application/js/$file"; + }else{ + self::$scripts[] = "js/$file"; + } } /** @@ -217,7 +221,11 @@ class OC_UTIL { $file = $application; $application = ""; } - self::$styles[] = "$application/css/$file"; + if( !empty( $application )){ + self::$styles[] = "$application/css/$file"; + }else{ + self::$styles[] = "css/$file"; + } } /** diff --git a/lib/helper.php b/lib/helper.php index c4352ca3344..c141d6f0499 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -63,7 +63,11 @@ class OC_HELPER { if( file_exists( "$SERVERROOT/apps/img/$app/$image" )){ return "$WEBROOT/apps/img/$app/$image"; } - return "$WEBROOT/$app/img/$image"; + if( !empty( $app )){ + return "$WEBROOT/$app/img/$image"; + }else{ + return "$WEBROOT/img/$image"; + } } /** |