Pastebin

Viewlegend migrations Datei v_2_4_0.php

von Talk19zehn (22.06.2025 11:12)
Beschreibung:
Erneuerte migrations v_2_4_0.php
Snippet erstellt:
22.06.2025 11:12
Snippet wird automatisch gelöscht:
22.07.2025 11:12

Dein Code:
  1. <?php
  2. /**
  3. *
  4. * Viewlegend extension for the phpBB Forum Software package.
  5. * @copyright (c) viewlegend add v240 2025 Talk19Zehn https://www.ongray-design.de and 2025 Kirk https://kirk-phpbb.com
  6. * @license GNU General Public License, version 2 (GPL-2.0-only)
  7. *
  8. */
  9.  
  10. namespace ongray\viewlegend\migrations;
  11.  
  12. class v_2_4_0 extends \phpbb\db\migration\migration
  13. {
  14.         public static function depends_on()
  15.         {
  16.                 return ['\phpbb\db\migration\data\v330\v330'];
  17.         }
  18.  
  19.         public function update_data()
  20.         {
  21.                 return [
  22.                         // Add configs
  23.                         ['config.add', ['vl_enable', 1]],
  24.                         ['config.add', ['vl_adminmode', 0]],
  25.                         ['config.add', ['show_vl_mini', 1]],
  26.  
  27.                         // Add ACP modules
  28.                         ['module.add', [
  29.                                 'acp',
  30.                                 'ACP_CAT_DOT_MODS',
  31.                                 'ACP_VIEWLEGEND'
  32.                         ]],
  33.                         ['module.add', [
  34.                                 'acp',
  35.                                 'ACP_VIEWLEGEND',
  36.                                 [
  37.                                         'module_basename'       => '\ongray\viewlegend\acp\viewlegend_module',
  38.                                         'module_langname'       => 'VIEWLEGEND_SETTINGS',
  39.                                         'module_mode'           => 'config',
  40.                                         'module_auth'           => 'ext_ongray/viewlegend && acl_a_board',
  41.                                 ],
  42.                         ]],
  43.                 ];
  44.         }
  45. }

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. Alternativ kannst du den gesamten Eintrag auch als Datei herunterladen.