getStorage belongs to files not to apps.

This commit is contained in:
Frank Karlitschek 2012-05-19 10:44:08 +02:00
parent 08f7d4c552
commit 7e49a33d64
4 changed files with 11 additions and 11 deletions

View 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.

View 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']);

View 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 );
}
}

View 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 );
}