Comment: | Corrections liées à des variables inutilisées |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
8f90c2ba0d3ad6d93b55209e1be3d866 |
User & Date: | bohwaz on 2018-07-11 19:50:07 |
Other Links: | manifest | tags |
2018-07-11
| ||
19:52 | Nouvelle release check-in: 49ba465405 user: bohwaz tags: trunk, stable, 0.8.5 | |
19:50 | Corrections liées à des variables inutilisées check-in: 8f90c2ba0d user: bohwaz tags: trunk, stable | |
19:49 | Corrige gestion du LOCAL_LOGIN dans le cas où le cookie n'est pas vide mais la session plus valide check-in: 3ddbc77ebb user: bohwaz tags: trunk, stable | |
Modified src/include/lib/Garradin/Compta/Exercices.php from [f9841e58c7] to [40f25a7060].
︙ | ︙ | |||
212 213 214 215 216 217 218 | * et les inscrire au résultat de l'exercice N+1 * @param integer $exercice ID de l'exercice à solder * @param string $date Date de début de l'exercice Y-m-d * @return boolean true en cas de succès */ public function solderResultat($exercice, $date) { | < < | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | * et les inscrire au résultat de l'exercice N+1 * @param integer $exercice ID de l'exercice à solder * @param string $date Date de début de l'exercice Y-m-d * @return boolean true en cas de succès */ public function solderResultat($exercice, $date) { $resultat_excedent = 120; $resultat_debiteur = 129; $comptes = new Comptes; if (!$comptes->isActive($resultat_excedent)) { |
︙ | ︙ |
Modified src/include/lib/Garradin/Compta/Import.php from [434894af9b] to [256fecd4fb].
︙ | ︙ | |||
101 102 103 104 105 106 107 | if (!$fp) { return false; } $db = DB::getInstance(); $db->begin(); | < < < | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | if (!$fp) { return false; } $db = DB::getInstance(); $db->begin(); $cats = new Categories; $journal = new Journal; $columns = array_flip($this->csv_header); $liste_cats = $db->getAssoc('SELECT intitule, id FROM compta_categories;'); $liste_moyens = $cats->listMoyensPaiement(); $col = function($column) use (&$row, &$columns) { if (!isset($columns[$column])) return null; |
︙ | ︙ |
Modified src/include/lib/Garradin/Compta/Rapports.php from [4805222cc1] to [193a79d665].
︙ | ︙ | |||
238 239 240 241 242 243 244 | WHERE compte IN (SELECT id FROM compta_comptes WHERE position IN ('.implode(', ', $include).')) ORDER BY compte ASC;'); while ($row = $res->fetchArray(SQLITE3_NUM)) { list($compte, $debit, $credit, $position) = $row; $parent = substr($compte, 0, 2); | < | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | WHERE compte IN (SELECT id FROM compta_comptes WHERE position IN ('.implode(', ', $include).')) ORDER BY compte ASC;'); while ($row = $res->fetchArray(SQLITE3_NUM)) { list($compte, $debit, $credit, $position) = $row; $parent = substr($compte, 0, 2); if (($position & Comptes::ACTIF) && ($position & Comptes::PASSIF)) { $position = 'actif_ou_passif'; $solde = $debit - $credit; } else if ($position & Comptes::ACTIF) |
︙ | ︙ |
Modified src/include/lib/Garradin/Compta/Rapprochement.php from [4eec0ce21a] to [dbf2a90fad].
︙ | ︙ | |||
48 49 50 51 52 53 54 | } $solde_final = $solde; return $result; } | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | } $solde_final = $solde; return $result; } public function record(array $journal, array $cases = null, $id_auteur) { if (!is_array($cases) && empty($cases)) { $cases = []; } $db = DB::getInstance(); |
︙ | ︙ |
Modified src/include/lib/Garradin/Install.php from [1ed25c3eb1] to [6badb0a7e2].
︙ | ︙ | |||
25 26 27 28 29 30 31 | // Configuration de base // c'est dans Config::set que sont vérifiées les données utilisateur (renvoie UserException) $config = Config::getInstance(); $config->set('nom_asso', $nom_asso); $config->set('adresse_asso', $adresse_asso); $config->set('email_asso', $email_asso); | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | // Configuration de base // c'est dans Config::set que sont vérifiées les données utilisateur (renvoie UserException) $config = Config::getInstance(); $config->set('nom_asso', $nom_asso); $config->set('adresse_asso', $adresse_asso); $config->set('email_asso', $email_asso); $config->set('site_asso', $site_asso); $config->set('monnaie', '€'); $config->set('pays', 'FR'); $config->set('email_envoi_automatique', $email_asso); $config->setVersion(garradin_version()); $champs = Membres\Champs::importInstall(); $champs->save(false); // Pas de copie car pas de table membres existante |
︙ | ︙ |
Modified src/include/lib/Garradin/Rappels_Envoyes.php from [c7cead62f7] to [4ab2f9f384].
︙ | ︙ | |||
193 194 195 196 197 198 199 | */ public function listForCotisation($id, $page = 1) { $begin = ($page - 1) * self::ITEMS_PER_PAGE; return DB::getInstance()->get('SELECT * FROM rappels_envoyes WHERE id_rappel IN (SELECT id FROM rappels WHERE id_cotisation = ?) | | > | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | */ public function listForCotisation($id, $page = 1) { $begin = ($page - 1) * self::ITEMS_PER_PAGE; return DB::getInstance()->get('SELECT * FROM rappels_envoyes WHERE id_rappel IN (SELECT id FROM rappels WHERE id_cotisation = ?) ORDER BY date DESC LIMIT ?, ?;', (int)$id, $begin, self::ITEMS_PER_PAGE); } /** * Nombre de rappels pour une cotisation donnée * @param integer $id Numéro de la cotisation * @return integer Nombre de rappels envoyés */ |
︙ | ︙ |
Modified src/include/lib/Garradin/Squelette.php from [55a9f0b312] to [63f2767bad].
︙ | ︙ | |||
498 499 500 501 502 503 504 | } } else if ($loopType == 'documents' || $loopType == 'images' || $loopType == 'fichiers') { $where = $order = ''; $limit = $begin = 0; | < < | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | } } else if ($loopType == 'documents' || $loopType == 'images' || $loopType == 'fichiers') { $where = $order = ''; $limit = $begin = 0; $query = 'SELECT f.*, fc.hash, fc.taille, strftime(\'%s\', f.datetime) AS date '; $query.= ' FROM fichiers AS f INNER JOIN fichiers_contenu AS fc ON fc.id = f.id_contenu '; $query.= ' INNER JOIN fichiers_wiki_pages AS fwp ON fwp.fichier = f.id '; $query.= ' INNER JOIN wiki_pages AS w ON w.id = fwp.id AND w.droit_lecture = -1 '; $where = 'WHERE 1 '; $allowed_fields = ['id', 'nom', 'type', 'date', 'image', 'hash', 'taille', |
︙ | ︙ |
Modified src/include/lib/Garradin/Squelette_Filtres.php from [4eee7b88b4] to [b4203fb585].
1 2 3 4 5 6 | <?php namespace Garradin; class Squelette_Filtres { | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <?php namespace Garradin; class Squelette_Filtres { static private $alt = []; static public $filtres_php = [ 'strtolower', 'strtoupper', 'ucfirst', 'ucwords', |
︙ | ︙ | |||
300 301 302 303 304 305 306 | static public function div($a, $b) { return $b ? $a / $b : 0; } static public function modulo($a, $mod, $add) { | | | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | static public function div($a, $b) { return $b ? $a / $b : 0; } static public function modulo($a, $mod, $add) { return ($mod ? $a % $mod : 0) + $add; } static public function vide($value) { return ''; } |
︙ | ︙ |
Modified src/include/lib/Garradin/Utils.php from [cb5d0acf56] to [7d0bf46225].
︙ | ︙ | |||
629 630 631 632 633 634 635 | return str_replace('.', ',', round($size / 1024 / 1024, 2)) . ' Mo'; elseif ($size > 1024) return str_replace('.', ',', round($size / 1024, 2)) . ' Ko'; else return $size . ' o'; } | | | | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | return str_replace('.', ',', round($size / 1024 / 1024, 2)) . ' Mo'; elseif ($size > 1024) return str_replace('.', ',', round($size / 1024, 2)) . ' Ko'; else return $size . ' o'; } static public function deleteRecursive($path) { if (!file_exists($path)) return false; $dir = dir($path); if (!$dir) return false; while ($file = $dir->read()) { if ($file == '.' || $file == '..') continue; if (is_dir($path . '/' . $file)) { if (!self::deleteRecursive($path . '/' . $file)) return false; } else { unlink($path . '/' . $file); } } |
︙ | ︙ |
Modified src/include/lib/Garradin/Wiki.php from [ea67414504] to [d68669124c].
︙ | ︙ | |||
429 430 431 432 433 434 435 | $db = DB::getInstance(); return $db->get('SELECT *, strftime(\'%s\', date_creation) AS date_creation, strftime(\'%s\', date_modification) AS date_modification FROM wiki_pages WHERE '.$this->_getLectureClause().' | | > | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | $db = DB::getInstance(); return $db->get('SELECT *, strftime(\'%s\', date_creation) AS date_creation, strftime(\'%s\', date_modification) AS date_modification FROM wiki_pages WHERE '.$this->_getLectureClause().' ORDER BY date_modification DESC LIMIT ?,?;', $begin, self::ITEMS_PER_PAGE); } public function countRecentModifications() { $db = DB::getInstance(); return $db->firstColumn('SELECT COUNT(*) FROM wiki_pages WHERE '.$this->_getLectureClause().';'); } |
︙ | ︙ |