[ Index ]

PHP Cross Reference of phpBB-3.3.3-deutsch

title

Body

[close]

/phpbb/install/helper/ -> install_helper.php (source)

   1  <?php
   2  /**
   3   *
   4   * This file is part of the phpBB Forum Software package.
   5   *
   6   * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7   * @license GNU General Public License, version 2 (GPL-2.0)
   8   *
   9   * 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  }


Generated: Sun Feb 14 20:08:31 2021 Cross-referenced by PHPXref 0.7.1