From 6bda69aff805f100c6f22a3d07e3c478b800d2cb Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Fri, 26 Apr 2013 16:23:53 -0400 Subject: [PATCH 1/3] Creacion de logs para SYSTEM_NAME Creacion de logs para SYSTEM_NAME --- workflow/engine/controllers/installer.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 398d59314..79b01a7b6 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -15,6 +15,7 @@ class Installer extends Controller public $path_plugins; public $path_xmlforms; public $path_shared; + public $systemName; public $path_sep; public $link; #resource for database connection @@ -367,6 +368,7 @@ class Installer extends Controller { $pathSharedPartner = trim( $_REQUEST['pathShared'] ); if (file_exists($pathSharedPartner.'partner.info')) { + $_REQUEST['PARTNER_FLAG'] = true; } $this->setResponseType( 'json' ); @@ -691,9 +693,7 @@ 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"; - error_log('1 --------'); - error_log($pathSharedSites); - $systemName = $this->getNameSystem($pathSharedSites); + $systemName = $this->getSystemName(); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -984,7 +984,7 @@ 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->getNameSystem($pathShared); + $systemName = $this->getSystemName(); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -1080,20 +1080,14 @@ class Installer extends Controller return $info; } - public function getNameSystem ($siteShared = '') + public function getSystemName () { - $systemName = ''; - error_log('PASE --------'); - error_log($siteShared); - if ($siteShared == '') { - $siteShared = trim( $_REQUEST['pathShared'] ); - } - + $systemName = '' + $siteShared = $this->path_shared; if (substr( $siteShared, - 1 ) != '/') { $siteShared .= '/'; } - error_log('2 --------'); - error_log($siteShared . 'partner.info'); + if (file_exists($siteShared . 'partner.info')) { $dataInfo = parse_ini_file($siteShared . 'partner.info'); if (isset($dataInfo['system_name'])) { From d52d4d7b3ad7a7c90cd3360bdcd2b227206dfd93 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Fri, 26 Apr 2013 16:34:48 -0400 Subject: [PATCH 2/3] borrar --- workflow/engine/controllers/installer.php | 43 +++++++++++++---------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 79b01a7b6..5933daa42 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -15,7 +15,6 @@ class Installer extends Controller public $path_plugins; public $path_xmlforms; public $path_shared; - public $systemName; public $path_sep; public $link; #resource for database connection @@ -368,8 +367,7 @@ class Installer extends Controller { $pathSharedPartner = trim( $_REQUEST['pathShared'] ); if (file_exists($pathSharedPartner.'partner.info')) { - - $_REQUEST['PARTNER_FLAG'] = true; + $_REQUEST["PARTNER_FLAG"] = true; } $this->setResponseType( 'json' ); if ($_REQUEST['db_engine'] == 'mysql') { @@ -384,13 +382,13 @@ class Installer extends Controller public function forceTogenerateTranslationsFiles ($url) { $ch = curl_init(); - curl_setopt( $ch, CURLOPT_URL, (isset( $_SERVER['HTTPS'] ) ? ($_SERVER['HTTPS'] != '' ? 'https://' : 'http://') : 'http://') . $_SERVER['HTTP_HOST'] . '/js/ext/translation.en.js?r=' . rand( 1, 10000 ) ); - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); - curl_setopt( $ch, CURLOPT_FRESH_CONNECT, 1 ); - curl_setopt( $ch, CURLOPT_TIMEOUT, 60 ); - curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 20 ); - curl_exec( $ch ); - curl_close( $ch ); + curl_setopt($ch, CURLOPT_URL, G::browserCacheFilesUrl((isset($_SERVER["HTTPS"])? (($_SERVER["HTTPS"] != "")? "https://" : "http://") : "http://") . $_SERVER["HTTP_HOST"] . "/js/ext/translation.en.js?r=" . rand(1, 10000))); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 60); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); + curl_exec($ch); + curl_close($ch); } /** @@ -693,7 +691,9 @@ 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(); + error_log('1 --------'); + error_log($pathSharedSites); + $systemName = $this->getNameSystem($pathSharedSites); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -984,7 +984,7 @@ 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(); + $systemName = $this->getNameSystem($pathShared); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -1080,14 +1080,20 @@ class Installer extends Controller return $info; } - public function getSystemName () + public function getNameSystem ($siteShared = '') { - $systemName = '' - $siteShared = $this->path_shared; + $systemName = ''; + error_log('PASE --------'); + error_log($siteShared); + if ($siteShared == '') { + $siteShared = trim( $_REQUEST['pathShared'] ); + } + if (substr( $siteShared, - 1 ) != '/') { $siteShared .= '/'; } - + error_log('2 --------'); + error_log($siteShared . 'partner.info'); if (file_exists($siteShared . 'partner.info')) { $dataInfo = parse_ini_file($siteShared . 'partner.info'); if (isset($dataInfo['system_name'])) { @@ -1404,7 +1410,7 @@ EOL; $output = curl_exec($ch); curl_close($ch); - /** + /** * Upload translation .po file */ @@ -1427,7 +1433,7 @@ EOL; $output = curl_exec($ch); curl_close($ch); - /** + /** * Upload skin file */ @@ -1491,3 +1497,4 @@ EOL; } } + From 83deacc0d803bdad3e5a1020672f50932279d6c9 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Fri, 26 Apr 2013 16:36:32 -0400 Subject: [PATCH 3/3] Creacion de logs para SYSTEM_NAME Creacion de logs para SYSTEM_NAME --- workflow/engine/controllers/installer.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 5933daa42..d9b475339 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -691,9 +691,7 @@ 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"; - error_log('1 --------'); - error_log($pathSharedSites); - $systemName = $this->getNameSystem($pathSharedSites); + $systemName = $this->getSystemName(); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -984,7 +982,7 @@ 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->getNameSystem($pathShared); + $systemName = $this->getSystemName(); if ($systemName != '') { $dbText .= " define ('SYSTEM_NAME', " . $systemName . ");\n"; } @@ -1080,20 +1078,14 @@ class Installer extends Controller return $info; } - public function getNameSystem ($siteShared = '') + public function getSystemName () { - $systemName = ''; - error_log('PASE --------'); - error_log($siteShared); - if ($siteShared == '') { - $siteShared = trim( $_REQUEST['pathShared'] ); - } - + $systemName = '' + $siteShared = $this->path_shared; if (substr( $siteShared, - 1 ) != '/') { $siteShared .= '/'; } - error_log('2 --------'); - error_log($siteShared . 'partner.info'); + if (file_exists($siteShared . 'partner.info')) { $dataInfo = parse_ini_file($siteShared . 'partner.info'); if (isset($dataInfo['system_name'])) { @@ -1497,4 +1489,3 @@ EOL; } } -