diff options
65 files changed, 1291 insertions, 216 deletions
diff --git a/.travis.yml b/.travis.yml index f1d194add7..3d79d156de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,23 +14,13 @@ services: - redis-server install: - - sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then travis/setup-php-extensions.sh; fi" - - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi" - - cd phpBB - - php ../composer.phar install --dev --no-interaction --prefer-source - - cd .. + - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION before_script: - - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" - - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' -a '$DB' = 'mysql' ]; then mysql -e 'SET GLOBAL storage_engine=MyISAM;'; fi" - - sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" + - travis/setup-database.sh $DB $TRAVIS_PHP_VERSION script: - - cd build - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi" - - cd .. + - travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION - phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi" diff --git a/build/build.xml b/build/build.xml index c1f81fb947..01fb48a383 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> - <property name="newversion" value="3.1.0-b3-dev" /> - <property name="prevversion" value="3.1.0-b2" /> - <property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1" /> + <property name="newversion" value="3.1.0-b4-dev" /> + <property name="prevversion" value="3.1.0-b3" /> + <property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 5d35666fdd..0e3b5ff3b2 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -331,15 +331,15 @@ <fieldset class="tabulated"> <legend>{L_TITLE}</legend> - <table class="table1 zebra-table"> + <table class="table1 zebra-table fixed-width-table"> <thead> <tr> <th>{L_FILENAME}</th> - <th>{L_FILEDATE}</th> - <th>{L_FILESIZE}</th> - <th>{L_ATTACH_POST_ID}</th> - <th>{L_ATTACH_TO_POST}</th> - <th>{L_DELETE}</th> + <th style="width: 15%;">{L_FILEDATE}</th> + <th style="width: 15%;">{L_FILESIZE}</th> + <th style="width: 15%;">{L_ATTACH_POST_ID}</th> + <th style="width: 15%;">{L_ATTACH_TO_POST}</th> + <th style="width: 15%;">{L_DELETE}</th> </tr> </thead> <tbody> @@ -348,7 +348,7 @@ <td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td> <td>{orphan.FILETIME}</td> <td>{orphan.FILESIZE}</td> - <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td> + <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" maxlength="10" value="{orphan.POST_ID}" style="width: 75%;" /></td> <td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td> <td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td> </tr> @@ -390,13 +390,13 @@ </div> <!-- IF .attachments --> - <table class="table1 zebra-table"> + <table class="table1 zebra-table fixed-width-table"> <thead> <tr> <th>{L_FILENAME}</th> - <th>{L_POSTED}</th> - <th class="centered-text">{L_FILESIZE}</th> - <th class="centered-text">{L_MARK}</th> + <th style="width: 15%;">{L_POSTED}</th> + <th style="width: 15%;" class="centered-text">{L_FILESIZE}</th> + <th style="width: 10%;" class="centered-text">{L_MARK}</th> </tr> </thead> <tbody> diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 9343b9b509..ec2065f906 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -22,15 +22,15 @@ <div><br style="clear: both;" /></div> <!-- IF .log --> - <table class="table1 zebra-table"> + <table class="table1 zebra-table fixed-width-table"> <thead> <tr> - <th>{L_USERNAME}</th> - <th>{L_IP}</th> - <th>{L_TIME}</th> + <th style="width: 15%;">{L_USERNAME}</th> + <th style="width: 15%;">{L_IP}</th> + <th style="width: 20%;">{L_TIME}</th> <th>{L_ACTION}</th> <!-- IF S_CLEARLOGS --> - <th>{L_MARK}</th> + <th style="width: 50px;">{L_MARK}</th> <!-- ENDIF --> </tr> </thead> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index b84e32013f..25064c6f3a 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -164,14 +164,14 @@ </div> <!-- IF .attach --> - <table class="table1 zebra-table"> + <table class="table1 zebra-table fixed-width-table"> <thead> <tr> <th>{L_FILENAME}</th> - <th>{L_POST_TIME}</th> - <th>{L_FILESIZE}</th> - <th>{L_DOWNLOADS}</th> - <th>{L_MARK}</th> + <th style="width: 20%;">{L_POST_TIME}</th> + <th style="width: 20%;">{L_FILESIZE}</th> + <th style="width: 20%;">{L_DOWNLOADS}</th> + <th style="width: 50px;">{L_MARK}</th> </tr> </thead> <tbody> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 6f2d65afc0..60a5cd9472 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -911,6 +911,11 @@ table.styles td.users, table td.mark { text-align: center; } +table.fixed-width-table { + table-layout: fixed; + word-break: break-word; +} + @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index a42701877b..f461d5a175 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -249,7 +249,16 @@ phpbb.ajaxify = function(options) { callback = options.callback, overlay = (typeof options.overlay !== 'undefined') ? options.overlay : true, isForm = elements.is('form'), - eventName = isForm ? 'submit' : 'click'; + isText = elements.is('input[type="text"], textarea'), + eventName; + + if (isForm) { + eventName = 'submit'; + } else if (isText) { + eventName = 'keyup'; + } else { + eventName = 'click'; + } elements.bind(eventName, function(event) { var action, method, data, submit, that = this, $this = $(this); @@ -349,6 +358,7 @@ phpbb.ajaxify = function(options) { // If the element is a form, POST must be used and some extra data must // be taken from the form. var runFilter = (typeof options.filter === 'function'); + var data = {}; if (isForm) { action = $this.attr('action').replace('&', '&'); @@ -362,33 +372,41 @@ phpbb.ajaxify = function(options) { value: submit.val() }); } + } else if (isText) { + var name = ($this.attr('data-name') !== undefined) ? $this.attr('data-name') : this['name']; + action = $this.attr('data-url').replace('&', '&'); + data[name] = this.value; + method = 'POST'; } else { action = this.href; data = null; method = 'GET'; } + var sendRequest = function() { + if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') === 'true')) { + phpbb.loadingIndicator(); + } + + var request = $.ajax({ + url: action, + type: method, + data: data, + success: returnHandler, + error: errorHandler + }); + request.always(function() { + loadingIndicator.fadeOut(phpbb.alertTime); + }); + }; + // If filter function returns false, cancel the AJAX functionality, // and return true (meaning that the HTTP request will be sent normally). - if (runFilter && !options.filter.call(this, data)) { + if (runFilter && !options.filter.call(this, data, event, sendRequest)) { return; } - if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') === 'true')) { - phpbb.loadingIndicator(); - } - - var request = $.ajax({ - url: action, - type: method, - data: data, - success: returnHandler, - error: errorHandler - }); - request.always(function() { - loadingIndicator.fadeOut(phpbb.alertTime); - }); - + sendRequest(); event.preventDefault(); }); @@ -404,6 +422,278 @@ phpbb.ajaxify = function(options) { return this; }; +phpbb.search = {cache: {data: []}, tpl: [], container: []}; + +/** + * Get cached search data. + * + * @param string id Search ID. + * @return bool|object. Cached data object. Returns false if no data exists. + */ +phpbb.search.cache.get = function(id) { + if (this.data[id]) { + return this.data[id]; + } + return false; +}; + +/** + * Set search cache data value. + * + * @param string id Search ID. + * @param string key Data key. + * @param string value Data value. + * + * @return undefined + */ +phpbb.search.cache.set = function(id, key, value) { + if (!this.data[id]) { + this.data[id] = {results: []}; + } + this.data[id][key] = value; +}; + +/** + * Cache search result. + * + * @param string id Search ID. + * @param string keyword Keyword. + * @param array results Search results. + * + * @return undefined + */ +phpbb.search.cache.setResults = function(id, keyword, value) { + this.data[id]['results'][keyword] = value; +}; + +/** + * Trim spaces from keyword and lower its case. + * + * @param string keyword Search keyword to clean. + * @return string Cleaned string. + */ +phpbb.search.cleanKeyword = function(keyword) { + return $.trim(keyword).toLowerCase(); +}; + +/** + * Get clean version of search keyword. If textarea supports several keywords + * (one per line), it fetches the current keyword based on the caret position. + * + * @param jQuery el Search input|textarea. + * @param string keyword Input|textarea value. + * @param bool multiline Whether textarea supports multiple search keywords. + * + * @return string Clean string. + */ +phpbb.search.getKeyword = function(el, keyword, multiline) { + if (multiline) { + var line = phpbb.search.getKeywordLine(el); + keyword = keyword.split("\n").splice(line, 1); + } + return phpbb.search.cleanKeyword(keyword); +}; + +/** + * Get the textarea line number on which the keyword resides - for textareas + * that support multiple keywords (one per line). + * + * @param jQuery el Search textarea. + * @return int + */ +phpbb.search.getKeywordLine = function (el) { + return el.val().substr(0, el.get(0).selectionStart).split("\n").length - 1; +}; + +/** + * Set the value on the input|textarea. If textarea supports multiple + * keywords, only the active keyword is replaced. + * + * @param jQuery el Search input|textarea. + * @param string value Value to set. + * @param bool multiline Whether textarea supports multiple search keywords. + * + * @return undefined + */ +phpbb.search.setValue = function(el, value, multiline) { + if (multiline) { + var line = phpbb.search.getKeywordLine(el), + lines = el.val().split("\n"); + lines[line] = value; + value = lines.join("\n"); + } + el.val(value); +}; + +/** + * Sets the onclick event to set the value on the input|textarea to the selected search result. + * + * @param jQuery el Search input|textarea. + * @param object value Result object. + * @param object container jQuery object for the search container. + * + * @return undefined + */ +phpbb.search.setValueOnClick = function(el, value, row, container) { + row.click(function() { + phpbb.search.setValue(el, value.result, el.attr('data-multiline')); + container.hide(); + }); +}; + +/** + * Runs before the AJAX search request is sent and determines whether + * there is a need to contact the server. If there are cached results + * already, those are displayed instead. Executes the AJAX request function + * itself due to the need to use a timeout to limit the number of requests. + * + * @param array data Data to be sent to the server. + * @param object event Onkeyup event object. + * @param function sendRequest Function to execute AJAX request. + * + * @return bool Returns false. + */ +phpbb.search.filter = function(data, event, sendRequest) { + var el = $(this), + dataName = (el.attr('data-name') !== undefined) ? el.attr('data-name') : el.attr('name'), + minLength = parseInt(el.attr('data-min-length')), + searchID = el.attr('data-results'), + keyword = phpbb.search.getKeyword(el, data[dataName], el.attr('data-multiline')), + cache = phpbb.search.cache.get(searchID), + proceed = true; + data[dataName] = keyword; + + if (cache['timeout']) { + clearTimeout(cache['timeout']); + } + + var timeout = setTimeout(function() { + // Check min length and existence of cache. + if (minLength > keyword.length) { + proceed = false; + } else if (cache['last_search']) { + // Has the keyword actually changed? + if (cache['last_search'] === keyword) { + proceed = false; + } else { + // Do we already have results for this? + if (cache['results'][keyword]) { + var response = {keyword: keyword, results: cache['results'][keyword]}; + phpbb.search.handleResponse(response, el, true); + proceed = false; + } + + // If the previous search didn't yield results and the string only had characters added to it, + // then we won't bother sending a request. + if (keyword.indexOf(cache['last_search']) === 0 && cache['results'][cache['last_search']].length === 0) { + phpbb.search.cache.set(searchID, 'last_search', keyword); + phpbb.search.cache.setResults(searchID, keyword, []); + proceed = false; + } + } + } + + if (proceed) { + sendRequest.call(this); + } + }, 350); + phpbb.search.cache.set(searchID, 'timeout', timeout); + + return false; +}; + +/** + * Handle search result response. + * + * @param object res Data received from server. + * @param jQuery el Search input|textarea. + * @param bool fromCache Whether the results are from the cache. + * @param function callback Optional callback to run when assigning each search result. + * + * @return undefined + */ +phpbb.search.handleResponse = function(res, el, fromCache, callback) { + if (typeof res !== 'object') { + return; + } + + var searchID = el.attr('data-results'), + container = $(searchID); + + if (this.cache.get(searchID)['callback']) { + callback = this.cache.get(searchID)['callback']; + } else if (typeof callback === 'function') { + this.cache.set(searchID, 'callback', callback); + } + + if (!fromCache) { + this.cache.setResults(searchID, res.keyword, res.results); + } + + this.cache.set(searchID, 'last_search', res.keyword); + this.showResults(res.results, el, container, callback); +}; + +/** + * Show search results. + * + * @param array results Search results. + * @param jQuery el Search input|textarea. + * @param jQuery container Search results container element. + * @param function callback Optional callback to run when assigning each search result. + * + * @return undefined + */ +phpbb.search.showResults = function(results, el, container, callback) { + var resultContainer = $('.search-results', container); + this.clearResults(resultContainer); + + if (!results.length) { + container.hide(); + return; + } + + var searchID = container.attr('id'), + tpl, + row; + + if (!this.tpl[searchID]) { + tpl = $('.search-result-tpl', container); + this.tpl[searchID] = tpl.clone().removeClass('search-result-tpl'); + tpl.remove(); + } + tpl = this.tpl[searchID]; + + $.each(results, function(i, item) { + row = tpl.clone(); + row.find('.search-result').html(item.display); + + if (typeof callback === 'function') { + callback.call(this, el, item, row, container); + } + row.appendTo(resultContainer).show(); + }); + container.show(); +}; + +/** + * Clear search results. + * + * @param jQuery container Search results container. + * @return undefined + */ +phpbb.search.clearResults = function(container) { + container.children(':not(.search-result-tpl)').remove(); +}; + +$('#phpbb').click(function(e) { + var target = $(e.target); + + if (!target.is('.live-search') && !target.parents().is('.live-search')) { + $('.live-search').hide(); + } +}); + /** * Hide the optgroups that are not the selected timezone * @@ -543,6 +833,12 @@ phpbb.addAjaxCallback = function(id, callback) { return this; }; +/** + * This callback handles live member searches. + */ +phpbb.addAjaxCallback('member_search', function(res) { + phpbb.search.handleResponse(res, $(this), false, phpbb.getFunctionByName('phpbb.search.setValueOnClick')); +}); /** * This callback alternates text - it replaces the current text with the text in @@ -1112,6 +1408,24 @@ phpbb.toggleDisplay = function(id, action, type) { } /** +* Get function from name. +* Based on http://stackoverflow.com/a/359910 +* +* @param string functionName Function to get. +* @return function +*/ +phpbb.getFunctionByName = function (functionName) { + var namespaces = functionName.split('.'), + func = namespaces.pop(), + context = window; + + for (var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } + return context[func]; +}; + +/** * Apply code editor to all textarea elements with data-bbcode attribute */ $(document).ready(function() { diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml index d12a1f8a37..00f025e141 100644 --- a/phpBB/config/profilefields.yml +++ b/phpBB/config/profilefields.yml @@ -4,6 +4,7 @@ services: arguments: - @auth - @dbal.conn + - @dispatcher - @request - @template - @profilefields.type_collection diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 90a2f3b187..fdd8a33135 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -95,6 +95,7 @@ services: - @user - @config - @controller.provider + - @ext.manager - %core.root_path% - %core.php_ext% @@ -107,8 +108,6 @@ services: controller.provider: class: phpbb\controller\provider - arguments: - - @ext.finder calls: - [find, [%core.root_path%]] @@ -175,16 +174,6 @@ services: - %core.php_ext% - @cache.driver - ext.finder: - class: phpbb\extension\finder - arguments: - - @ext.manager - - @filesystem - - %core.root_path% - - @cache.driver - - %core.php_ext% - - _ext_finder - filesystem: class: phpbb\filesystem @@ -217,7 +206,7 @@ services: kernel_request_subscriber: class: phpbb\event\kernel_request_subscriber arguments: - - @ext.finder + - @ext.manager - %core.root_path% - %core.php_ext% tags: diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 8499431f83..b1e85131f2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -46,6 +46,7 @@ <ol> <li><a href="#changelog">Changelog</a> <ol style="list-style-type: lower-roman;"> + <li><a href="#v310b2">Changes since 3.1.0-b2</a></li> <li><a href="#v310b1">Changes since 3.1.0-b1</a></li> <li><a href="#v310a3">Changes since 3.1.0-a3</a></li> <li><a href="#v310a2">Changes since 3.1.0-a2</a></li> @@ -91,7 +92,172 @@ <div class="content"> - <a name="v310b1"></a><h3>1.i. Changes since 3.1.0-b1</h3> + <a name="v310b2"></a><h3>1.i. Changes since 3.1.0-b2</h3> + + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7707">PHPBB3-7707</a>] - Missing occurrences of get_username_string</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8323">PHPBB3-8323</a>] - Banned User (PMs and Mails)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8558">PHPBB3-8558</a>] - Board Emails not setting a correct email header</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8700">PHPBB3-8700</a>] - Language file "acp/styles.php" contains many unused language entries</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8960">PHPBB3-8960</a>] - Allow changing allow_avatar_remote when images/avatars/upload is not writable</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10423">PHPBB3-10423</a>] - Searching for the term "test *" will highlight nearly every word and displays htmlspecialchars as htmlentities.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10687">PHPBB3-10687</a>] - UNABLE_GET_IMAGE_SIZE text misleading for remote avatars</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10851">PHPBB3-10851</a>] - HTML files containing certain tags being rejected as possible attack vectors with "Check attachment file" set to "No"</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11098">PHPBB3-11098</a>] - New persistent login keys list should have (un)select all and order options.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11339">PHPBB3-11339</a>] - Using AJAX calls one after another</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11352">PHPBB3-11352</a>] - Disapproving topic takes you to quick reply for that topic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11431">PHPBB3-11431</a>] - All topic notifications are deleted if one reply is edited and needs to be approved</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11508">PHPBB3-11508</a>] - General error "not allowed as quickmod" when changing the forum while merging two topics</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11772">PHPBB3-11772</a>] - New topic notification triggered when editing an existing post with post-approval enabled</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11860">PHPBB3-11860</a>] - .htaccess not working for Apache 2.4</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11881">PHPBB3-11881</a>] - Timezone migration can take a long time</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11917">PHPBB3-11917</a>] - "Manage external account" shows when not activated</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11978">PHPBB3-11978</a>] - Text field for topic-search</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12004">PHPBB3-12004</a>] - Support empty routes to app.php/ in path_helper</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12012">PHPBB3-12012</a>] - DB Tools should correctly remove columns that are part of indexes</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12043">PHPBB3-12043</a>] - Sort Extensions by Name in ACP Ext Mgr</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12052">PHPBB3-12052</a>] - Post edited by user on moderation queue is not marked as unapproved.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12083">PHPBB3-12083</a>] - "Select all" selects nothing in Webkit Browsers with only one character in [code] -</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12097">PHPBB3-12097</a>] - The validate_data() function doesn't work with class method</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12113">PHPBB3-12113</a>] - Deleting warnings does not use plurals correctly</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12121">PHPBB3-12121</a>] - Update process doesn't preserve total redirects for links</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12130">PHPBB3-12130</a>] - Bullet character disappears on mouse-over in IE8</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12186">PHPBB3-12186</a>] - MCP should open "Reported posts" instead of PM Reports</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12191">PHPBB3-12191</a>] - UCP should open with global settings instead of notification settings</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12193">PHPBB3-12193</a>] - Broken HTML when an SQL error occurs during migration</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12211">PHPBB3-12211</a>] - Attachment file names are run through htmlspecialchars twice</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12254">PHPBB3-12254</a>] - Language switching on Registration page doesn't work for Extensions</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12265">PHPBB3-12265</a>] - Contact profile fields icons should be hidden in a dropdown</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12286">PHPBB3-12286</a>] - Fix coding guidelines</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12331">PHPBB3-12331</a>] - Fix DB error in update_profile_field_data() with disabled fields</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12342">PHPBB3-12342</a>] - Javascript Bugs and Fixes</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12348">PHPBB3-12348</a>] - Make create_schema_files.php runnable when phpBB is not installed yet</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12350">PHPBB3-12350</a>] - tests/extension/modules_test.php can not be run alone</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12351">PHPBB3-12351</a>] - Ajax "Mark topics read" does not give feedback</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12353">PHPBB3-12353</a>] - User attachments in ACP are not displaying every attachment</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12354">PHPBB3-12354</a>] - passwords_manager_test::test_unique_id fails from time to time</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12355">PHPBB3-12355</a>] - Topic Tools not updated fully updated when subscribing/bookmarking</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12356">PHPBB3-12356</a>] - Plupload does not load in PM editor</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12358">PHPBB3-12358</a>] - data-refresh not working as expected for routes</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12359">PHPBB3-12359</a>] - Day and Month of Birthday Misaligned When Editing</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12360">PHPBB3-12360</a>] - User is displayed twice in online list after second login</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12362">PHPBB3-12362</a>] - Infinite loop in schema generator if dependency can't be resolved</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12367">PHPBB3-12367</a>] - Travis fails in phpbb_wrapper_gmgetdate_test::test_gmgetdate()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12372">PHPBB3-12372</a>] - dE() function does not toggle in ACP</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12373">PHPBB3-12373</a>] - Add to/from forum ids to LOG_MOVE entries </li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12375">PHPBB3-12375</a>] - Attachment deletion broken after jQuery update</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12378">PHPBB3-12378</a>] - Prosilver common.css has duplicate entries</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12379">PHPBB3-12379</a>] - Plupload labels duplicated when responsive</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12380">PHPBB3-12380</a>] - “Remember Me” login keys are not sorted in UCP</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12381">PHPBB3-12381</a>] - Broken error message when selecting invalid DB driver</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12382">PHPBB3-12382</a>] - Template event listners can not access subloops when loop is defined in the original file</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12386">PHPBB3-12386</a>] - Add DEBUG_EXTRA again and use it for container creation</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12388">PHPBB3-12388</a>] - Log entries without log_data display language key instead of translated string</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12391">PHPBB3-12391</a>] - core.posting_modify_template_vars pass some variables to listeners</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12395">PHPBB3-12395</a>] - Pagination tests fail on travis with postgresql</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12397">PHPBB3-12397</a>] - db_tools::sql_unique_index_exists() has wrong doc block</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12398">PHPBB3-12398</a>] - Prune shadow topics tests fail due to wrong forum_last_post_id</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12405">PHPBB3-12405</a>] - create_user() in functional tests uses invalid timezone and no dateformat</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12406">PHPBB3-12406</a>] - Fix description of page_title var in core.viewtopic_modify_page_title</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12412">PHPBB3-12412</a>] - Styling issue with pagination numbering for smilies and icons</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12413">PHPBB3-12413</a>] - Fatal error "Call to undefined method phpbb\feed\*::fetch_attachments()" for topic based feeds</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12418">PHPBB3-12418</a>] - Notice displayed for feed.php </li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12422">PHPBB3-12422</a>] - Log searches error due to plural arrays in language files</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12429">PHPBB3-12429</a>] - Update phpunit to 3.8+</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12432">PHPBB3-12432</a>] - Migrator should not automatically revert custom functions defined in update_data()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12436">PHPBB3-12436</a>] - Functional test framework's add_style() should not use sql_multi_insert()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12444">PHPBB3-12444</a>] - The logs message aren't filled correctly when some values are missing.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12455">PHPBB3-12455</a>] - Remove unused strings EXTENSION_CONTROLLER_MISSING and EXTENSION_CLASS_WRONG_TYPE from common.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12456">PHPBB3-12456</a>] - Missing new lines at the end of file in language files</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12467">PHPBB3-12467</a>] - Add config_*.php and tests_config_*.php to .gitignore</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12469">PHPBB3-12469</a>] - Convert Timezone test fails because of outdated schema</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12470">PHPBB3-12470</a>] - Move commands from .travis.yml to separate files to allow reuse</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12472">PHPBB3-12472</a>] - Set fast finish for .travis.yml</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12474">PHPBB3-12474</a>] - The console command for updating/migrating the db should display the error with the <error> tag</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12475">PHPBB3-12475</a>] - Undefined variable $log in db:migrate console command</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12477">PHPBB3-12477</a>] - PM link no longer displays in viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12478">PHPBB3-12478</a>] - ucp_pm_viewmessage_contact_fields_before/after missing in PM page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12480">PHPBB3-12480</a>] - \phpbb\extension\finder is finding too many routing files</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12482">PHPBB3-12482</a>] - Undefined variable: data in viewtopic when not logged in</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12485">PHPBB3-12485</a>] - Broken tests due to absolute exclude</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12494">PHPBB3-12494</a>] - Undefined index: user_type on viewtopic.php</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9758">PHPBB3-9758</a>] - Make users avatar available to the template</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10521">PHPBB3-10521</a>] - Override Board Language via URL</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11962">PHPBB3-11962</a>] - Resize images to 100% with in viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12150">PHPBB3-12150</a>] - Automatically prune shadow topics</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12201">PHPBB3-12201</a>] - Clean up ACP attachment management page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12273">PHPBB3-12273</a>] - Add a test to run the event exporter on travis</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12282">PHPBB3-12282</a>] - Add an interface for dbal driver to ensure that functions are there</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12283">PHPBB3-12283</a>] - Online status on posting review page.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12322">PHPBB3-12322</a>] - Add CSS classes for post-profile <dd> elements</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12323">PHPBB3-12323</a>] - Add Template Event search_results_author_prepend</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12327">PHPBB3-12327</a>] - Changing poll result-bars width from absolute % to relative</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12328">PHPBB3-12328</a>] - Add Template Event index_body_stat_blocks_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12329">PHPBB3-12329</a>] - Add <div> container to index blocks (online-list, birthday-list, statistics)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12333">PHPBB3-12333</a>] - Add Template Event overall_header_page_body_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12335">PHPBB3-12335</a>] - Add Events to phpbb\profilefields\manager (grab & show)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12336">PHPBB3-12336</a>] - Add functions_module.php core events to allow adjusting parameters for custom ACP, MCP, UCP modules</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12337">PHPBB3-12337</a>] - Update jQuery to version 1.11.0</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12338">PHPBB3-12338</a>] - Add Template Event overall_footer_page_body_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12339">PHPBB3-12339</a>] - Add Event core.page_header_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12344">PHPBB3-12344</a>] - Add event to submit_pm()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12345">PHPBB3-12345</a>] - Improve search flood interval message</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12346">PHPBB3-12346</a>] - Add Template Event overall_header_navlink_append/prepend</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12347">PHPBB3-12347</a>] - Move breadcrumb seperator from template to CSS</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12361">PHPBB3-12361</a>] - Replace the Google logo with the phpBB logo in the BBCode FAQ</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12364">PHPBB3-12364</a>] - Add template identifier var to all missing pages</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12365">PHPBB3-12365</a>] - Do not crop image attachment heights at 350px</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12366">PHPBB3-12366</a>] - Add Event core.search_get_posts_data</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12369">PHPBB3-12369</a>] - Add template variable for extensions to add classes to <body> element without JS</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12374">PHPBB3-12374</a>] - Add Template events index_body_block_<blockname>_append</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12376">PHPBB3-12376</a>] - Add template events viewtopic_body_polls</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12377">PHPBB3-12377</a>] - Move navbars to separate template files</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12389">PHPBB3-12389</a>] - Move "print topic" & "email topic" icons (and PM versions) to topic tools</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12392">PHPBB3-12392</a>] - Include $profile_fields in core.memberlist_view_profile event</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12396">PHPBB3-12396</a>] - Add Template events viewforum_forum_name_append/prepend</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12400">PHPBB3-12400</a>] - Add viewforum.php core event to allow modifying topics data before display the page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12401">PHPBB3-12401</a>] - Add $topic_data array to core.viewtopic_modify_post_row event in viewtopic.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12403">PHPBB3-12403</a>] - Add template events to acp_users_prefs.html</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12409">PHPBB3-12409</a>] - Add acp_users.php core events to modify users preferences data</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12410">PHPBB3-12410</a>] - Add Template events search_results_post_before/after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12411">PHPBB3-12411</a>] - Expand dispatch vars of event: core.search_modify_tpl_ary</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12419">PHPBB3-12419</a>] - Improve font size in notifications drop-down</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12437">PHPBB3-12437</a>] - Clean up redundant "clear" elements & "corners"</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12438">PHPBB3-12438</a>] - Add Template event memberlist_view_content_prepend</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12442">PHPBB3-12442</a>] - Add CSS classes to heading elements</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12473">PHPBB3-12473</a>] - Add console command for updating/migrating database</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12484">PHPBB3-12484</a>] - Template event ucp_agreement_terms_before/after</li> + </ul> + <h4>New Feature</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9728">PHPBB3-9728</a>] - Support for sqlite version 3</li> + </ul> + <h4>Sub-task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12349">PHPBB3-12349</a>] - License in migrations header not linking to version 2 of GNU GPL</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12370">PHPBB3-12370</a>] - Editing a post removes topic notifications</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12371">PHPBB3-12371</a>] - Notifications are incorrectly updated when a post is deleted or moved to ModerationQueue</li> + </ul> + <h4>Task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12071">PHPBB3-12071</a>] - Test suite fails if Fileinfo isn't installed</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12199">PHPBB3-12199</a>] - Move deprecated functions to functions_compatibility.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12318">PHPBB3-12318</a>] - Correctly setup HHVM functional tests on Travis CI</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12320">PHPBB3-12320</a>] - No longer allow Travis CI HHVM environment to fail</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12341">PHPBB3-12341</a>] - Add tests for get_username_string()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12390">PHPBB3-12390</a>] - Released packages MUST NOT contain vendor tests or other non-library code</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12417">PHPBB3-12417</a>] - hhvm-nightly 2014.04.16~precise breaks tests</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12423">PHPBB3-12423</a>] - Increase composer minimum-stability from beta to stable</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12424">PHPBB3-12424</a>] - Update Symfony Dependencies to latest 2.3 releaes</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12458">PHPBB3-12458</a>] - Apply Squiz.WhiteSpace.SuperfluousWhitespace.* sniffs to legacy codebase</li> + </ul> + + + <a name="v310b1"></a><h3>1.ii. Changes since 3.1.0-b1</h3> <h4>Bug</h4> <ul> @@ -159,7 +325,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12302">PHPBB3-12302</a>] - Upgrade composer.phar to 1.0.0-alpha8</li> </ul> - <a name="v310a3"></a><h3>1.ii. Changes since 3.1.0-a3</h3> + <a name="v310a3"></a><h3>1.iii. Changes since 3.1.0-a3</h3> <h4>Bug</h4> <ul> @@ -306,7 +472,7 @@ </ul> - <a name="v310a2"></a><h3>1.iii. Changes since 3.1.0-a2</h3> + <a name="v310a2"></a><h3>1.iv. Changes since 3.1.0-a2</h3> <h4>Bug</h4> <ul> @@ -414,7 +580,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12147">PHPBB3-12147</a>] - Remove Travis CI notification configuration</li> </ul> - <a name="v310a1"></a><h3>1.iv. Changes since 3.1.0-a1</h3> + <a name="v310a1"></a><h3>1.v. Changes since 3.1.0-a1</h3> <h4>Bug</h4> <ul> @@ -490,7 +656,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li> </ul> - <a name="v30x"></a><h3>1.v. Changes since 3.0.x</h3> + <a name="v30x"></a><h3>1.vi. Changes since 3.0.x</h3> <h4>Bug</h4> <ul> @@ -1171,7 +1337,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li> </ul> - <a name="v3011"></a><h3>1.vi. Changes since 3.0.11</h3> + <a name="v3011"></a><h3>1.vii. Changes since 3.0.11</h3> <h4>Bug</h4> <ul> @@ -1326,7 +1492,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li> </ul> - <a name="v3010"></a><h3>1.vii. Changes since 3.0.10</h3> + <a name="v3010"></a><h3>1.viii. Changes since 3.0.10</h3> <h4>Bug</h4> <ul> @@ -1451,7 +1617,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li> </ul> - <a name="v309"></a><h3>1.viii. Changes since 3.0.9</h3> + <a name="v309"></a><h3>1.ix. Changes since 3.0.9</h3> <h4>Bug</h4> <ul> @@ -1587,7 +1753,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li> </ul> - <a name="v308"></a><h3>1.ix. Changes since 3.0.8</h3> + <a name="v308"></a><h3>1.x. Changes since 3.0.8</h3> <h4> Bug </h4> @@ -1955,7 +2121,7 @@ </ul> - <a name="v307-PL1"></a><h3>1.x. Changes since 3.0.7-PL1</h3> + <a name="v307-PL1"></a><h3>1.xi. Changes since 3.0.7-PL1</h3> <h4> Security </h4> <ul> @@ -2413,13 +2579,13 @@ </ul> - <a name="v307"></a><h3>1.xi. Changes since 3.0.7</h3> + <a name="v307"></a><h3>1.xii. Changes since 3.0.7</h3> <ul> <li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li> </ul> - <a name="v306"></a><h3>1.xii. Changes since 3.0.6</h3> + <a name="v306"></a><h3>1.xiii. Changes since 3.0.6</h3> <ul> <li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li> @@ -2523,7 +2689,7 @@ </ul> - <a name="v305"></a><h3>1.xiii. Changes since 3.0.5</h3> + <a name="v305"></a><h3>1.xiv. Changes since 3.0.5</h3> <ul> <li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li> @@ -2745,7 +2911,7 @@ <li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li> </ul> - <a name="v304"></a><h3>1.xiv. Changes since 3.0.4</h3> + <a name="v304"></a><h3>1.xv. Changes since 3.0.4</h3> <ul> <li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li> @@ -2834,7 +3000,7 @@ <li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li> </ul> - <a name="v303"></a><h3>1.xv. Changes since 3.0.3</h3> + <a name="v303"></a><h3>1.xvi. Changes since 3.0.3</h3> <ul> <li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li> @@ -2866,7 +3032,7 @@ <li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li> </ul> - <a name="v302"></a><h3>1.xvi. Changes since 3.0.2</h3> + <a name="v302"></a><h3>1.xvii. Changes since 3.0.2</h3> <ul> <li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li> @@ -2965,7 +3131,7 @@ <li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li> </ul> - <a name="v301"></a><h3>1.xvii. Changes since 3.0.1</h3> + <a name="v301"></a><h3>1.xviii. Changes since 3.0.1</h3> <ul> <li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li> @@ -3013,7 +3179,7 @@ <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li> </ul> - <a name="v300"></a><h3>1.xviii. Changes since 3.0.0</h3> + <a name="v300"></a><h3>1.xix. Changes since 3.0.0</h3> <ul> <li>[Change] Validate birthdays (Bug #15004)</li> @@ -3084,7 +3250,7 @@ <li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li> </ul> - <a name="v30rc8"></a><h3>1.xix. Changes since 3.0.RC8</h3> + <a name="v30rc8"></a><h3>1.xx. Changes since 3.0.RC8</h3> <ul> <li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li> @@ -3093,7 +3259,7 @@ <li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li> </ul> - <a name="v30rc7"></a><h3>1.xx. Changes since 3.0.RC7</h3> + <a name="v30rc7"></a><h3>1.xxi. Changes since 3.0.RC7</h3> <ul> <li>[Fix] Fixed MSSQL related bug in the update system</li> @@ -3128,7 +3294,7 @@ <li>[Fix] No duplication of active topics (Bug #15474)</li> </ul> - <a name="v30rc6"></a><h3>1.xxi. Changes since 3.0.RC6</h3> + <a name="v30rc6"></a><h3>1.xxii. Changes since 3.0.RC6</h3> <ul> <li>[Fix] Submitting language changes using acp_language (Bug #14736)</li> @@ -3138,7 +3304,7 @@ <li>[Fix] Able to request new password (Bug #14743)</li> </ul> - <a name="v30rc5"></a><h3>1.xxii. Changes since 3.0.RC5</h3> + <a name="v30rc5"></a><h3>1.xxiii. Changes since 3.0.RC5</h3> <ul> <li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li> @@ -3201,7 +3367,7 @@ <li>[Sec] New password hashing mechanism for storing passwords (#i42)</li> </ul> - <a name="v30rc4"></a><h3>1.xxiii. Changes since 3.0.RC4</h3> + <a name="v30rc4"></a><h3>1.xxiv. Changes since 3.0.RC4</h3> <ul> <li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li> @@ -3252,7 +3418,7 @@ <li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li> </ul> - <a name="v30rc3"></a><h3>1.xxiv. Changes since 3.0.RC3</h3> + <a name="v30rc3"></a><h3>1.xxv. Changes since 3.0.RC3</h3> <ul> <li>[Fix] Fixing some subsilver2 and prosilver style issues</li> @@ -3361,7 +3527,7 @@ </ul> - <a name="v30rc2"></a><h3>1.xxv. Changes since 3.0.RC2</h3> + <a name="v30rc2"></a><h3>1.xxvi. Changes since 3.0.RC2</h3> <ul> <li>[Fix] Re-allow searching within the memberlist</li> @@ -3407,7 +3573,7 @@ </ul> - <a name="v30rc1"></a><h3>1.xxvi. Changes since 3.0.RC1</h3> + <a name="v30rc1"></a><h3>1.xxvii. Changes since 3.0.RC1</h3> <ul> <li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 1cc1300c05..18beb1c64a 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -186,6 +186,54 @@ forumlist_body_last_row_after * Since: 3.1.0-b2 * Purpose: Add content after the very last row of the forum list. +index_body_block_birthday_append +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Append content to the birthday list on the Board index + +index_body_block_birthday_prepend +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Prepend content to the birthday list on the Board index + +index_body_block_online_append +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Append content to the online list on the Board index + +index_body_block_online_prepend +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Prepend content to the online list on the Board index + +index_body_block_stats_append +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Append content to the statistics list on the Board index + +index_body_block_stats_prepend +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Since: 3.1.0-b3 +* Purpose: Prepend content to the statistics list on the Board index + index_body_linklist_after === * Locations: @@ -260,6 +308,14 @@ memberlist_view_content_append * Since: 3.1.0-b2 * Purpose: Add custom content to the user profile view after the main content +memberlist_view_content_prepend +=== +* Locations: + + styles/prosilver/template/memberlist_view.html + + styles/subsilver2/template/memberlist_view.html +* Since: 3.1.0-b3 +* Purpose: Add custom content to the user profile view before the main content + memberlist_view_user_statistics_after === * Locations: @@ -403,6 +459,22 @@ overall_header_navigation_prepend * Since: 3.1.0-a1 * Purpose: Add links before the navigation links in the header +overall_header_navlink_append +=== +* Locations: + + styles/prosilver/template/navbar_header.html + + styles/subsilver2/template/breadcrumbs.html +* Since: 3.1.0-b3 +* Purpose: Add content after each individual navlink (breadcrumb) + +overall_header_navlink_prepend +=== +* Locations: + + styles/prosilver/template/navbar_header.html + + styles/subsilver2/template/breadcrumbs.html +* Since: 3.1.0-b3 +* Purpose: Add content before each individual navlink (breadcrumb) + overall_header_page_body_before === * Locations: @@ -499,6 +571,36 @@ quickreply_editor_message_before * Since: 3.1.0-a4 * Purpose: Add content before the quick reply textbox +search_results_post_after +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/subsilver2/template/search_results.html +* Since: 3.1.0-b3 +* Purpose: Add data after search result posts + +search_results_post_before +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/subsilver2/template/search_results.html +* Since: 3.1.0-b3 +* Purpose: Add data before search result posts + +search_results_postprofile_after +=== +* Locations: + + styles/prosilver/template/search_results.html +* Since: 3.1.0-b3 +* Purpose: Add content after the post author and stats in search results (posts view mode) + +search_results_postprofile_before +=== +* Locations: + + styles/prosilver/template/search_results.html +* Since: 3.1.0-b3 +* Purpose: Add content directly before the post author in search results (posts view mode) + simple_footer_after === * Locations: @@ -535,6 +637,22 @@ topiclist_row_append * Since: 3.1.0-a1 * Purpose: Add content into topic rows (inside the elements containing topic titles) +ucp_agreement_terms_after +=== +* Locations: + + styles/prosilver/template/ucp_agreement.html + + styles/subsilver2/template/ucp_agreement.html +* Since: 3.1.0-b3 +* Purpose: Add content after the terms of agreement text at user registration + +ucp_agreement_terms_before +=== +* Locations: + + styles/prosilver/template/ucp_agreement.html + + styles/subsilver2/template/ucp_agreement.html +* Since: 3.1.0-b3 +* Purpose: Add content before the terms of agreement text at user registration + ucp_pm_viewmessage_contact_fields_after === * Locations: @@ -659,6 +777,22 @@ ucp_friend_list_after * Since: 3.1.0-a4 * Purpose: Add optional elements after list of friends in UCP +viewforum_forum_name_append +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-b3 +* Purpose: Add content directly after the forum name link on the View forum screen + +viewforum_forum_name_prepend +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-b3 +* Purpose: Add content directly before the forum name link on the View forum screen + viewtopic_print_head_append === * Locations: @@ -693,6 +827,40 @@ viewtopic_body_footer_before and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in Subsilver2. +viewtopic_body_poll_option_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-b3 +* Purpose: Add content after the poll option +the list. + +viewtopic_body_poll_option_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-b3 +* Purpose: Add content before the poll option +the list. + +viewtopic_body_poll_question_append +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-b3 +* Purpose: Add content directly after the poll question on the View topic screen + +viewtopic_body_poll_question_prepend +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-b3 +* Purpose: Add content directly before the poll question on the View topic screen + viewtopic_body_post_buttons_after === * Locations: @@ -769,6 +937,14 @@ viewtopic_body_topic_actions_before * Since: 3.1.0-a4 * Purpose: Add data before the topic actions buttons (after the posts sorting options) +viewtopic_topic_title_append +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-b3 +* Purpose: Add content directly after the topic title link on the View topic screen + viewtopic_topic_title_prepend === * Locations: diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 1aaf1f9c09..03d3e0f85f 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1222,7 +1222,7 @@ class acp_attachments 'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']), 'FILESIZE' => get_formatted_filesize((int) $row['filesize']), 'FILETIME' => $user->format_date((int) $row['filetime']), - 'REAL_FILENAME' => (!$row['in_message']) ? utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '<br />', true) : '', + 'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '', 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']), 'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '', 'COMMENT' => $comment, diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 6b52fbbdb2..cf0f23a16e 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -345,6 +345,7 @@ class acp_board 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_live_searches' => array('lang' => 'ALLOW_LIVE_SEARCHES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend3' => 'CUSTOM_PROFILE_FIELDS', 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 66d2e4bd81..77cb499533 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.0-b3-dev'); +define('PHPBB_VERSION', '3.1.0-b4-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 786003a9ff..3480a338c0 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4859,7 +4859,6 @@ function page_header($page_title = '', $display_online_list = false, $item_id = // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( - 'CURRENT_USER_AVATAR' => phpbb_get_user_avatar($user->data), 'SITENAME' => $config['sitename'], 'SITE_DESCRIPTION' => $config['site_desc'], 'PAGE_TITLE' => $page_title, @@ -4870,8 +4869,10 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => $l_online_record, - 'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0, + 'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0, + 'CURRENT_USER_AVATAR' => phpbb_get_user_avatar($user->data), + 'CURRENT_USERNAME_FULL' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'), @@ -4888,7 +4889,6 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'SESSION_ID' => $user->session_id, 'ROOT_PATH' => $web_path, 'BOARD_URL' => $board_url, - 'USERNAME_FULL' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'L_LOGIN_LOGOUT' => $l_login_logout, 'L_INDEX' => ($config['board_index_text'] !== '') ? $config['board_index_text'] : $user->lang['FORUM_INDEX'], diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php index 8e5ae20f93..cdbe60595c 100644 --- a/phpBB/includes/functions_url_matcher.php +++ b/phpBB/includes/functions_url_matcher.php @@ -22,22 +22,22 @@ if (!defined('IN_PHPBB')) /** * Create a new UrlMatcher class and dump it into the cache file * -* @param \phpbb\extension\finder $finder Extension finder +* @param \phpbb\extension\manager $manager Extension manager * @param RequestContext $context Symfony RequestContext object * @param string $root_path Root path * @param string $php_ext PHP extension * @return null */ -function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path, $php_ext) +function phpbb_get_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path, $php_ext) { if (defined('DEBUG')) { - return phpbb_create_url_matcher($finder, $context, $root_path); + return phpbb_create_url_matcher($manager, $context, $root_path); } if (!phpbb_url_matcher_dumped($root_path, $php_ext)) { - phpbb_create_dumped_url_matcher($finder, $root_path, $php_ext); + phpbb_create_dumped_url_matcher($manager, $root_path, $php_ext); } return phpbb_load_url_matcher($context, $root_path, $php_ext); @@ -46,14 +46,15 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $ /** * Create a new UrlMatcher class and dump it into the cache file * -* @param \phpbb\extension\finder $finder Extension finder +* @param \phpbb\extension\manager $manager Extension manager * @param string $root_path Root path * @param string $php_ext PHP extension * @return null */ -function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext) +function phpbb_create_dumped_url_matcher(\phpbb\extension\manager $manager, $root_path, $php_ext) { - $provider = new \phpbb\controller\provider($finder); + $provider = new \phpbb\controller\provider(); + $provider->find_routing_files($manager->get_finder()); $routes = $provider->find($root_path)->get_routes(); $dumper = new PhpMatcherDumper($routes); $cached_url_matcher_dump = $dumper->dump(array( @@ -66,13 +67,14 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_ /** * Create a non-cached UrlMatcher * -* @param \phpbb\extension\finder $finder Extension finder +* @param \phpbb\extension\manager $manager Extension manager * @param RequestContext $context Symfony RequestContext object * @return UrlMatcher */ -function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path) +function phpbb_create_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path) { - $provider = new \phpbb\controller\provider($finder); + $provider = new \phpbb\controller\provider(); + $provider->find_routing_files($manager->get_finder()); $routes = $provider->find($root_path)->get_routes(); return new UrlMatcher($routes, $context); } diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 926f139da4..5f672ca092 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -33,7 +33,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-b2', + 'phpbb_version' => '3.1.0-b3', 'author' => '<a href="https://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index fbf1374346..0f9976a96b 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -21,6 +21,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_live_searches', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0'); @@ -270,7 +271,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-b3-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-b4-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index e21d959e40..505709d513 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -356,6 +356,8 @@ $lang = array_merge($lang, array( 'ALLOW_CDN' => 'Allow usage of third party content delivery networks', 'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Google’s content delivery network.', + 'ALLOW_LIVE_SEARCHES' => 'Allow live searches', + 'ALLOW_LIVE_SEARCHES_EXPLAIN' => 'If this setting is enabled, users are provided with keyword suggestions as they type in certain fields throughout the board.', 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields', 'LIMIT_LOAD' => 'Limit system load', 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index dc42693ca7..ab4db02053 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -68,8 +68,8 @@ $lang = array_merge($lang, array( 'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration.', 'DISPLAY_ON_MEMBERLIST' => 'Display on memberlist screen', 'DISPLAY_ON_MEMBERLIST_EXPLAIN' => 'If this option is enabled, the field will be displayed in the user rows on the memberlist screen.', - 'DISPLAY_ON_PM' => 'Display on view pm screen', - 'DISPLAY_ON_PM_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the pm screen.', + 'DISPLAY_ON_PM' => 'Display on view private message screen', + 'DISPLAY_ON_PM_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the private message screen.', 'DISPLAY_ON_VT' => 'Display on viewtopic screen', 'DISPLAY_ON_VT_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the topic screen.', 'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field', diff --git a/phpBB/language/en/app.php b/phpBB/language/en/app.php index cb56015c30..6697532150 100644 --- a/phpBB/language/en/app.php +++ b/phpBB/language/en/app.php @@ -41,9 +41,6 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'CONTROLLER_ARGUMENT_VALUE_MISSING' => 'Missing value for argument #%1$s: <strong>%3$s</strong> in class <strong>%2$s</strong>', 'CONTROLLER_NOT_SPECIFIED' => 'No controller has been specified.', - 'CONTROLLER_NOT_FOUND' => 'The requested page could not be found.', 'CONTROLLER_METHOD_NOT_SPECIFIED' => 'No method was specified for the controller.', - 'CONTROLLER_SERVICE_NOT_GIVEN' => 'The controller "<strong>%s</strong>" must have a service specified in ./config/routing.yml.', 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller "<strong>%s</strong>" is not defined in ./config/services.yml.', - 'CONTROLLER_RETURN_TYPE_INVALID' => 'The controller object <strong>%s</strong> must return a Symfony\Component\HttpFoundation\Response object.', )); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 2df585ca03..7faa46daf3 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -218,8 +218,6 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', 'EXPAND_VIEW' => 'Expand view', 'EXTENSION' => 'Extension', - 'EXTENSION_CONTROLLER_MISSING' => 'The extension <strong>%s</strong> is missing a controller class and cannot be accessed through the front-end.', - 'EXTENSION_CLASS_WRONG_TYPE' => 'The extension controller class <strong>%s</strong> is not an instance of the phpbb_extension_controller_interface.', 'EXTENSION_DISABLED' => 'The extension <strong>%s</strong> is not enabled.', 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.', 'EXTENSION_DOES_NOT_EXIST' => 'The extension <strong>%s</strong> does not exist.', @@ -349,6 +347,7 @@ $lang = array_merge($lang, array( 'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.', 'LDAP_SEARCH_FAILED' => 'An error occurred while searching the LDAP directory.', 'LEGEND' => 'Legend', + 'LIVE_SEARCHES_NOT_ALLOWED' => 'Live searches are not allowed.', 'LOADING' => 'Loading', 'LOCATION' => 'Location', 'LOCK_POST' => 'Lock post', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 82143d44cb..6c28f962dc 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -40,7 +40,7 @@ if ($mode == 'leaders') } // Check our mode... -if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team'))) +if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team', 'livesearch'))) { trigger_error('NO_MODE'); } @@ -50,6 +50,13 @@ switch ($mode) case 'email': break; + case 'livesearch': + if (!$config['allow_live_searches']) + { + trigger_error('LIVE_SEARCHES_NOT_ALLOWED'); + } + // No break + default: // Can this user view profiles/memberlist? if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) @@ -558,8 +565,6 @@ switch ($mode) $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], $parse_flags, true); } - $poster_avatar = phpbb_get_user_avatar($member); - // We need to check if the modules 'zebra' ('friends' & 'foes' mode), 'notes' ('user_notes' mode) and 'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links $zebra_enabled = $friends_enabled = $foes_enabled = $user_notes_enabled = $warn_user_enabled = false; @@ -584,25 +589,31 @@ switch ($mode) unset($module); } + // Custom Profile Fields + $profile_fields = array(); + if ($config['load_cpf_viewprofile']) + { + $cp = $phpbb_container->get('profilefields.manager'); + $profile_fields = $cp->grab_profile_fields_data($user_id); + $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array(); + } + /** * Modify user data before we display the profile * * @event core.memberlist_view_profile * @var array member Array with user's data - * @var bool user_notes_enabled Is the mcp user notes module - * enabled? - * @var bool warn_user_enabled Is the mcp warnings module - * enabled? - * @var bool zebra_enabled Is the ucp zebra module - * enabled? - * @var bool friends_enabled Is the ucp friends module - * enabled? - * @var bool foes_enabled Is the ucp foes module - * enabled? + * @var bool user_notes_enabled Is the mcp user notes module enabled? + * @var bool warn_user_enabled Is the mcp warnings module enabled? + * @var bool zebra_enabled Is the ucp zebra module enabled? + * @var bool friends_enabled Is the ucp friends module enabled? + * @var bool foes_enabled Is the ucp foes module enabled? * @var bool friend Is the user friend? * @var bool foe Is the user foe? + * @var array profile_fields Array with user's profile field data * @since 3.1.0-a1 * @changed 3.1.0-b2 Added friend and foe status + * @changed 3.1.0-b3 Added profile fields data */ $vars = array( 'member', @@ -613,20 +624,12 @@ switch ($mode) 'foes_enabled', 'friend', 'foe', + 'profile_fields', ); extract($phpbb_dispatcher->trigger_event('core.memberlist_view_profile', compact($vars))); $template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled)); - // Custom Profile Fields - $profile_fields = array(); - if ($config['load_cpf_viewprofile']) - { - $cp = $phpbb_container->get('profilefields.manager'); - $profile_fields = $cp->grab_profile_fields_data($user_id); - $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array(); - } - // If the user has m_approve permission or a_user permission, then list then display unapproved posts if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user')) { @@ -652,7 +655,6 @@ switch ($mode) 'SIGNATURE' => $member['user_sig'], 'POSTS_IN_QUEUE'=> $member['posts_in_queue'], - 'AVATAR_IMG' => $poster_avatar, 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), @@ -990,6 +992,35 @@ switch ($mode) break; + case 'livesearch': + + $username_chars = $request->variable('username', '', true); + + $sql = 'SELECT username, user_id, user_colour + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . ' + AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->any_char); + $result = $db->sql_query_limit($sql, 10); + $user_list = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $user_list[] = array( + 'user_id' => (int) $row['user_id'], + 'result' => $row['username'], + 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']), + ); + } + $db->sql_freeresult($result); + $json_response = new \phpbb\json_response(); + $json_response->send(array( + 'keyword' => $username_chars, + 'results' => $user_list, + )); + + break; + case 'group': default: // The basic memberlist @@ -1627,6 +1658,7 @@ switch ($mode) 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '', 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '', + 'U_LIVE_SEARCH' => ($config['allow_live_searches']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch') : false, 'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php index 16a09af6fc..d984ac9e7a 100644 --- a/phpBB/phpbb/console/command/db/migrate.php +++ b/phpBB/phpbb/console/command/db/migrate.php @@ -103,7 +103,7 @@ class migrate extends \phpbb\console\command\command if ($orig_version != $this->config['version']) { - $this->log->add('admin', 'LOG_UPDATE_DATABASE', $orig_version, $this->config['version']); + $this->log->add('admin', ANONYMOUS, '', 'LOG_UPDATE_DATABASE', time(), array($orig_version, $this->config['version'])); } $this->finalise_update(); diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 54c30c93fc..959a24f277 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -56,17 +56,19 @@ class helper * @param \phpbb\user $user User object * @param \phpbb\config\config $config Config object * @param \phpbb\controller\provider $provider Path provider + * @param \phpbb\extension\manager $manager Extension manager object * @param string $phpbb_root_path phpBB root path * @param string $php_ext PHP extension */ - public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, $phpbb_root_path, $php_ext) + public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext) { $this->template = $template; $this->user = $user; $this->config = $config; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; - $this->route_collection = $provider->get_routes(); + $provider->find_routing_files($manager->get_finder()); + $this->route_collection = $provider->find($phpbb_root_path)->get_routes(); } /** diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php index 2c7493f64c..a32ce1473b 100644 --- a/phpBB/phpbb/controller/provider.php +++ b/phpBB/phpbb/controller/provider.php @@ -37,20 +37,24 @@ class provider * @param array() $routing_files Array of strings containing paths * to YAML files holding route information */ - public function __construct(\phpbb\extension\finder $finder = null, $routing_files = array()) + public function __construct($routing_files = array()) { $this->routing_files = $routing_files; + } - if ($finder) - { - // We hardcode the path to the core config directory - // because the finder cannot find it - $this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder - ->directory('/config') - ->suffix('routing.yml') - ->find() - )); - } + /** + * @param \phpbb\extension\finder $finder + * @return null + */ + public function find_routing_files(\phpbb\extension\finder $finder) + { + // We hardcode the path to the core config directory + // because the finder cannot find it + $this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder + ->directory('/config') + ->suffix('routing.yml') + ->find() + )); } /** diff --git a/phpBB/phpbb/db/migration/data/v310/beta3.php b/phpBB/phpbb/db/migration/data/v310/beta3.php new file mode 100644 index 0000000000..de4c6f7698 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/beta3.php @@ -0,0 +1,32 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class beta3 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\beta2', + '\phpbb\db\migration\data\v310\auth_provider_oauth2', + '\phpbb\db\migration\data\v310\board_contact_name', + '\phpbb\db\migration\data\v310\jquery_update2', + '\phpbb\db\migration\data\v310\live_searches_config', + '\phpbb\db\migration\data\v310\prune_shadow_topics', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.0-b3')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/live_searches_config.php b/phpBB/phpbb/db/migration/data/v310/live_searches_config.php new file mode 100644 index 0000000000..8b147c954c --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/live_searches_config.php @@ -0,0 +1,25 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class live_searches_config extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return isset($this->config['allow_live_searches']); + } + + public function update_data() + { + return array( + array('config.add', array('allow_live_searches', '1')), + ); + } +} diff --git a/phpBB/phpbb/event/kernel_request_subscriber.php b/phpBB/phpbb/event/kernel_request_subscriber.php index 7d5418498b..a39d622273 100644 --- a/phpBB/phpbb/event/kernel_request_subscriber.php +++ b/phpBB/phpbb/event/kernel_request_subscriber.php @@ -18,10 +18,10 @@ use Symfony\Component\Routing\RequestContext; class kernel_request_subscriber implements EventSubscriberInterface { /** - * Extension finder object - * @var \phpbb\extension\finder + * Extension manager object + * @var \phpbb\extension\manager */ - protected $finder; + protected $manager; /** * PHP extension @@ -38,15 +38,15 @@ class kernel_request_subscriber implements EventSubscriberInterface /** * Construct method * - * @param \phpbb\extension\finder $finder Extension finder object + * @param \phpbb\extension\manager $manager Extension manager object * @param string $root_path Root path * @param string $php_ext PHP extension */ - public function __construct(\phpbb\extension\finder $finder, $root_path, $php_ext) + public function __construct(\phpbb\extension\manager $manager, $root_path, $php_ext) { - $this->finder = $finder; $this->root_path = $root_path; $this->php_ext = $php_ext; + $this->manager = $manager; } /** @@ -55,6 +55,7 @@ class kernel_request_subscriber implements EventSubscriberInterface * This is responsible for setting up the routing information * * @param GetResponseEvent $event + * @throws \BadMethodCallException * @return null */ public function on_kernel_request(GetResponseEvent $event) @@ -63,7 +64,7 @@ class kernel_request_subscriber implements EventSubscriberInterface $context = new RequestContext(); $context->fromRequest($request); - $matcher = phpbb_get_url_matcher($this->finder, $context, $this->root_path, $this->php_ext); + $matcher = phpbb_get_url_matcher($this->manager, $context, $this->root_path, $this->php_ext); $router_listener = new RouterListener($matcher, $context); $router_listener->onKernelRequest($event); } diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 37449c67c4..7d545a5f72 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -28,6 +28,12 @@ class manager protected $db; /** + * Event dispatcher object + * @var \phpbb\event\dispatcher + */ + protected $dispatcher; + + /** * Request object * @var \phpbb\request\request */ @@ -64,6 +70,7 @@ class manager * * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\db\driver\driver_interface $db Database object + * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object * @param \phpbb\request\request $request Request object * @param \phpbb\template\template $template Template object * @param \phpbb\di\service_collection $type_collection @@ -72,10 +79,11 @@ class manager * @param string $fields_language_table * @param string $fields_data_table */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) { $this->auth = $auth; $this->db = $db; + $this->dispatcher = $dispatcher; $this->request = $request; $this->template = $template; $this->type_collection = $type_collection; @@ -313,6 +321,17 @@ class manager } $this->db->sql_freeresult($result); + /** + * Event to modify profile fields data retrieved from the database + * + * @event core.grab_profile_fields_data + * @var array user_ids Single user id or an array of ids + * @var array field_data Array with profile fields data + * @since 3.1.0-b3 + */ + $vars = array('user_ids', 'field_data'); + extract($this->dispatcher->trigger_event('core.grab_profile_fields_data', compact($vars))); + $user_fields = array(); // Go through the fields in correct order @@ -351,6 +370,18 @@ class manager $tpl_fields = array(); $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); + /** + * Event to modify data of the generated profile fields, before the template assignment loop + * + * @event core.generate_profile_fields_template_data_before + * @var array profile_row Array with users profile field data + * @var array tpl_fields Array with template data fields + * @var bool use_contact_fields Should we display contact fields as such? + * @since 3.1.0-b3 + */ + $vars = array('profile_row', 'tpl_fields', 'use_contact_fields'); + extract($this->dispatcher->trigger_event('core.generate_profile_fields_template_data_before', compact($vars))); + foreach ($profile_row as $ident => $ident_ary) { $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; @@ -404,6 +435,18 @@ class manager ); } + /** + * Event to modify template data of the generated profile fields + * + * @event core.generate_profile_fields_template_data + * @var array profile_row Array with users profile field data + * @var array tpl_fields Array with template data fields + * @var bool use_contact_fields Should we display contact fields as such? + * @since 3.1.0-b3 + */ + $vars = array('profile_row', 'tpl_fields', 'use_contact_fields'); + extract($this->dispatcher->trigger_event('core.generate_profile_fields_template_data', compact($vars))); + return $tpl_fields; } diff --git a/phpBB/search.php b/phpBB/search.php index dfb53c6896..a34c0a4e5a 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -635,12 +635,66 @@ if ($keywords || $author || $author_id || $search_id || $submit) } $db->sql_freeresult($result); - $sql = 'SELECT p.*, f.forum_id, f.forum_name, t.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_colour - FROM ' . POSTS_TABLE . ' p - LEFT JOIN ' . TOPICS_TABLE . ' t ON (p.topic_id = t.topic_id) - LEFT JOIN ' . FORUMS_TABLE . ' f ON (p.forum_id = f.forum_id) - LEFT JOIN ' . USERS_TABLE . " u ON (p.poster_id = u.user_id) - WHERE $sql_where"; + $sql_array = array( + 'SELECT' => 'p.*, f.forum_id, f.forum_name, t.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_colour', + 'FROM' => array( + POSTS_TABLE => 'p', + ), + 'LEFT_JOIN' => array( + array( + 'FROM' => array(TOPICS_TABLE => 't'), + 'ON' => 'p.topic_id = t.topic_id', + ), + array( + 'FROM' => array(FORUMS_TABLE => 'f'), + 'ON' => 'p.forum_id = f.forum_id', + ), + array( + 'FROM' => array(USERS_TABLE => 'u'), + 'ON' => 'p.poster_id = u.user_id', + ), + ), + 'WHERE' => $sql_where, + 'ORDER_BY' => $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'), + ); + + /** + * Event to modify the SQL query before the posts data is retrieved + * + * @event core.search_get_posts_data + * @var array sql_array The SQL array + * @var array zebra Array of zebra data for the current user + * @var int total_match_count The total number of search matches + * @var string keywords String of the specified keywords + * @var array sort_by_sql Array of SQL sorting instructions + * @var string s_sort_dir The sort direction + * @var string s_sort_key The sort key + * @var string s_limit_days Limit the age of results + * @var array ex_fid_ary Array of excluded forum ids + * @var array author_id_ary Array of exclusive author ids + * @var string search_fields The data fields to search in + * @var int search_id The id of the search request + * @var int start The starting id of the results + * @since 3.1.0-b3 + */ + $vars = array( + 'sql_array', + 'zebra', + 'total_match_count', + 'keywords', + 'sort_by_sql', + 's_sort_dir', + 's_sort_key', + 's_limit_days', + 'ex_fid_ary', + 'author_id_ary', + 'search_fields', + 'search_id', + 'start', + ); + extract($phpbb_dispatcher->trigger_event('core.search_get_posts_data', compact($vars))); + + $sql = $db->sql_build_query('SELECT', $sql_array); } else { @@ -689,8 +743,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) $sql = "SELECT $sql_select FROM $sql_from WHERE $sql_where"; + $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); } - $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); $result = $db->sql_query($sql); $result_topic_id = 0; @@ -1002,11 +1056,46 @@ if ($keywords || $author || $author_id || $search_id || $submit) * Modify the topic data before it is assigned to the template * * @event core.search_modify_tpl_ary - * @var array row Array with topic data - * @var array tpl_ary Template block array with topic data + * @var array row Array with topic data + * @var array tpl_ary Template block array with topic data + * @var string show_results Display topics or posts + * @var string topic_title Cleaned topic title + * @var int replies The number of topic replies + * @var string view_topic_url The URL to the topic + * @var string folder_img The folder image of the topic + * @var string folder_alt The alt attribute of the topic folder img + * @var int topic_type The topic type + * @var bool unread_topic Whether the topic has unread posts + * @var bool topic_unapproved Whether the topic is unapproved + * @var int posts_unapproved The number of unapproved posts + * @var bool topic_deleted Whether the topic has been deleted + * @var string u_mcp_queue The URL to the corresponding MCP queue page + * @var array zebra The zebra data of the current user + * @var array attachments All the attachments of the search results * @since 3.1.0-a1 + * @changed 3.1.0-b3 Added vars show_results, topic_title, replies, + * view_topic_url, folder_img, folder_alt, topic_type, unread_topic, + * topic_unapproved, posts_unapproved, topic_deleted, u_mcp_queue, + * zebra, attachments */ - $vars = array('row', 'tpl_ary'); + $vars = array( + 'row', + 'tpl_ary', + 'show_results', + 'topic_title', + 'replies', + 'view_topic_url', + 'folder_img', + 'folder_alt', + 'topic_type', + 'unread_topic', + 'topic_unapproved', + 'posts_unapproved', + 'topic_deleted', + 'u_mcp_queue', + 'zebra', + 'attachments', + ); extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars))); $template->assign_block_vars('searchresults', $tpl_ary); diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 1beb32685c..33631bac70 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -style_version = 3.1.0-b2 -phpbb_version = 3.1.0-b2 +style_version = 3.1.0-b3 +phpbb_version = 3.1.0-b3 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index bc68e5ae0c..e9f8064b9e 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -315,13 +315,17 @@ $('.poll_view_results a').click(function(e) { $('[data-ajax]').each(function() { var $this = $(this), ajax = $this.attr('data-ajax'), + filter = $this.attr('data-filter'), fn; if (ajax !== 'false') { fn = (ajax !== 'true') ? ajax : null; + filter = (filter !== undefined) ? phpbb.getFunctionByName(filter) : null; + phpbb.ajaxify({ selector: this, refresh: $this.attr('data-refresh') !== undefined, + filter: filter, callback: fn }); } diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index 3e9aae28e3..f9c5b4cf20 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -48,22 +48,34 @@ <!-- IF S_DISPLAY_ONLINE_LIST --> <div class="stat-block online-list"> <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF --> - <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST} - <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --></p> + <p> + <!-- EVENT index_body_block_online_prepend --> + {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST} + <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --> + <!-- EVENT index_body_block_online_append --> + </p> </div> <!-- ENDIF --> <!-- IF S_DISPLAY_BIRTHDAY_LIST --> <div class="stat-block birthday-list"> <h3>{L_BIRTHDAYS}</h3> - <p><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p> + <p> + <!-- EVENT index_body_block_birthday_prepend --> + <!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --> + <!-- EVENT index_body_block_birthday_append --> + </p> </div> <!-- ENDIF --> <!-- IF NEWEST_USER --> <div class="stat-block statistics"> <h3>{L_STATISTICS}</h3> - <p>{TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER}</p> + <p> + <!-- EVENT index_body_block_stats_prepend --> + {TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER} + <!-- EVENT index_body_block_stats_append --> + </p> </div> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index ee89b103b5..f4439b6934 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -7,9 +7,21 @@ <p>{L_FIND_USERNAME_EXPLAIN}</p> <fieldset class="fields1 column1"> - <dl> + <dl style="overflow: visible;"> <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt> - <dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" /></dd> + <dd> + <input type="text" name="username" id="username" value="{USERNAME}" class="inputbox"<!-- IF U_LIVE_SEARCH --> autocomplete="off" data-filter="phpbb.search.filter" data-ajax="member_search" data-min-length="3" data-url="{U_LIVE_SEARCH}" data-results="#user-search" data-overlay="false"<!-- ENDIF --> /> + <!-- IF U_LIVE_SEARCH --> + <div class="dropdown-container"> + <div class="dropdown live-search hidden" id="user-search"> + <div class="pointer"><div class="pointer-inner"></div></div> + <ul class="dropdown-contents search-results"> + <li class="search-result-tpl"><span class="search-result"></span></li> + </ul> + </div> + </div> + <!-- ENDIF --> + </dd> </dl> <!-- IF S_EMAIL_SEARCH_ALLOWED --> <dl> diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 3ef3f7ca07..a8b1e972fe 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -2,6 +2,8 @@ <h2 class="memberlist-title">{PAGE_TITLE}</h2> +<!-- EVENT memberlist_view_content_prepend --> + <form method="post" action="{S_PROFILE_ACTION}" id="viewprofile"> <div class="panel bg1<!-- IF S_ONLINE --> online<!-- ENDIF -->"> <div class="inner"> diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 7fbaa1254f..804fa5b2aa 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -6,11 +6,11 @@ <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 --> + <!-- BEGIN navlinks --><!-- EVENT overall_header_navlink_prepend --><span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- EVENT overall_header_navlink_append --><!-- END navlinks --> <!-- EVENT overall_header_breadcrumb_append --> </li> - <!-- IF S_REGISTERED_USER --><li id="username_logged_in" class="rightside"><!-- IF CURRENT_USER_AVATAR --><a href="{U_USER_PROFILE}" class="header-avatar">{CURRENT_USER_AVATAR}</a> <!-- ENDIF -->{USERNAME_FULL}</li><!-- ENDIF --> + <!-- IF S_REGISTERED_USER --><li id="username_logged_in" class="rightside"><!-- IF CURRENT_USER_AVATAR --><a href="{U_USER_PROFILE}" class="header-avatar">{CURRENT_USER_AVATAR}</a> <!-- ENDIF -->{CURRENT_USERNAME_FULL}</li><!-- ENDIF --> <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --><li class="responsive-search rightside" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH}</a></li><!-- ENDIF --> </ul> diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html index b6f4d13804..4ad66656b2 100644 --- a/phpBB/styles/prosilver/template/posting_attach_body.html +++ b/phpBB/styles/prosilver/template/posting_attach_body.html @@ -35,7 +35,7 @@ <tbody class="responsive-skip-empty" id="file-list"> <tr class="attach-row" id="attach-row-tpl"> <td class="attach-name"> - <span class="file-name"></span> + <span class="file-name ellipsis-text"></span> <span class="attach-controls"> <input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" /> <input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" /> @@ -58,7 +58,7 @@ <!-- BEGIN attach_row --> <tr class="attach-row" data-attach-id="{attach_row.ATTACH_ID}"> <td class="attach-name"> - <span class="file-name"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span> + <span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span> <span class="attach-controls"> <!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" /> <!-- ENDIF --> <input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" /> diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index 818b8ee642..fe0b0362ce 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -113,6 +113,7 @@ <!-- ELSE --> <!-- BEGIN searchresults --> + <!-- EVENT search_results_post_before --> <div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->"> <div class="inner"> @@ -122,12 +123,14 @@ </div> <!-- ELSE --> <dl class="postprofile"> + <!-- EVENT search_results_postprofile_before --> <dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt> <dd class="search-result-date">{searchresults.POST_DATE}</dd> <dd>{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd> <dd>{L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd> <dd>{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></dd> <dd>{L_VIEWS}{L_COLON} <strong>{searchresults.TOPIC_VIEWS}</strong></dd> + <!-- EVENT search_results_postprofile_after --> </dl> <div class="postbody"> @@ -144,6 +147,7 @@ </div> </div> + <!-- EVENT search_results_post_after --> <!-- BEGINELSE --> <div class="panel"> <div class="inner"> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 10edece3cd..02e24ab796 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -4,11 +4,27 @@ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF --> </div> + + <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}"> + <div id="darken"> </div> + </div> + <div id="loading_indicator"></div> + + <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}"> + <a href="#" class="alert_close"></a> + <h3 class="alert_title"></h3><p class="alert_text"></p> + </div> + <div id="phpbb_confirm" class="phpbb_alert"> + <a href="#" class="alert_close"></a> + <div class="alert_text"></div> + </div> </div> <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> <!-- INCLUDEJS forum_fn.js --> +<!-- INCLUDEJS ajax.js --> <!-- EVENT simple_footer_after --> diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index bc4f23cee7..943774c6ec 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -35,7 +35,9 @@ <div class="inner"> <div class="content"> <h2 class="sitename-title">{SITENAME} - {L_REGISTRATION}</h2> + <!-- EVENT ucp_agreement_terms_before --> <p><!-- IF S_SHOW_COPPA -->{L_COPPA_BIRTHDAY}<!-- ELSE -->{L_TERMS_OF_USE}<!-- ENDIF --></p> + <!-- EVENT ucp_agreement_terms_after --> </div> </div> </div> diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index ed39e80c12..4731683a80 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -38,7 +38,7 @@ <dl> <dt> <div class="list-inner"> - <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br /> + <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle attachment-filename ellipsis-text" title="{attachrow.FILENAME}">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br /> <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}{L_COLON} <!-- ELSE -->{L_TOPIC}{L_COLON} <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a> </div> </dt> diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 33d309bcb8..6646f40f01 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> <!-- IF U_MCP or U_ACP --><p class="responsive-center">[ <!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP --> | <!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF --> ]</p><!-- ENDIF --> -<h2 class="forum-title"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2> +<h2 class="forum-title"><!-- EVENT viewforum_forum_name_prepend --><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- EVENT viewforum_forum_name_append --></h2> <!-- IF FORUM_DESC or MODERATORS or U_MCP --> <div> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 6d9e6b81c6..6adb690391 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> <!-- IF U_MCP or U_ACP --><p class="responsive-center">[ <!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP --> | <!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF --> ]</p><!-- ENDIF --> -<h2 class="topic-title"><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2> +<h2 class="topic-title"><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2> <!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body --> <!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF --> @@ -67,17 +67,19 @@ <div class="inner"> <div class="content"> - <h2 class="poll-title">{POLL_QUESTION}</h2> + <h2 class="poll-title"><!-- EVENT viewtopic_body_poll_question_prepend -->{POLL_QUESTION}<!-- EVENT viewtopic_body_poll_question_append --></h2> <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE --><span class="poll_max_votes">{L_MAX_VOTES}</span><!-- ENDIF --></p> <fieldset class="polls"> <!-- BEGIN poll_option --> + <!-- EVENT viewtopic_body_poll_option_before --> <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> <dd class="poll_option_percent<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd> </dl> + <!-- EVENT viewtopic_body_poll_option_after --> <!-- END poll_option --> <dl class="poll_total_votes<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"> diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 0e0f847328..94fad55ae9 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -261,7 +261,6 @@ a#logo:hover { } .navbar { - padding: 0 10px; padding: 5px 10px 5px 10px; border-radius: 7px; } @@ -473,6 +472,10 @@ ul.linklist.bulletin li.no-bulletin:before { margin-right: -500px; } +.dropdown.live-search { + top: auto; +} + .dropdown-container.topic-tools { float: left; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index dc6ab9aef3..db752d7068 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -793,6 +793,17 @@ div.dl_links { display: inline-block; } +.attachment-filename { + width: 100%; +} + +.ellipsis-text { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + /* Show scrollbars for items with overflow on iOS devices ----------------------------------------*/ .postbody .content::-webkit-scrollbar, #topicreview::-webkit-scrollbar, #post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar { diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index 88f2bd65c5..0c0a3e5ca9 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -96,7 +96,7 @@ fieldset.fields1 div { } /* Set it back to 0px for the reCaptcha divs: PHPBB3-9587 */ -fieldset.fields1 #recaptcha_widget_div div { +fieldset.fields1 #recaptcha_widget_div div, fieldset.fields1 .live-search div { margin-bottom: 0; } diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css index 8569eca662..f81064dbe6 100644 --- a/phpBB/styles/prosilver/theme/plupload.css +++ b/phpBB/styles/prosilver/theme/plupload.css @@ -74,3 +74,8 @@ height: 16px; width: 16px; } + +.file-name { + max-width: 65%; + vertical-align: bottom; +} diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css index 456bbf3479..9a8ed5d399 100644 --- a/phpBB/styles/prosilver/theme/tweaks.css +++ b/phpBB/styles/prosilver/theme/tweaks.css @@ -66,3 +66,8 @@ dd.option { .icon-notification { *z-index: 2; } + +/* Fixes header-avatar aspect-ratio in IE8 */ +.header-avatar img { + height: 25px; +} diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index c534c30bb9..8c62519738 100644 --- a/phpBB/styles/subsilver2/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = subsilver2 copyright = © 2005 phpBB Group -style_version = 3.1.0-b2 -phpbb_version = 3.1.0-b2 +style_version = 3.1.0-b3 +phpbb_version = 3.1.0-b3 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/subsilver2/template/breadcrumbs.html b/phpBB/styles/subsilver2/template/breadcrumbs.html index 47cb82c790..646525c206 100644 --- a/phpBB/styles/subsilver2/template/breadcrumbs.html +++ b/phpBB/styles/subsilver2/template/breadcrumbs.html @@ -2,7 +2,7 @@ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;"> <tr> <td class="row1"> - <p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks --> + <p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --><!-- EVENT overall_header_navlink_prepend --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- EVENT overall_header_navlink_append --><!-- END navlinks --> <!-- EVENT overall_header_breadcrumb_append --></p> <!-- EVENT overall_footer_timezone_before --> <p class="datetime">{S_TIMEZONE}</p> diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html index 9e859eac0e..cb67768b15 100644 --- a/phpBB/styles/subsilver2/template/index_body.html +++ b/phpBB/styles/subsilver2/template/index_body.html @@ -44,7 +44,13 @@ <!-- ELSE --> <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> <!-- ENDIF --> - <td class="row1" width="100%"><span class="genmed">{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST}</span></td> + <td class="row1" width="100%"> + <span class="genmed"> + <!-- EVENT index_body_block_online_prepend --> + {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST} + <!-- EVENT index_body_block_online_append --> + </span> + </td> </tr> <!-- IF LEGEND --> <tr> @@ -63,7 +69,13 @@ </tr> <tr> <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_BIRTHDAYS}" /></td> - <td class="row1" width="100%"><p class="genmed"><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <b><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td> + <td class="row1" width="100%"> + <p class="genmed"> + <!-- EVENT index_body_block_birthday_prepend --> + <!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <b><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --> + <!-- EVENT index_body_block_birthday_append --> + </p> + </td> </tr> </table> <!-- ENDIF --> @@ -76,7 +88,13 @@ </tr> <tr> <td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_STATISTICS}" /></td> - <td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td> + <td class="row1" width="100%" valign="middle"> + <p class="genmed"> + <!-- EVENT index_body_block_stats_prepend --> + {TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER} + <!-- EVENT index_body_block_stats_append --> + </p> + </td> </tr> </table> diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 52f40707c0..4c8014a370 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -2,6 +2,8 @@ <div id="pagecontent"> + <!-- EVENT memberlist_view_content_prepend --> + <form method="post" action="{S_PROFILE_ACTION}"> <table class="tablebg" width="100%" cellspacing="1"> diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index 092779055d..ff34055b29 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -91,6 +91,7 @@ <!-- BEGIN searchresults --> <tr class="row2"> + <!-- EVENT search_results_post_before --> <!-- IF searchresults.S_IGNORE_POST --> <td class="gensmall" colspan="2" height="25" align="center">{searchresults.L_IGNORE_POST}</td> <!-- ELSE --> @@ -126,6 +127,7 @@ </td> </tr> <!-- ENDIF --> + <!-- EVENT search_results_post_after --> <tr> <td class="spacer" colspan="2"><img src="images/spacer.gif" height="1" alt="" /></td> </tr> diff --git a/phpBB/styles/subsilver2/template/ucp_agreement.html b/phpBB/styles/subsilver2/template/ucp_agreement.html index 3afe6e89a0..fca7eb2368 100644 --- a/phpBB/styles/subsilver2/template/ucp_agreement.html +++ b/phpBB/styles/subsilver2/template/ucp_agreement.html @@ -42,7 +42,9 @@ <td class="gen" align="center"><br />{L_COPPA_BIRTHDAY}<br /><br /><a href="{U_COPPA_NO}">{L_COPPA_NO}</a> :: <a href="{U_COPPA_YES}">{L_COPPA_YES}</a><br /><br /></td> <!-- ELSE --> <td> + <!-- EVENT ucp_agreement_terms_before --> <span class="genmed"><br />{L_TERMS_OF_USE}<br /><br /></span> + <!-- EVENT ucp_agreement_terms_after --> <div align="center"> <input class="btnlite" type="submit" id="agreed" name="agreed" value="{L_AGREE}" /><br /><br /> <input class="btnlite" type="submit" name="not_agreed" value="{L_NOT_AGREE}" /> diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index 44e8f30ce4..a7a130a8df 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -103,7 +103,7 @@ <!-- IF S_IS_POSTABLE or S_NO_READ_ACCESS --> <div id="pageheader"> - <h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2> + <h2><!-- EVENT viewforum_forum_name_prepend --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- EVENT viewforum_forum_name_append --></h2> <!-- IF MODERATORS --> <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p> diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 307ed0f391..6ac4e0ea33 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -15,7 +15,7 @@ <!-- ENDIF --> <div id="pageheader"> - <h2><!-- EVENT viewtopic_topic_title_prepend --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2> + <h2><!-- EVENT viewtopic_topic_title_prepend --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2> <!-- IF MODERATORS --> <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p> @@ -72,13 +72,14 @@ <table cellspacing="0" cellpadding="4" border="0" align="center"> <tr> - <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td> + <td align="center"><span class="gen"><!-- EVENT viewtopic_body_poll_question_prepend --><b>{POLL_QUESTION}</b><!-- EVENT viewtopic_body_poll_question_append --></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td> </tr> <tr> <td align="{S_CONTENT_FLOW_BEGIN}"> <table cellspacing="0" cellpadding="2" border="0"> <!-- BEGIN poll_option --> <tr> + <!-- EVENT viewtopic_body_poll_option_before --> <!-- IF S_CAN_VOTE --> <td<!-- IF poll_option.POLL_OPTION_MOST_VOTES --> class="most-votes"<!-- ENDIF -->> <!-- IF S_IS_MULTI_CHOICE --> @@ -97,6 +98,7 @@ <td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td> <!-- ENDIF --> <!-- ENDIF --> + <!-- EVENT viewtopic_body_poll_option_after --> </tr> <!-- END poll_option --> </table> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 1f59019245..84040af2bb 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1109,6 +1109,7 @@ while ($row = $db->sql_fetchrow($result)) if ($poster_id == ANONYMOUS) { $user_cache_data = array( + 'user_type' => USER_IGNORE, 'joined' => '', 'posts' => '', diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 7d9fe652eb..7b8b78dd22 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -29,7 +29,8 @@ class phpbb_controller_controller_test extends phpbb_test_case public function test_provider() { - $provider = new \phpbb\controller\provider($this->extension_manager->get_finder()); + $provider = new \phpbb\controller\provider(); + $provider->find_routing_files($this->extension_manager->get_finder()); $routes = $provider->find(__DIR__)->get_routes(); // This will need to be updated if any new routes are defined diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php index 5264c788c7..ae6f924a62 100644 --- a/tests/controller/helper_route_test.php +++ b/tests/controller/helper_route_test.php @@ -27,23 +27,25 @@ class phpbb_controller_helper_route_test extends phpbb_test_case ); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0')); $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $this->user, new \phpbb\template\context()); + $this->extension_manager = new phpbb_mock_extension_manager( + dirname(__FILE__) . '/', + array( + 'vendor2/foo' => array( + 'ext_name' => 'vendor2/foo', + 'ext_active' => '1', + 'ext_path' => 'ext/vendor2/foo/', + ), + ) + ); $finder = new \phpbb\extension\finder( - new phpbb_mock_extension_manager( - dirname(__FILE__) . '/', - array( - 'vendor2/foo' => array( - 'ext_name' => 'vendor2/foo', - 'ext_active' => '1', - 'ext_path' => 'ext/vendor2/foo/', - ), - ) - ), + $this->extension_manager, new \phpbb\filesystem(), dirname(__FILE__) . '/', new phpbb_mock_cache() ); - $this->provider = new \phpbb\controller\provider($finder); + $this->provider = new \phpbb\controller\provider(); + $this->provider->find_routing_files($finder); $this->provider->find(dirname(__FILE__) . '/'); } @@ -82,7 +84,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case */ public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description) { - $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, '', 'php', dirname(__FILE__) . '/'); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id)); } @@ -122,7 +124,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) { $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); - $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, '', 'php', dirname(__FILE__) . '/'); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id)); } } diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php new file mode 100644 index 0000000000..01ac6494d0 --- /dev/null +++ b/tests/mock/controller_helper.php @@ -0,0 +1,22 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +class phpbb_mock_controller_helper extends \phpbb\controller\helper +{ + public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext, $phpbb_root_path_ext) + { + $this->template = $template; + $this->user = $user; + $this->config = $config; + $this->phpbb_root_path = $phpbb_root_path; + $this->php_ext = $php_ext; + $provider->find_routing_files($manager->get_finder()); + $this->route_collection = $provider->find($phpbb_root_path_ext)->get_routes(); + } +} diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index 71206dff58..f7a02dc419 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -30,17 +30,19 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case ->method('lang') ->will($this->returnCallback(array($this, 'return_callback_implode'))); + $manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()); $this->finder = new \phpbb\extension\finder( - new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()), + $manager, new \phpbb\filesystem(), dirname(__FILE__) . '/', new phpbb_mock_cache() ); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); - $provider = new \phpbb\controller\provider($this->finder); + $provider = new \phpbb\controller\provider(); + $provider->find_routing_files($this->finder); $provider->find(dirname(__FILE__) . '/'); - $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $provider, '', 'php'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, '', 'php', dirname(__FILE__) . '/'); $this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper); } diff --git a/travis/phing-sniff.sh b/travis/phing-sniff.sh new file mode 100755 index 0000000000..1473b99da4 --- /dev/null +++ b/travis/phing-sniff.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# @copyright (c) 2014 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 + +if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysql" ] +then + cd build + ../phpBB/vendor/bin/phing sniff + cd .. +fi diff --git a/travis/setup-database.sh b/travis/setup-database.sh new file mode 100755 index 0000000000..c1917042cd --- /dev/null +++ b/travis/setup-database.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# @copyright (c) 2014 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 + +if [ "$DB" == "postgres" ] +then + psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres + psql -c 'create database phpbb_tests;' -U postgres +fi + +if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysql" ] +then + mysql -e 'SET GLOBAL storage_engine=MyISAM;' +fi + +if [ "$DB" == "mysql" -o "$DB" == "mariadb" ] +then + mysql -e 'create database IF NOT EXISTS phpbb_tests;' +fi diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh new file mode 100755 index 0000000000..f079a0a6b7 --- /dev/null +++ b/travis/setup-phpbb.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# @copyright (c) 2014 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 + +if [ "$DB" == "mariadb" ] +then + travis/setup-mariadb.sh +fi + +if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] +then + travis/setup-php-extensions.sh +fi + +if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` == "1" ] +then + travis/setup-webserver.sh +fi + +cd phpBB +php ../composer.phar install --dev --no-interaction --prefer-source +cd .. |