Merged in 3.1.3 (pull request #5047)

3.1.3
This commit is contained in:
Paula Quispe
2016-10-25 16:22:03 +00:00
3 changed files with 20 additions and 18 deletions

View File

@@ -131,11 +131,9 @@ class processMap
$oDatasetX->next();
$aRowx = $oDatasetX->getRow();
if ($oProcess->exists($aRowx['PRO_UID'])) {
//$aRowy = $oProcess->load($aRowx['PRO_UID']);
//$oTask->label = $aRowy['PRO_TITLE'];
$oTask->label = htmlentities($aRowx['TAS_TITLE'], ENT_QUOTES, 'UTF-8');
} else {
$oTask->label = htmlentities($aRow1['CON_VALUE'], ENT_QUOTES, 'UTF-8');
$oTask->label = htmlentities($aRow1['TAS_TITLE'], ENT_QUOTES, 'UTF-8');
}
}
$oTask->taskINI = (strtolower($aRow1['TAS_START']) == 'true' ? true : false);

View File

@@ -1981,26 +1981,22 @@ class workspaceTools
}
}
public function verifyLicenseEnterprise ($workspace)
/**
* @param $workspace
*/
public function verifyLicenseEnterprise($workspace)
{
$this->initPropel( true );
require_once ("classes/model/LicenseManager.php");
$this->initPropel(true);
$oCriteria = new Criteria('workflow');
$oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
$oDataset = LicenseManagerPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$row = array();
if ($oDataset->next()) {
$row = $oDataset->getRow();
$tr = LicenseManagerPeer::retrieveByPK ( $row['LICENSE_UID'] );
$pos = strpos( $row['LICENSE_PATH'], 'license_' );
$license = substr( $row['LICENSE_PATH'], $pos, strlen($row['LICENSE_PATH']));
$tr->setLicensePath ( PATH_DATA . "sites/" . $workspace . "/licenses/" . $license);
$tr->setLicenseWorkspace ( $workspace );
$res = $tr->save ();
$tr = LicenseManagerPeer::retrieveByPK($row['LICENSE_UID']);
$tr->setLicensePath(PATH_DATA_SITE . basename($row['LICENSE_PATH']));
$tr->setLicenseWorkspace($workspace);
$res = $tr->save();
}
}

View File

@@ -167,6 +167,14 @@ abstract class Importer
$generateUid = false;
break;
case self::IMPORT_OPTION_OVERWRITE:
$obj = \ProcessPeer::retrieveByPK($this->metadata['uid']);
if (is_object($obj)) {
if ($obj->getProTitle() !== $name) {
if (\Process::existsByProTitle($name)) {
$name = $name . ' ' . date('Y-m-d H:i:s');
}
}
}
//Shouldn't generate new UID for all objects
/*----------------------------------********---------------------------------*/
if($objectsToImport === ''){
@@ -212,13 +220,13 @@ abstract class Importer
//Should generate new UID for all objects
$this->disableProject();
$name = "New - " . $name . " - " . date("M d, H:i");
$name = "New - " . $name . " - " . date('Y-m-d H:i:s');
$generateUid = true;
break;
case self::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW:
//Should generate new UID for all objects
$name = \G::LoadTranslation("ID_COPY_OF") . " - " . $name . " - " . date("M d, H:i");
$name = \G::LoadTranslation("ID_COPY_OF") . " - " . $name . " - " . date('Y-m-d H:i:s');
$generateUid = true;
break;