1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

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.
This commit is contained in:
Joas Schilling
2014-03-18 11:00:43 +01:00
4 changed files with 71 additions and 36 deletions

View File

@@ -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');
}