From c1ea3738748bd0512bcfc00fea07f46bfbfbf343 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 4 Nov 2020 13:33:32 +0100 Subject: [PATCH 01/10] (These levels=stuff are obsolete now) --- check_process | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/check_process b/check_process index 6da1a82..0b2b1d0 100644 --- a/check_process +++ b/check_process @@ -16,15 +16,3 @@ incorrect_path=1 port_already_use=0 change_url=1 -;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=na -# l'utilisateur est à créer. LDAP non supporté par le paquet de base (obligation d'utiliser de MySql) - Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 \ No newline at end of file From bb5292373e65dfea53cb00be61696fce759e4af9 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 13:39:47 +0100 Subject: [PATCH 02/10] =?UTF-8?q?Test=20des=20fonctionnalit=C3=A9s=20de=20?= =?UTF-8?q?git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 From 29147c584f5b364261acc695d66cc613081e3f44 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 13:50:44 +0100 Subject: [PATCH 03/10] Mise a jour de la version pour les sources --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 01152be..87b6329 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.8.1.tar.bz2 -SOURCE_SUM=7cc64b51c9721c2dd7ee510f245bcfc4693ee07f74581ad74003906eb4716ef1 +SOURCE_SUM=5a031124910575c4332baf07254678ec7e183a71876aeb2a45e0d9e118e41fb6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true From a473841e16343d0de394bddf970057b230975d70 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 14:11:11 +0100 Subject: [PATCH 04/10] Mise a jour du fichier app.src pour le passage en version 1 --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 87b6329..61b155c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.8.1.tar.bz2 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.1.tar.bz2 SOURCE_SUM=5a031124910575c4332baf07254678ec7e183a71876aeb2a45e0d9e118e41fb6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 From 36041c0bbade958fc43a8916cd00dea7eef0a9f6 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 15:06:45 +0100 Subject: [PATCH 05/10] Mise a jour de manifest.json (changement de version) --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7806358..7a3b4eb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "0.9.8.1~ynh4", + "version": "1.0.1~ynh4", "url": "http://garradin.eu/a-propos/", "license": "GPL-3.0-or-later", "maintainer": { From 047726673c671e139bc91ea9f7f0bbea7eedb218 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 15:16:45 +0100 Subject: [PATCH 06/10] Suppression du fichier test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test diff --git a/test b/test deleted file mode 100644 index e69de29..0000000 From 31f5db25a0276abfdfee78cdf94f278cc0e3dd40 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 13:39:47 +0100 Subject: [PATCH 07/10] Passage a la version 1 de garradin --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 01152be..61b155c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.8.1.tar.bz2 -SOURCE_SUM=7cc64b51c9721c2dd7ee510f245bcfc4693ee07f74581ad74003906eb4716ef1 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.1.tar.bz2 +SOURCE_SUM=5a031124910575c4332baf07254678ec7e183a71876aeb2a45e0d9e118e41fb6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 7806358..7a3b4eb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "0.9.8.1~ynh4", + "version": "1.0.1~ynh4", "url": "http://garradin.eu/a-propos/", "license": "GPL-3.0-or-later", "maintainer": { From e43002b4a829d35025b220d4f00a7016773ffdd9 Mon Sep 17 00:00:00 2001 From: perso Date: Wed, 6 Jan 2021 16:19:13 +0100 Subject: [PATCH 08/10] Mises a jour des fichiers README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac562df..e2e3250 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Garradin is a free association managing software. -**Shipped version:** 0.9.8.1 +**Shipped version:** 1.0.1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 05337c9..7d55447 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Garradin est un logiciel libre de gestion associative. il permet de gérer des membres. -**Version incluse :** 0.9.8.1 +**Version incluse :** 1.0.1 ## Captures d'écran From 72fd70601030f061159e5b598f979d3ef5b9ab5e Mon Sep 17 00:00:00 2001 From: BenoitCier Date: Sun, 10 Jan 2021 19:53:19 +0100 Subject: [PATCH 09/10] Mise a jour 1.0.1 > 1.0.2 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2e3250..4eec7d6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Garradin is a free association managing software. -**Shipped version:** 1.0.1 +**Shipped version:** 1.0.2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 7d55447..7f7254e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Garradin est un logiciel libre de gestion associative. il permet de gérer des membres. -**Version incluse :** 1.0.1 +**Version incluse :** 1.0.2 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 61b155c..835e4a9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.1.tar.bz2 -SOURCE_SUM=5a031124910575c4332baf07254678ec7e183a71876aeb2a45e0d9e118e41fb6 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.2.tar.bz2 +SOURCE_SUM=54623d8b1531e0f129eb2a991bb31067f20990878ce5d8ef7941b01cbfb1a40a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 7a3b4eb..168e451 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.0.1~ynh4", + "version": "1.0.2~ynh4", "url": "http://garradin.eu/a-propos/", "license": "GPL-3.0-or-later", "maintainer": { From 326d27ac5cf55e2a3f1f0b9f2cc9eab6f51de3fc Mon Sep 17 00:00:00 2001 From: BenoitCier Date: Tue, 19 Jan 2021 17:27:46 +0100 Subject: [PATCH 10/10] Upgrade to v1.0.3 --- README.md | 2 +- README_fr.md | 2 +- conf/Utils.php | 904 --------------------------------------- conf/app.src | 4 +- manifest.json | 2 +- pull_request_template.md | 10 +- scripts/install | 3 - scripts/upgrade | 3 - 8 files changed, 10 insertions(+), 920 deletions(-) delete mode 100644 conf/Utils.php diff --git a/README.md b/README.md index 9c4f926..8a76b44 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Garradin is a free association managing software. -**Shipped version:** 1.0.2 +**Shipped version:** 1.0.3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 98064ba..744cae9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Garradin est un logiciel libre de gestion associative. il permet de gérer des membres. -**Version incluse :** 1.0.2 +**Version incluse :** 1.0.3 ## Captures d'écran diff --git a/conf/Utils.php b/conf/Utils.php deleted file mode 100644 index 28d8a09..0000000 --- a/conf/Utils.php +++ /dev/null @@ -1,904 +0,0 @@ -'Janvier', 'February'=>'Février', 'March'=>'Mars', 'April'=>'Avril', 'May'=>'Mai', - 'June'=>'Juin', 'July'=>'Juillet', 'August'=>'Août', 'September'=>'Septembre', 'October'=>'Octobre', - 'November'=>'Novembre', 'December'=>'Décembre', 'Monday'=>'Lundi', 'Tuesday'=>'Mardi', 'Wednesday'=>'Mercredi', - 'Thursday'=>'Jeudi','Friday'=>'Vendredi','Saturday'=>'Samedi','Sunday'=>'Dimanche', - 'Feb'=>'Fév','Apr'=>'Avr','Jun'=>'Juin', 'Jul'=>'Juil','Aug'=>'Aout','Dec'=>'Déc', - 'Mon'=>'Lun','Tue'=>'Mar','Wed'=>'Mer','Thu'=>'Jeu','Fri'=>'Ven','Sat'=>'Sam','Sun'=>'Dim']; - - static public function get_datetime($ts) - { - if (is_object($ts) && $ts instanceof \DateTimeInterface) { - return $ts; - } - elseif (is_numeric($ts)) { - return new \DateTime('@' . $ts); - } - elseif (strlen($ts) == 10) { - return \DateTime::createFromFormat('!Y-m-d', $ts); - } - elseif (strlen($ts) == 19) { - return \DateTime::createFromFormat('Y-m-d H:i:s', $ts); - } - else { - return null; - } - } - - static public function strftime_fr($ts, $format) - { - $ts = self::get_datetime($ts); - - if (null === $ts) { - return $ts; - } - - $date = strftime($format, $ts->getTimestamp()); - - $date = strtr($date, self::FRENCH_DATE_NAMES); - $date = strtolower($date); - return $date; - } - - static public function date_fr($ts, $format = null) - { - $ts = self::get_datetime($ts); - - if (null === $ts) { - return $ts; - } - - if (is_null($format)) - { - $format = 'd/m/Y à H:i'; - } - - $date = $ts->format($format); - - $date = strtr($date, self::FRENCH_DATE_NAMES); - $date = strtolower($date); - return $date; - } - - /** - * @deprecated - */ - static public function checkDate($str) - { - if (!preg_match('!^(\d{4})-(\d{2})-(\d{2})$!', $str, $match)) - return false; - - if (!checkdate($match[2], $match[3], $match[1])) - return false; - - return true; - } - - /** - * @deprecated - */ - static public function checkDateTime($str) - { - if (!preg_match('!^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})!', $str, $match)) - return false; - - if (!self::checkDate($match[1])) - return false; - - if ((int) $match[2] < 0 || (int) $match[2] > 23) - return false; - - if ((int) $match[3] < 0 || (int) $match[3] > 59) - return false; - - if (isset($match[4]) && ((int) $match[4] < 0 || (int) $match[4] > 59)) - return false; - - return true; - } - - static public function moneyToInteger($value) - { - if (trim($value) === '') { - return 0; - } - - if (!preg_match('/^-?(\d+)(?:[,.](\d{1,2}))?$/', $value, $match)) { - throw new UserException(sprintf('Le montant est invalide : %s. Exemple de format accepté : 142,02', $value)); - } - - $value = $match[1] . str_pad(@$match[2], 2, '0', STR_PAD_RIGHT); - $value = (int) $value; - return $value; - } - - static public function money_format($number, string $dec_point = ',', string $thousands_sep = ' ', $zero_if_empty = true): string { - if ($number == 0) { - return $zero_if_empty ? '0' : '0,00'; - } - - $sign = $number < 0 ? '-' : ''; - $number = abs((int) $number); - - $decimals = substr('0' . $number, -2); - $number = (int) substr($number, 0, -2); - - return sprintf('%s%s%s%s', $sign, number_format($number, 0, $dec_point, $thousands_sep), $dec_point, $decimals); - } - - static public function getRequestURI() - { - if (!empty($_SERVER['REQUEST_URI'])) - return $_SERVER['REQUEST_URI']; - else - return false; - } - - static public function getSelfURL($qs = true) - { - $uri = self::getSelfURI($qs); - - // Make absolute URI relative to parent URI - if (strpos($uri, WWW_URI) === 0) - { - $uri = substr($uri, strlen(WWW_URI)); - } - - return WWW_URL . $uri; - } - - static public function getSelfURI($qs = true) - { - $uri = self::getRequestURI(); - - if ($qs !== true && (strpos($uri, '?') !== false)) - { - $uri = substr($uri, 0, strpos($uri, '?')); - } - - if (is_array($qs)) - { - $uri .= '?' . http_build_query($qs); - } - - return $uri; - } - - static public function getModifiedURL(string $new) - { - return HTTP::mergeURLs(self::getSelfURL(), $new); - } - - public static function redirect($destination=false, $exit=true) - { - if (empty($destination) || !preg_match('/^https?:\/\//', $destination)) - { - if (empty($destination)) - $destination = WWW_URL; - else - $destination = WWW_URL . preg_replace('/^\//', '', $destination); - } - - if (PHP_SAPI == 'cli') { - echo 'Please visit ' . $destination . PHP_EOL; - exit; - } - - if (headers_sent()) - { - echo - ''. - ' ' . - ' ' . - ' '. - ' '. - ' '. - ' '. - ''; - - if ($exit) - exit(); - - return true; - } - - header("Location: " . $destination); - - if ($exit) - exit(); - } - - static public function getIP() - { - if (!empty($_SERVER['REMOTE_ADDR'])) - return $_SERVER['REMOTE_ADDR']; - return ''; - } - - static public function getCountryList() - { - return Translate::getCountriesList('fr'); - } - - static public function getCountryName($code) - { - $list = self::getCountryList(); - - if (!isset($list[$code])) - return false; - - return $list[$code]; - } - - /** - * Génération pagination à partir de la page courante ($current), - * du nombre d'items total ($total), et du nombre d'items par page ($bypage). - * $listLength représente la longueur d'items de la pagination à génerer - * - * @param int $current - * @param int $total - * @param int $bypage - * @param int $listLength - * @param bool $showLast Toggle l'affichage du dernier élément de la pagination - * @return array|null - */ - public static function getGenericPagination($current, $total, $bypage, $listLength=11, $showLast = true) - { - if ($total <= $bypage) - return null; - - $total = ceil($total / $bypage); - - if ($total < $current) - return null; - - $length = ($listLength / 2); - - $begin = $current - ceil($length); - if ($begin < 1) - { - $begin = 1; - } - - $end = $begin + $listLength; - if($end > $total) - { - $begin -= ($end - $total); - $end = $total; - } - if ($begin < 1) - { - $begin = 1; - } - if($end==($total-1)) { - $end = $total; - } - if($begin == 2) { - $begin = 1; - } - $out = []; - - if ($current > 1) { - $out[] = ['id' => $current - 1, 'label' => '« ' . 'Page précédente', 'class' => 'prev', 'accesskey' => 'a']; - } - - if ($begin > 1) { - $out[] = ['id' => 1, 'label' => '1 ...', 'class' => 'first']; - } - - for ($i = $begin; $i <= $end; $i++) - { - $out[] = ['id' => $i, 'label' => $i, 'class' => ($i == $current) ? 'current' : '']; - } - - if ($showLast && $end < $total) { - $out[] = ['id' => $total, 'label' => '... ' . $total, 'class' => 'last']; - } - - if ($current < $total) { - $out[] = ['id' => $current + 1, 'label' => 'Page suivante' . ' »', 'class' => 'next', 'accesskey' => 'z']; - } - - return $out; - } - - static public function transliterateToAscii($str, $charset='UTF-8') - { - // Don't process empty strings - if (!trim($str)) - return $str; - - // We only process non-ascii strings - if (preg_match('!^[[:ascii:]]+$!', $str)) - return $str; - - $str = htmlentities($str, ENT_NOQUOTES, $charset); - - $str = preg_replace('#&([A-za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $str); - $str = preg_replace('#&([A-za-z]{2})(?:lig);#', '\1', $str); // pour les ligatures e.g. 'œ' - - $str = preg_replace('#&[^;]+;#', '', $str); // supprime les autres caractères - $str = preg_replace('![^[:ascii:]]+!', '', $str); - - return $str; - } - - /** - * Transforme un texte SkrivML en HTML - * @param string $str Texte SkrivML - * @return string Texte HTML - */ - static public function SkrivToHTML($str) - { - if (!self::$skriv) - { - self::$skriv = new \KD2\SkrivLite; - self::$skriv->registerExtension('fichier', ['\\Garradin\\Fichiers', 'SkrivFichier']); - self::$skriv->registerExtension('image', ['\\Garradin\\Fichiers', 'SkrivImage']); - - // Enregistrer d'autres extensions éventuellement - Plugin::fireSignal('skriv.init', ['skriv' => self::$skriv]); - } - - $skriv =& self::$skriv; - - $str = preg_replace_callback('/(fichier|image):\/\/(\d+)/', function ($match) use ($skriv) { - try { - $file = new Fichiers((int)$match[2]); - } - catch (\InvalidArgumentException $e) - { - return $skriv->parseError('/!\ Lien fichier : ' . $e->getMessage()); - } - - return $file->getURL(); - }, $str); - - $str = self::$skriv->render($str); - - return $str; - } - - /** - * Transforme les tags de base SPIP en tags SkrivML - * @param string $str Texte d'entrée - * @return string Texte transformé - */ - static public function SpipToSkriv($str) - { - $str = preg_replace('/(?(.+?)\]/', '[[$1 | $2]]', $str); - $str = preg_replace('/(?(\V*?)<\/h3>/', '=== $1 ===', $str); - $str = preg_replace('/(\V*)<\/b>/', '**$1**', $str); - $str = preg_replace('/(\V*?)<\/strong>/', '**$1**', $str); - $str = preg_replace('/(\V*?)<\/i>/', '\'\'$1\'\'', $str); - $str = preg_replace('/(\V*?)<\/em>/', '\'\'$1\'\'', $str); - $str = preg_replace('/
  • (\V*?)<\/li>/', '* $1', $str); - $str = preg_replace('/