Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

obtain_update_settings.php

Zuletzt modifiziert: 01.05.2026, 11:27 - Dateigröße: 2.47 KiB


 001  <?php
 002  /**
 003   *
 004   * This file is part of the phpBB Forum Software package.
 005   *
 006   * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007   * @license GNU General Public License, version 2 (GPL-2.0)
 008   *
 009   * For full copyright and license information, please see
 010   * the docs/CREDITS.txt file.
 011   *
 012   */
 013   
 014  namespace phpbb\install\module\obtain_data\task;
 015   
 016  use phpbb\install\exception\user_interaction_required_exception;
 017  use phpbb\install\helper\config;
 018  use phpbb\install\helper\iohandler\iohandler_interface;
 019  use phpbb\install\task_base;
 020   
 021  class obtain_update_settings extends task_base
 022  {
 023      /**
 024       * @var config
 025       */
 026      protected $installer_config;
 027   
 028      /**
 029       * @var iohandler_interface
 030       */
 031      protected $iohandler;
 032   
 033      /**
 034       * Constructor
 035       *
 036       * @param config                $installer_config
 037       * @param iohandler_interface    $iohandler
 038       */
 039      public function __construct(config $installer_config, iohandler_interface $iohandler)
 040      {
 041          $this->installer_config    = $installer_config;
 042          $this->iohandler        = $iohandler;
 043   
 044          parent::__construct(true);
 045      }
 046   
 047      /**
 048       * {@inheritdoc}
 049       */
 050      public function run()
 051      {
 052          // Check if data is sent
 053          if ($this->iohandler->get_input('submit_update', false))
 054          {
 055              $update_files = $this->iohandler->get_input('update_type', 'all') === 'all';
 056   
 057              if ($this->installer_config->get('disable_filesystem_update', false) && $update_files)
 058              {
 059                  $this->iohandler->add_error_message('UPDATE_FILES_NOT_FOUND');
 060   
 061                  throw new user_interaction_required_exception();
 062              }
 063   
 064              $this->installer_config->set('do_update_files', $update_files);
 065          }
 066          else
 067          {
 068              if ($this->installer_config->get('disable_filesystem_update', false))
 069              {
 070                  $options[] = array(
 071                      'value'        => 'db_only',
 072                      'label'        => 'UPDATE_TYPE_DB_ONLY',
 073                      'selected'    => true,
 074                  );
 075              }
 076              else
 077              {
 078                  $options = array(
 079                      array(
 080                          'value'        => 'all',
 081                          'label'        => 'UPDATE_TYPE_ALL',
 082                          'selected'    => true,
 083                      ),
 084                      array(
 085                          'value'        => 'db_only',
 086                          'label'        => 'UPDATE_TYPE_DB_ONLY',
 087                          'selected'    => false,
 088                      ),
 089                  );
 090              }
 091   
 092              $this->iohandler->add_user_form_group('UPDATE_TYPE', array(
 093                  'update_type' => array(
 094                      'label'        => 'UPDATE_TYPE',
 095                      'type'        => 'radio',
 096                      'options'    => $options,
 097                  ),
 098                  'submit_update' => array(
 099                      'label'    => 'SUBMIT',
 100                      'type'    => 'submit',
 101                  ),
 102              ));
 103   
 104              throw new user_interaction_required_exception();
 105          }
 106      }
 107   
 108      /**
 109       * {@inheritdoc}
 110       */
 111      static public function get_step_count()
 112      {
 113          return 0;
 114      }
 115   
 116      /**
 117       * {@inheritdoc}
 118       */
 119      public function get_task_lang_name()
 120      {
 121          return '';
 122      }
 123  }
 124