aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--build/build.xml89
-rw-r--r--phpBB/adm/style/acp_attachments.html47
-rw-r--r--phpBB/adm/style/acp_forums.html44
-rw-r--r--phpBB/adm/style/acp_logs.html2
-rw-r--r--phpBB/adm/style/acp_modules.html4
-rw-r--r--phpBB/adm/style/acp_ranks.html4
-rw-r--r--phpBB/adm/style/acp_send_statistics.html15
-rw-r--r--phpBB/adm/style/acp_users_overview.html4
-rw-r--r--phpBB/adm/style/acp_users_prefs.html2
-rw-r--r--phpBB/adm/style/admin.css14
-rw-r--r--phpBB/adm/style/admin.js4
-rw-r--r--phpBB/adm/style/install_header.html26
-rw-r--r--phpBB/adm/style/install_update.html2
-rw-r--r--phpBB/adm/style/overall_header.html19
-rw-r--r--phpBB/adm/style/permissions.js12
-rw-r--r--phpBB/adm/style/simple_footer.html2
-rw-r--r--phpBB/adm/style/simple_header.html19
-rw-r--r--phpBB/assets/javascript/core.js21
-rw-r--r--phpBB/composer.json5
-rw-r--r--phpBB/composer.lock162
-rw-r--r--phpBB/includes/acp/acp_attachments.php15
-rw-r--r--phpBB/includes/functions.php10
-rw-r--r--phpBB/includes/functions_content.php18
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/functions_privmsgs.php14
-rw-r--r--phpBB/install/database_update.php2
-rw-r--r--phpBB/install/install_install.php14
-rw-r--r--phpBB/language/en/acp/attachments.php9
-rw-r--r--phpBB/language/en/acp/common.php8
-rw-r--r--phpBB/language/en/search.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/softdelete_p1.php9
-rw-r--r--phpBB/phpbb/db/tools.php4
-rw-r--r--phpBB/phpbb/log/log.php22
-rw-r--r--phpBB/phpbb/path_helper.php10
-rw-r--r--phpBB/posting.php18
-rw-r--r--phpBB/search.php11
-rw-r--r--phpBB/styles/prosilver/template/ajax.js2
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js17
-rw-r--r--phpBB/styles/prosilver/template/navbar_footer.html4
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html7
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html6
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html2
-rw-r--r--phpBB/styles/prosilver/theme/common.css18
-rw-r--r--phpBB/styles/prosilver/theme/forms.css2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html16
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html2
-rw-r--r--phpBB/viewforum.php12
-rw-r--r--phpBB/viewtopic.php23
-rw-r--r--tests/functional/download_test.php2
-rw-r--r--tests/functional/paging_test.php14
-rw-r--r--tests/functional/prune_shadow_topic_test.php2
-rw-r--r--tests/functional/softdelete_test.php4
-rw-r--r--tests/functions_content/phpbb_clean_search_string_test.php38
-rw-r--r--tests/log/fixtures/full_log.xml12
-rw-r--r--tests/log/function_view_log_test.php43
-rw-r--r--tests/path_helper/web_root_path_test.php7
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php4
59 files changed, 604 insertions, 305 deletions
diff --git a/.travis.yml b/.travis.yml
index a65b1ccd2b..88c902cd4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,3 +40,5 @@ matrix:
env: DB=mariadb
- php: 5.4
env: DB=postgres
+ allow_failures:
+ - php: hhvm
diff --git a/build/build.xml b/build/build.xml
index 3a2a66b113..c1f81fb947 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -273,6 +273,10 @@
<delete dir="${dir}/develop" />
<delete dir="${dir}/install/data" />
+ <phingcall target="clean-vendor-dir">
+ <property name="dir" value="${dir}" />
+ </phingcall>
+
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
<!-- set permissions of all files to 644, directories to 755 -->
<exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
@@ -284,6 +288,91 @@
<chmod mode="0777" file="${dir}/images/avatars/upload" />
</target>
+ <target name="clean-vendor-dir">
+ <!-- Delete unrelated files from vendor/, see PHPBB3-12390 -->
+ <delete dir="${dir}/vendor/lusitanian/oauth/examples" />
+ <delete dir="${dir}/vendor/lusitanian/oauth/tests" />
+ <delete file="${dir}/vendor/lusitanian/oauth/.gitignore" />
+ <delete file="${dir}/vendor/lusitanian/oauth/.travis.yml" />
+ <delete file="${dir}/vendor/lusitanian/oauth/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/lusitanian/oauth/README.md" />
+
+ <delete dir="${dir}/vendor/psr/log/Psr/Log/Test" />
+ <delete file="${dir}/vendor/psr/log/.gitignore" />
+ <delete file="${dir}/vendor/psr/log/README.md" />
+
+ <delete dir="${dir}/vendor/symfony/config/Symfony/Component/Config/Tests" />
+ <delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/.gitignore" />
+ <delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/README.md" />
+ <delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/console/Symfony/Component/Console/Tests" />
+ <delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/.gitignore" />
+ <delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/README.md" />
+ <delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/debug/Symfony/Component/Debug/Tests" />
+ <delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/.gitignore" />
+ <delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/README.md" />
+ <delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests" />
+ <delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/.gitignore" />
+ <delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/README.md" />
+ <delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests" />
+ <delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore" />
+ <delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md" />
+ <delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests" />
+ <delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/.gitignore" />
+ <delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/README.md" />
+ <delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests" />
+ <delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitignore" />
+ <delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md" />
+ <delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests" />
+ <delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitignore" />
+ <delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/README.md" />
+ <delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/routing/Symfony/Component/Routing/Tests" />
+ <delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/.gitignore" />
+ <delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/README.md" />
+ <delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/Tests" />
+ <delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/.gitignore" />
+ <delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/CHANGELOG.md" />
+ <delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/README.md" />
+ <delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist" />
+
+ <delete dir="${dir}/vendor/twig/twig/doc" />
+ <delete dir="${dir}/vendor/twig/twig/ext" />
+ <delete dir="${dir}/vendor/twig/twig/test" />
+ <delete file="${dir}/vendor/twig/twig/.editorconfig" />
+ <delete file="${dir}/vendor/twig/twig/.gitignore" />
+ <delete file="${dir}/vendor/twig/twig/.travis.yml" />
+ <delete file="${dir}/vendor/twig/twig/AUTHORS" />
+ <delete file="${dir}/vendor/twig/twig/CHANGELOG" />
+ <delete file="${dir}/vendor/twig/twig/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/twig/twig/README.markdown" />
+ </target>
+
<target name="clean-diff-dir">
<delete dir="${dir}/cache" />
<delete dir="${dir}/docs" />
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 82fb229fae..5d35666fdd 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -378,7 +378,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <div class="pagination">
+ <div class="pagination top-pagination">
<!-- IF .pagination or TOTAL_FILES -->
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
<!-- IF .pagination -->
@@ -389,13 +389,14 @@
<!-- ENDIF -->
</div>
+<!-- IF .attachments -->
<table class="table1 zebra-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
<th>{L_POSTED}</th>
- <th>{L_FILESIZE}</th>
- <th>{L_DELETE}</th>
+ <th class="centered-text">{L_FILESIZE}</th>
+ <th class="centered-text">{L_MARK}</th>
</tr>
</thead>
<tbody>
@@ -406,25 +407,19 @@
<!-- ELSE --><a href="{attachments.U_FILE}" style="font-weight: bold;">{attachments.REAL_FILENAME}</a><br /><!-- IF attachments.COMMENT -->{attachments.COMMENT}<br /><!-- ENDIF -->{attachments.L_DOWNLOAD_COUNT}<br />{L_TOPIC}{L_COLON} <a href="{attachments.U_VIEW_TOPIC}">{attachments.TOPIC_TITLE}</a><!-- ENDIF -->
</td>
<td>{attachments.FILETIME}<br />{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER}</td>
- <td>{attachments.FILESIZE}</td>
- <td><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td>
+ <td class="centered-text">{attachments.FILESIZE}</td>
+ <td class="centered-text"><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td>
</tr>
<!-- END attachments -->
- <tr class="row4">
- <td colspan="3">&nbsp;</td>
- <td class="small"><a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
- </tr>
</tbody>
</table>
+<!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ATTACHMENTS}</p>
+ </div>
+<!-- ENDIF -->
<!-- IF TOTAL_FILES -->
- <fieldset class="display-options">
- {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
- <input class="button2" type="submit" value="{L_GO}" name="sort" />
- </fieldset>
-
- <hr />
-
<div class="pagination">
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
<!-- IF .pagination -->
@@ -435,10 +430,22 @@
</div>
<!-- ENDIF -->
- <p class="submit-buttons">
- <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
- <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
- </p>
+ <fieldset class="display-options">
+ {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ </fieldset>
+
+ <hr />
+
+<!-- IF .attachments -->
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="submit" value="{L_DELETE_MARKED}" /><br />
+ <p class="small">
+ <a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> &bull;
+ <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
+ </p>
+ </fieldset>
+<!-- ENDIF -->
{S_FORM_TOKEN}
</fieldset>
</form>
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 537fffbf65..f8ea284acb 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -14,45 +14,45 @@
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
if (value == {FORUM_POST})
{
- dE('type_actions', -1);
+ phpbb.toggleDisplay('type_actions', -1);
}
else
{
- dE('type_actions', 1);
+ phpbb.toggleDisplay('type_actions', 1);
}
<!-- ENDIF -->
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
if (value == {FORUM_LINK})
{
- dE('cat_to_link_actions', 1);
+ phpbb.toggleDisplay('cat_to_link_actions', 1);
}
else
{
- dE('cat_to_link_actions', -1);
+ phpbb.toggleDisplay('cat_to_link_actions', -1);
}
<!-- ENDIF -->
if (value == {FORUM_POST})
{
- dE('forum_post_options', 1);
- dE('forum_link_options', -1);
- dE('forum_rules_options', 1);
- dE('forum_cat_options', -1);
+ phpbb.toggleDisplay('forum_post_options', 1);
+ phpbb.toggleDisplay('forum_link_options', -1);
+ phpbb.toggleDisplay('forum_rules_options', 1);
+ phpbb.toggleDisplay('forum_cat_options', -1);
}
else if (value == {FORUM_LINK})
{
- dE('forum_post_options', -1);
- dE('forum_link_options', 1);
- dE('forum_rules_options', -1);
- dE('forum_cat_options', -1);
+ phpbb.toggleDisplay('forum_post_options', -1);
+ phpbb.toggleDisplay('forum_link_options', 1);
+ phpbb.toggleDisplay('forum_rules_options', -1);
+ phpbb.toggleDisplay('forum_cat_options', -1);
}
else if (value == {FORUM_CAT})
{
- dE('forum_post_options', -1);
- dE('forum_link_options', -1);
- dE('forum_rules_options', 1);
- dE('forum_cat_options', 1);
+ phpbb.toggleDisplay('forum_post_options', -1);
+ phpbb.toggleDisplay('forum_link_options', -1);
+ phpbb.toggleDisplay('forum_rules_options', 1);
+ phpbb.toggleDisplay('forum_cat_options', 1);
}
}
@@ -64,30 +64,30 @@
{
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
<!-- IF S_FORUM_POST -->
- dE('type_actions', -1);
+ phpbb.toggleDisplay('type_actions', -1);
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
<!-- IF S_FORUM_CAT -->
- dE('cat_to_link_actions', -1);
+ phpbb.toggleDisplay('cat_to_link_actions', -1);
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF not S_FORUM_POST -->
- dE('forum_post_options', -1);
+ phpbb.toggleDisplay('forum_post_options', -1);
<!-- ENDIF -->
<!-- IF not S_FORUM_CAT -->
- dE('forum_cat_options', -1);
+ phpbb.toggleDisplay('forum_cat_options', -1);
<!-- ENDIF -->
<!-- IF not S_FORUM_LINK -->
- dE('forum_link_options', -1);
+ phpbb.toggleDisplay('forum_link_options', -1);
<!-- ENDIF -->
<!-- IF S_FORUM_LINK -->
- dE('forum_rules_options', -1);
+ phpbb.toggleDisplay('forum_rules_options', -1);
<!-- ENDIF -->
}
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index 592b5bbc16..9343b9b509 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -13,7 +13,7 @@
</fieldset>
<!-- IF .pagination -->
-<div class="pagination" style="float: right; margin: 15px 0 2px 0">
+<div class="pagination top-pagination">
<!-- INCLUDE pagination.html -->
</div>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index c7688a610c..3c97706e6a 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -10,11 +10,11 @@
{
if (value == 'category')
{
- dE('modoptions', -1);
+ phpbb.toggleDisplay('modoptions', -1);
}
else
{
- dE('modoptions', 1);
+ phpbb.toggleDisplay('modoptions', 1);
}
}
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index be68dda695..dd2d07a837 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -35,8 +35,8 @@
</dl>
<dl>
<dt><label for="special_rank">{L_RANK_SPECIAL}{L_COLON}</label></dt>
- <dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label><input onclick="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ <dd><label><input onclick="phpbb.toggleDisplay('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input onclick="phpbb.toggleDisplay('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
<dl>
diff --git a/phpBB/adm/style/acp_send_statistics.html b/phpBB/adm/style/acp_send_statistics.html
index 2d6c4837fd..480e438e1f 100644
--- a/phpBB/adm/style/acp_send_statistics.html
+++ b/phpBB/adm/style/acp_send_statistics.html
@@ -17,8 +17,8 @@ function iframe_updated()
return;
}
- dE('questionnaire-form', -1);
- dE('questionnaire-thanks', 1);
+ phpbb.toggleDisplay('questionnaire-form', -1);
+ phpbb.toggleDisplay('questionnaire-thanks', 1);
}
//]]>
</script>
@@ -31,10 +31,10 @@ function iframe_updated()
<p>{L_EXPLAIN_SHOW_STATISTICS}</p>
- <p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
+ <p id="show-button"><input type="button" class="button2" onclick="phpbb.toggleDisplay('configlist', 1); phpbb.toggleDisplay('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
<div id="configlist">
- <input type="button" class="button2" onclick="dE('show-button', 1); dE('configlist', -1);" value="{L_HIDE_STATISTICS}" />
+ <input type="button" class="button2" onclick="phpbb.toggleDisplay('show-button', 1); phpbb.toggleDisplay('configlist', -1);" value="{L_HIDE_STATISTICS}" />
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
</p>
@@ -61,11 +61,4 @@ function iframe_updated()
<p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">&laquo; {L_GO_ACP_MAIN}</a></p>
</div>
-<script type="text/javascript">
-//<![CDATA[
- dE('configlist', -1);
- dE('questionnaire-thanks', -1);
-//]]>
-</script>
-
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 013be80465..506101c3f7 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -86,11 +86,11 @@
{
if (option != 'banuser' && option != 'banemail' && option != 'banip')
{
- dE('reasons', -1);
+ phpbb.toggleDisplay('reasons', -1);
return;
}
- dE('reasons', 1);
+ phpbb.toggleDisplay('reasons', 1);
element = document.getElementById('user_quick_tools').ban_reason;
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 1092b25b04..d1e389ca04 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -50,7 +50,7 @@
<!-- INCLUDE timezone_option.html -->
<dl>
<dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
- <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
+ <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 22bbf404ea..6f2d65afc0 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -102,6 +102,10 @@ hr {
height: 1px;
}
+.centered-text {
+ text-align: center;
+}
+
.small {
font-size: 0.85em;
}
@@ -1126,11 +1130,14 @@ input.langvalue, textarea.langvalue {
}
optgroup, select {
+ background-color: #FAFAFA;
+ border: 1px solid #666666;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 0.85em;
font-weight: normal;
font-style: normal;
cursor: pointer;
+ padding: 1px;
vertical-align: middle;
width: auto;
color: #000;
@@ -1238,7 +1245,7 @@ fieldset.display-options {
border: none;
background-color: transparent;
text-align: center;
- font-size: 0.75em;
+ font-size: 0.85em;
}
fieldset.display-options select, fieldset.display-options input, fieldset.display-options label {
@@ -1663,11 +1670,16 @@ input.button1:focus, input.button2:focus {
/* Pagination
---------------------------------------- */
.pagination {
+ font-size: .85em;
height: 1%; /* IE tweak (holly hack) */
width: auto;
text-align: right;
margin-top: 5px;
+}
+
+.top-pagination {
float: right;
+ margin: 15px 0 2px 0;
}
.rtl .pagination {
diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js
index dd46124f97..7bda86e1e3 100644
--- a/phpBB/adm/style/admin.js
+++ b/phpBB/adm/style/admin.js
@@ -242,5 +242,9 @@ function parse_document(container)
});
parse_document($('body'));
+
+ // Hide configlist and success message in send statistics page
+ phpbb.toggleDisplay('configlist', -1);
+ phpbb.toggleDisplay('questionnaire-thanks', -1);
});
})(jQuery);
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
index 99b98ef068..a8f7009e4b 100644
--- a/phpBB/adm/style/install_header.html
+++ b/phpBB/adm/style/install_header.html
@@ -7,32 +7,6 @@
<title>{PAGE_TITLE}</title>
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
-
-<script type="text/javascript">
-// <![CDATA[
-
-/**
-* Set display of page element
-* s[-1,0,1] = hide,toggle display,show
-*/
-function dE(n, s, type)
-{
- if (!type)
- {
- type = 'block';
- }
-
- var e = document.getElementById(n);
- if (!s)
- {
- s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
- }
- e.style.display = (s == 1) ? type : 'none';
-}
-
-// ]]>
-</script>
-
</head>
<body class="{S_CONTENT_DIRECTION} nojs">
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index d746226753..f0df138641 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -224,7 +224,7 @@
<!-- IF .not_modified -->
<h2>{L_FILES_NOT_MODIFIED}</h2>
- <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
<p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
<fieldset id="not_modified" style="display: none;">
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index f5d0fda88a..25a82a5faa 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -36,25 +36,6 @@ function jumpto()
}
/**
-* Set display of page element
-* s[-1,0,1] = hide,toggle display,show
-*/
-function dE(n, s, type)
-{
- if (!type)
- {
- type = 'block';
- }
-
- var e = document.getElementById(n);
- if (!s)
- {
- s = (e.style.display == '') ? -1 : 1;
- }
- e.style.display = (s == 1) ? type : 'none';
-}
-
-/**
* Mark/unmark checkboxes
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js
index 1c85fbd9ef..9178adab50 100644
--- a/phpBB/adm/style/permissions.js
+++ b/phpBB/adm/style/permissions.js
@@ -177,7 +177,7 @@ function swap_options(pmask, fmask, cat, adv, view) {
var adv_block = document.getElementById('advanced' + pmask + fmask);
if (adv_block.style.display === 'block' && adv === true) {
- dE('advanced' + pmask + fmask, -1);
+ phpbb.toggleDisplay('advanced' + pmask + fmask, -1);
reset_opacity(1);
display_checkboxes(false);
return;
@@ -207,11 +207,11 @@ function swap_options(pmask, fmask, cat, adv, view) {
return;
}
- dE('options' + active_option, -1);
+ phpbb.toggleDisplay('options' + active_option, -1);
//hiding and showing the checkbox
if (document.getElementById('checkbox' + active_pmask + active_fmask)) {
- dE('checkbox' + pmask + fmask, -1);
+ phpbb.toggleDisplay('checkbox' + pmask + fmask, -1);
if ((pmask + fmask) !== (active_pmask + active_fmask)) {
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
@@ -219,13 +219,13 @@ function swap_options(pmask, fmask, cat, adv, view) {
}
if (!view) {
- dE('advanced' + active_pmask + active_fmask, -1);
+ phpbb.toggleDisplay('advanced' + active_pmask + active_fmask, -1);
}
if (!view) {
- dE('advanced' + pmask + fmask, 1);
+ phpbb.toggleDisplay('advanced' + pmask + fmask, 1);
}
- dE('options' + id, 1);
+ phpbb.toggleDisplay('options' + id, 1);
active_pmask = pmask;
active_fmask = fmask;
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index a559b25b72..c549a2df4e 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -18,6 +18,8 @@
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+
<!-- EVENT acp_simple_footer_after -->
</body>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index fd5145f0d5..ae25f28d32 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -49,25 +49,6 @@ function jumpto()
}
/**
-* Set display of page element
-* s[-1,0,1] = hide,toggle display,show
-*/
-function dE(n, s, type)
-{
- if (!type)
- {
- type = 'block';
- }
-
- var e = document.getElementById(n);
- if (!s)
- {
- s = (e.style.display == '') ? -1 : 1;
- }
- e.style.display = (s == 1) ? type : 'none';
-}
-
-/**
* Mark/unmark checkboxes
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index ca62a5f649..ac866f7c78 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -1082,6 +1082,27 @@ phpbb.registerPalette = function(el) {
}
/**
+* Set display of page element
+*
+* @param string id The ID of the element to change
+* @param int action Set to 0 if element display should be toggled, -1 for
+* hiding the element, and 1 for showing it.
+* @param string type Display type that should be used, e.g. inline, block or
+* other CSS "display" types
+*/
+phpbb.toggleDisplay = function(id, action, type) {
+ if (!type) {
+ type = 'block';
+ }
+
+ var display = $('#' + id).css('display');
+ if (!action) {
+ action = (display === '' || display === type) ? -1 : 1;
+ }
+ $('#' + id).css('display', ((action === 1) ? type : 'none'));
+}
+
+/**
* Apply code editor to all textarea elements with data-bbcode attribute
*/
$(document).ready(function() {
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 3cf83a8fe9..f005fff805 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -1,5 +1,8 @@
{
- "minimum-stability": "beta",
+ "_readme": [
+ "You MUST update the clean-vendor-dir target in build/build.xml",
+ "accordingly when adding or upgrading dependencies."
+ ],
"require": {
"lusitanian/oauth": "0.2.*",
"symfony/config": "2.3.*",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index c0eb7afcbb..ee83dee047 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "cc83663b780856890f787b9b4d6ea474",
+ "hash": "9b683acbc766a345d90de958db4e7f48",
"packages": [
{
"name": "lusitanian/oauth",
@@ -108,17 +108,17 @@
},
{
"name": "symfony/config",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/Config",
"source": {
"type": "git",
"url": "https://github.com/symfony/Config.git",
- "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0"
+ "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Config/zipball/65a927c15ca5a911ba2fa277a5457fa8129505b0",
- "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0",
+ "url": "https://api.github.com/repos/symfony/Config/zipball/91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21",
+ "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21",
"shasum": ""
},
"require": {
@@ -136,14 +136,16 @@
"Symfony\\Component\\Config\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -152,21 +154,21 @@
],
"description": "Symfony Config Component",
"homepage": "http://symfony.com",
- "time": "2013-08-06 05:49:23"
+ "time": "2014-03-31 10:15:50"
},
{
"name": "symfony/console",
- "version": "v2.3.6",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
- "reference": "f880062d56edefb25b36f2defa65aafe65959dc7"
+ "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7",
- "reference": "f880062d56edefb25b36f2defa65aafe65959dc7",
+ "url": "https://api.github.com/repos/symfony/Console/zipball/df17996d37eb113a5675ca4cc2ac45f4fc057cb7",
+ "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7",
"shasum": ""
},
"require": {
@@ -196,7 +198,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -205,7 +209,7 @@
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
- "time": "2013-09-25 06:04:15"
+ "time": "2014-03-01 17:25:29"
},
{
"name": "symfony/debug",
@@ -245,14 +249,16 @@
"Symfony\\Component\\Debug\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -265,17 +271,17 @@
},
{
"name": "symfony/dependency-injection",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/DependencyInjection",
"source": {
"type": "git",
"url": "https://github.com/symfony/DependencyInjection.git",
- "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c"
+ "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c",
- "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c",
+ "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/41e9e2078e8edf261c11be478300c8fcddb64e30",
+ "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30",
"shasum": ""
},
"require": {
@@ -301,14 +307,16 @@
"Symfony\\Component\\DependencyInjection\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -317,21 +325,21 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "http://symfony.com",
- "time": "2013-07-25 17:13:25"
+ "time": "2014-03-27 18:14:33"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8"
+ "reference": "15645237c6ff70e74a28e8836362d82492765055"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8",
- "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8",
+ "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/15645237c6ff70e74a28e8836362d82492765055",
+ "reference": "15645237c6ff70e74a28e8836362d82492765055",
"shasum": ""
},
"require": {
@@ -362,7 +370,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -371,7 +381,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com",
- "time": "2013-07-21 12:12:18"
+ "time": "2014-02-11 10:29:24"
},
{
"name": "symfony/filesystem",
@@ -402,14 +412,16 @@
"Symfony\\Component\\Filesystem\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -452,14 +464,16 @@
"Symfony/Component/HttpFoundation/Resources/stubs"
]
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -472,17 +486,17 @@
},
{
"name": "symfony/http-kernel",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpKernel.git",
- "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf"
+ "reference": "48d61b3622ca35dd924b167441a9810ad55906ce"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
- "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
+ "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/48d61b3622ca35dd924b167441a9810ad55906ce",
+ "reference": "48d61b3622ca35dd924b167441a9810ad55906ce",
"shasum": ""
},
"require": {
@@ -523,14 +537,16 @@
"Symfony\\Component\\HttpKernel\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -539,21 +555,21 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com",
- "time": "2013-08-27 08:58:24"
+ "time": "2014-04-03 05:42:39"
},
{
"name": "symfony/routing",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
- "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143"
+ "reference": "08afcafd9af22a24a8055669f85d63b863c4711b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
- "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
+ "url": "https://api.github.com/repos/symfony/Routing/zipball/08afcafd9af22a24a8055669f85d63b863c4711b",
+ "reference": "08afcafd9af22a24a8055669f85d63b863c4711b",
"shasum": ""
},
"require": {
@@ -581,14 +597,16 @@
"Symfony\\Component\\Routing\\": ""
}
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -597,21 +615,21 @@
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
- "time": "2013-08-23 15:14:07"
+ "time": "2014-03-28 10:34:27"
},
{
"name": "symfony/yaml",
- "version": "v2.3.4",
+ "version": "v2.3.12",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
- "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847"
+ "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
- "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
+ "url": "https://api.github.com/repos/symfony/Yaml/zipball/3acf34f6993db3d873fa77ac2cb6e595db00b88d",
+ "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d",
"shasum": ""
},
"require": {
@@ -635,7 +653,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -644,7 +664,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com",
- "time": "2013-08-24 15:26:22"
+ "time": "2014-03-04 16:04:39"
},
{
"name": "twig/twig",
@@ -743,7 +763,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
}
],
"description": "A simple PHP Web Scraper",
@@ -1430,16 +1452,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "1.5.0RC4",
+ "version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43"
+ "reference": "a76a39b317ce8106abe6264daa505e24e1731860"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
- "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860",
+ "reference": "a76a39b317ce8106abe6264daa505e24e1731860",
"shasum": ""
},
"require": {
@@ -1496,7 +1518,7 @@
"phpcs",
"standards"
],
- "time": "2013-09-26 00:14:02"
+ "time": "2014-02-04 23:49:58"
},
{
"name": "symfony/browser-kit",
@@ -1542,7 +1564,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -1589,7 +1613,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -1646,7 +1672,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -1693,7 +1721,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -1740,7 +1770,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Symfony Community",
@@ -1755,7 +1787,7 @@
"aliases": [
],
- "minimum-stability": "beta",
+ "minimum-stability": "stable",
"stability-flags": [
],
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index f68fd76587..d8d382b2bd 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1115,11 +1115,6 @@ class acp_attachments
if ($stats_error)
{
$error[] = $stats_error;
-
- // Show option to resync stats
- $this->template->assign_vars(array(
- 'S_ACTION_OPTIONS' => $auth->acl_get('a_board'),
- ));
}
$template->assign_vars(array(
@@ -1321,7 +1316,15 @@ class acp_attachments
if (($num_files != $stats['num_files']) || ($total_size != $stats['upload_dir_size']))
{
- return $this->user->lang('FILES_STATS_WRONG', (int) $stats['num_files'], get_formatted_filesize($stats['upload_dir_size']));
+ $u_resync = $this->u_action . '&amp;action=stats';
+
+ return $this->user->lang(
+ 'FILES_STATS_WRONG',
+ (int) $stats['num_files'],
+ get_formatted_filesize($stats['upload_dir_size']),
+ '<a href="' . $u_resync . '">',
+ '</a>'
+ );
}
return false;
}
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 69f7c3f162..0cb88cd8ee 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3849,6 +3849,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_'))
{
$msg_text = $log_text;
+
+ // If this is defined there already was some output
+ // So let's not break it
+ if (defined('IN_DB_UPDATE'))
+ {
+ echo '<div class="errorbox">' . $msg_text . '</div>';
+
+ $db->sql_return_on_error(true);
+ phpbb_end_update($cache, $config);
+ }
}
if ((defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index dd9201165b..b1f69c5756 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -20,6 +20,7 @@ if (!defined('IN_PHPBB'))
* make_jumpbox()
* bump_topic_allowed()
* get_context()
+* phpbb_clean_search_string()
* decode_message()
* strip_bbcode()
* generate_text_for_display()
@@ -360,6 +361,23 @@ function get_context($text, $words, $length = 400)
}
/**
+* Cleans a search string by removing single wildcards from it and replacing multiple spaces with a single one.
+*
+* @param string $search_string The full search string which should be cleaned.
+*
+* @return string The cleaned search string without any wildcards and multiple spaces.
+*/
+function phpbb_clean_search_string($search_string)
+{
+ // This regular expressions matches every single wildcard.
+ // That means one after a whitespace or the beginning of the string or one before a whitespace or the end of the string.
+ $search_string = preg_replace('#(?<=^|\s)\*+(?=\s|$)#', '', $search_string);
+ $search_string = trim($search_string);
+ $search_string = preg_replace(array('#\s+#u', '#\*+#u'), array(' ', '*'), $search_string);
+ return $search_string;
+}
+
+/**
* Decode text whereby text is coming from the db and expected to be pre-parsed content
* We are placing this outside of the message parser because we are often in need of it...
*/
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 79fcb892ef..51bbcb8bae 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1153,7 +1153,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
'S_FRIEND' => ($row['friend']) ? true : false,
'S_IGNORE_POST' => ($row['foe']) ? true : false,
- 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"dE('{$post_anchor}', 1); return false;\">", '</a>') : '',
+ 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'POST_SUBJECT' => $post_subject,
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 17d67b4a23..9b44984dfa 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1575,7 +1575,7 @@ function get_folder_status($folder_id, $folder)
*/
function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
{
- global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container;
+ global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
// We do not handle erasing pms here
if ($mode == 'delete')
@@ -1585,6 +1585,18 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
$current_time = time();
+ /**
+ * Get all parts of the PM that are to be submited to the DB.
+ *
+ * @event core.submit_pm_before
+ * @var string mode PM Post mode - post|reply|quote|quotepost|forward|edit
+ * @var string subject Subject of the private message
+ * @var array data The whole row data of the PM.
+ * @since 3.1.0-b3
+ */
+ $vars = array('mode', 'subject', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.submit_pm_before', compact($vars)));
+
// Collect some basic information about which tables and which rows to update/insert
$sql_data = array();
$root_level = 0;
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index bad51e2fe3..6c9eeb6a75 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -169,6 +169,8 @@ header('Content-type: text/html; charset=UTF-8');
<?php
+define('IN_DB_UPDATE', true);
+
/**
* @todo firebird/mysql update?
*/
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 977ce8562c..a0c9cf9c5c 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1663,7 +1663,19 @@ class install_install extends module
$_module->move_module_by($row, 'move_down', 4);
- // Move OAuth module 5 down...
+ // Move notification options module 4 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'ucp_notifications'
+ AND module_class = 'ucp'
+ AND module_mode = 'notification_options'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_down', 4);
+
+ // Move OAuth module 5 down...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_basename = 'ucp_auth_link'
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index c7d68d29c2..6ca2865383 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -107,6 +107,9 @@ $lang = array_merge($lang, array(
'EXT_GROUP_REAL_MEDIA' => 'Real Media',
'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media',
+ 'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.',
+ 'FILES_STATS_WRONG' => 'Your file statistics are likely inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.<br />Click %3$shere%4$s to resynchronise them.',
+
'GO_TO_EXTENSIONS' => 'Go to extension management screen',
'GROUP_NAME' => 'Group name',
@@ -130,6 +133,7 @@ $lang = array_merge($lang, array(
'NOT_ALLOWED_IN_PM' => 'Only allowed in posts',
'NOT_ALLOWED_IN_PM_POST' => 'Not allowed',
'NOT_ASSIGNED' => 'Not assigned',
+ 'NO_ATTACHMENTS' => 'No attachments found for this period.',
'NO_EXT_GROUP' => 'None',
'NO_EXT_GROUP_NAME' => 'No group name entered',
'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified.',
@@ -143,8 +147,9 @@ $lang = array_merge($lang, array(
'ORDER_ALLOW_DENY' => 'Allow',
'ORDER_DENY_ALLOW' => 'Deny',
- 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames',
- 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
+ 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames',
+ 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
+ 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?',
'SEARCH_IMAGICK' => 'Search for Imagemagick',
'SECURE_ALLOW_DENY' => 'Allow/Deny list',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 5794a7c833..6f16dfabd4 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -241,9 +241,6 @@ $lang = array_merge($lang, array(
'EXPORT_DOWNLOAD' => 'Download',
'EXPORT_STORE' => 'Store',
- 'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.',
- 'FILES_STATS_WRONG' => 'Your files statistics are probably inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.',
-
'GENERAL_OPTIONS' => 'General options',
'GENERAL_SETTINGS' => 'General settings',
'GLOBAL_MASK' => 'Global permission mask',
@@ -286,8 +283,6 @@ $lang = array_merge($lang, array(
'REMIND' => 'Remind',
'RESYNC' => 'Resynchronise',
- 'RESYNC_FILES_STATS' => 'Resynchronise files statistics',
- 'RESYNC_FILES_STATS_EXPLAIN' => 'Recalculates the total number and size of files attached to posts and private messages.',
'SELECT_ANONYMOUS' => 'Select anonymous user',
'SELECT_OPTION' => 'Select option',
@@ -388,7 +383,6 @@ $lang = array_merge($lang, array(
'RESET_ONLINE' => 'Reset most users ever online',
'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?',
'RESET_ONLINE_SUCCESS' => 'Most users ever online reset',
- 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise files statistics?',
'RESYNC_POSTCOUNTS' => 'Resynchronise post counts',
'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.',
'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?',
@@ -696,7 +690,7 @@ $lang = array_merge($lang, array(
'LOG_REFERER_INVALID' => '<strong>Referer validation failed</strong><br />»Referer was “<em>%1$s</em>”. The request was rejected and the session killed.',
'LOG_RESET_DATE' => '<strong>Board start date reset</strong>',
'LOG_RESET_ONLINE' => '<strong>Most users online reset</strong>',
- 'LOG_RESYNC_FILES_STATS' => '<strong>Files statistics resynchronised</strong>',
+ 'LOG_RESYNC_FILES_STATS' => '<strong>File statistics resynchronised</strong>',
'LOG_RESYNC_POSTCOUNTS' => '<strong>User post counts resynchronised</strong>',
'LOG_RESYNC_POST_MARKING' => '<strong>Dotted topics resynchronised</strong>',
'LOG_RESYNC_STATS' => '<strong>Post, topic and user statistics resynchronised</strong>',
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index f65022fbcb..13aa66514c 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -69,7 +69,10 @@ $lang = array_merge($lang, array(
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
'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_TIME' => array(
+ 1 => 'Sorry but you cannot use search at this time. Please try again in %d second.',
+ 2 => 'Sorry but you cannot use search at this time. Please try again in %d seconds.',
+ ),
'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/phpbb/db/migration/data/v310/softdelete_p1.php b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php
index d5da54b888..10243dc77f 100644
--- a/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php
+++ b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php
@@ -149,6 +149,15 @@ class softdelete_p1 extends \phpbb\db\migration\migration
$limit = 10;
$converted_forums = 0;
+ if (!$start)
+ {
+ // Preserve the forum_posts value for link forums as it represents redirects.
+ $sql = 'UPDATE ' . $this->table_prefix . 'forums
+ SET forum_posts_approved = forum_posts
+ WHERE forum_type = ' . FORUM_LINK;
+ $this->db->sql_query($sql);
+ }
+
$sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS sum_topics, SUM(topic_posts_approved) AS sum_posts_approved, SUM(topic_posts_unapproved) AS sum_posts_unapproved
FROM ' . $this->table_prefix . 'topics
GROUP BY forum_id, topic_visibility
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 7616849465..3d480b7e1c 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -892,7 +892,7 @@ class tools
}
}
- // Add unqiue indexes?
+ // Add unique indexes?
if (!empty($schema_changes['add_unique_index']))
{
foreach ($schema_changes['add_unique_index'] as $table => $index_array)
@@ -1303,7 +1303,7 @@ class tools
}
/**
- * Check if a specified index exists in table. Does not return PRIMARY KEY and UNIQUE indexes.
+ * Check if a specified index exists in table. Does not return PRIMARY KEY indexes.
*
* @param string $table_name Table to check the index at
* @param string $index_name The index name to check
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 24eb408b63..e38950f4c1 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -558,6 +558,10 @@ class log implements \phpbb\log\log_interface
$log[$i]['action'] = make_clickable($log[$i]['action']);
*/
}
+ else
+ {
+ $log[$i]['action'] = $this->user->lang($log[$i]['action']);
+ }
$i++;
}
@@ -639,9 +643,23 @@ class log implements \phpbb\log\log_interface
$operations = array();
foreach ($this->user->lang as $key => $value)
{
- if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
+ if (substr($key, 0, 4) == 'LOG_')
{
- $operations[] = $key;
+ if (is_array($value))
+ {
+ foreach ($value as $plural_value)
+ {
+ if (preg_match($keywords_pattern, $plural_value))
+ {
+ $operations[] = $key;
+ break;
+ }
+ }
+ }
+ else if (preg_match($keywords_pattern, $value))
+ {
+ $operations[] = $key;
+ }
}
}
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index a8e12c4063..fefef39c51 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -149,6 +149,16 @@ class path_helper
$script_name = $this->symfony_request->getScriptName();
/*
+ * If the path info is empty but we're using app.php, then we
+ * might be using an empty route like app.php/ which is
+ * supported by symfony's routing
+ */
+ if ($path_info === '/' && preg_match('/app\.' . $this->php_ext . '\/$/', $request_uri))
+ {
+ return $this->web_root_path = $this->phpbb_root_path . '../';
+ }
+
+ /*
* If the path info is empty (single /), then we're not using
* a route like app.php/foo/bar
*/
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f592402fc6..ed1268e84b 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -52,7 +52,7 @@ $current_time = time();
/**
* This event allows you to alter the above parameters, such as submit and mode
-*
+*
* Note: $refresh must be true to retain previously submitted form data.
*
* Note: The template class will not work properly until $user->setup() is
@@ -74,7 +74,7 @@ $current_time = time();
* viewtopic or viewforum depending on if the user
* is posting a new topic or editing a post)
* @var bool refresh Whether or not to retain previously submitted data
-* @var string mode What action to take if the form has been sumitted
+* @var string mode What action to take if the form has been submitted
* post|reply|quote|edit|delete|bump|smilies|popup
* @var array error Any error strings; a non-empty array aborts
* form submission.
@@ -1548,9 +1548,21 @@ $template->assign_vars(array(
* This event allows you to modify template variables for the posting screen
*
* @event core.posting_modify_template_vars
+* @var array post_data Array with post data
+* @var array moderators Array with forum moderators
+* @var string mode What action to take if the form is submitted
+* post|reply|quote|edit|delete|bump|smilies|popup
+* @var string page_title Title of the mode page
+* @var bool s_topic_icons Whether or not to show the topic icons
+* @var string form_enctype If attachments are allowed for this form the value of
+* this is "multipart/form-data" else it is the empty string
+* @var string s_action The URL to submit the POST data to
+* @var string s_hidden_fields The concatenated input tags of the form's hidden fields
* @since 3.1-A1
+* @change 3.1.0-b3 Added vars post_data, moderators, mode, page_title, s_topic_icons, form_enctype, s_action, s_hidden_fields
*/
-$phpbb_dispatcher->dispatch('core.posting_modify_template_vars');
+$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons', 'form_enctype', 's_action', 's_hidden_fields');
+extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars)));
// Build custom bbcodes array
display_custom_bbcodes();
diff --git a/phpBB/search.php b/phpBB/search.php
index 4756a941f5..fbb4e93089 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -108,7 +108,7 @@ if ($interval && !in_array($search_id, array('unreadposts', 'unanswered', 'activ
if ($user->data['user_last_search'] > time() - $interval)
{
$template->assign_var('S_NO_SEARCH', true);
- trigger_error('NO_SEARCH_TIME');
+ trigger_error($user->lang('NO_SEARCH_TIME', (int) ($user->data['user_last_search'] + $interval - time())));
}
}
@@ -561,9 +561,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
// define some vars for urls
- $hilit = implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')', '&quot;'), ' ', $keywords))));
- // Do not allow *only* wildcard being used for hilight
- $hilit = (strspn($hilit, '*') === strlen($hilit)) ? '' : $hilit;
+ // A single wildcard will make the search results look ugly
+ $hilit = phpbb_clean_search_string(str_replace(array('+', '-', '|', '(', ')', '&quot;'), ' ', $keywords));
+ $hilit = str_replace(' ', '|', $hilit);
$u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
$u_show_results = '&amp;sr=' . $show_results;
@@ -850,7 +850,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$hilit_array = array_filter(explode('|', $hilit), 'strlen');
foreach ($hilit_array as $key => $value)
{
- $hilit_array[$key] = str_replace('\*', '\w*?', preg_quote($value, '#'));
+ $hilit_array[$key] = phpbb_clean_search_string($value);
+ $hilit_array[$key] = str_replace('\*', '\w*?', preg_quote($hilit_array[$key], '#'));
$hilit_array[$key] = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $hilit_array[$key]);
}
$hilit = implode('|', $hilit_array);
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index d2a070d11b..4df38f4275 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -244,10 +244,12 @@ phpbb.addAjaxCallback('vote_poll', function(res) {
var option = $(this);
var option_id = option.attr('data-poll-option-id');
var voted = (typeof res.user_votes[option_id] !== 'undefined') ? true : false;
+ var most_voted = (res.vote_counts[option_id] == most_votes) ? true : false;
var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[option_id] / res.total_votes) * 100);
var percent_rel = (most_votes == 0) ? 0 : Math.round((res.vote_counts[option_id] / most_votes) * 100);
option.toggleClass('voted', voted);
+ option.toggleClass('most-votes', most_voted);
// Update the bars
var bar = option.find('.resultbar div');
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 56dfcb04c7..1594d73517 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -92,23 +92,6 @@ function viewableArea(e, itself) {
}
/**
-* Set display of page element
-* s[-1,0,1] = hide,toggle display,show
-* type = string: inline, block, inline-block or other CSS "display" type
-*/
-function dE(n, s, type) {
- if (!type) {
- type = 'block';
- }
-
- var e = document.getElementById(n);
- if (!s) {
- s = (e.style.display === '' || e.style.display === type) ? -1 : 1;
- }
- e.style.display = (s === 1) ? type : 'none';
-}
-
-/**
* Alternate display of subPanels
*/
jQuery(document).ready(function() {
diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html
index 32cbecdf8c..0bc67a4417 100644
--- a/phpBB/styles/prosilver/template/navbar_footer.html
+++ b/phpBB/styles/prosilver/template/navbar_footer.html
@@ -2,7 +2,9 @@
<div class="inner">
<ul class="linklist bulletin">
- <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>&#8249;</strong></span> <!-- ENDIF --><span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span>
+ <li class="small-icon icon-home breadcrumbs">
+ <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a></span><!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span>
<!-- EVENT overall_footer_breadcrumb_append -->
</li>
<!-- IF not S_IS_BOT -->
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index 259aec75ed..d10976c0da 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -3,9 +3,10 @@
<ul class="linklist navlinks">
<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
- <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>&#8249;</strong></span> <!-- ENDIF -->
- <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span>
- <!-- BEGIN navlinks --> <span class="crumb"><strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- END navlinks -->
+ <li class="small-icon icon-home breadcrumbs">
+ <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a></span><!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span>
+ <!-- BEGIN navlinks --><span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- END navlinks -->
<!-- EVENT overall_header_breadcrumb_append -->
</li>
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 1164b2ffbe..3dad6606bb 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -34,7 +34,7 @@
function change_palette()
{
- dE('colour_palette');
+ phpbb.toggleDisplay('colour_palette');
e = document.getElementById('colour_palette');
if (e.style.display == 'block')
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
index a5b4852af8..d07aab1a89 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -66,7 +66,7 @@
<dl>
<dt><label for="dateformat">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
<dd>
- <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
+ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
</select>
</dd>
@@ -109,11 +109,11 @@
// Show/hide custom field
if (e.selectedIndex == e.length - 1)
{
- dE('custom_date',1);
+ phpbb.toggleDisplay('custom_date',1);
}
else
{
- dE('custom_date',-1);
+ phpbb.toggleDisplay('custom_date',-1);
}
}
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 4e3561c4a2..649129923a 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -72,7 +72,7 @@
<fieldset class="polls">
<!-- BEGIN poll_option -->
- <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}">
+ <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}">
<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
<!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
<dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 298d310ab1..3d5a0a433d 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -433,11 +433,11 @@ ul.linklist.bulletin li:before {
}
ul.linklist.bulletin li:first-child:before, ul.linklist.bulletin li.rightside:last-child:before {
- display: none;
+ content: none;
}
ul.linklist.bulletin li.no-bulletin:before {
- display: none;
+ content: none;
}
.responsive-menu:before {
@@ -597,9 +597,20 @@ ul.linklist.bulletin li.no-bulletin:before {
/* Responsive breadcrumbs
----------------------------------------*/
.breadcrumbs .crumb {
+ float: left;
word-wrap: normal;
}
+.breadcrumbs .crumb:before {
+ content: '‹';
+ font-weight: bold;
+ padding: 0 0.5em;
+}
+
+.breadcrumbs .crumb:first-child:before {
+ content: none;
+}
+
.breadcrumbs .crumb a {
display: inline-block;
white-space: nowrap;
@@ -1078,7 +1089,7 @@ form > p.post-notice strong {
.dropdown-extended .footer {
text-align: center;
- font-size: 1.2em;
+ font-size: 1.1em;
}
.dropdown-extended ul li a, .notification_list dt > a, .dropdown-extended .footer > a {
@@ -1096,6 +1107,7 @@ form > p.post-notice strong {
.notification_list ul li p {
margin: 0;
+ font-size: 1em;
}
.notification_list div.notifications {
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index 64d2df2d1a..88f2bd65c5 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -284,7 +284,7 @@ fieldset.submit-buttons input {
input.inputbox { width: 85%; }
input.medium { width: 50%; }
input.narrow { width: 25%; }
-input.tiny { width: 125px; }
+input.tiny { width: 150px; }
textarea.inputbox {
width: 85%;
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
index cd5fc9a13f..93fcfac5b1 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -2,20 +2,6 @@
<script type="text/javascript">
// <![CDATA[
- /**
- * Set display of page element
- * s[-1,0,1] = hide,toggle display,show
- */
- function dE(n,s)
- {
- var e = document.getElementById(n);
- if (!s)
- {
- s = (e.style.display == '') ? -1 : 1;
- }
- e.style.display = (s == 1) ? 'block' : 'none';
- }
-
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
// ]]>
</script>
@@ -70,7 +56,7 @@
<tr>
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}{L_COLON}</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
- <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
+ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
</select>
<div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index a5a50780fe..307ed0f391 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -80,7 +80,7 @@
<!-- BEGIN poll_option -->
<tr>
<!-- IF S_CAN_VOTE -->
- <td>
+ <td<!-- IF poll_option.POLL_OPTION_MOST_VOTES --> class="most-votes"<!-- ENDIF -->>
<!-- IF S_IS_MULTI_CHOICE -->
<input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
<!-- ELSE -->
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 4da0267284..a7396f9c72 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -653,6 +653,18 @@ $template->assign_vars(array(
$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
$topic_tracking_info = $tracking_topics = array();
+/**
+* Modify topics data before we display the viewforum page
+*
+* @event core.viewforum_modify_topics_data
+* @var array topic_list Array with current viewforum page topic ids
+* @var array rowset Array with topics data (in topic_id => topic_data format)
+* @var int total_topic_count Forum's total topic count
+* @since 3.1.0-b3
+*/
+$vars = array('topic_list', 'rowset', 'total_topic_count');
+extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topics_data', compact($vars)));
+
// Okay, lets dump out the page ...
if (sizeof($topic_list))
{
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 1a74ad3e38..9dc965240f 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -422,17 +422,11 @@ else
$highlight_match = $highlight = '';
if ($hilit_words)
{
- foreach (explode(' ', trim($hilit_words)) as $word)
- {
- if (trim($word))
- {
- $word = str_replace('\*', '\w+?', preg_quote($word, '#'));
- $word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
- $highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
- }
- }
-
- $highlight = urlencode($hilit_words);
+ $highlight_match = phpbb_clean_search_string($hilit_words);
+ $highlight = urlencode($highlight_match);
+ $highlight_match = str_replace('\*', '\w+?', preg_quote($highlight_match, '#'));
+ $highlight_match = preg_replace('#(?<=^|\s)\\\\w\*\?(?=\s|$)#', '\w+?', $highlight_match);
+ $highlight_match = str_replace(' ', '|', $highlight_match);
}
// Make sure $start is set to the last page if it exceeds the amount
@@ -864,6 +858,7 @@ if (!empty($topic_data['poll_start']))
$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
$option_pct_rel = ($poll_most > 0) ? $poll_option['poll_option_total'] / $poll_most : 0;
$option_pct_rel_txt = sprintf("%.1d%%", round($option_pct_rel * 100));
+ $option_most_votes = ($poll_option['poll_option_total'] > 0 && $poll_option['poll_option_total'] == $poll_most) ? true : false;
$template->assign_block_vars('poll_option', array(
'POLL_OPTION_ID' => $poll_option['poll_option_id'],
@@ -874,6 +869,7 @@ if (!empty($topic_data['poll_start']))
'POLL_OPTION_PCT' => round($option_pct * 100),
'POLL_OPTION_WIDTH' => round($option_pct * 250),
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false,
+ 'POLL_OPTION_MOST_VOTES' => $option_most_votes,
));
}
@@ -1674,15 +1670,18 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* @var int start Start item of this page
* @var int current_row_number Number of the post on this page
* @var int end Number of posts on this page
+ * @var int total_posts Total posts count
* @var array row Array with original post and user data
* @var array cp_row Custom profile field data of the poster
* @var array attachments List of attachments
* @var array user_poster_data Poster's data from user cache
* @var array post_row Template block array of the post
+ * @var array topic_data Array with topic data
* @since 3.1-A1
* @change 3.1.0-a3 Added vars start, current_row_number, end, attachments
+ * @change 3.1.0-b3 Added topic_data array, total_posts
*/
- $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
+ $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row', 'topic_data');
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars)));
$i = $current_row_number;
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index 24366992d5..087250157d 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -57,7 +57,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
$this->assertContains('Re: Download Topic #1-#2', $crawler->filter('html')->text());
- $this->data['posts']['Re: Download Topic #1-#2'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->eq(1)->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+ $this->data['posts']['Re: Download Topic #1-#2'] = (int) $post2['post_id'];
}
public function test_download_accessible()
diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php
index 91f14cb75d..b0e4743d5b 100644
--- a/tests/functional/paging_test.php
+++ b/tests/functional/paging_test.php
@@ -18,22 +18,22 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case
$this->login();
$post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.');
- for ($post_id = 1; $post_id <= 11; $post_id++)
+ for ($post_id = 1; $post_id <= 16; $post_id++)
{
$this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.');
}
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
- $this->assertContains('post no9', $crawler->text());
- $this->assertNotContains('post no11', $crawler->text());
+ $this->assertContains('post no4', $crawler->text());
+ $this->assertNotContains('post no16', $crawler->text());
$next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href');
$crawler = self::request('GET', $next_link);
- $this->assertContains('post no11', $crawler->text());
- $this->assertNotContains('post no9', $crawler->text());
+ $this->assertNotContains('post no4', $crawler->text());
+ $this->assertContains('post no16', $crawler->text());
$prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href');
$crawler = self::request('GET', $prev_link);
- $this->assertContains('post no9', $crawler->text());
- $this->assertNotContains('post no11', $crawler->text());
+ $this->assertContains('post no4', $crawler->text());
+ $this->assertNotContains('post no16', $crawler->text());
}
}
diff --git a/tests/functional/prune_shadow_topic_test.php b/tests/functional/prune_shadow_topic_test.php
index 901cedb389..a9fd2457bb 100644
--- a/tests/functional/prune_shadow_topic_test.php
+++ b/tests/functional/prune_shadow_topic_test.php
@@ -76,7 +76,7 @@ class phpbb_functional_prune_shadow_topic_test extends phpbb_functional_test_cas
$crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
$this->assertContains('Re: Prune Shadow #1-#2', $crawler->filter('html')->text());
- $this->data['posts']['Re: Prune Shadow #1-#2'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->eq(1)->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+ $this->data['posts']['Re: Prune Shadow #1-#2'] = (int) $post2['post_id'];
$this->assert_forum_details($this->data['forums']['Prune Shadow'], array(
'forum_posts_approved' => 2,
diff --git a/tests/functional/softdelete_test.php b/tests/functional/softdelete_test.php
index bd4d34cf99..1c86d00b9b 100644
--- a/tests/functional/softdelete_test.php
+++ b/tests/functional/softdelete_test.php
@@ -83,7 +83,7 @@ class phpbb_functional_softdelete_test extends phpbb_functional_test_case
$crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
$this->assertContains('Re: Soft Delete Topic #1-#2', $crawler->filter('html')->text());
- $this->data['posts']['Re: Soft Delete Topic #1-#2'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->eq(1)->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+ $this->data['posts']['Re: Soft Delete Topic #1-#2'] = (int) $post2['post_id'];
$this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
'forum_posts_approved' => 2,
@@ -410,7 +410,7 @@ class phpbb_functional_softdelete_test extends phpbb_functional_test_case
$crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
$this->add_lang('mcp');
- $form = $crawler->selectButton($this->lang('RESTORE'))->form();
+ $form = $crawler->filter('#p' . $this->data['posts']['Soft Delete Topic #1'])->selectButton($this->lang('RESTORE'))->form();
$crawler = self::submit($form);
$this->assertContainsLang('RESTORE_POST', $crawler->text());
diff --git a/tests/functions_content/phpbb_clean_search_string_test.php b/tests/functions_content/phpbb_clean_search_string_test.php
new file mode 100644
index 0000000000..de642c9040
--- /dev/null
+++ b/tests/functions_content/phpbb_clean_search_string_test.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+
+class phpbb_functions_content_phpbb_clean_search_string_test extends phpbb_test_case
+{
+ public function phpbb_clean_search_string_data()
+ {
+ return array(
+ array('*', ''),
+ array('* *', ''),
+ array('test', 'test'),
+ array(' test ', 'test'),
+ array(' test * ', 'test'),
+ array('test* *', 'test*'),
+ array('* *test*', '*test*'),
+ array('test test * test', 'test test test'),
+ array(' some wild*cards * between wo*rds ', 'some wild*cards between wo*rds'),
+ array(' we * now have*** multiple wild***cards * ', 'we now have* multiple wild*cards'),
+ array('pi is *** . * **** * *****', 'pi is .'),
+ );
+ }
+
+ /**
+ * @dataProvider phpbb_clean_search_string_data
+ */
+ public function test_phpbb_clean_search_string($search_string, $expected)
+ {
+ $this->assertEquals($expected, phpbb_clean_search_string($search_string));
+ }
+}
diff --git a/tests/log/fixtures/full_log.xml b/tests/log/fixtures/full_log.xml
index a10c224e0e..4e5538d5a9 100644
--- a/tests/log/fixtures/full_log.xml
+++ b/tests/log/fixtures/full_log.xml
@@ -119,6 +119,18 @@
<value>LOG_USER</value>
<value>a:1:{i:0;s:5:"guest";}</value>
</row>
+ <row>
+ <value>10</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_SINGULAR_PLURAL</value>
+ <value>a:1:{i:0;i:2;}</value>
+ </row>
</table>
<table name="phpbb_users">
<column>user_id</column>
diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php
index 9148d23bb4..2f64459062 100644
--- a/tests/log/function_view_log_test.php
+++ b/tests/log/function_view_log_test.php
@@ -164,7 +164,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'topic_id' => 45,
'viewforum' => '',
- 'action' => '{LOG MOD2}',
+ 'action' => 'LOG_MOD2',
'viewtopic' => '',
'viewlogs' => '',
),
@@ -185,7 +185,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'topic_id' => 0,
'viewforum' => '',
- 'action' => '{LOG USER}<br />admin',
+ 'action' => 'LOG_USER admin',
),
9 => array(
'id' => 9,
@@ -204,7 +204,26 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'topic_id' => 0,
'viewforum' => '',
- 'action' => '{LOG USER}<br />guest',
+ 'action' => 'LOG_USER guest',
+ ),
+ 10 => array(
+ 'id' => 10,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => 'LOG_SINGULAR_PLURAL 2',
),
);
@@ -277,10 +296,20 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user', 0, 5, 0, 0, 0, 2,
),
array(
- 'expected' => array(8, 9),
+ 'expected' => array(8, 9, 10),
'expected_returned' => 0,
'users', 0,
),
+ array(
+ 'expected' => array(1),
+ 'expected_returned' => 0,
+ 'admin', false, 5, 0, 0, 0, 0, 0, 'l.log_id ASC', 'install',
+ ),
+ array(
+ 'expected' => array(10),
+ 'expected_returned' => 0,
+ 'user', false, 5, 0, 0, 0, 0, 0, 'l.log_id ASC', 'plural',
+ ),
);
foreach ($test_cases as $case => $case_data)
@@ -331,6 +360,12 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
// Test sprintf() of the data into the action
$user->lang = array(
'LOG_INSTALL_INSTALLED' => 'installed: %s',
+ 'LOG_USER' => 'User<br /> %s',
+ 'LOG_MOD2' => 'Mod2',
+ 'LOG_SINGULAR_PLURAL' => array(
+ 1 => 'singular',
+ 2 => 'plural (%d)',
+ ),
);
$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
diff --git a/tests/path_helper/web_root_path_test.php b/tests/path_helper/web_root_path_test.php
index 2c22511402..ec04135997 100644
--- a/tests/path_helper/web_root_path_test.php
+++ b/tests/path_helper/web_root_path_test.php
@@ -116,6 +116,13 @@ class phpbb_path_helper_web_root_path_test extends phpbb_test_case
'/phpbb3-fork/phpBB/foo/template',
'/phpbb3-fork/phpBB/app.php',
),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . '../test.php',
+ '/',
+ '/phpbb3-fork/phpBB/app.php/',
+ '/phpbb3-fork/phpBB/app.php',
+ ),
);
}
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 1f372fff0c..95ed334ed0 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -522,8 +522,8 @@ class phpbb_functional_test_case extends phpbb_test_case
'user_email' => 'nobody@example.com',
'user_type' => 0,
'user_lang' => 'en',
- 'user_timezone' => 0,
- 'user_dateformat' => '',
+ 'user_timezone' => 'UTC',
+ 'user_dateformat' => 'r',
'user_password' => $passwords_manager->hash($username . $username),
);
return user_add($user_row);