Browse Source

getStorage belongs to files not to apps.

tags/v4.0.0
Frank Karlitschek 12 years ago
parent
commit
7e49a33d64
4 changed files with 11 additions and 11 deletions
  1. 1
    1
      apps/contacts/ajax/uploadimport.php
  2. 1
    1
      apps/contacts/import.php
  3. 0
    9
      lib/public/app.php
  4. 9
    0
      lib/public/files.php

+ 1
- 1
apps/contacts/ajax/uploadimport.php View File

OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::DEBUG); OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::DEBUG);
} }


$view = OCP\App::getStorage('contacts');
$view = OCP\Files::getStorage('contacts');
$tmpfile = md5(rand()); $tmpfile = md5(rand());


// If it is a Drag'n'Drop transfer it's handled here. // If it is a Drag'n'Drop transfer it's handled here.

+ 1
- 1
apps/contacts/import.php View File

writeProgress('10'); writeProgress('10');
$view = $file = null; $view = $file = null;
if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') { 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']); $file = $view->file_get_contents('/' . $_POST['file']);
} else { } else {
$file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']); $file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);

+ 0
- 9
lib/public/app.php View File

} }




/**
* @param string appid
* @param $app app
* @return OC_FilesystemView
*/
public static function getStorage( $app ){
return \OC_App::getStorage( $app );
}



} }



+ 9
- 0
lib/public/files.php View File

return(\OC_Helper::buildNotExistingFileName( $path, $filename )); 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 );
}








Loading…
Cancel
Save