Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 141 → Rev 142

/trunk/services/modules/Traitement.php
83,9 → 83,9
if (isset($projet) && isset($script)) {
$requete = ($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
'FROM ref_traitement '.
"WHERE referentiel_code = $projet ".
" AND script = $script ".
' AND date_fin IS NULL '.
"WHERE ".(($projet == "'tout'") ? '' : 'referentiel_code = '.$projet.' AND ') .
" script = $script ".
' AND date_fin IS NULL '.
'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'meta_date_creation DESC').' '.
'LIMIT 0,1 ';
120,9 → 120,9
$requete = ($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
'FROM ref_traitement '.
"WHERE referentiel_code = $projet ".
" AND script = $script ".
' AND date_debut IS NULL '.
' AND date_fin IS NULL '.
" AND script = $script ".
' AND date_debut IS NULL '.
' AND date_fin IS NULL '.
'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'meta_date_creation DESC').' ';
// Récupération des résultats
/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();
/trunk/scripts/modules/versionnage/Versionnage.php
53,13 → 53,11
private $referentielDao = null;
public function executer() {
// Récupération de paramêtres
$this->projet = $this->getParam('p');
// Récupération du dernier traitement demandé
$this->traitementDao = new TraitementDao();
$this->traitement = $this->traitementDao->getDernierTraitement($this->projet, self::SCRIPT_NOM);
$this->traitement = $this->traitementDao->getDernierTraitement('tout', self::SCRIPT_NOM);
if (isset($this->traitement)) {
$this->projet = $this->traitement['referentiel_code']; // Récupération du nom de projet
Debug::printr($this->traitement);
// Écriture de la date de début du traitement
Debug::printr('Debute:'.$this->traitementDao->debuterTraitement($this->traitement['id_traitement']));
/trunk/scripts/modules/tests/Tests.php
32,8 → 32,6
private $referentielDao = null;
public function executer() {
// Récupération de paramêtres
$this->projet = $this->getParam('p');
$this->manuel = parse_ini_file(Config::get('chemin_appli').DS.'..'.DS.'configurations'.DS.'referentiel_v2.1.ini');
$this->resultatDao = new ResultatDao();
40,8 → 38,9
$this->traitementDao = new TraitementDao();
Debug::printr('Dans le script test');
// Récupération du dernier traitement demandé
$this->traitement = $this->traitementDao->getDernierTraitement($this->projet, self::SCRIPT_NOM);
$this->traitement = $this->traitementDao->getDernierTraitement('tout', self::SCRIPT_NOM);
if (isset($this->traitement)) {
$this->projet = $this->traitement['referentiel_code']; // Récupération du nom de projet
Debug::printr($this->traitement);
// Écriture de la date de début du traitement
Debug::printr('Debute:'.$this->traitementDao->debuterTraitement($this->traitement['id_traitement']));
67,7 → 66,7
// Écriture de la date de fin du traitement
Debug::printr('Termine:'.$this->traitementDao->terminerTraitement($this->traitement['id_traitement']));
} else {
Debug::printr("Aucun dernier traitement trouvé pour le projet '{$this->projet}' et le script '".self::SCRIPT_NOM."' !");
Debug::printr("Aucun dernier traitement trouvé pour le script '".self::SCRIPT_NOM."' !");
}
}
 
/trunk/scripts/modules/tests/configurations/config.ini
New file
0,0 → 1,5
[titres]
NombreDeChamps = "Structure -> nombre de champs : %s"
 
[descriptions]
NombreDeChamps = "Le nombre de champs présent dans la table doit être supérieur ou égal à 35."