diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:40 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:40 +0100 |
| commit | 021c186be91095397d4e76801738373989360a52 (patch) | |
| tree | 4a5b42c0ebcaeb0be77edacb839bf164fe2dadc0 /phpBB/install/install_update.php | |
| parent | 4f9c3b8f5c0181c2ebf367436f3c0336d8f2251d (diff) | |
| parent | 3ddedd5ff228cdcc3c0b05000affe3944afc7854 (diff) | |
| download | forums-021c186be91095397d4e76801738373989360a52.tar forums-021c186be91095397d4e76801738373989360a52.tar.gz forums-021c186be91095397d4e76801738373989360a52.tar.bz2 forums-021c186be91095397d4e76801738373989360a52.tar.xz forums-021c186be91095397d4e76801738373989360a52.zip | |
Merge commit 'release-3.0.6-RC1'
Diffstat (limited to 'phpBB/install/install_update.php')
| -rw-r--r-- | phpBB/install/install_update.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 388e217133..ad72652e97 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -203,10 +203,10 @@ class install_update extends module } // What about the language file? Got it updated? - if (in_array('language/en/install.php', $this->update_info['files'])) + if (in_array('language/en/install.' . $phpEx, $this->update_info['files'])) { $lang = array(); - include($this->new_location . 'language/en/install.php'); + include($this->new_location . 'language/en/install.' . $phpEx); // only add new keys to user's language in english $new_keys = array_diff(array_keys($lang), array_keys($user->lang)); foreach ($new_keys as $i => $new_key) @@ -915,6 +915,11 @@ class install_update extends module // Now init the connection if ($update_mode == 'download') { + if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/')) + { + trigger_error(sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $phpbb_root_path . 'store/'), E_USER_ERROR); + } + if ($use_method == '.zip') { $compress = new compress_zip('w', $phpbb_root_path . 'store/' . $archive_filename . $use_method); @@ -1551,7 +1556,7 @@ class install_update extends module if ($info === false) { $update_info = array(); - include($phpbb_root_path . 'install/update/index.php'); + include($phpbb_root_path . 'install/update/index.' . $phpEx); $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info; if ($info !== false) @@ -1565,13 +1570,19 @@ class install_update extends module global $phpbb_root_path, $phpEx; $update_info = array(); - include($phpbb_root_path . 'install/update/index.php'); + include($phpbb_root_path . 'install/update/index.' . $phpEx); $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info; $errstr = ($info === false) ? $user->lang['WRONG_INFO_FILE_FORMAT'] : ''; if ($info !== false) { + // We assume that all file extensions have been renamed to .$phpEx, + // if someone is using a non .php file extension for php files. + // However, in $update_info['files'] we use hardcoded .php. + // We therefore replace .php with .$phpEx. + $info['files'] = preg_replace('/\.php$/i', ".$phpEx", $info['files']); + // Adjust the update info file to hold some specific style-related information $info['custom'] = array(); /* |
