Skip to content
Snippets Groups Projects
Commit d1b4f74b authored by Marco Michelino's avatar Marco Michelino
Browse files

Avoid // in URIs

parent 3d5c13a3
No related branches found
No related tags found
No related merge requests found
...@@ -204,7 +204,11 @@ class OC_UTIL { ...@@ -204,7 +204,11 @@ class OC_UTIL {
$file = $application; $file = $application;
$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 { ...@@ -217,7 +221,11 @@ class OC_UTIL {
$file = $application; $file = $application;
$application = ""; $application = "";
} }
self::$styles[] = "$application/css/$file"; if( !empty( $application )){
self::$styles[] = "$application/css/$file";
}else{
self::$styles[] = "css/$file";
}
} }
/** /**
......
...@@ -63,7 +63,11 @@ class OC_HELPER { ...@@ -63,7 +63,11 @@ class OC_HELPER {
if( file_exists( "$SERVERROOT/apps/img/$app/$image" )){ if( file_exists( "$SERVERROOT/apps/img/$app/$image" )){
return "$WEBROOT/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";
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment