mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/7332] Fix post details expand link rendering on Webkit. [ticket/9162] Prevent notice on unset poll title [ticket/7417] Also focus search keywords and username in subsilver2. [ticket/7417] Focus username field when prosilver login page is loaded. [ticket/7417] Focus search keywords field when prosilver search page is loaded. [ticket/9841] Change "Save" to "Save draft", "Load" to "Load draft". [ticket/9664] Resolve conflict with accesskey="t", change addlitsitem to "y". [ticket/7538] Limit user_login_attempts to prevent SQL errors. [ticket/9848] Add avatars, attachments and store files to .gitignore. [ticket/9822] Correct some style related ACP explain statements. [ticket/9698] Add .htaccess to the includes subdirectory. [ticket/9830] Redirect to install directly when config.php does not exist. [ticket/9816] Remove config.php from repository [ticket/9810] Hide "Select All" of code bbcode on print page
This commit is contained in:
commit
d753a02ec0
20 changed files with 90 additions and 25 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,4 +1,8 @@
|
|||
*~
|
||||
phpBB/cache/*.php
|
||||
phpBB/config.php
|
||||
phpBB/files/*
|
||||
phpBB/images/avatars/upload/*
|
||||
phpBB/store/*
|
||||
tests/phpbb_unit_tests.sqlite2
|
||||
tests/test_config.php
|
||||
*~
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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
|
||||
|
|
4
phpBB/includes/.htaccess
Normal file
4
phpBB/includes/.htaccess
Normal file
|
@ -0,0 +1,4 @@
|
|||
<Files *>
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
|
@ -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...
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.',
|
||||
|
||||
|
|
|
@ -1300,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'];
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
|
@ -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}">
|
||||
|
|
|
@ -307,6 +307,11 @@ div[class].topic-actions {
|
|||
max-height: 300px;
|
||||
}
|
||||
|
||||
#expand
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Content container styles
|
||||
----------------------------------------*/
|
||||
.content {
|
||||
|
|
|
@ -140,3 +140,5 @@ div.spacer { clear: both; }
|
|||
|
||||
/* Accessibility tweaks: Mozilla.org */
|
||||
.skip_link { display: none; }
|
||||
|
||||
dl.codebox dt { display: none; }
|
|
@ -88,4 +88,21 @@
|
|||
|
||||
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
|
||||
|
||||
<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 -->
|
|
@ -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>
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -75,4 +75,21 @@
|
|||
|
||||
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
|
||||
|
||||
<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 -->
|
Loading…
Add table
Reference in a new issue