diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-18 11:00:43 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-18 11:00:43 +0100 |
commit | 1af769714304054e63ffaeb41cfa51801785a59d (patch) | |
tree | 6bb3de30d5a9700b758ec097b791e0abd64f1bb1 /phpBB/includes/functions_install.php | |
parent | 96e5a04001b31e667468634493fd1380208cabaf (diff) | |
parent | 249b9dcdb5a19e3d380a28f3df403106a41fadff (diff) | |
download | forums-1af769714304054e63ffaeb41cfa51801785a59d.tar forums-1af769714304054e63ffaeb41cfa51801785a59d.tar.gz forums-1af769714304054e63ffaeb41cfa51801785a59d.tar.bz2 forums-1af769714304054e63ffaeb41cfa51801785a59d.tar.xz forums-1af769714304054e63ffaeb41cfa51801785a59d.zip |
Merge remote-tracking branch 'prototech/ticket/12160' into develop
* prototech/ticket/12160:
[ticket/12160] Use phpbb_check_installation_exists() in the other modules.
[ticket/12160] Move phpbb_check_installation_exists() to functions_install.php
[ticket/12160] Check if phpBB is installed before creating phpBB container.
[ticket/12160] Add function to check if phpBB is installed.
Diffstat (limited to 'phpBB/includes/functions_install.php')
-rw-r--r-- | phpBB/includes/functions_install.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index deb304b838..476535ae5b 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -581,3 +581,22 @@ function phpbb_ignore_new_file_on_update($phpbb_root_path, $file) return $ignore_new_file; } + +/** +* Check whether phpBB is installed. +* +* @param string $phpbb_root_path Path to the phpBB board root. +* @param string $php_ext PHP file extension. +* +* @return bool Returns true if phpBB is installed. +*/ +function phpbb_check_installation_exists($phpbb_root_path, $php_ext) +{ + // Try opening config file + if (file_exists($phpbb_root_path . 'config.' . $php_ext)) + { + include($phpbb_root_path . 'config.' . $php_ext); + } + + return defined('PHPBB_INSTALLED'); +} |