diff options
Diffstat (limited to 'phpBB')
27 files changed, 103 insertions, 10 deletions
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index 6f7f129d39..cfafe7917f 100644 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index 5f80084705..324dc50d05 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index ada88edff2..d399c680ee 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index f62a7a900e..9f47b2052b 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 89825d612f..6c0e2d33a5 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="phpBB 3.1.x Changelog" /> <title>phpBB • Changelog</title> diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 4786d8d796..5f3a425cda 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="phpBB 3.1.x frequently asked questions" /> <title>phpBB • FAQ</title> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 2929c7be28..333d367aa7 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" /> <title>phpBB • Install</title> diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 4b85735463..38f74c199a 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="phpBB 3.1.x Readme" /> <title>phpBB • Readme</title> diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index 27d090c296..960fa76417 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" /> <title>phpBB3 • Auth API</title> diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 26189235ef..eb0fb60de2 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -2,6 +2,7 @@ <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="keywords" content="" /> <meta name="description" content="Ascraeus coding guidelines document" /> <title>phpBB3 • Coding Guidelines</title> diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 72c0d458c6..8e3f62230a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2401,6 +2401,7 @@ function redirect($url, $return = false, $disable_cd_check = false) echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">'; echo '<head>'; echo '<meta charset="utf-8">'; + echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">'; echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&', $url) . '" />'; echo '<title>' . $user->lang['REDIRECT'] . '</title>'; echo '</head>'; @@ -3997,6 +3998,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo '<html dir="ltr">'; echo '<head>'; echo '<meta charset="utf-8">'; + echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">'; echo '<title>' . $msg_title . '</title>'; echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n"; echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } '; diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 254e65ae3d..2c5cba2c0d 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -108,6 +108,7 @@ function wrap_img_in_html($src, $title) echo '<html>'; echo '<head>'; echo '<meta charset="utf-8">'; + echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">'; echo '<title>' . $title . '</title>'; echo '</head>'; echo '<body>'; @@ -412,7 +413,7 @@ function set_modified_headers($stamp, $browser) global $request; // let's see if we have to send the file at all - $last_load = $request->header('Modified-Since') ? strtotime(trim($request->header('Modified-Since'))) : false; + $last_load = $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false; if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7)) { diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 80fd40a944..42cc27e60b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -138,6 +138,7 @@ header('Content-type: text/html; charset=UTF-8'); <html dir="<?php echo $user->lang['DIRECTION']; ?>" lang="<?php echo $user->lang['USER_LANG']; ?>"> <head> <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <title><?php echo $user->lang['UPDATING_TO_LATEST_STABLE']; ?></title> diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 5c16421499..b5d14f27cf 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -633,6 +633,7 @@ class module echo '<html dir="ltr">'; echo '<head>'; echo '<meta charset="utf-8">'; + echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">'; echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>'; echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />'; echo '</head>'; diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index e44157294c..cb8dfcad4f 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -167,17 +167,29 @@ class upload extends \phpbb\avatar\driver\driver $destination = ''; } + $filedata = array( + 'filename' => $file->get('filename'), + 'filesize' => $file->get('filesize'), + 'mimetype' => $file->get('mimetype'), + 'extension' => $file->get('extension'), + 'physical_filename' => $file->get('realname'), + 'real_filename' => $file->get('uploadname'), + ); + /** * Before moving new file in place (and eventually overwriting the existing avatar with the newly uploaded avatar) * * @event core.avatar_driver_upload_move_file_before + * @var array filedata Array containing uploaded file data * @var string destination Destination directory where the file is going to be moved * @var string prefix Prefix for the avatar filename * @var array row Array with avatar row data * @var array error Array of errors, if filled in by this event file will not be moved * @since 3.1.6-RC1 + * @changed 3.1.9-RC1 Added filedata */ $vars = array( + 'filedata', 'destination', 'prefix', 'row', @@ -185,6 +197,8 @@ class upload extends \phpbb\avatar\driver\driver ); extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars))); + unset($filedata); + if (!sizeof($error)) { // Move file and overwrite any existing image diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 1b49775b32..01dd66cd6e 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -897,6 +897,7 @@ abstract class driver implements driver_interface <html dir="ltr"> <head> <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>SQL Report</title> <link href="' . htmlspecialchars($phpbb_path_helper->update_web_root_path($phpbb_root_path) . $phpbb_path_helper->get_adm_relative_path()) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" /> </head> diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index f5ad5096bb..faedd79703 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -725,7 +725,7 @@ class user extends \phpbb\session $utc = new \DateTimeZone('UTC'); } - $time = new $this->datetime($this, "@$gmepoch", $utc); + $time = new $this->datetime($this, '@' . (int) $gmepoch, $utc); $time->setTimezone($this->timezone); return $time->format($format, $forcedate); diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index ff3a6c4100..adb8931210 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> {META} <title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title> diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 80f7fd8ebf..3924aa29d9 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> {META} <title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title> diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html index 55d81b4e69..d431561834 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex" /> {META} <title>{SITENAME} • {PAGE_TITLE}</title> diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html index f65f1ab542..919c9397e1 100644 --- a/phpBB/styles/prosilver/template/viewtopic_print.html +++ b/phpBB/styles/prosilver/template/viewtopic_print.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex" /> {META} <title>{SITENAME} • {PAGE_TITLE}</title> diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 7648edc35a..a4185785e3 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> {META} <title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title> diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html index 3abf89719f..2beeac2548 100644 --- a/phpBB/styles/subsilver2/template/simple_header.html +++ b/phpBB/styles/subsilver2/template/simple_header.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> {META} <title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title> diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html index fd5e390d83..624a6ea8ef 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex" /> <title>{SITENAME} :: {PAGE_TITLE}</title> diff --git a/phpBB/styles/subsilver2/template/viewtopic_print.html b/phpBB/styles/subsilver2/template/viewtopic_print.html index 9497fda121..53b38f414e 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_print.html +++ b/phpBB/styles/subsilver2/template/viewtopic_print.html @@ -2,6 +2,7 @@ <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"> <head> <meta charset="utf-8" /> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex" /> <title>{SITENAME} :: {PAGE_TITLE}</title> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 6607f24833..ee9c700e6b 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -274,14 +274,42 @@ if ($sort_days) { $min_post_time = time() - ($sort_days * 86400); - $sql = 'SELECT COUNT(topic_id) AS num_topics - FROM ' . TOPICS_TABLE . " - WHERE forum_id = $forum_id - AND (topic_last_post_time >= $min_post_time - OR topic_type = " . POST_ANNOUNCE . ' - OR topic_type = ' . POST_GLOBAL . ') - AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id); - $result = $db->sql_query($sql); + $sql_array = array( + 'SELECT' => 'COUNT(t.topic_id) AS num_topics', + 'FROM' => array( + TOPICS_TABLE => 't', + ), + 'WHERE' => 't.forum_id = ' . $forum_id . ' + AND (t.topic_last_post_time >= ' . $min_post_time . ' + OR t.topic_type = ' . POST_ANNOUNCE . ' + OR t.topic_type = ' . POST_GLOBAL . ') + AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'), + ); + + /** + * Modify the sort data SQL query for getting additional fields if needed + * + * @event core.viewforum_modify_sort_data_sql + * @var int forum_id The forum_id whose topics are being listed + * @var int start Variable containing start for pagination + * @var int sort_days The oldest topic displayable in elapsed days + * @var string sort_key The sorting by. It is one of the first character of (in low case): + * Author, Post time, Replies, Subject, Views + * @var string sort_dir Either "a" for ascending or "d" for descending + * @var array sql_array The SQL array to get the data of all topics + * @since 3.1.9-RC1 + */ + $vars = array( + 'forum_id', + 'start', + 'sort_days', + 'sort_key', + 'sort_dir', + 'sql_array', + ); + extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_data_sql', compact($vars))); + + $result = $db->sql_query($db->sql_build_query('SELECT', $sql_array)); $topics_count = (int) $db->sql_fetchfield('num_topics'); $db->sql_freeresult($result); diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fcc44abc33..eeb6444ceb 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -588,6 +588,33 @@ $quickmod_array = array( 'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)), ); +/** +* Event to modify data in the quickmod_array before it gets sent to the +* phpbb_add_quickmod_option function. +* +* @event core.viewtopic_add_quickmod_option_before +* @var int forum_id Forum ID +* @var int post_id Post ID +* @var array quickmod_array Array with quick moderation options data +* @var array topic_data Array with topic data +* @var int topic_id Topic ID +* @var array topic_tracking_info Array with topic tracking data +* @var string viewtopic_url URL to the topic page +* @var bool allow_change_type Topic change permissions check +* @since 3.1.9-RC1 +*/ +$vars = array( + 'forum_id', + 'post_id', + 'quickmod_array', + 'topic_data', + 'topic_id', + 'topic_tracking_info', + 'viewtopic_url', + 'allow_change_type', +); +extract($phpbb_dispatcher->trigger_event('core.viewtopic_add_quickmod_option_before', compact($vars))); + foreach ($quickmod_array as $option => $qm_ary) { if (!empty($qm_ary[1])) |