Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 141 → Rev 142

/trunk/scripts/bibliotheque/ScriptCommande.php
39,8 → 39,7
* il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.
* @var array
*/
private $_parametres_autorises = array( '-p' => array(true, true, 'Projet, le nom utiliser pour le fichier ini'),
'-a' => array(true, true, 'Action à réaliser'),
private $_parametres_autorises = array( '-a' => array(true, true, 'Action à réaliser'),
'-v' => array(false, '1', 'Mode verbeux : 1 ou 2'),
'-t' => array(false, '', 'Test sur un nombre de ligne...'));
/**
106,15 → 105,10
$this->setParam($parametres);
}
// Tableaux des emplacements des fichiers ini à rechercher et à charger dans l'ordre du tableau
$projet_prefixe = '';
if (preg_match('/^([^_]+)/', $this->getParam('p'), $match)) {
$projet_prefixe = $match[1];
}
 
$tab_fichiers_ini = array( ES_CHEMIN_CONFIG.'bdd.ini', // Paramêtres de la base de données
ES_CHEMIN_CONFIG.'commun.ini', // Paramêtres communs aux différents projets
$this->getModuleChemin().$this->getParam('p').'.ini',
$this->getModuleChemin().DS.'configurations'.DS.$this->getParam('p').'.ini');
$this->getModuleChemin().DS.'configurations'.DS.'config.ini');
// Chargement des fichiers ini généraux
for ($i = 0; $i < 2 ; $i++) {
123,17 → 117,6
trigger_error($e, E_USER_WARNING);
}
}
// Chargement du fichier ini du projet
$erreur_ini_projet = true;
for ($i = 2; $i < 4 ; $i++) {
if ($this->parserFichierIni($tab_fichiers_ini[$i])) {
$erreur_ini_projet = false;
}
}
if ($erreur_ini_projet) {
$e = "Le fichier .ini du projet est introuvable : \n".$tab_fichiers_ini[2]."\n".$tab_fichiers_ini[3]."\n";
trigger_error($e, E_USER_WARNING);
}
}
 
abstract public function executer();