summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-06-20 20:29:30 +0200
committerJakob Sack <kde@jakobsack.de>2011-06-20 20:29:30 +0200
commit91c37bbb7642b996e4c386b3033cca02831371ef (patch)
tree96984269f6851e9208e26c9533c5ce4e045396c5 /lib/helper.php
parent272fc252fb71422db2101a76fc541f20924808cd (diff)
downloadnextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.tar.gz
nextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.zip
moved core stuff to /core
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 072607f742b..6f7d7ce251e 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -44,6 +44,9 @@ class OC_HELPER {
return $WEBROOT . '/apps/' . $app . $file;
}
}
+ else{
+ $app = 'core';
+ }
return $WEBROOT . '/' . $app . $file;
}
@@ -58,14 +61,16 @@ class OC_HELPER {
public static function imagePath( $app, $image ){
global $SERVERROOT;
global $WEBROOT;
+
// Check if the app is in the app folder
if( file_exists( "$SERVERROOT/apps/$app/img/$image" )){
return "$WEBROOT/apps/$app/img/$image";
}
- if( !empty( $app )){
+ elseif( !empty( $app )){
return "$WEBROOT/$app/img/$image";
- }else{
- return "$WEBROOT/img/$image";
+ }
+ else{
+ return "$WEBROOT/core/img/$image";
}
}
@@ -84,15 +89,15 @@ class OC_HELPER {
// Is it a dir?
if( $mimetype == "dir" ){
- return "$WEBROOT/img/places/folder.png";
+ return "$WEBROOT/core/img/places/folder.png";
}
// Icon exists?
- if( file_exists( "$SERVERROOT/img/mimetypes/$mimetype.png" )){
- return "$WEBROOT/img/mimetypes/$mimetype.png";
+ if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){
+ return "$WEBROOT/core/img/mimetypes/$mimetype.png";
}
else{
- return "$WEBROOT/img/mimetypes/file.png";
+ return "$WEBROOT/core/img/mimetypes/file.png";
}
}