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();
|
||||||
|
|
|
@ -66,7 +66,7 @@ if(isset($version) && ($version != false) && ($version < AIRTIME_VERSION)) {
|
||||||
echo "It appears you already have a version of Airtime installed.\n";
|
echo "It appears you already have a version of Airtime installed.\n";
|
||||||
echo "Upgrading is currently disabled for Airtime 1.9.0-beta1.\n";
|
echo "Upgrading is currently disabled for Airtime 1.9.0-beta1.\n";
|
||||||
exit(2);
|
exit(2);
|
||||||
|
|
||||||
require_once("airtime-upgrade.php");
|
require_once("airtime-upgrade.php");
|
||||||
|
|
||||||
//Make sure to exit with non-zero error code so that airtime-install
|
//Make sure to exit with non-zero error code so that airtime-install
|
||||||
|
@ -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