BUG 10836 You are able to create 2 workspaces with same name SOLVED

- Missing validation to check if a workspace exists
- Add validation to check if a workspace exists
This commit is contained in:
Julio Cesar Laura
2013-02-18 17:50:22 -04:00
parent 2c5308e433
commit c8e992a258

View File

@@ -17,8 +17,10 @@ class newSiteProxy extends HttpProxyController
//G::LoadClass( 'json' );
$name = trim( $_POST['NW_TITLE'] );
$inst = new Installer();
$isset = $inst->isset_site( $name );
$new = ((! $isset)) ? true : false;
if ($inst->isset_site($name)) {
$this->error = true;
return;
}
$user = (isset( $_POST['NW_USERNAME'] )) ? trim( $_POST['NW_USERNAME'] ) : 'admin';
$pass = (isset( $_POST['NW_PASSWORD'] )) ? $_POST['NW_PASSWORD'] : 'admin';
$pass1 = (isset( $_POST['NW_PASSWORD2'] )) ? $_POST['NW_PASSWORD2'] : 'admin';