$c instead of $config

This commit is contained in:
Michael RICOIS 2016-11-25 20:28:28 +01:00
parent a8687aac5e
commit a7aa4a03e1

View File

@ -265,11 +265,11 @@ $tabDico = array(
);
//Définition bdd local
$config = new Zend_Config($application->getOptions());
Zend_Registry::set('config', $config);
$c = new Zend_Config($application->getOptions());
Zend_Registry::set('config', $c);
try {
$db = Zend_Db::factory($config->resources->db);
$dbMetier = Zend_Db::factory($config->profil->db->metier);
$db = Zend_Db::factory($c->resources->db);
$dbMetier = Zend_Db::factory($c->profil->db->metier);
Zend_Db_Table::setDefaultAdapter($dbMetier);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
@ -311,7 +311,7 @@ if ($opts->id) {
$extension = strrchr($file,'.');
$file = str_replace($extension, '', $file);
if (!file_exists($config->profil->path->data.'/export')) mkdir($config->profil->path->data.'/export');
if (!file_exists($c->profil->path->data.'/export')) mkdir($c->profil->path->data.'/export');
if ($opts->id) {
$profilM = new Application_Model_Profil($db);
@ -338,7 +338,7 @@ $tabData = array();
$posKeySiren = $posKeySiret = $posKeyNic = $posKeySpecial = false;
//Fichier de définition
$inFile = $config->profil->path->data.'/clients/'.$file.'.csv';
$inFile = $c->profil->path->data.'/clients/'.$file.'.csv';
//Lire le fichier csv
$row = 0;
@ -546,7 +546,7 @@ if (count($tabEntete)>0){
//Définition du fichier de sortie
if ( $opts->reprise ) {
$outFile = $config->profil->path->data.'/export/'.$commande->fichierOut;
$outFile = $c->profil->path->data.'/export/'.$commande->fichierOut;
$rowReprise = 0;
$fp = fopen($outFile, 'r+');
@ -555,7 +555,7 @@ if ( $opts->reprise ) {
}
} else {
$outFile = $config->profil->path->data.'/export/'.$file.'-'.date('YmdHis').'.csv';
$outFile = $c->profil->path->data.'/export/'.$file.'-'.date('YmdHis').'.csv';
//Ecriture de l'entete du fichier
$fp = fopen($outFile, 'w');