cc-1799 Human Filesystem
storage dir should be created first so then it's realpath can be inserted into the database.
This commit is contained in:
parent
7876552b38
commit
e725e4fbe4
|
@ -25,7 +25,7 @@ class PluploadController extends Zend_Controller_Action
|
||||||
public function uploadAction()
|
public function uploadAction()
|
||||||
{
|
{
|
||||||
$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
|
$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
|
||||||
$res = StoredFile::uploadFile($upload_dir);
|
StoredFile::uploadFile($upload_dir);
|
||||||
|
|
||||||
die('{"jsonrpc" : "2.0"}');
|
die('{"jsonrpc" : "2.0"}');
|
||||||
}
|
}
|
||||||
|
|
|
@ -800,12 +800,10 @@ class StoredFile {
|
||||||
if (PEAR::isError($duplicate)) {
|
if (PEAR::isError($duplicate)) {
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
||||||
}
|
}
|
||||||
else {
|
if (file_exists($duplicate->getFilePath())) {
|
||||||
if (file_exists($duplicate->getFilePath())) {
|
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
|
||||||
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
|
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$storDir = MusicDir::getStorDir();
|
$storDir = MusicDir::getStorDir();
|
||||||
|
|
|
@ -130,6 +130,8 @@ require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php')
|
||||||
|
|
||||||
echo "* Airtime Version: ".AIRTIME_VERSION.PHP_EOL;
|
echo "* Airtime Version: ".AIRTIME_VERSION.PHP_EOL;
|
||||||
|
|
||||||
|
AirtimeInstall::InstallStorageDirectory();
|
||||||
|
|
||||||
if ($db_install) {
|
if ($db_install) {
|
||||||
if($newInstall) {
|
if($newInstall) {
|
||||||
// This is called with "system" so that we can pass in a parameter. See the file itself
|
// This is called with "system" so that we can pass in a parameter. See the file itself
|
||||||
|
@ -141,8 +143,6 @@ if ($db_install) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AirtimeInstall::InstallStorageDirectory();
|
|
||||||
|
|
||||||
AirtimeInstall::CreateSymlinksToUtils();
|
AirtimeInstall::CreateSymlinksToUtils();
|
||||||
|
|
||||||
AirtimeInstall::CreateZendPhpLogFile();
|
AirtimeInstall::CreateZendPhpLogFile();
|
||||||
|
|
Loading…
Reference in New Issue