mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12160] Move phpbb_check_installation_exists() to functions_install.php
PHPBB3-12160
This commit is contained in:
parent
d6ec463977
commit
fc33a0c176
2 changed files with 19 additions and 19 deletions
|
@ -5303,22 +5303,3 @@ function phpbb_convert_30_dbms_to_31($dbms)
|
|||
|
||||
throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue