PM-527 Calendarios con el mismo nombre
Al realizar la copia de calendarios se pueden crear calendarios con el mismo nombre
This commit is contained in:
@@ -178,7 +178,7 @@ class adminProxy extends HttpProxyController
|
|||||||
$httpData=array_unique((array)$httpData);
|
$httpData=array_unique((array)$httpData);
|
||||||
$message = '';
|
$message = '';
|
||||||
$oldName = isset($_POST['oldName'])? $_POST['oldName']:'';
|
$oldName = isset($_POST['oldName'])? $_POST['oldName']:'';
|
||||||
|
|
||||||
switch ($_POST['action']){
|
switch ($_POST['action']){
|
||||||
case 'calendarName':
|
case 'calendarName':
|
||||||
require_once ('classes/model/CalendarDefinition.php');
|
require_once ('classes/model/CalendarDefinition.php');
|
||||||
@@ -193,14 +193,10 @@ class adminProxy extends HttpProxyController
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isset($aDefinitions['CALENDAR_NAME'])) {
|
if (isset($aDefinitions['CALENDAR_NAME'])) {
|
||||||
if ($aDefinitions['CALENDAR_NAME'] != $_POST['name']) {
|
if ($aDefinitions['CALENDAR_NAME'] == $_POST['name']) {
|
||||||
$validated = true;
|
$validated = false;
|
||||||
} else {
|
$message = G::loadTranslation('ID_CALENDAR_INVALID_NAME');
|
||||||
if ($aDefinitions['CALENDAR_NAME'] != $oldName) {
|
break;
|
||||||
$validated = false;
|
|
||||||
$message = G::loadTranslation('ID_CALENDAR_INVALID_NAME');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user