From 7e49a33d6467ab0cc5efdceffd4204cffa281bd1 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 19 May 2012 10:44:08 +0200 Subject: [PATCH] getStorage belongs to files not to apps. --- apps/contacts/ajax/uploadimport.php | 2 +- apps/contacts/import.php | 2 +- lib/public/app.php | 9 --------- lib/public/files.php | 9 +++++++++ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/contacts/ajax/uploadimport.php b/apps/contacts/ajax/uploadimport.php index 99386516f5..f4a13e0a4b 100644 --- a/apps/contacts/ajax/uploadimport.php +++ b/apps/contacts/ajax/uploadimport.php @@ -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. diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 7c1c98d9f5..1a07781b9d 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -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']); diff --git a/lib/public/app.php b/lib/public/app.php index fc277b6ae9..1a46180bb9 100644 --- a/lib/public/app.php +++ b/lib/public/app.php @@ -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 ); - } - } diff --git a/lib/public/files.php b/lib/public/files.php index 4e9e9e7980..24c0193e8a 100644 --- a/lib/public/files.php +++ b/lib/public/files.php @@ -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 ); + } +