Overview
Comment: | Delete PLUGINS_SYSTEM constant and feature |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA3-256: |
b2fd85aceb20e5c92fef3c595796ec0c |
User & Date: | bohwaz on 2022-05-13 13:58:09 |
Other Links: | manifest | tags |
Context
2022-05-30
| ||
10:08 | Fix quote of field name in index creation check-in: bff1167aa7 user: bohwaz tags: trunk, stable | |
2022-05-13
| ||
16:29 | Merge with trunk check-in: 19a0b12f84 user: bohwaz tags: emails | |
13:58 | Delete PLUGINS_SYSTEM constant and feature check-in: b2fd85aceb user: bohwaz tags: trunk, stable | |
13:31 | Move admin_url to Template check-in: c011ac38d5 user: bohwaz tags: trunk | |
Changes
Modified src/config.dist.php from [2fc8f5c8d2] to [e181ab502c].
︙ | ︙ | |||
120 121 122 123 124 125 126 | * Emplacement de stockage des plugins * * Défaut : DATA_ROOT . '/plugins' */ //const PLUGINS_ROOT = DATA_ROOT . '/plugins'; | < < < < < < < < < < < < < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | * Emplacement de stockage des plugins * * Défaut : DATA_ROOT . '/plugins' */ //const PLUGINS_ROOT = DATA_ROOT . '/plugins'; /** * Signaux système * * Permet de déclencher des signaux sans passer par un plugin. * Le fonctionnement des signaux système est strictment identique aux signaux des plugins. * Les signaux système sont exécutés en premier, avant les signaux des plugins. * |
︙ | ︙ |
Modified src/include/init.php from [d1e6e9ff62] to [eb29a78f8b].
︙ | ︙ | |||
184 185 186 187 188 189 190 | 'CACHE_ROOT' => DATA_ROOT . '/cache', 'SHARED_CACHE_ROOT' => DATA_ROOT . '/cache/shared', 'DB_FILE' => DATA_ROOT . '/association.sqlite', 'DB_SCHEMA' => ROOT . '/include/data/schema.sql', 'PLUGINS_ROOT' => DATA_ROOT . '/plugins', 'PREFER_HTTPS' => false, 'ALLOW_MODIFIED_IMPORT' => true, | < | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | 'CACHE_ROOT' => DATA_ROOT . '/cache', 'SHARED_CACHE_ROOT' => DATA_ROOT . '/cache/shared', 'DB_FILE' => DATA_ROOT . '/association.sqlite', 'DB_SCHEMA' => ROOT . '/include/data/schema.sql', 'PLUGINS_ROOT' => DATA_ROOT . '/plugins', 'PREFER_HTTPS' => false, 'ALLOW_MODIFIED_IMPORT' => true, 'SHOW_ERRORS' => true, 'MAIL_ERRORS' => false, 'ERRORS_REPORT_URL' => null, 'ENABLE_TECH_DETAILS' => true, 'ENABLE_UPGRADES' => true, 'USE_CRON' => false, 'ENABLE_XSENDFILE' => false, |
︙ | ︙ |
Modified src/include/lib/Garradin/Install.php from [c79bfa7c95] to [68a0642e6b].
︙ | ︙ | |||
76 77 78 79 80 81 82 | // We can't use the real password, as it might not be valid (too short or compromised) $ok = self::install($data->organization ?? 'Association', $data->name, $data->email, md5($data->password)); // Restore password DB::getInstance()->preparedQuery('UPDATE membres SET passe = ? WHERE id = 1;', [$data->password]); | < < < | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | // We can't use the real password, as it might not be valid (too short or compromised) $ok = self::install($data->organization ?? 'Association', $data->name, $data->email, md5($data->password)); // Restore password DB::getInstance()->preparedQuery('UPDATE membres SET passe = ? WHERE id = 1;', [$data->password]); if (defined('\Garradin\LOCAL_LOGIN') && \Garradin\LOCAL_LOGIN) { Session::getInstance()->refresh(); } @unlink(CACHE_ROOT . '/reset'); Utils::redirect('!config/advanced/?msg=RESET'); |
︙ | ︙ |
Modified src/include/lib/Garradin/Plugin.php from [607eb942d9] to [7a837036f4].
︙ | ︙ | |||
25 26 27 28 29 30 31 | 'pdf' => 'application/pdf', 'png' => 'image/png', 'swf' => 'application/shockwave-flash', 'xml' => 'text/xml', 'svg' => 'image/svg+xml', ]; | | < < < < < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 'pdf' => 'application/pdf', 'png' => 'image/png', 'swf' => 'application/shockwave-flash', 'xml' => 'text/xml', 'svg' => 'image/svg+xml', ]; static public function getPath($id) { if (file_exists(PLUGINS_ROOT . '/' . $id . '.tar.gz')) { return 'phar://' . PLUGINS_ROOT . '/' . $id . '.tar.gz'; } elseif (is_dir(PLUGINS_ROOT . '/' . $id)) { return PLUGINS_ROOT . '/' . $id; } return false; } /** * Construire un objet Plugin pour un plugin * @param string $id Identifiant du plugin * @throws UserException Si le plugin n'est pas installé (n'existe pas en DB) |
︙ | ︙ | |||
358 359 360 361 362 363 364 | * Liste des plugins installés (en DB) * @return array Liste des plugins triés par nom */ static public function listInstalled() { $db = DB::getInstance(); $plugins = $db->getGrouped('SELECT id, * FROM plugins ORDER BY nom;'); | < < | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | * Liste des plugins installés (en DB) * @return array Liste des plugins triés par nom */ static public function listInstalled() { $db = DB::getInstance(); $plugins = $db->getGrouped('SELECT id, * FROM plugins ORDER BY nom;'); foreach ($plugins as &$row) { $row->disabled = !self::getPath($row->id, false); } return $plugins; } /** |
︙ | ︙ | |||
393 394 395 396 397 398 399 | $plugin->upgrade(); } unset($plugin); } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | $plugin->upgrade(); } unset($plugin); } } /** * Liste les plugins qui doivent être affichés dans le menu * @return array Tableau associatif id => nom (ou un tableau vide si aucun plugin ne doit être affiché) */ static public function listMenu(Session $session) { $db = DB::getInstance(); $list = $db->getGrouped('SELECT id, nom, menu_condition FROM plugins WHERE menu = 1 ORDER BY nom;'); // FIXME deprecated $fix_legacy = [ '{Membres::DROIT_AUCUN}' => '{ACCESS_NONE}', '{Membres::DROIT_ACCES}' => '{ACCESS_READ}', |
︙ | ︙ | |||
841 842 843 844 845 846 847 | return null; } if (null === $params) { $params = []; } | < < | < | 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | return null; } if (null === $params) { $params = []; } foreach ($list as $row) { $path = self::getPath($row->plugin); // Ne pas appeler les plugins dont le code n'existe pas/plus, if (!$path) { continue; } $params['plugin_root'] = $path; |
︙ | ︙ |
Modified src/include/lib/Garradin/Sauvegarde.php from [fb842afc09] to [65811bb164].
︙ | ︙ | |||
538 539 540 541 542 543 544 | } if ($version != garradin_version()) { $return |= self::NEED_UPGRADE; } else { | < < < | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | } if ($version != garradin_version()) { $return |= self::NEED_UPGRADE; } else { // Check and upgrade plugins, if a software upgrade is necessary, plugins will be upgraded after the upgrade Plugin::upgradeAllIfRequired(); } return $return; } |
︙ | ︙ |
Modified src/include/lib/Garradin/Upgrade.php from [e583484540] to [258a556151].
︙ | ︙ | |||
454 455 456 457 458 459 460 | $db->setVersion(garradin_version()); // reset last version check $db->exec('UPDATE config SET value = NULL WHERE key = \'last_version_check\';'); Static_Cache::remove('upgrade'); | < < < | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | $db->setVersion(garradin_version()); // reset last version check $db->exec('UPDATE config SET value = NULL WHERE key = \'last_version_check\';'); Static_Cache::remove('upgrade'); Plugin::upgradeAllIfRequired(); } catch (\Exception $e) { if ($db->inTransaction()) { $db->rollback(); } |
︙ | ︙ |
Modified src/templates/admin/config/plugins.tpl from [87c21ad0af] to [2960d4b159].
︙ | ︙ | |||
50 51 52 53 54 55 56 | <td> <a href="{$plugin.url}" onclick="return !window.open(this.href);">{$plugin.auteur}</a> </td> <td> {$plugin.version} </td> <td class="actions"> | < < < | < > | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | <td> <a href="{$plugin.url}" onclick="return !window.open(this.href);">{$plugin.auteur}</a> </td> <td> {$plugin.version} </td> <td class="actions"> {if !empty($plugin.config)} {linkbutton shape="settings" label="Configurer" href="!plugin/%s/config.php"|args:$plugin.id} {/if} {linkbutton shape="delete" href="!config/plugins.php?delete=%d"|args:$plugin.id label="Désinstaller"} </td> {/if} </tr> {/foreach} </tbody> </table> {else} |
︙ | ︙ | |||
83 84 85 86 87 88 89 | <dl> {foreach from=$liste_telecharges item="plugin" key="id"} <dt> <input type="radio" name="plugin" value="{$id}" id="f_{$id}" /> <label for="f_{$id}"> {$plugin.nom} </label> | | | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | <dl> {foreach from=$liste_telecharges item="plugin" key="id"} <dt> <input type="radio" name="plugin" value="{$id}" id="f_{$id}" /> <label for="f_{$id}"> {$plugin.nom} </label> <small>(version {$plugin.version})</small> </dt> <dd>[<a href="{$plugin.url}" onclick="return !window.open(this.href);">{$plugin.auteur}</a>] {$plugin.description}</dd> {/foreach} </dl> </fieldset> <p class="help"> |
︙ | ︙ |