aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--phpBB/docs/events.md24
-rw-r--r--phpBB/includes/functions_mcp.php22
-rw-r--r--phpBB/includes/functions_user.php5
-rw-r--r--phpBB/language/en/email/short/newtopic_notify.txt2
-rw-r--r--phpBB/language/en/email/short/topic_notify.txt2
-rw-r--r--phpBB/styles/prosilver/template/search_results.html10
-rw-r--r--phpBB/styles/prosilver/theme/colours.css14
-rw-r--r--phpBB/styles/subsilver2/template/search_results.html6
-rw-r--r--tests/functional/download_test.php15
-rw-r--r--tests/upload/filespec_test.php5
11 files changed, 96 insertions, 15 deletions
diff --git a/README.md b/README.md
index e6fb17f95f..1770a0b7c8 100644
--- a/README.md
+++ b/README.md
@@ -27,9 +27,9 @@ To be able to run an installation from the repo (and not from a pre-built packag
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
-* develop [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb)
-* develop-ascraeus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-ascraeus)](http://travis-ci.org/phpbb/phpbb)
-* develop-olympus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb)
+* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=master)](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
+* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
+* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.0.x)](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x
## LICENSE
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 8bede0c89a..08b9d2cd18 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -980,6 +980,22 @@ quickreply_editor_message_before
* Since: 3.1.0-a4
* Purpose: Add content before the quick reply textbox
+search_results_header_after
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/subsilver2/template/search_results.html
+* Since: 3.1.4-RC1
+* Purpose: Add content after the header of the search results
+
+search_results_header_before
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/subsilver2/template/search_results.html
+* Since: 3.1.4-RC1
+* Purpose: Add content before the header of the search results.
+
search_results_post_after
===
* Locations:
@@ -1010,6 +1026,14 @@ search_results_postprofile_before
* Since: 3.1.0-b3
* Purpose: Add content directly before the post author in search results (posts view mode)
+search_results_searchbox_after
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/subsilver2/template/search_results.html
+* Since: 3.1.4-RC1
+* Purpose: Add content right after the searchbox of the search results.
+
search_results_topic_after
===
* Locations:
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index 811d49f1de..4a03ea8f13 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -423,6 +423,28 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
AND t.topic_id = p.topic_id
AND t.topic_visibility <> p.post_visibility';
+ /**
+ * This event allows you to control the SQL query to retrieve the list of unapproved and deleted posts
+ *
+ * @event core.mcp_sorting_unapproved_deleted_posts_query_before
+ * @var string sql The current SQL search string
+ * @var int forum_id The forum id of the posts the user is trying to access
+ * @var int topic_id The topic id of the posts the user is trying to access
+ * @var int min_time Integer with the minimum post time that the user is searching for
+ * @var int visibility_const Integer with one of the possible ITEM_* constant values
+ * @var string where_sql Extra information included in the WHERE clause. It must end with "WHERE" or "AND" or "OR"
+ * @since 3.1.4-RC1
+ */
+ $vars = array(
+ 'sql',
+ 'forum_id',
+ 'topic_id',
+ 'min_time',
+ 'visibility_const',
+ 'where_sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_sorting_unapproved_deleted_posts_query_before', compact($vars)));
+
if ($min_time)
{
$sql .= ' AND post_time >= ' . $min_time;
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index acf5649ed5..9cd662027e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -398,7 +398,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
*/
function user_delete($mode, $user_ids, $retain_username = true)
{
- global $cache, $config, $db, $user, $phpbb_dispatcher;
+ global $cache, $config, $db, $user, $phpbb_dispatcher, $phpbb_container;
global $phpbb_root_path, $phpEx;
$db->sql_transaction('begin');
@@ -672,6 +672,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
}
phpbb_delete_users_pms($user_ids);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_ids);
+
$db->sql_transaction('commit');
/**
diff --git a/phpBB/language/en/email/short/newtopic_notify.txt b/phpBB/language/en/email/short/newtopic_notify.txt
index bf6799e5be..5089e7dcb8 100644
--- a/phpBB/language/en/email/short/newtopic_notify.txt
+++ b/phpBB/language/en/email/short/newtopic_notify.txt
@@ -2,7 +2,7 @@ Subject: New topic notification - "{FORUM_NAME}"
Hello {USERNAME},
-You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
+You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
{U_FORUM}
diff --git a/phpBB/language/en/email/short/topic_notify.txt b/phpBB/language/en/email/short/topic_notify.txt
index 472375fb22..529478eae2 100644
--- a/phpBB/language/en/email/short/topic_notify.txt
+++ b/phpBB/language/en/email/short/topic_notify.txt
@@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}"
Hello {USERNAME},
-You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
+You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
If you want to view the newest post made since your last visit, click the following link:
{U_NEWEST_POST}
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index 970a7bcdd1..2767eb85a3 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -1,16 +1,20 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT search_results_header_before -->
+
<h2 class="searchresults-title"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_COLON} <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
<!-- IF SEARCHED_QUERY --> <p>{L_SEARCHED_QUERY}{L_COLON} <strong>{SEARCHED_QUERY}</strong></p><!-- ENDIF -->
<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}{L_COLON} <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->
<!-- IF PHRASE_SEARCH_DISABLED --> <p><strong>{L_PHRASE_SEARCH_DISABLED}</strong></p><!-- ENDIF -->
<!-- IF SEARCH_TOPIC -->
- <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO_TOPIC}</a></p>
+ <p class="return-link"><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO_TOPIC}</a></p>
<!-- ELSE -->
- <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_GO_TO_SEARCH_ADV}</a></p>
+ <p class="advanced-search-link"><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_GO_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->
+<!-- EVENT search_results_header_after -->
+
<!-- IF .pagination or SEARCH_MATCHES or TOTAL_MATCHES or PAGE_NUMBER -->
<div class="action-bar top">
@@ -26,6 +30,8 @@
</div>
<!-- ENDIF -->
+ <!-- EVENT search_results_searchbox_after -->
+
<div class="pagination">
{SEARCH_MATCHES}
<!-- IF .pagination -->
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index d094a1beff..4743b4b39b 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -96,7 +96,9 @@ table.zebra-list tr:nth-child(even) td, ul.zebra-list li:nth-child(even) {
background-color: #e1ebf2;
}
-.bg3 { background-color: #cadceb; }
+.bg3 {
+ background-color: #cadceb;
+}
.ucprowbg {
background-color: #DCDEE2;
@@ -164,9 +166,9 @@ dl.details dd {
---------------------------------------- */
.pagination li a {
- color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
+ color: #5C758C;
}
.pagination li.ellipsis span {
@@ -175,14 +177,14 @@ dl.details dd {
}
.pagination li.active span {
- color: #FFFFFF;
background-color: #4692BF;
border-color: #4692BF;
+ color: #FFFFFF;
}
.pagination li a:hover, .pagination .dropdown-visible a.dropdown-trigger, .nojs .pagination .dropdown-container:hover a.dropdown-trigger {
- border-color: #368AD2;
background-color: #368AD2;
+ border-color: #368AD2;
color: #FFFFFF;
}
@@ -263,13 +265,13 @@ a:hover { color: #D31141; }
/* Post body links */
.postlink {
- color: #368AD2;
border-bottom-color: #368AD2;
+ color: #368AD2;
}
.postlink:visited {
- color: #5D8FBD;
border-bottom-color: #5D8FBD;
+ color: #5D8FBD;
}
.postlink:hover {
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html
index 23d0b3a146..6f651b2618 100644
--- a/phpBB/styles/subsilver2/template/search_results.html
+++ b/phpBB/styles/subsilver2/template/search_results.html
@@ -1,5 +1,7 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT search_results_header_before -->
+
<form method="post" action="{S_SEARCH_ACTION}">
<table width="100%" cellspacing="1">
@@ -8,10 +10,12 @@
</tr>
<tr>
<td class="genmed"><!-- IF SEARCH_TOPIC -->{L_SEARCHED_TOPIC}{L_COLON} <a href="{U_SEARCH_TOPIC}"><b>{SEARCH_TOPIC}</b></a><br /><!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_SEARCHED_FOR}{L_COLON} <a href="{U_SEARCH_WORDS}"><b>{SEARCH_WORDS}</b></a><!-- ENDIF --><!-- IF IGNORED_WORDS --> {L_IGNORED_TERMS}{L_COLON} <b>{IGNORED_WORDS}</b><!-- ENDIF --></td>
- <td align="{S_CONTENT_FLOW_END}"><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}{L_COLON} </span><input class="post" type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- EVENT search_results_searchbox_after --><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}{L_COLON} </span><input class="post" type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
</tr>
</table>
+<!-- EVENT search_results_header_after -->
+
<br clear="all" />
<!-- IF S_SHOW_TOPICS -->
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index 4e4995c21e..1e863210e6 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -66,6 +66,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_accessible()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
@@ -118,6 +123,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_softdeleted_post()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
@@ -180,6 +190,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_softdeleted_topic()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index d8fa82e2b5..05547dcd00 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -266,6 +266,11 @@ class phpbb_filespec_test extends phpbb_test_case
*/
public function test_is_image_get_mimetype($filename, $mimetype, $expected)
{
+ if (!class_exists('finfo') && strtolower(substr(PHP_OS, 0, 3)) === 'win')
+ {
+ $this->markTestSkipped('Unable to test mimetype guessing without fileinfo support on Windows');
+ }
+
$filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename, 'type' => $mimetype));
$filespec->get_mimetype($this->path . $filename);
$this->assertEquals($expected, $filespec->is_image());