]> source.dussan.org Git - nextcloud-server.git/commitdiff
getStorage belongs to files not to apps.
authorFrank Karlitschek <frank@owncloud.org>
Sat, 19 May 2012 08:44:08 +0000 (10:44 +0200)
committerFrank Karlitschek <frank@owncloud.org>
Sat, 19 May 2012 08:44:08 +0000 (10:44 +0200)
apps/contacts/ajax/uploadimport.php
apps/contacts/import.php
lib/public/app.php
lib/public/files.php

index 99386516f5083c56281de69a99ea4685962c0ae6..f4a13e0a4bb016ecbf0ea0af867a64aff118b013 100644 (file)
@@ -32,7 +32,7 @@ function debug($msg) {
        OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::DEBUG);
 }
 
-$view = OCP\App::getStorage('contacts');
+$view = OCP\Files::getStorage('contacts');
 $tmpfile = md5(rand());
 
 // If it is a Drag'n'Drop transfer it's handled here.
index 7c1c98d9f5d0cc41b691152e4c4e7713e4427651..1a07781b9d0db99ec287a5ba64b97a26d357db6b 100644 (file)
@@ -23,7 +23,7 @@ function writeProgress($pct) {
 writeProgress('10');
 $view = $file = null;
 if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') {
-       $view = OCP\App::getStorage('contacts');
+       $view = OCP\Files::getStorage('contacts');
        $file = $view->file_get_contents('/' . $_POST['file']);
 } else {
        $file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
index fc277b6ae9ac3ceaa661bff55c5604284bc7edab..1a46180bb9642b7ae7f64b267789149110f94c1d 100644 (file)
@@ -156,15 +156,6 @@ class App {
        }
 
 
-        /**
-         * @param string appid
-         * @param $app app
-         * @return OC_FilesystemView
-         */
-        public static function getStorage( $app ){
-               return \OC_App::getStorage( $app );
-       }
-
 
 }
 
index 4e9e9e79804fa7e4c44a13bd035ce0ef40125c62..24c0193e8a73076647fb015f0ad80d8fcbe313a2 100644 (file)
@@ -102,6 +102,15 @@ class Files {
                return(\OC_Helper::buildNotExistingFileName( $path, $filename ));
        }
 
+        /**
+         * @param string appid
+         * @param $app app
+         * @return OC_FilesystemView
+         */
+        public static function getStorage( $app ){
+               return \OC_App::getStorage( $app );
+       }
+