From cf8e42cc99cfef88ed37f765f880647b18cd7c49 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Fri, 26 Apr 2013 17:01:09 -0400 Subject: [PATCH] Creacion de logs para SYSTEM_NAME Creacion de logs para SYSTEM_NAME --- workflow/engine/controllers/installer.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index d9b475339..b03f35da9 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -16,6 +16,7 @@ class Installer extends Controller public $path_xmlforms; public $path_shared; public $path_sep; + public $systemName; public $link; #resource for database connection @@ -29,6 +30,7 @@ class Installer extends Controller $this->path_public = PATH_HOME . 'public_html/index.html'; $this->path_shared = PATH_TRUNK . 'shared/'; $this->path_sep = PATH_SEP; + $this->systemName = ''; } public function index ($httpData) @@ -367,6 +369,7 @@ class Installer extends Controller { $pathSharedPartner = trim( $_REQUEST['pathShared'] ); if (file_exists($pathSharedPartner.'partner.info')) { + $this->systemName = $this->getSystemName($pathSharedPartner); $_REQUEST["PARTNER_FLAG"] = true; } $this->setResponseType( 'json' ); @@ -691,9 +694,8 @@ class Installer extends Controller if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) { $dbText .= "\n"; $dbText .= " define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG')) ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG']:'false')) . ");\n"; - $systemName = $this->getSystemName(); - if ($systemName != '') { - $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; + if ($this->systemName != '') { + $dbText .= " define ('SYSTEM_NAME', " . $this->systemName . ");\n"; } } @@ -982,9 +984,8 @@ class Installer extends Controller if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) { $dbText .= "\n"; $dbText .= " define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG')) ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG']:'false')) . ");\n"; - $systemName = $this->getSystemName(); - if ($systemName != '') { - $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; + if ($this->systemName != '') { + $dbText .= " define ('SYSTEM_NAME', " . $this->systemName . ");\n"; } } @@ -1078,10 +1079,9 @@ class Installer extends Controller return $info; } - public function getSystemName () + public function getSystemName ($siteShared) { $systemName = '' - $siteShared = $this->path_shared; if (substr( $siteShared, - 1 ) != '/') { $siteShared .= '/'; }