HOR-812

HOR-812
This commit is contained in:
Paula V. Quispe
2016-04-20 15:18:23 -04:00
parent 84a88c9bc2
commit 0506053bdb
2 changed files with 15 additions and 3 deletions

View File

@@ -18,9 +18,17 @@ class newSiteProxy extends HttpProxyController
//G::LoadClass( 'json' );
$name = trim( $_POST['NW_TITLE'] );
$inst = new Installer();
if ($inst->isset_site($name) && $ao_db_drop !==true) {
$this->error = true;
return;
if ($inst->isset_site($name)) {
if($ao_db_drop === true){
if(!file_exists(PATH_DATA . "sites/" . $name)){
$this->error = true;
$this->message = 'We can not overwrite this workspace because the workspace '.$name.' does not exist please check the lower case and upper case.';
return;
}
} else {
$this->error = true;
return;
}
}
$user = (isset( $_POST['NW_USERNAME'] )) ? trim( $_POST['NW_USERNAME'] ) : 'admin';
$pass = (isset( $_POST['NW_PASSWORD'] )) ? $_POST['NW_PASSWORD'] : 'admin';