diff options
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/helper.php b/lib/helper.php index c4352ca3344..009e961397b 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"; + } } /** @@ -162,7 +166,7 @@ class OC_HELPER { * * Makes 2048 to 2 kB. */ - function chmodr($path, $filemode) { + static function chmodr($path, $filemode) { if (!is_dir($path)) return chmod($path, $filemode); $dh = opendir($path); @@ -173,7 +177,7 @@ class OC_HELPER { return FALSE; elseif(!is_dir($fullpath) && !chmod($fullpath, $filemode)) return FALSE; - elseif(!chmodr($fullpath, $filemode)) + elseif(!self::chmodr($fullpath, $filemode)) return FALSE; } } |