]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid // in URIs
authorMarco Michelino <michelinux@gmail.com>
Tue, 19 Apr 2011 10:32:37 +0000 (12:32 +0200)
committerMarco Michelino <michelinux@gmail.com>
Tue, 19 Apr 2011 10:32:37 +0000 (12:32 +0200)
lib/base.php
lib/helper.php

index acdea093d917d77e35b5459727c3a858f1906654..324b2f7e0a022b8e801473cbfc6b7f326996dc84 100644 (file)
@@ -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";
+               }
        }
 
        /**
index c4352ca33446d8280c0d3f53815b807bb6d97d8f..c141d6f04996a15f395d95bfc9e88eeaa4bba541 100644 (file)
@@ -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";
+               }
        }
 
        /**