Overview
Comment:Afficher le message à l'utilisateur, pas une exception technique
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0b4c5b49efda8269a8c24b8d5a02f2dd8680d06c0ebade8aface8ee53d608f0f
User & Date: bohwaz on 2021-10-01 03:31:45
Other Links: manifest | tags
Context
2021-10-01
03:38
Implement PDF export check-in: 946359c67b user: bohwaz tags: trunk, stable
03:31
Afficher le message à l'utilisateur, pas une exception technique check-in: 0b4c5b49ef user: bohwaz tags: trunk
03:29
Remove height: 100% in print mode check-in: 9380c90e3c user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Plugin.php from [2c3e05e869] to [d9b7c0cb75].

725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
			{
				throw new \RuntimeException('Le fichier garradin_plugin.ini ne contient pas d\'entrée "'.$key.'".');
			}
		}

		if (!empty($infos->min_version) && !version_compare(garradin_version(), $infos->min_version, '>='))
		{
			throw new \RuntimeException('Le plugin '.$id.' nécessite Garradin version '.$infos->min_version.' ou supérieure.');
		}

		if (!empty($infos->max_version) && !version_compare(garradin_version(), $infos->max_version, '>'))
		{
			throw new \RuntimeException('Le plugin '.$id.' nécessite Garradin version '.$infos->max_version.' ou inférieure.');
		}

		if (!empty($infos->menu) && !file_exists($path . '/www/admin/index.php'))
		{
			throw new \RuntimeException('Le plugin '.$id.' ne comporte pas de fichier www/admin/index.php alors qu\'il demande à figurer au menu.');
		}








|




|







725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
			{
				throw new \RuntimeException('Le fichier garradin_plugin.ini ne contient pas d\'entrée "'.$key.'".');
			}
		}

		if (!empty($infos->min_version) && !version_compare(garradin_version(), $infos->min_version, '>='))
		{
			throw new UserException('Le plugin '.$id.' nécessite Garradin version '.$infos->min_version.' ou supérieure.');
		}

		if (!empty($infos->max_version) && !version_compare(garradin_version(), $infos->max_version, '>'))
		{
			throw new UserException('Le plugin '.$id.' nécessite Garradin version '.$infos->max_version.' ou inférieure.');
		}

		if (!empty($infos->menu) && !file_exists($path . '/www/admin/index.php'))
		{
			throw new \RuntimeException('Le plugin '.$id.' ne comporte pas de fichier www/admin/index.php alors qu\'il demande à figurer au menu.');
		}