Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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

install_helper.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.15 KiB


01  <?php
02  /**
03   *
04   * This file is part of the phpBB Forum Software package.
05   *
06   * @copyright (c) phpBB Limited <https://www.phpbb.com>
07   * @license GNU General Public License, version 2 (GPL-2.0)
08   *
09   * For full copyright and license information, please see
10   * the docs/CREDITS.txt file.
11   *
12   */
13   
14  namespace phpbb\install\helper;
15   
16  /**
17   * General helper functionality for the installer
18   */
19  class install_helper
20  {
21      /**
22       * @var string
23       */
24      protected $php_ext;
25   
26      /**
27       * @var string
28       */
29      protected $phpbb_root_path;
30   
31      /**
32       * Constructor
33       *
34       * @param string    $phpbb_root_path    path to phpBB's root
35       * @param string    $php_ext            Extension of PHP files
36       */
37      public function __construct($phpbb_root_path, $php_ext)
38      {
39          $this->phpbb_root_path    = $phpbb_root_path;
40          $this->php_ext            = $php_ext;
41      }
42   
43      /**
44       * Check whether phpBB is installed.
45       *
46       * @return bool
47       */
48      public function is_phpbb_installed()
49      {
50          $config_path = $this->phpbb_root_path . 'config.' . $this->php_ext;
51          $install_lock_path = $this->phpbb_root_path . 'cache/install_lock';
52   
53          if (file_exists($config_path) && !file_exists($install_lock_path) && filesize($config_path))
54          {
55              return true;
56          }
57   
58          return false;
59      }
60  }
61