diff options
Diffstat (limited to 'phpBB')
41 files changed, 234 insertions, 175 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 4c568cf441..92bcf90039 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -432,6 +432,20 @@ function validate_config_vars($config_vars, &$cfg_array, &$error) { $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]); } + + if (strpos($config_name, '_max') !== false) + { + // Min/max pairs of settings should ensure that min <= max + // Replace _max with _min to find the name of the minimum + // corresponding configuration variable + $min_name = str_replace('_max', '_min', $config_name); + + if (isset($cfg_array[$min_name]) && is_numeric($cfg_array[$min_name]) && $cfg_array[$config_name] < $cfg_array[$min_name]) + { + // A minimum value exists and the maximum value is less than it + $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], (int) $cfg_array[$min_name]); + } + } break; // Absolute path diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index 6317a375b4..69c6d8f3fb 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -56,7 +56,7 @@ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> - <input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="y" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> <!-- IF S_BBCODE_IMG --> <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> <!-- ENDIF --> diff --git a/phpBB/common.php b/phpBB/common.php index 9b6913e95f..c8b2fb9609 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -123,13 +123,11 @@ if (defined('IN_CRON')) $phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR; } -if (!file_exists($phpbb_root_path . 'config.' . $phpEx)) +if (file_exists($phpbb_root_path . 'config.' . $phpEx)) { - die("<p>The config.$phpEx file could not be found.</p><p><a href=\"{$phpbb_root_path}install/index.$phpEx\">Click here to install phpBB</a></p>"); + require($phpbb_root_path . 'config.' . $phpEx); } -require($phpbb_root_path . 'config.' . $phpEx); - if (!defined('PHPBB_INSTALLED')) { // Redirect the user to the installer diff --git a/phpBB/config.php b/phpBB/config.php deleted file mode 100644 index e69de29bb2..0000000000 --- a/phpBB/config.php +++ /dev/null diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS index 84677c4e15..b3166313c3 100644 --- a/phpBB/docs/AUTHORS +++ b/phpBB/docs/AUTHORS @@ -26,8 +26,8 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) Acyd Burn (Meik Sievertsen) [Lead 09/2005 - 01/2010] APTX (Marek A. R.) bantu (Andreas Fischer) - DavidMJ (David M.) dhn (Dominik Dröscher) + igorw (Igor Wiedler) kellanved (Henry Sudhof) nickvergessen (Joas Schilling) rxu (Ruslan Uzdenov) @@ -49,6 +49,7 @@ phpBB Lead Developer: psoTFX (Paul S. Owen) [2001 - 09/2005] phpBB Developers: Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006] BartVB (Bart van Bragt) [11/2000 - 03/2006] + DavidMJ (David M.) [12/2005 - 08/2009] GrahamJE (Graham Eames) [09/2005 - 11/2006] Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009] diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index c83aaadc2d..8973582bdb 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -61,6 +61,9 @@ <li><a href="#acl_getf">acl_getf</a></li> <li><a href="#acl_getf_global">acl_getf_global</a></li> <li><a href="#acl_cache">acl_cache</a></li> + <li><a href="#acl_clear_prefetch">acl_clear_prefetch</a></li> + <li><a href="#acl_get_list">acl_get_list</a></li> + <li><a href="#misc">Miscellaneous</a></li> </ol> </li> <li><a href="#admin_related">Admin related functions</a></li> @@ -176,7 +179,7 @@ array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <e <p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p> <div class="codebox"><pre> -$result = acl_getf_global(<code>option</code>) +$result = $auth->acl_getf_global(<code>option</code>) </pre></div> <p>As with the previous methods option is a string specifying the permission which has to be checked.</p> @@ -187,6 +190,49 @@ $result = acl_getf_global(<code>option</code>) <p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <code>acl</code>.</p> + <a name="acl_clear_prefetch"></a><h3>2.vii. acl_clear_prefetch</h3> + + <p>This method clears the user_permissions column in the users table for the given user. If the user ID passed is zero, the permissions cache is cleared for all users. This method should be called whenever permissions are set.</p> + + <div class="codebox"><pre> +// clear stored permissions for user 2 +$user_id = 2; +$auth->acl_clear_prefetch($user_id); +</pre></div> + + <p>This method returns void.</p> + + <a name="acl_get_list"></a><h3>2.viii. acl_get_list</h3> + + <p>This method returns an an array describing which users have permissions in given fora. The resultant array contains an entry for permission that every user has in every forum when no arguments are passed.</p> + + <div class="codebox"><pre> +$user_id = array(2, 53); +$permissions = array('f_list', 'f_read'); +$forum_id = array(1, 2, 3); +$result = $auth->acl_get_list($user_id, $permissions, $forum_id); +</pre></div> + + <p>The parameters may be of the following legal types:</p> + <ul> + <li><strong>$user_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li> + <li><strong>$permissions</strong>: <code>false</code>, string, array(string, string, ...)</li> + <li><strong>$forum_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li> + </ul> + + <a name="misc"></a><h3>2.ix. Miscellaneous</h3> + + <p>There are other methods defined in the auth class which serve mostly as private methods, but are available for use if needed. Each of them is used to pull data directly from the database tables. They are:</p> + <ul> + <li><pre>function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)</pre></li> + <li><pre>function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li> + <li><pre>function acl_raw_data_single_user($user_id)</pre></li> + <li><pre>function acl_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li> + <li><pre>function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)</pre></li> + </ul> + + <p>Of these, <code>acl_raw_data</code> is the most general, but the others will be faster if you need a smaller amount of data.</p> + </div> <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> @@ -241,7 +287,7 @@ $auth_admin = new auth_admin(); <!-- END DOCUMENT --> <div id="page-footer"> - <div class="version"> $Id$ </div> + <div class="version"> </div> </div> </div></div> diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 1978a0a307..76afc79f99 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -90,10 +90,9 @@ <li><a href="#vcs">VCS Guidelines</a> <ol style="list-style-type: lower-roman;"> <li><a href="#repostruct">Repository structure</a></li> - <li><a href="#commitmessage">Commit messages</a></li> + <li><a href="#commitmessage">Commit Messages and Repository Rules</a></li> </ol> </li> - <li><a href="#changes">Guidelines Changelog</a></li> <li><a href="#disclaimer">Copyright and disclaimer</a></li> </ol> @@ -2326,126 +2325,33 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <div class="content"> - <p>The version control system for phpBB3 is subversion. The repository is available at <a href="http://code.phpbb.com/svn/phpbb" title="repository">http://code.phpbb.com/svn/phpbb</a>.</p> + <p>The version control system for phpBB3 is git. The repository is available at <a href="http://github.com/phpbb/phpbb3" title="repository">http://github.com/phpbb/phpbb3</a>.</p> <a name="repostruct"></a><h3>7.i. Repository Structure</h3> <ul> - <li><strong>trunk</strong><br />The latest unstable development version with new features etc. Contains the actual board in <code>/trunk/phpBB</code></li> - <li><strong>branches</strong><br />Development branches of stable phpBB releases. Copied from <code>/trunk</code> at the time of release. + <li><strong>develop</strong><br />The latest unstable development version with new features etc.</li> + <li><strong>develop-*</strong><br />Development branches of stable phpBB releases. Branched off of <code>develop</code> at the time of feature freeze. <ul> - <li><strong>phpBB3.0</strong><code>/branches/phpBB-3_0_0/phpBB</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li> - <li><strong>phpBB2</strong><code>/branches/phpBB-2_0_0/phpBB</code><br />Old phpBB2 development branch.</li> + <li><strong>phpBB3.0</strong><code>develop-olympus</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li> + <li><strong>phpBB3.1</strong><code>develop-ascraeus</code><br />Development branch of the stable 3.1 line. Bug fixes are applied here.</li> </ul> </li> - <li><strong>tags</strong><br />Released versions. Copies of trunk or the respective branch, made at the time of release. + <li><strong>master</strong><br />A branch containing all stable phpBB3 release points</li> + <li><strong>tags</strong><br />Released versions. Stable ones get merged into the master branch. <ul> - <li><code>/tags/release_3_0_BX</code><br />Beta release X of the 3.0 line.</li> - <li><code>/tags/release_3_0_RCX</code><br />Release candidate X of the 3.0 line.</li> - <li><code>/tags/release_3_0_X-RCY</code><br />Release candidate Y of the stable 3.0.X release.</li> - <li><code>/tags/release_3_0_X</code><br />Stable <strong>3.0.X</strong> release.</li> - <li><code>/tags/release_2_0_X</code><br />Old stable 2.0.X release.</li> + <li><code>release-3.Y-BX</code><br />Beta release X of the 3.Y line.</li> + <li><code>release-3.Y-RCX</code><br />Release candidate X of the 3.Y line.</li> + <li><code>release-3.Y.Z-RCX</code><br />Release candidate X of the stable 3.Y.Z release.</li> + <li><code>release-3.0.X</code><br />Stable <strong>3.0.X</strong> release.</li> + <li><code>release-2.0.X</code><br />Old stable 2.0.X release.</li> </ul> </li> </ul> - <a name="commitmessage"></a><h3>7.ii. Commit Messages</h3> - - <p>The commit message should contain a brief explanation of all changes made within the commit. Often identical to the changelog entry. A bug ticket can be referenced by specifying the ticket ID with a hash, e.g. #12345. A reference to another revision should simply be prefixed with r, e.g. r12345.</p> - - <p>Junior Developers need to have their patches approved by a development team member first. The commit message must end in a line with the following format:</p> - - <div class="codebox"><pre> -Authorised by: developer1[, developer2[, ...]] - </pre></div> - - </div> - - <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> - - <span class="corners-bottom"><span></span></span></div> - </div> - - <hr /> - -<a name="changes"></a><h2>8. Guidelines Changelog</h2> - <div class="paragraph"> - <div class="inner"><span class="corners-top"><span></span></span> - - <div class="content"> -<h3>Revision 10007</h3> - -<ul> - <li>Added <a href="#constants">Special Constants</a> section.</li> -</ul> - -<h3>Revision 9817</h3> - -<ul> - <li>Added VCS section.</li> -</ul> - -<h3>Revision 8732</h3> - -<ul> - <li>Added cfg files.</li> - <li>Added template <a href="#inheritance">inheritance</a>.</li> -</ul> - -<h3>Revision 8596+</h3> - -<ul> - <li>Removed sql_build_array('MULTI_INSERT'... statements.</li> - <li>Added sql_multi_insert() explanation.</li> -</ul> - -<h3>Revision 1.31</h3> - -<ul> - <li>Added add_form_key and check_form_key. </li> -</ul> - -<h3>Revision 1.24</h3> - -<ul> - <li>Added <a href="#translation">5. Character Sets and Encodings</a> section to explain the recommended treatment of strings in phpBB.</li> -</ul> - -<h3>Revision 1.16</h3> - -<ul> - <li>Added <a href="#translation">6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> section to explain expected format and authoring considerations for language packs that are to be created for phpBB.</li> -</ul> - -<h3>Revision 1.11-1.15</h3> - -<ul> - <li>Various document formatting, spelling, punctuation, grammar bugs.</li> -</ul> - -<h3>Revision 1.9-1.10</h3> - -<ul> - <li>Added sql_query_limit to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li> -</ul> - -<h3>Revision 1.8</h3> - -<ul> - <li>Some adjustements to wordings</li> - <li>Updated paragraph <a href="#locations">1.iii. File Locations</a> to reflect recent changes</li> - <li>Extended paragraph <a href="#codelayout">2.ii. Code Layout</a>.</li> - <li>Added sql_in_set and sql_build_query explanation to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li> - <li>Updated paragraph <a href="#styling">3. Styling</a>.</li> - <li>Updated paragraph <a href="#templating">4. Templating</a> to explain loop checking, loop breaking and other changes we recently made.</li> -</ul> - -<h3>Revision 1.5</h3> - -<ul> - <li>Changed General function usage paragraph in <a href="#general">2.v. General Guidelines</a></li> -</ul> + <a name="commitmessage"></a><h3>7.ii. Commit Messages and Reposiory Rules</h3> + <p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a></p>. </div> @@ -2475,7 +2381,7 @@ Authorised by: developer1[, developer2[, ...]] <!-- END DOCUMENT --> <div id="page-footer"> - <div class="version"> $Id$ </div> + <div class="version"> </div> </div> </div></div> diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html index b23ebab869..1bf4630a9f 100644 --- a/phpBB/docs/hook_system.html +++ b/phpBB/docs/hook_system.html @@ -875,7 +875,7 @@ function phpbb_hook_register(&$hook) </div> <div id="page-footer"> - <div class="version">$Id$</div> + <div class="version"> </div> </div> </div></div> diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 1f2cee4d95..5f45b88359 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -77,7 +77,7 @@ if (isset($_GET['avatar'])) // '==' is not a bug - . as the first char is as bad as no dot at all if (strpos($filename, '.') == false) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); $exit = true; } @@ -91,7 +91,7 @@ if (isset($_GET['avatar'])) if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg'))) { // no way such an avatar could exist. They are not following the rules, stop the show. - header("HTTP/1.0 403 Forbidden"); + send_status_line(403, 'Forbidden'); $exit = true; } @@ -101,7 +101,7 @@ if (isset($_GET['avatar'])) if (!$filename) { // no way such an avatar could exist. They are not following the rules, stop the show. - header("HTTP/1.0 403 Forbidden"); + send_status_line(403, 'Forbidden'); } else { @@ -199,7 +199,7 @@ else $row['forum_id'] = false; if (!$auth->acl_get('u_pm_download')) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error('SORRY_AUTH_VIEW_ATTACH'); } @@ -222,7 +222,7 @@ else if (!$allowed) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error('ERROR_NO_ATTACHMENT'); } } @@ -237,7 +237,7 @@ else if (!download_allowed()) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error($user->lang['LINKAGE_FORBIDDEN']); } @@ -383,7 +383,7 @@ function send_avatar_to_browser($file, $browser) } else { - header('HTTP/1.0 404 Not Found'); + send_status_line(404, 'Not Found'); } } diff --git a/phpBB/includes/.htaccess b/phpBB/includes/.htaccess new file mode 100644 index 0000000000..4128d345ab --- /dev/null +++ b/phpBB/includes/.htaccess @@ -0,0 +1,4 @@ +<Files *> + Order Allow,Deny + Deny from All +</Files> diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 927e72010e..a5e80e1f6d 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -319,6 +319,7 @@ class acp_board 'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'load_unreads_search' => array('lang' => 'YES_UNREAD_SEARCH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 73c4f92976..e04a6307e9 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -134,7 +134,8 @@ function login_db(&$username, &$password) // increase login attempt count to make sure this cannot be exploited $sql = 'UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 - WHERE user_id = ' . $row['user_id']; + WHERE user_id = ' . (int) $row['user_id'] . ' + AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX; $db->sql_query($sql); return array( @@ -194,7 +195,8 @@ function login_db(&$username, &$password) // Password incorrect - increase login attempts $sql = 'UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 - WHERE user_id = ' . $row['user_id']; + WHERE user_id = ' . (int) $row['user_id'] . ' + AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX; $db->sql_query($sql); // Give status about wrong password... diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 0f0bfc4156..ea171dbe2c 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -314,10 +314,7 @@ class phpbb_recaptcha extends phpbb_default_captcha } else { - if ($answers[1] === 'incorrect-captcha-sol') - { - return $user->lang['RECAPTCHA_INCORRECT']; - } + return $user->lang['RECAPTCHA_INCORRECT']; } } diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index ff572869e2..ebaa342f54 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -69,6 +69,10 @@ define('LOGIN_ERROR_ATTEMPTS', 13); define('LOGIN_ERROR_EXTERNAL_AUTH', 14); define('LOGIN_ERROR_PASSWORD_CONVERT', 15); +// Maximum login attempts +// The value is arbitrary, but it has to fit into the user_login_attempts field. +define('LOGIN_ATTEMPTS_MAX', 100); + // Group settings define('GROUP_OPEN', 0); define('GROUP_CLOSED', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c4ff998e69..e154aa44b0 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3753,7 +3753,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) } // Do not send 200 OK, but service unavailable on errors - header('HTTP/1.1 503 Service Unavailable'); + send_status_line(503, 'Service Unavailable'); garbage_collection(); @@ -4223,7 +4223,8 @@ function phpbb_http_login($param) } else if ($auth_result['status'] == LOGIN_ERROR_ATTEMPTS) { - header('HTTP/1.0 401 Unauthorized'); + send_status_line(401, 'Unauthorized'); + trigger_error('NOT_AUTHORISED'); } } @@ -4235,7 +4236,7 @@ function phpbb_http_login($param) $param['auth_message'] = preg_replace('/[\x80-\xFF]/', '?', $param['auth_message']); header('WWW-Authenticate: Basic realm="' . $param['auth_message'] . '"'); - header('HTTP/1.0 401 Unauthorized'); + send_status_line(401, 'Unauthorized'); trigger_error('NOT_AUTHORISED'); } @@ -4465,6 +4466,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'S_ENABLE_FEEDS_TOPICS_ACTIVE' => ($config['feed_topics_active']) ? true : false, 'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false, + 'S_LOAD_UNREADS' => ($config['load_unreads_search'] && ($config['load_anon_lastread'] || $user->data['is_registered'])) ? true : false, + 'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme', 'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template', 'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template', diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 5e25648eb8..6fd87db663 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2583,7 +2583,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } // Send Notifications - if ($mode != 'edit' && $mode != 'delete' && $post_approval) + if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval) { user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']); } diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index e43881fab2..c419da5574 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -428,7 +428,7 @@ class mcp_queue 'POST_ID' => $row['post_id'], 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'], - 'POST_SUBJECT' => $row['post_subject'], + 'POST_SUBJECT' => ($row['post_subject'] != '') ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'TOPIC_TITLE' => $row['topic_title'], 'POST_TIME' => $user->format_date($row['post_time'])) ); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 79023cc7bc..5f5b39fe27 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -285,6 +285,17 @@ class session break; } + // Quick check for IPv4-mapped address in IPv6 + if (stripos($ip, '::ffff:') === 0) + { + $ipv4 = substr($ip, 7); + + if (preg_match(get_preg_expression('ipv4'), $ipv4)) + { + $ip = $ipv4; + } + } + // Use the last in chain $this->ip = $ip; } @@ -748,7 +759,7 @@ class session if ((int) $row['sessions'] > (int) $config['active_sessions']) { - header('HTTP/1.1 503 Service Unavailable'); + send_status_line(503, 'Service Unavailable'); trigger_error('BOARD_UNAVAILABLE'); } } @@ -1821,7 +1832,7 @@ class user extends session { if ($this->data['is_bot']) { - header('HTTP/1.1 503 Service Unavailable'); + send_status_line(503, 'Service Unavailable'); } $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; @@ -1840,7 +1851,7 @@ class user extends session { if ($this->data['is_bot']) { - header('HTTP/1.1 503 Service Unavailable'); + send_status_line(503, 'Service Unavailable'); } trigger_error('BOARD_UNAVAILABLE'); } diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index b80c7673e3..78224dd5da 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1239,9 +1239,9 @@ function phpbb_prepare_message($message) // Already the new user id ;) $user_id = $convert->row['poster_id']; + $message = str_replace('<br />', "\n", $message); $message = str_replace('<', '<', $message); $message = str_replace('>', '>', $message); - $message = str_replace('<br />', "\n", $message); // make the post UTF-8 $message = phpbb_set_encoding($message); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ce0e9a6480..e65237266b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -119,6 +119,7 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); unset($dbpasswd); $user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; +$user->ip = (stripos($user->ip, '::ffff:') === 0) ? substr($user->ip, 7) : $user->ip; $sql = "SELECT config_value FROM " . CONFIG_TABLE . " @@ -1803,6 +1804,9 @@ function change_database_data(&$no_updates, $version) // Sync the forums we have deleted shadow topics from. sync('forum', 'forum_id', $sync_forum_ids, true, true); + // Unread posts search load switch + set_config('load_unreads_search', '1'); + $no_updates = false; break; } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 6c23460de9..2dd58584f4 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1236,6 +1236,7 @@ class install_install extends module $current_time = time(); $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; + $user_ip = (stripos($user_ip, '::ffff:') === 0) ? substr($user_ip, 7) : $user_ip; if ($data['script_path'] !== '/') { diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index e815615eef..a25b68ba39 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -168,6 +168,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_unreads_search', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index ac0ddf1b73..77deba6e19 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -375,6 +375,7 @@ $lang = array_merge($lang, array( 'YES_POST_MARKING_EXPLAIN' => 'Indicates whether user has posted to a topic.', 'YES_READ_MARKING' => 'Enable server-side topic marking', 'YES_READ_MARKING_EXPLAIN' => 'Stores read/unread status information in the database rather than a cookie.', + 'YES_UNREAD_SEARCH' => 'Enable search for unread posts', )); // Auth settings diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 951c69f915..f161a7e6e6 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -76,13 +76,13 @@ $lang = array_merge($lang, array( 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.', 'DELETE_FROM_FS' => 'Delete from filesystem', 'DELETE_IMAGESET' => 'Delete imageset', - 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the imageset is deleted it is gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.', 'DELETE_STYLE' => 'Delete style', - 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care in deleting styles there is no undo facility.', + 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care when deleting styles, there is no undo facility.', 'DELETE_TEMPLATE' => 'Delete template', - 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the templates are deleted they are gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.', 'DELETE_THEME' => 'Delete theme', - 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.', + 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Please note that there is no undo capability. It is recommended that you first export your theme for possible future use.', 'DETAILS' => 'Details', 'DIMENSIONS_EXPLAIN' => 'Selecting yes here will include width/height parameters.', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index be92391a4e..d93fe6b56a 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -62,6 +62,7 @@ $lang = array_merge($lang, array( 'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.', 'NO_SEARCH_RESULTS' => 'No suitable matches were found.', 'NO_SEARCH_TIME' => 'Sorry but you cannot use search at this time. Please try again in a few minutes.', + 'NO_SEARCH_UNREADS' => 'Sorry but searching for unread posts has been disabled on this board.', 'WORD_IN_NO_POST' => 'No posts were found because the word <strong>%s</strong> is not contained in any post.', 'WORDS_IN_NO_POST' => 'No posts were found because the words <strong>%s</strong> are not contained in any post.', diff --git a/phpBB/posting.php b/phpBB/posting.php index 8cacac2910..f775699cee 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -402,15 +402,18 @@ if ($post_data['poll_start']) $db->sql_freeresult($result); } -$original_poll_data = array( - 'poll_title' => $post_data['poll_title'], - 'poll_length' => $post_data['poll_length'], - 'poll_max_options' => $post_data['poll_max_options'], - 'poll_option_text' => implode("\n", $post_data['poll_options']), - 'poll_start' => $post_data['poll_start'], - 'poll_last_vote' => $post_data['poll_last_vote'], - 'poll_vote_change' => $post_data['poll_vote_change'], -); +if ($mode == 'edit') +{ + $original_poll_data = array( + 'poll_title' => $post_data['poll_title'], + 'poll_length' => $post_data['poll_length'], + 'poll_max_options' => $post_data['poll_max_options'], + 'poll_option_text' => implode("\n", $post_data['poll_options']), + 'poll_start' => $post_data['poll_start'], + 'poll_last_vote' => $post_data['poll_last_vote'], + 'poll_vote_change' => $post_data['poll_vote_change'], + ); +} $orig_poll_options_size = sizeof($post_data['poll_options']); @@ -1297,7 +1300,7 @@ $attachment_data = $message_parser->attachment_data; $filename_data = $message_parser->filename_data; $post_data['post_text'] = $message_parser->message; -if (sizeof($post_data['poll_options']) && $post_data['poll_title']) +if (sizeof($post_data['poll_options']) || !empty($post_data['poll_title'])) { $message_parser->message = $post_data['poll_title']; $message_parser->bbcode_uid = $post_data['bbcode_uid']; diff --git a/phpBB/search.php b/phpBB/search.php index 96f320fe9f..2a13e20477 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -61,10 +61,18 @@ if ($search_id == 'egosearch') } } -// Search for unread posts needs user to be logged in if topics tracking for guests is disabled -if ($search_id == 'unreadposts' && !$config['load_anon_lastread'] && !$user->data['is_registered']) +// Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled +if ($search_id == 'unreadposts') { - login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']); + if (!$config['load_unreads_search']) + { + $template->assign_var('S_NO_SEARCH', true); + trigger_error('NO_SEARCH_UNREADS'); + } + else if (!$config['load_anon_lastread'] && !$user->data['is_registered']) + { + login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']); + } } // Is user able to search? Has search been disabled? @@ -892,7 +900,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false, 'S_TOPIC_TYPE' => $row['topic_type'], - 'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false, + 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false, 'S_UNREAD_TOPIC' => $unread_topic, 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false, diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index 17790eb78a..d4d50a11c0 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -6,7 +6,7 @@ <!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) --> <ul class="linklist"> <!-- IF S_DISPLAY_SEARCH --> - <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li> + <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li> <!-- ENDIF --> <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF --> </ul> diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html index e52ccd6434..26e425a1d0 100644 --- a/phpBB/styles/prosilver/template/login_body.html +++ b/phpBB/styles/prosilver/template/login_body.html @@ -1,5 +1,11 @@ <!-- INCLUDE overall_header.html --> +<script type="text/javascript"> +// <![CDATA[ + onload_functions.push('document.getElementById("{USERNAME_CREDENTIAL}").focus();'); +// ]]> +</script> + <form action="{S_LOGIN_ACTION}" method="post" id="login"> <div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index dab2d572a9..04e24cd1f9 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -54,7 +54,7 @@ </ul> <!-- ENDIF --> - <span class="right-box clear" id="expand"><a href="#post_details" onclick="viewableArea(getElementById('post_details'), true); var rev_text = getElementById('expand').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'}; return false;">{L_EXPAND_VIEW}</a></span> + <span class="right-box" id="expand"><a href="#post_details" onclick="viewableArea(getElementById('post_details'), true); var rev_text = getElementById('expand').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'}; return false;">{L_EXPAND_VIEW}</a></span> <h3><a href="{U_VIEW_POST}">{POST_SUBJECT}</a></h3> <!-- IF S_PM --> diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 4d866681f0..5d21229611 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -79,7 +79,7 @@ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" /> <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" /> <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" /> - <input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> + <input type="button" class="button2" accesskey="y" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> <!-- IF S_BBCODE_IMG --> <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" /> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 9476242d11..5f7fb8408e 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -187,8 +187,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_ADDRESS_FIELD} {S_HIDDEN_FIELDS} - <!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD}" class="button2" onclick="load_draft = true;" /> <!-- ENDIF --> - <!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE}" class="button2" /> <!-- ENDIF --> + <!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD_DRAFT}" class="button2" onclick="load_draft = true;" /> <!-- ENDIF --> + <!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE_DRAFT}" class="button2" /> <!-- ENDIF --> <input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1"<!-- IF not S_PRIVMSGS --> onclick="document.getElementById('postform').action += '#preview';"<!-- ENDIF --> /> <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1 default-submit-action" /> diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index 612641b141..6616b95a73 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -1,5 +1,11 @@ <!-- INCLUDE overall_header.html --> +<script type="text/javascript"> +// <![CDATA[ + onload_functions.push('document.getElementById("keywords").focus();'); +// ]]> +</script> + <h2 class="solo">{L_SEARCH}</h2> <form method="get" action="{S_SEARCH_ACTION}"> @@ -119,4 +125,4 @@ </div> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index dfe00371e4..64beb97a37 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -307,6 +307,11 @@ div[class].topic-actions { max-height: 300px; } +#expand +{ + clear: both; +} + /* Content container styles ----------------------------------------*/ .content { diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css index 6dfb5c4726..68600b030b 100644 --- a/phpBB/styles/prosilver/theme/print.css +++ b/phpBB/styles/prosilver/theme/print.css @@ -140,3 +140,5 @@ div.spacer { clear: both; } /* Accessibility tweaks: Mozilla.org */ .skip_link { display: none; } + +dl.codebox dt { display: none; }
\ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html index 503de9e69e..90bbf8c139 100644 --- a/phpBB/styles/subsilver2/template/login_body.html +++ b/phpBB/styles/subsilver2/template/login_body.html @@ -88,4 +88,21 @@ <div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<script type="text/javascript"> +// <![CDATA[ + (function() + { + var elements = document.getElementsByName("{USERNAME_CREDENTIAL}"); + for (var i = 0; i < elements.length; ++i) + { + if (elements[i].tagName.toLowerCase() == 'input') + { + elements[i].focus(); + break; + } + } + })(); +// ]]> +</script> + +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 963f5160dd..a8a53abd24 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -201,8 +201,8 @@ function marklist(id, name, state) <!-- IF S_DISPLAY_SEARCH --> <p class="searchbar"> <span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span> - <!-- IF S_USER_LOGGED_IN --> - <span style="float: {S_CONTENT_FLOW_END};"><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> | <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span> + <!-- IF S_USER_LOGGED_IN or S_LOAD_UNREADS --> + <span style="float: {S_CONTENT_FLOW_END};"><!-- IF S_LOAD_UNREADS --><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- IF S_USER_LOGGED_IN --> | <!-- ENDIF --><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><!-- ENDIF --></span> <!-- ENDIF --> </p> <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 963e6fe966..0021cd2eb3 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -342,8 +342,8 @@ <td class="cat" colspan="2" align="center"> <input class="btnlite" type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" /> <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" /> - <!-- IF S_SAVE_ALLOWED --> <input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE}" /><!-- ENDIF --> - <!-- IF S_HAS_DRAFTS --> <input class="btnlite" type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD}" /><!-- ENDIF --> + <!-- IF S_SAVE_ALLOWED --> <input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE_DRAFT}" /><!-- ENDIF --> + <!-- IF S_HAS_DRAFTS --> <input class="btnlite" type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD_DRAFT}" /><!-- ENDIF --> <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="{L_CANCEL}" /> </td> </tr> @@ -365,8 +365,8 @@ <input class="btnlite" type="submit" tabindex="10" name="preview" value="{L_PREVIEW}" /> <input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" /> <!-- IF not S_SHOW_ATTACH_BOX and not S_SHOW_POLL_BOX --> - <!-- IF S_SAVE_ALLOWED --> <input class="btnlite" type="submit" accesskey="k" tabindex="12" name="save" value="{L_SAVE}" /><!-- ENDIF --> - <!-- IF S_HAS_DRAFTS --> <input class="btnlite" type="submit" accesskey="d" tabindex="13" name="load" value="{L_LOAD}" /><!-- ENDIF --> + <!-- IF S_SAVE_ALLOWED --> <input class="btnlite" type="submit" accesskey="k" tabindex="12" name="save" value="{L_SAVE_DRAFT}" /><!-- ENDIF --> + <!-- IF S_HAS_DRAFTS --> <input class="btnlite" type="submit" accesskey="d" tabindex="13" name="load" value="{L_LOAD_DRAFT}" /><!-- ENDIF --> <!-- ENDIF --> <input class="btnlite" type="submit" accesskey="c" tabindex="14" name="cancel" value="{L_CANCEL}" /> </td> diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index 2fff9c1991..621fa87fd4 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -45,7 +45,7 @@ <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="y" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> <!-- IF S_BBCODE_IMG --> <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html index a0ec30e9ba..763a229c83 100644 --- a/phpBB/styles/subsilver2/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -75,4 +75,21 @@ <div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<script type="text/javascript"> +// <![CDATA[ + (function() + { + var elements = document.getElementsByName("keywords"); + for (var i = 0; i < elements.length; ++i) + { + if (elements[i].tagName.toLowerCase() == 'input') + { + elements[i].focus(); + break; + } + } + })(); +// ]]> +</script> + +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/ucp.php b/phpBB/ucp.php index 994fe064a1..f5a2ec9648 100644 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -22,7 +22,7 @@ require($phpbb_root_path . 'includes/functions_module.' . $phpEx); $id = request_var('i', ''); $mode = request_var('mode', ''); -if ($mode == 'login' || $mode == 'logout' || $mode == 'confirm') +if (in_array($mode, array('login', 'logout', 'confirm', 'sendpassword', 'activate'))) { define('IN_LOGIN', true); } |