From 48477484aa4ceb2a8d50a317b9a080f97db2bc77 Mon Sep 17 00:00:00 2001 From: dheeyi william Date: Fri, 14 Oct 2016 09:12:23 -0400 Subject: [PATCH] =?UTF-8?q?HOR-1954=20Solicitud=20de=20cambio=20de=20compo?= =?UTF-8?q?rtamiento=20en=20la=20restauraci=C3=B3n=20de=20workspaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/classes/class.wsTools.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index 2acdcb0f1..a141dad91 100644 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -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(); } }