diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-30 15:04:49 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-30 15:04:49 +0000 |
commit | 5634fad4ae67fd6fa9251ff4aa50cc8553e826a4 (patch) | |
tree | d498a39d667e8afa273029c2210783af0eb8fbd0 /phpBB | |
parent | b1b542f69b3fd2f5fad3f2b757bc9a1593628c8d (diff) | |
download | forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.gz forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.bz2 forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.tar.xz forums-5634fad4ae67fd6fa9251ff4aa50cc8553e826a4.zip |
some fixes...
git-svn-id: file:///svn/phpbb/trunk@7813 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/acp_update.html | 10 | ||||
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 4 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 9 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_update.php | 13 | ||||
-rw-r--r-- | phpBB/includes/functions_messenger.php | 5 | ||||
-rw-r--r-- | phpBB/includes/functions_template.php | 3 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 4 | ||||
-rwxr-xr-x | phpBB/language/en/install.php | 6 | ||||
-rw-r--r-- | phpBB/memberlist.php | 2 |
10 files changed, 50 insertions, 10 deletions
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html index eb4dbbdef4..e82aee0e87 100644 --- a/phpBB/adm/style/acp_update.html +++ b/phpBB/adm/style/acp_update.html @@ -8,7 +8,7 @@ <p>{L_VERSION_CHECK_EXPLAIN}</p> - <!-- IF S_UP_TO_DATE --> + <!-- IF S_UP_TO_DATE and S_UP_TO_DATE_AUTO --> <div class="successbox"> <p>{L_VERSION_UP_TO_DATE_ACP}</p> </div> @@ -22,7 +22,7 @@ <legend></legend> <dl> <dt><label>{L_CURRENT_VERSION}</label></dt> - <dd><strong>{CURRENT_VERSION}</strong></dd> + <dd><strong><!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO -->{AUTO_VERSION}<!-- ELSE -->{CURRENT_VERSION}<!-- ENDIF --></strong></dd> </dl> <dl> <dt><label>{L_LATEST_VERSION}</label></dt> @@ -30,6 +30,12 @@ </dl> </fieldset> + <!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO --> + {L_UPDATE_INSTRUCTIONS_INCOMPLETE} + <br /><br /> + {UPDATE_INSTRUCTIONS} + <br /><br /> + <!-- ENDIF --> <!-- IF not S_UP_TO_DATE --> {UPDATE_INSTRUCTIONS} <br /><br /> diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 3cba293c99..d5f0c0d0f6 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -202,6 +202,10 @@ p a { <li>[Fix] Font colour list having the correct height in IE (Bug #9571)</li> <li>[Feature] Added mark/unmark all links to the bots page (Bug #12461)</li> <li>[Fix] Introduced check on duplicate usernames during bot creation/edit (Bug #12461)</li> + <li>[Fix] Correctly chmod created cache files (Bug #12859)</li> + <li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li> + <li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li> + </ul> </div> diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index f98873fdbf..faa6403a2e 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -79,6 +79,8 @@ class acm fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>"); @flock($fp, LOCK_UN); fclose($fp); + + @chmod($this->cache_dir . 'data_global.' . $phpEx, 0666); } else { @@ -181,6 +183,8 @@ class acm fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$data = " . var_export($var, true) . ";\n?>"); @flock($fp, LOCK_UN); fclose($fp); + + @chmod($this->cache_dir . "data{$var_name}.$phpEx", 0666); } } else @@ -365,8 +369,9 @@ class acm // Remove extra spaces and tabs $query = preg_replace('/[\n\r\s\t]+/', ' ', $query); + $filename = $this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx; - if ($fp = @fopen($this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx, 'wb')) + if ($fp = @fopen($filename, 'wb')) { @flock($fp, LOCK_EX); @@ -387,6 +392,8 @@ class acm @flock($fp, LOCK_UN); fclose($fp); + @chmod($filename, 0666); + $query_result = $query_id; } } diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 9f2b3579e8..4ab4420e6f 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -258,7 +258,7 @@ parse_css_file = {PARSE_CSS_FILE} } else { - $filelist[substr($row['template_filename'], 0, $slash_pos + 1)] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1); + $filelist[substr($row['template_filename'], 0, $slash_pos + 1)][] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1); } } } @@ -779,7 +779,7 @@ parse_css_file = {PARSE_CSS_FILE} } else { - $filelist[$file_info['dirname'] . '/'][] = "{$file_info['basename']}.{$file_info['extension']}"; + $filelist[$file_info['dirname'] . '/'][] = $file_info['basename']; } } diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 02d4c6bb3c..03f2db7d15 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -42,15 +42,28 @@ class acp_update $announcement_url = trim($info[1]); $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); + // Determine automatic update... + $sql = 'SELECT config_value + FROM ' . CONFIG_TABLE . " + WHERE config_name = 'version_update_from'"; + $result = $db->sql_query($sql); + $version_update_from = (string) $db->sql_fetchfield('config_value'); + $db->sql_freeresult($result); + + $current_version = (!empty($version_update_from)) ? $version_update_from : $config['version']; + + $up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; $template->assign_vars(array( 'S_UP_TO_DATE' => $up_to_date, + 'S_UP_TO_DATE_AUTO' => $up_to_date_automatic, 'S_VERSION_CHECK' => true, 'U_ACTION' => $this->u_action, 'LATEST_VERSION' => $latest_version, 'CURRENT_VERSION' => $config['version'], + 'AUTO_VERSION' => $version_update_from, 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link), )); diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 26ff1491fb..6497bfb392 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -556,6 +556,7 @@ class queue $fp = @fopen($this->cache_file . '.lock', 'wb'); fclose($fp); + @chmod($this->cache_file . '.lock', 0666); include($this->cache_file); @@ -683,6 +684,8 @@ class queue fwrite($fp, "<?php\n\$this->queue_data = " . var_export($this->queue_data, true) . ";\n?>"); @flock($fp, LOCK_UN); fclose($fp); + + @chmod($this->cache_file, 0666); } } @@ -722,6 +725,8 @@ class queue fwrite($fp, "<?php\n\$this->queue_data = " . var_export($this->data, true) . ";\n?>"); @flock($fp, LOCK_UN); fclose($fp); + + @chmod($this->cache_file, 0666); } } } diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index aacb4c6ddb..0d8a39eaee 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -752,8 +752,7 @@ class template_compile @flock($fp, LOCK_UN); @fclose($fp); - @umask(0); - @chmod($filename, 0644); + @chmod($filename, 0666); } return; diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index f8222956e7..7fe4d50bf2 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -781,8 +781,8 @@ function _write_result($no_updates, $errored, $error_ary) for ($i = 0; $i < sizeof($error_ary['sql']); $i++) { - echo '<li>' . $lang['ERROR'] . ' :: <strong>' . $error_ary['error_code'][$i]['message'] . '</strong><br />'; - echo $lang['SQL'] . ' :: <strong>' . $error_ary['sql'][$i] . '</strong><br /><br /></li>'; + echo '<li>' . $lang['ERROR'] . ' :: <strong>' . htmlspecialchars($error_ary['error_code'][$i]['message']) . '</strong><br />'; + echo $lang['SQL'] . ' :: <strong>' . htmlspecialchars($error_ary['sql'][$i]) . '</strong><br /><br /></li>'; } echo '</ul> <br /><br />' . $lang['SQL_FAILURE_EXPLAIN'] . '</p>'; diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 9bfb8063f6..180157d5e0 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -505,6 +505,12 @@ $lang = array_merge($lang, array( You will then be guided through the update process. You will be notified once the update is complete. </p> ', + 'UPDATE_INSTRUCTIONS_INCOMPLETE' => ' + + <h1>Incomplete update detected</h1> + + <p>phpBB detected an incomplete automatic update. Please make sure you followed every step within the automatic update tool. Below you will find the link again, or go directly to your install directory.</p> + ', 'UPDATE_METHOD' => 'Update method', 'UPDATE_METHOD_EXPLAIN' => 'You are now able to choose your preferred update method. Using the FTP upload will present you with a form you need to enter your FTP account details into. With this method the files will be automatically moved to the new location and backups of the old files being created by appending .bak to the filename. If you choose to download the modified files you are able to unpack and upload them to their correct location manually later.', 'UPDATE_SUCCESS' => 'Update was successful', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 991c73198f..81e0012f35 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -717,7 +717,7 @@ switch ($mode) } else { - if (!$email || !preg_match('#^.*?@(.*?\.)?[a-z0-9\-]+\.[a-z]{2,4}$#i', $email)) + if (!$email || !preg_match('/^' . get_preg_expression('email') . '$/i', $email)) { $error[] = $user->lang['EMPTY_ADDRESS_EMAIL']; } |