]> source.dussan.org Git - nextcloud-server.git/commitdiff
merge master in storage-wrapper-quota
authorRobin Appelman <icewind@owncloud.com>
Sun, 18 Aug 2013 09:34:56 +0000 (11:34 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sun, 18 Aug 2013 09:34:56 +0000 (11:34 +0200)
1  2 
apps/files_external/lib/webdav.php
lib/helper.php
lib/util.php

Simple merge
diff --cc lib/helper.php
index 0d55682bdb0630316277589d385a92ffdc366221,51165193623614cb01bc27160597a0ccfefb20e8..1024a570e36bd7979e66587285be84f15033be9a
@@@ -54,28 -55,25 +55,25 @@@ class OC_Helper 
         *
         * Returns a url to the given app and file.
         */
 -      public static function linkTo($app, $file, $args = array()) {
 -              if ($app != '') {
 +      public static function linkTo( $app, $file, $args = array() ) {
 +              if( $app != '' ) {
                        $app_path = OC_App::getAppPath($app);
                        // Check if the app is in the app folder
-                       if( $app_path && file_exists( $app_path.'/'.$file )) {
-                               if(substr($file, -3) == 'php' || substr($file, -3) == 'css') {
-                                       $urlLinkTo =  OC::$WEBROOT . '/index.php/apps/' . $app;
-                                       $urlLinkTo .= ($file!='index.php') ? '/' . $file : '';
-                               }else{
-                                       $urlLinkTo =  OC_App::getAppWebPath($app) . '/' . $file;
+                       if ($app_path && file_exists($app_path . '/' . $file)) {
+                               if (substr($file, -3) == 'php' || substr($file, -3) == 'css') {
+                                       $urlLinkTo = OC::$WEBROOT . '/index.php/apps/' . $app;
+                                       $urlLinkTo .= ($file != 'index.php') ? '/' . $file : '';
+                               } else {
+                                       $urlLinkTo = OC_App::getAppWebPath($app) . '/' . $file;
                                }
+                       } else {
+                               $urlLinkTo = OC::$WEBROOT . '/' . $app . '/' . $file;
                        }
-                       else{
-                               $urlLinkTo =  OC::$WEBROOT . '/' . $app . '/' . $file;
-                       }
-               }
-               else{
-                       if( file_exists( OC::$SERVERROOT . '/core/'. $file )) {
-                               $urlLinkTo =  OC::$WEBROOT . '/core/'.$file;
-                       }
-                       else{
-                               $urlLinkTo =  OC::$WEBROOT . '/'.$file;
+               } else {
+                       if (file_exists(OC::$SERVERROOT . '/core/' . $file)) {
+                               $urlLinkTo = OC::$WEBROOT . '/core/' . $file;
+                       } else {
+                               $urlLinkTo = OC::$WEBROOT . '/' . $file;
                        }
                }
  
                        $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
                }
  
-               if($freeSpace !== \OC\Files\SPACE_UNKNOWN){
 -              if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN) {
++              if ($freeSpace !== \OC\Files\SPACE_UNKNOWN) {
                        $freeSpace = max($freeSpace, 0);
  
                        return min($maxUploadFilesize, $freeSpace);
diff --cc lib/util.php
Simple merge