HOR-1954
Solicitud de cambio de comportamiento en la restauración de workspaces
This commit is contained in:
committed by
william barra
parent
6384d57960
commit
48477484aa
@@ -1981,25 +1981,21 @@ class workspaceTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $workspace
|
||||||
|
*/
|
||||||
public function verifyLicenseEnterprise($workspace)
|
public function verifyLicenseEnterprise($workspace)
|
||||||
{
|
{
|
||||||
$this->initPropel(true);
|
$this->initPropel(true);
|
||||||
|
|
||||||
require_once ("classes/model/LicenseManager.php");
|
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
|
$oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
|
||||||
$oDataset = LicenseManagerPeer::doSelectRS($oCriteria);
|
$oDataset = LicenseManagerPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$row = array();
|
|
||||||
if ($oDataset->next()) {
|
if ($oDataset->next()) {
|
||||||
$row = $oDataset->getRow();
|
$row = $oDataset->getRow();
|
||||||
|
|
||||||
$tr = LicenseManagerPeer::retrieveByPK($row['LICENSE_UID']);
|
$tr = LicenseManagerPeer::retrieveByPK($row['LICENSE_UID']);
|
||||||
$pos = strpos( $row['LICENSE_PATH'], 'license_' );
|
$tr->setLicensePath(PATH_DATA_SITE . basename($row['LICENSE_PATH']));
|
||||||
$license = substr( $row['LICENSE_PATH'], $pos, strlen($row['LICENSE_PATH']));
|
|
||||||
$tr->setLicensePath ( PATH_DATA . "sites/" . $workspace . "/licenses/" . $license);
|
|
||||||
$tr->setLicenseWorkspace($workspace);
|
$tr->setLicenseWorkspace($workspace);
|
||||||
|
|
||||||
$res = $tr->save();
|
$res = $tr->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user