Creacion de logs para SYSTEM_NAME

Creacion de logs para SYSTEM_NAME
This commit is contained in:
Brayan Osmar Pereyra Suxo
2013-04-26 16:23:53 -04:00
parent 53361359d6
commit 6bda69aff8

View File

@@ -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'])) {