diff options
Diffstat (limited to 'phpBB')
41 files changed, 537 insertions, 249 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 82fb229fae..5d35666fdd 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -378,7 +378,7 @@ <fieldset class="tabulated"> <legend>{L_TITLE}</legend> - <div class="pagination"> + <div class="pagination top-pagination"> <!-- IF .pagination or TOTAL_FILES --> {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE} <!-- IF .pagination --> @@ -389,13 +389,14 @@ <!-- ENDIF --> </div> +<!-- IF .attachments --> <table class="table1 zebra-table"> <thead> <tr> <th>{L_FILENAME}</th> <th>{L_POSTED}</th> - <th>{L_FILESIZE}</th> - <th>{L_DELETE}</th> + <th class="centered-text">{L_FILESIZE}</th> + <th class="centered-text">{L_MARK}</th> </tr> </thead> <tbody> @@ -406,25 +407,19 @@ <!-- ELSE --><a href="{attachments.U_FILE}" style="font-weight: bold;">{attachments.REAL_FILENAME}</a><br /><!-- IF attachments.COMMENT -->{attachments.COMMENT}<br /><!-- ENDIF -->{attachments.L_DOWNLOAD_COUNT}<br />{L_TOPIC}{L_COLON} <a href="{attachments.U_VIEW_TOPIC}">{attachments.TOPIC_TITLE}</a><!-- ENDIF --> </td> <td>{attachments.FILETIME}<br />{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER}</td> - <td>{attachments.FILESIZE}</td> - <td><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td> + <td class="centered-text">{attachments.FILESIZE}</td> + <td class="centered-text"><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td> </tr> <!-- END attachments --> - <tr class="row4"> - <td colspan="3"> </td> - <td class="small"><a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a></td> - </tr> </tbody> </table> +<!-- ELSE --> + <div class="errorbox"> + <p>{L_NO_ATTACHMENTS}</p> + </div> +<!-- ENDIF --> <!-- IF TOTAL_FILES --> - <fieldset class="display-options"> - {L_DISPLAY_LOG}{L_COLON} {S_LIMIT_DAYS} {L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR} - <input class="button2" type="submit" value="{L_GO}" name="sort" /> - </fieldset> - - <hr /> - <div class="pagination"> {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE} <!-- IF .pagination --> @@ -435,10 +430,22 @@ </div> <!-- ENDIF --> - <p class="submit-buttons"> - <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> - <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> - </p> + <fieldset class="display-options"> + {L_DISPLAY_LOG}{L_COLON} {S_LIMIT_DAYS} {L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR} + <input class="button2" type="submit" value="{L_GO}" name="sort" /> + </fieldset> + + <hr /> + +<!-- IF .attachments --> + <fieldset class="quick"> + <input class="button2" type="submit" name="submit" value="{L_DELETE_MARKED}" /><br /> + <p class="small"> + <a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> • + <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a> + </p> + </fieldset> +<!-- ENDIF --> {S_FORM_TOKEN} </fieldset> </form> diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 592b5bbc16..9343b9b509 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -13,7 +13,7 @@ </fieldset> <!-- IF .pagination --> -<div class="pagination" style="float: right; margin: 15px 0 2px 0"> +<div class="pagination top-pagination"> <!-- INCLUDE pagination.html --> </div> <!-- ENDIF --> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 22bbf404ea..6f2d65afc0 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -102,6 +102,10 @@ hr { height: 1px; } +.centered-text { + text-align: center; +} + .small { font-size: 0.85em; } @@ -1126,11 +1130,14 @@ input.langvalue, textarea.langvalue { } optgroup, select { + background-color: #FAFAFA; + border: 1px solid #666666; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 0.85em; font-weight: normal; font-style: normal; cursor: pointer; + padding: 1px; vertical-align: middle; width: auto; color: #000; @@ -1238,7 +1245,7 @@ fieldset.display-options { border: none; background-color: transparent; text-align: center; - font-size: 0.75em; + font-size: 0.85em; } fieldset.display-options select, fieldset.display-options input, fieldset.display-options label { @@ -1663,11 +1670,16 @@ input.button1:focus, input.button2:focus { /* Pagination ---------------------------------------- */ .pagination { + font-size: .85em; height: 1%; /* IE tweak (holly hack) */ width: auto; text-align: right; margin-top: 5px; +} + +.top-pagination { float: right; + margin: 15px 0 2px 0; } .rtl .pagination { diff --git a/phpBB/composer.json b/phpBB/composer.json index 3cf83a8fe9..f005fff805 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -1,5 +1,8 @@ { - "minimum-stability": "beta", + "_readme": [ + "You MUST update the clean-vendor-dir target in build/build.xml", + "accordingly when adding or upgrading dependencies." + ], "require": { "lusitanian/oauth": "0.2.*", "symfony/config": "2.3.*", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index c0eb7afcbb..ee83dee047 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "cc83663b780856890f787b9b4d6ea474", + "hash": "9b683acbc766a345d90de958db4e7f48", "packages": [ { "name": "lusitanian/oauth", @@ -108,17 +108,17 @@ }, { "name": "symfony/config", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Config", "source": { "type": "git", "url": "https://github.com/symfony/Config.git", - "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0" + "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/65a927c15ca5a911ba2fa277a5457fa8129505b0", - "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0", + "url": "https://api.github.com/repos/symfony/Config/zipball/91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", + "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", "shasum": "" }, "require": { @@ -136,14 +136,16 @@ "Symfony\\Component\\Config\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -152,21 +154,21 @@ ], "description": "Symfony Config Component", "homepage": "http://symfony.com", - "time": "2013-08-06 05:49:23" + "time": "2014-03-31 10:15:50" }, { "name": "symfony/console", - "version": "v2.3.6", + "version": "v2.3.12", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "f880062d56edefb25b36f2defa65aafe65959dc7" + "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7", - "reference": "f880062d56edefb25b36f2defa65aafe65959dc7", + "url": "https://api.github.com/repos/symfony/Console/zipball/df17996d37eb113a5675ca4cc2ac45f4fc057cb7", + "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7", "shasum": "" }, "require": { @@ -196,7 +198,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -205,7 +209,7 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2013-09-25 06:04:15" + "time": "2014-03-01 17:25:29" }, { "name": "symfony/debug", @@ -245,14 +249,16 @@ "Symfony\\Component\\Debug\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -265,17 +271,17 @@ }, { "name": "symfony/dependency-injection", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c" + "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c", - "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/41e9e2078e8edf261c11be478300c8fcddb64e30", + "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30", "shasum": "" }, "require": { @@ -301,14 +307,16 @@ "Symfony\\Component\\DependencyInjection\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -317,21 +325,21 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", - "time": "2013-07-25 17:13:25" + "time": "2014-03-27 18:14:33" }, { "name": "symfony/event-dispatcher", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8" + "reference": "15645237c6ff70e74a28e8836362d82492765055" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8", - "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/15645237c6ff70e74a28e8836362d82492765055", + "reference": "15645237c6ff70e74a28e8836362d82492765055", "shasum": "" }, "require": { @@ -362,7 +370,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -371,7 +381,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2013-07-21 12:12:18" + "time": "2014-02-11 10:29:24" }, { "name": "symfony/filesystem", @@ -402,14 +412,16 @@ "Symfony\\Component\\Filesystem\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -452,14 +464,16 @@ "Symfony/Component/HttpFoundation/Resources/stubs" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -472,17 +486,17 @@ }, { "name": "symfony/http-kernel", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf" + "reference": "48d61b3622ca35dd924b167441a9810ad55906ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf", - "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/48d61b3622ca35dd924b167441a9810ad55906ce", + "reference": "48d61b3622ca35dd924b167441a9810ad55906ce", "shasum": "" }, "require": { @@ -523,14 +537,16 @@ "Symfony\\Component\\HttpKernel\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -539,21 +555,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2013-08-27 08:58:24" + "time": "2014-04-03 05:42:39" }, { "name": "symfony/routing", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143" + "reference": "08afcafd9af22a24a8055669f85d63b863c4711b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143", - "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143", + "url": "https://api.github.com/repos/symfony/Routing/zipball/08afcafd9af22a24a8055669f85d63b863c4711b", + "reference": "08afcafd9af22a24a8055669f85d63b863c4711b", "shasum": "" }, "require": { @@ -581,14 +597,16 @@ "Symfony\\Component\\Routing\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -597,21 +615,21 @@ ], "description": "Symfony Routing Component", "homepage": "http://symfony.com", - "time": "2013-08-23 15:14:07" + "time": "2014-03-28 10:34:27" }, { "name": "symfony/yaml", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847" + "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847", - "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3acf34f6993db3d873fa77ac2cb6e595db00b88d", + "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d", "shasum": "" }, "require": { @@ -635,7 +653,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -644,7 +664,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2013-08-24 15:26:22" + "time": "2014-03-04 16:04:39" }, { "name": "twig/twig", @@ -743,7 +763,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" } ], "description": "A simple PHP Web Scraper", @@ -1430,16 +1452,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "1.5.0RC4", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43" + "reference": "a76a39b317ce8106abe6264daa505e24e1731860" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/146a9b54e4adeaca0a3ae073e0a8a03570d6cc43", - "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860", + "reference": "a76a39b317ce8106abe6264daa505e24e1731860", "shasum": "" }, "require": { @@ -1496,7 +1518,7 @@ "phpcs", "standards" ], - "time": "2013-09-26 00:14:02" + "time": "2014-02-04 23:49:58" }, { "name": "symfony/browser-kit", @@ -1542,7 +1564,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1589,7 +1613,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1646,7 +1672,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1693,7 +1721,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1740,7 +1770,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1755,7 +1787,7 @@ "aliases": [ ], - "minimum-stability": "beta", + "minimum-stability": "stable", "stability-flags": [ ], diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index f68fd76587..d8d382b2bd 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1115,11 +1115,6 @@ class acp_attachments if ($stats_error) { $error[] = $stats_error; - - // Show option to resync stats - $this->template->assign_vars(array( - 'S_ACTION_OPTIONS' => $auth->acl_get('a_board'), - )); } $template->assign_vars(array( @@ -1321,7 +1316,15 @@ class acp_attachments if (($num_files != $stats['num_files']) || ($total_size != $stats['upload_dir_size'])) { - return $this->user->lang('FILES_STATS_WRONG', (int) $stats['num_files'], get_formatted_filesize($stats['upload_dir_size'])); + $u_resync = $this->u_action . '&action=stats'; + + return $this->user->lang( + 'FILES_STATS_WRONG', + (int) $stats['num_files'], + get_formatted_filesize($stats['upload_dir_size']), + '<a href="' . $u_resync . '">', + '</a>' + ); } return false; } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 69f7c3f162..0cb88cd8ee 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3849,6 +3849,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_')) { $msg_text = $log_text; + + // If this is defined there already was some output + // So let's not break it + if (defined('IN_DB_UPDATE')) + { + echo '<div class="errorbox">' . $msg_text . '</div>'; + + $db->sql_return_on_error(true); + phpbb_end_update($cache, $config); + } } if ((defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db)) diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index be066de0f0..98b2848c19 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -398,6 +398,7 @@ class p_master 'cfg_([a-z0-9_]+)' => '(int) $config[\'\\1\']', 'request_([a-zA-Z0-9_]+)' => '$request->variable(\'\\1\', false)', 'ext_([a-zA-Z0-9_/]+)' => 'array_key_exists(\'\\1\', $phpbb_extension_manager->all_enabled())', + 'authmethod_([a-z0-9_\\\\]+)' => '($config[\'auth_method\'] === \'\\1\')', ); /** diff --git a/phpBB/includes/ucp/info/ucp_auth_link.php b/phpBB/includes/ucp/info/ucp_auth_link.php index ee88b15ea8..3a34232d28 100644 --- a/phpBB/includes/ucp/info/ucp_auth_link.php +++ b/phpBB/includes/ucp/info/ucp_auth_link.php @@ -19,7 +19,7 @@ class ucp_auth_link_info 'title' => 'UCP_AUTH_LINK', 'version' => '1.0.0', 'modes' => array( - 'auth_link' => array('title' => 'UCP_AUTH_LINK_MANAGE', 'auth' => '', 'cat' => array('UCP_PROFILE')), + 'auth_link' => array('title' => 'UCP_AUTH_LINK_MANAGE', 'auth' => 'authmethod_oauth', 'cat' => array('UCP_PROFILE')), ), ); } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index bad51e2fe3..6c9eeb6a75 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -169,6 +169,8 @@ header('Content-type: text/html; charset=UTF-8'); <?php +define('IN_DB_UPDATE', true); + /** * @todo firebird/mysql update? */ diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index db8156a831..dcf2756850 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1674,6 +1674,18 @@ class install_install extends module $db->sql_freeresult($result); $_module->move_module_by($row, 'move_down', 4); + + // Move OAuth module 5 down... + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_basename = 'ucp_auth_link' + AND module_class = 'ucp' + AND module_mode = 'auth_link'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $_module->move_module_by($row, 'move_down', 5); } // And now for the special ones diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index c7d68d29c2..6ca2865383 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -107,6 +107,9 @@ $lang = array_merge($lang, array( 'EXT_GROUP_REAL_MEDIA' => 'Real Media', 'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media', + 'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.', + 'FILES_STATS_WRONG' => 'Your file statistics are likely inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.<br />Click %3$shere%4$s to resynchronise them.', + 'GO_TO_EXTENSIONS' => 'Go to extension management screen', 'GROUP_NAME' => 'Group name', @@ -130,6 +133,7 @@ $lang = array_merge($lang, array( 'NOT_ALLOWED_IN_PM' => 'Only allowed in posts', 'NOT_ALLOWED_IN_PM_POST' => 'Not allowed', 'NOT_ASSIGNED' => 'Not assigned', + 'NO_ATTACHMENTS' => 'No attachments found for this period.', 'NO_EXT_GROUP' => 'None', 'NO_EXT_GROUP_NAME' => 'No group name entered', 'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified.', @@ -143,8 +147,9 @@ $lang = array_merge($lang, array( 'ORDER_ALLOW_DENY' => 'Allow', 'ORDER_DENY_ALLOW' => 'Deny', - 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames', - 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames', + 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames', + 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames', + 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?', 'SEARCH_IMAGICK' => 'Search for Imagemagick', 'SECURE_ALLOW_DENY' => 'Allow/Deny list', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 5794a7c833..6f16dfabd4 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -241,9 +241,6 @@ $lang = array_merge($lang, array( 'EXPORT_DOWNLOAD' => 'Download', 'EXPORT_STORE' => 'Store', - 'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.', - 'FILES_STATS_WRONG' => 'Your files statistics are probably inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.', - 'GENERAL_OPTIONS' => 'General options', 'GENERAL_SETTINGS' => 'General settings', 'GLOBAL_MASK' => 'Global permission mask', @@ -286,8 +283,6 @@ $lang = array_merge($lang, array( 'REMIND' => 'Remind', 'RESYNC' => 'Resynchronise', - 'RESYNC_FILES_STATS' => 'Resynchronise files statistics', - 'RESYNC_FILES_STATS_EXPLAIN' => 'Recalculates the total number and size of files attached to posts and private messages.', 'SELECT_ANONYMOUS' => 'Select anonymous user', 'SELECT_OPTION' => 'Select option', @@ -388,7 +383,6 @@ $lang = array_merge($lang, array( 'RESET_ONLINE' => 'Reset most users ever online', 'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?', 'RESET_ONLINE_SUCCESS' => 'Most users ever online reset', - 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise files statistics?', 'RESYNC_POSTCOUNTS' => 'Resynchronise post counts', 'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.', 'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?', @@ -696,7 +690,7 @@ $lang = array_merge($lang, array( 'LOG_REFERER_INVALID' => '<strong>Referer validation failed</strong><br />»Referer was “<em>%1$s</em>”. The request was rejected and the session killed.', 'LOG_RESET_DATE' => '<strong>Board start date reset</strong>', 'LOG_RESET_ONLINE' => '<strong>Most users online reset</strong>', - 'LOG_RESYNC_FILES_STATS' => '<strong>Files statistics resynchronised</strong>', + 'LOG_RESYNC_FILES_STATS' => '<strong>File statistics resynchronised</strong>', 'LOG_RESYNC_POSTCOUNTS' => '<strong>User post counts resynchronised</strong>', 'LOG_RESYNC_POST_MARKING' => '<strong>Dotted topics resynchronised</strong>', 'LOG_RESYNC_STATS' => '<strong>Post, topic and user statistics resynchronised</strong>', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index f65022fbcb..13aa66514c 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -69,7 +69,10 @@ $lang = array_merge($lang, array( 'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.', 'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.', 'NO_SEARCH_RESULTS' => 'No suitable matches were found.', - 'NO_SEARCH_TIME' => 'Sorry but you cannot use search at this time. Please try again in a few minutes.', + 'NO_SEARCH_TIME' => array( + 1 => 'Sorry but you cannot use search at this time. Please try again in %d second.', + 2 => 'Sorry but you cannot use search at this time. Please try again in %d seconds.', + ), 'NO_SEARCH_UNREADS' => 'Sorry but searching for unread posts has been disabled on this board.', 'WORD_IN_NO_POST' => 'No posts were found because the word <strong>%s</strong> is not contained in any post.', 'WORDS_IN_NO_POST' => 'No posts were found because the words <strong>%s</strong> are not contained in any post.', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 40c8bd9f8e..5148589471 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -412,6 +412,7 @@ $lang = array_merge($lang, array( 'PM_SENTBOX' => 'Sent messages', 'PM_SUBJECT' => 'Message subject', 'PM_TO' => 'Send to', + 'PM_TOOLS' => 'Message tools', 'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.', 'POST_EDIT_PM' => 'Edit message', 'POST_FORWARD_PM' => 'Forward message', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index b566f4b5c0..afbad5a0d6 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -58,7 +58,7 @@ $lang = array_merge($lang, array( 1 => 'Last edited by %2$s on %3$s, edited %1$d time in total.', 2 => 'Last edited by %2$s on %3$s, edited %1$d times in total.', ), - 'EMAIL_TOPIC' => 'Email friend', + 'EMAIL_TOPIC' => 'Email topic', 'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore.', 'FILE_NOT_FOUND_404' => 'The file <strong>%s</strong> does not exist.', diff --git a/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth2.php b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth2.php new file mode 100644 index 0000000000..692647dcde --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth2.php @@ -0,0 +1,40 @@ +<?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 auth_provider_oauth2 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\auth_provider_oauth', + ); + } + + public function update_data() + { + return array( + array('custom', array( + array($this, 'update_auth_link_module_auth'), + )), + ); + } + + public function update_auth_link_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'authmethod_oauth' + WHERE module_class = 'ucp' + AND module_basename = 'ucp_auth_link' + AND module_mode = 'auth_link' + AND module_auth = ''"; + $this->db->sql_query($sql); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php index d5da54b888..10243dc77f 100644 --- a/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php +++ b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php @@ -149,6 +149,15 @@ class softdelete_p1 extends \phpbb\db\migration\migration $limit = 10; $converted_forums = 0; + if (!$start) + { + // Preserve the forum_posts value for link forums as it represents redirects. + $sql = 'UPDATE ' . $this->table_prefix . 'forums + SET forum_posts_approved = forum_posts + WHERE forum_type = ' . FORUM_LINK; + $this->db->sql_query($sql); + } + $sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS sum_topics, SUM(topic_posts_approved) AS sum_posts_approved, SUM(topic_posts_unapproved) AS sum_posts_unapproved FROM ' . $this->table_prefix . 'topics GROUP BY forum_id, topic_visibility diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 3d480b7e1c..2b0132075b 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -34,6 +34,12 @@ class tools var $dbms_type_map = array(); /** + * Is the used MS SQL Server a SQL Server 2000? + * @var bool + */ + protected $is_sql_server_2000; + + /** * Get the column types for every database we support * * @return array @@ -1846,50 +1852,46 @@ class tools case 'mssql': case 'mssqlnative': - $sql = "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(25)) AS mssql_version"; - $result = $this->db->sql_query($sql); - $row = $this->db->sql_fetchrow($result); - $this->db->sql_freeresult($result); + // We need the data here + $old_return_statements = $this->return_statements; + $this->return_statements = true; - // Remove default constraints - if ($row['mssql_version'][0] == '8') // SQL Server 2000 - { - // http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspx - // Deprecated in SQL Server 2005 - $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000) - SET @drop_default_name = - (SELECT so.name FROM sysobjects so - JOIN sysconstraints sc ON so.id = sc.constid - WHERE object_name(so.parent_obj) = '{$table_name}' - AND so.xtype = 'D' - AND sc.colid = (SELECT colid FROM syscolumns - WHERE id = object_id('{$table_name}') - AND name = '{$column_name}')) - IF @drop_default_name <> '' - BEGIN - SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']' - EXEC(@cmd) - END"; - } - else - { - $sql = "SELECT dobj.name AS def_name - FROM sys.columns col - LEFT OUTER JOIN sys.objects dobj ON (dobj.object_id = col.default_object_id AND dobj.type = 'D') - WHERE col.object_id = object_id('{$table_name}') - AND col.name = '{$column_name}' - AND dobj.name IS NOT NULL"; - $result = $this->db->sql_query($sql); - $row = $this->db->sql_fetchrow($result); - $this->db->sql_freeresult($result); + $indexes = $this->mssql_get_existing_indexes($table_name, $column_name); - if ($row) + // Drop any indexes + $recreate_indexes = array(); + if (!empty($indexes)) + { + foreach ($indexes as $index_name => $index_data) { - $statements[] = 'ALTER TABLE [' . $table_name . '] DROP CONSTRAINT [' . $row['def_name'] . ']'; + $result = $this->sql_index_drop($table_name, $index_name); + $statements = array_merge($statements, $result); + if (sizeof($index_data) > 1) + { + // Remove this column from the index and recreate it + $recreate_indexes[$index_name] = array_diff($index_data, array($column_name)); + } } } + // Drop default value constraint + $result = $this->mssql_get_drop_default_constraints_queries($table_name, $column_name); + $statements = array_merge($statements, $result); + + // Remove the column $statements[] = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']'; + + if (!empty($recreate_indexes)) + { + // Recreate indexes after we removed the column + foreach ($recreate_indexes as $index_name => $index_data) + { + $result = $this->sql_create_index($table_name, $index_name, $index_data); + $statements = array_merge($statements, $result); + } + } + + $this->return_statements = $old_return_statements; break; case 'mysql_40': @@ -2371,53 +2373,46 @@ class tools case 'mssql': case 'mssqlnative': + // We need the data here + $old_return_statements = $this->return_statements; + $this->return_statements = true; + + $indexes = $this->mssql_get_existing_indexes($table_name, $column_name); + + // Drop any indexes + if (!empty($indexes)) + { + foreach ($indexes as $index_name => $index_data) + { + $result = $this->sql_index_drop($table_name, $index_name); + $statements = array_merge($statements, $result); + } + } + + // Drop default value constraint + $result = $this->mssql_get_drop_default_constraints_queries($table_name, $column_name); + $statements = array_merge($statements, $result); + + // Change the column $statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql']; if (!empty($column_data['default'])) { - $sql = "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(25)) AS mssql_version"; - $result = $this->db->sql_query($sql); - $row = $this->db->sql_fetchrow($result); - $this->db->sql_freeresult($result); + // Add new default value constraint + $statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $this->db->sql_escape($column_data['default']) . ' FOR [' . $column_name . ']'; + } - // Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage - if ($row['mssql_version'][0] == '8') // SQL Server 2000 - { - $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000) - SET @drop_default_name = - (SELECT so.name FROM sysobjects so - JOIN sysconstraints sc ON so.id = sc.constid - WHERE object_name(so.parent_obj) = '{$table_name}' - AND so.xtype = 'D' - AND sc.colid = (SELECT colid FROM syscolumns - WHERE id = object_id('{$table_name}') - AND name = '{$column_name}')) - IF @drop_default_name <> '' - BEGIN - SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']' - EXEC(@cmd) - END - SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]' - EXEC(@cmd)"; - } - else + if (!empty($indexes)) + { + // Recreate indexes after we changed the column + foreach ($indexes as $index_name => $index_data) { - $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000) - SET @drop_default_name = - (SELECT dobj.name FROM sys.columns col - LEFT OUTER JOIN sys.objects dobj ON (dobj.object_id = col.default_object_id AND dobj.type = 'D') - WHERE col.object_id = object_id('{$table_name}') - AND col.name = '{$column_name}' - AND dobj.name IS NOT NULL) - IF @drop_default_name <> '' - BEGIN - SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']' - EXEC(@cmd) - END - SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]' - EXEC(@cmd)"; + $result = $this->sql_create_index($table_name, $index_name, $index_data); + $statements = array_merge($statements, $result); } } + + $this->return_statements = $old_return_statements; break; case 'mysql_40': @@ -2551,4 +2546,159 @@ class tools return $this->_sql_run_sql($statements); } + + /** + * Get queries to drop the default constraints of a column + * + * We need to drop the default constraints of a column, + * before being able to change their type or deleting them. + * + * @param string $table_name + * @param string $column_name + * @return array Array with SQL statements + */ + protected function mssql_get_drop_default_constraints_queries($table_name, $column_name) + { + $statements = array(); + if ($this->mssql_is_sql_server_2000()) + { + // http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspx + // Deprecated in SQL Server 2005 + $sql = "SELECT so.name AS def_name + FROM sysobjects so + JOIN sysconstraints sc ON so.id = sc.constid + WHERE object_name(so.parent_obj) = '{$table_name}' + AND so.xtype = 'D' + AND sc.colid = (SELECT colid FROM syscolumns + WHERE id = object_id('{$table_name}') + AND name = '{$column_name}')"; + } + else + { + $sql = "SELECT dobj.name AS def_name + FROM sys.columns col + LEFT OUTER JOIN sys.objects dobj ON (dobj.object_id = col.default_object_id AND dobj.type = 'D') + WHERE col.object_id = object_id('{$table_name}') + AND col.name = '{$column_name}' + AND dobj.name IS NOT NULL"; + } + + $result = $this->db->sql_query($sql); + while ($row = $this->db->sql_fetchrow($result)) + { + $statements[] = 'ALTER TABLE [' . $table_name . '] DROP CONSTRAINT [' . $row['def_name'] . ']'; + } + $this->db->sql_freeresult($result); + + return $statements; + } + + /** + * Get a list with existing indexes for the column + * + * @param string $table_name + * @param string $column_name + * @return array Array with Index name => columns + */ + protected function mssql_get_existing_indexes($table_name, $column_name) + { + $existing_indexes = array(); + if ($this->mssql_is_sql_server_2000()) + { + // http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspx + // Deprecated in SQL Server 2005 + $sql = "SELECT DISTINCT ix.name AS phpbb_index_name + FROM sysindexes ix + INNER JOIN sysindexkeys ixc + ON ixc.id = ix.id + AND ixc.indid = ix.indid + INNER JOIN syscolumns cols + ON cols.colid = ixc.colid + AND cols.id = ix.id + WHERE ix.id = object_id('{$table_name}') + AND cols.name = '{$column_name}'"; + } + else + { + $sql = "SELECT DISTINCT ix.name AS phpbb_index_name + FROM sys.indexes ix + INNER JOIN sys.index_columns ixc + ON ixc.object_id = ix.object_id + AND ixc.index_id = ix.index_id + INNER JOIN sys.columns cols + ON cols.column_id = ixc.column_id + AND cols.object_id = ix.object_id + WHERE ix.object_id = object_id('{$table_name}') + AND cols.name = '{$column_name}'"; + } + + $result = $this->db->sql_query($sql); + $existing_indexes = array(); + while ($row = $this->db->sql_fetchrow($result)) + { + $existing_indexes[$row['phpbb_index_name']] = array(); + } + $this->db->sql_freeresult($result); + + if (empty($existing_indexes)) + { + return array(); + } + + if ($this->mssql_is_sql_server_2000()) + { + $sql = "SELECT DISTINCT ix.name AS phpbb_index_name, cols.name AS phpbb_column_name + FROM sysindexes ix + INNER JOIN sysindexkeys ixc + ON ixc.id = ix.id + AND ixc.indid = ix.indid + INNER JOIN syscolumns cols + ON cols.colid = ixc.colid + AND cols.id = ix.id + WHERE ix.id = object_id('{$table_name}') + AND " . $this->db->sql_in_set('ix.name', array_keys($existing_indexes)); + } + else + { + $sql = "SELECT DISTINCT ix.name AS phpbb_index_name, cols.name AS phpbb_column_name + FROM sys.indexes ix + INNER JOIN sys.index_columns ixc + ON ixc.object_id = ix.object_id + AND ixc.index_id = ix.index_id + INNER JOIN sys.columns cols + ON cols.column_id = ixc.column_id + AND cols.object_id = ix.object_id + WHERE ix.object_id = object_id('{$table_name}') + AND " . $this->db->sql_in_set('ix.name', array_keys($existing_indexes)); + } + + $result = $this->db->sql_query($sql); + + while ($row = $this->db->sql_fetchrow($result)) + { + $existing_indexes[$row['phpbb_index_name']][] = $row['phpbb_column_name']; + } + $this->db->sql_freeresult($result); + + return $existing_indexes; + } + + /** + * Is the used MS SQL Server a SQL Server 2000? + * + * @return bool + */ + protected function mssql_is_sql_server_2000() + { + if ($this->is_sql_server_2000 === null) + { + $sql = "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(25)) AS mssql_version"; + $result = $this->db->sql_query($sql); + $properties = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + $this->is_sql_server_2000 = $properties['mssql_version'][0] == '8'; + } + + return $this->is_sql_server_2000; + } } diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 44fba06d9d..e38950f4c1 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -643,9 +643,23 @@ class log implements \phpbb\log\log_interface $operations = array(); foreach ($this->user->lang as $key => $value) { - if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value)) + if (substr($key, 0, 4) == 'LOG_') { - $operations[] = $key; + if (is_array($value)) + { + foreach ($value as $plural_value) + { + if (preg_match($keywords_pattern, $plural_value)) + { + $operations[] = $key; + break; + } + } + } + else if (preg_match($keywords_pattern, $value)) + { + $operations[] = $key; + } } } diff --git a/phpBB/search.php b/phpBB/search.php index 44335e2927..fbb4e93089 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -108,7 +108,7 @@ if ($interval && !in_array($search_id, array('unreadposts', 'unanswered', 'activ if ($user->data['user_last_search'] > time() - $interval) { $template->assign_var('S_NO_SEARCH', true); - trigger_error('NO_SEARCH_TIME'); + trigger_error($user->lang('NO_SEARCH_TIME', (int) ($user->data['user_last_search'] + $interval - time()))); } } diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index d2a070d11b..4df38f4275 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -244,10 +244,12 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var option = $(this); var option_id = option.attr('data-poll-option-id'); var voted = (typeof res.user_votes[option_id] !== 'undefined') ? true : false; + var most_voted = (res.vote_counts[option_id] == most_votes) ? true : false; var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[option_id] / res.total_votes) * 100); var percent_rel = (most_votes == 0) ? 0 : Math.round((res.vote_counts[option_id] / most_votes) * 100); option.toggleClass('voted', voted); + option.toggleClass('most-votes', most_voted); // Update the bars var bar = option.find('.resultbar div'); diff --git a/phpBB/styles/prosilver/template/faq_body.html b/phpBB/styles/prosilver/template/faq_body.html index 46f738aa3a..f72807cdec 100644 --- a/phpBB/styles/prosilver/template/faq_body.html +++ b/phpBB/styles/prosilver/template/faq_body.html @@ -24,10 +24,6 @@ </div> </div> - - -<div class="clear"></div> - <!-- BEGIN faq_block --> <div class="panel <!-- IF faq_block.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->"> <div class="inner"> diff --git a/phpBB/styles/prosilver/template/mcp_footer.html b/phpBB/styles/prosilver/template/mcp_footer.html index e5768bdc6b..89ce7c34ab 100644 --- a/phpBB/styles/prosilver/template/mcp_footer.html +++ b/phpBB/styles/prosilver/template/mcp_footer.html @@ -1,9 +1,8 @@ </div> - <div class="clear"></div> </div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 57d6fe0911..6665019ab8 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -50,14 +50,14 @@ <!-- ENDIF --> </dl> - <span class="clear"></span></div> + </div> </div> <!-- EVENT memberlist_view_contact_before --> <div class="panel bg2"> <div class="inner"> - <div class="column1"> + <div class="column1"> <h3>{L_CONTACT_USER} {USERNAME}</h3> <dl class="details"> @@ -103,7 +103,8 @@ <!-- EVENT memberlist_view_user_statistics_after --> </dl> </div> - <span class="clear"></span></div> + + </div> </div> <!-- EVENT memberlist_view_contact_after --> @@ -115,7 +116,7 @@ <div class="postbody"><div class="signature standalone">{SIGNATURE}</div></div> - <span class="clear"></span></div> + </div> </div> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html index 32cbecdf8c..0bc67a4417 100644 --- a/phpBB/styles/prosilver/template/navbar_footer.html +++ b/phpBB/styles/prosilver/template/navbar_footer.html @@ -2,7 +2,9 @@ <div class="inner"> <ul class="linklist bulletin"> - <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong></span> <!-- ENDIF --><span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span> + <li class="small-icon icon-home breadcrumbs"> + <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a></span><!-- ENDIF --> + <span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span> <!-- EVENT overall_footer_breadcrumb_append --> </li> <!-- IF not S_IS_BOT --> diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 259aec75ed..7fbaa1254f 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -3,17 +3,14 @@ <ul class="linklist navlinks"> <!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' --> - <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>‹</strong></span> <!-- ENDIF --> - <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span> - <!-- BEGIN navlinks --> <span class="crumb"><strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- END navlinks --> + <li class="small-icon icon-home breadcrumbs"> + <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a></span><!-- ENDIF --> + <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span> + <!-- BEGIN navlinks --><span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- END navlinks --> <!-- EVENT overall_header_breadcrumb_append --> </li> <!-- 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 U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF --> - <!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF --> - <!-- IF U_PRINT_TOPIC --><li class="rightside"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p" class="print">{L_PRINT_TOPIC}</a></li><!-- ENDIF --> - <!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></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_pm_header.html b/phpBB/styles/prosilver/template/posting_pm_header.html index 114b361e9a..dea50b5daf 100644 --- a/phpBB/styles/prosilver/template/posting_pm_header.html +++ b/phpBB/styles/prosilver/template/posting_pm_header.html @@ -76,7 +76,6 @@ </dl> </div> <!-- ENDIF --> - - <div class="clear"></div> + <!-- ENDIF --> </fieldset> diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html index ea546f7a82..f2f1a68db3 100644 --- a/phpBB/styles/prosilver/template/ucp_footer.html +++ b/phpBB/styles/prosilver/template/ucp_footer.html @@ -1,9 +1,8 @@ </div> - <div class="clear"></div> </div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <!-- IF S_COMPOSE_PM --> <div>{S_FORM_TOKEN}</div> diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html index a6ef3fc7dd..840eba4c83 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html @@ -15,6 +15,18 @@ </div> <!-- ENDIF --> + <!-- IF not S_IS_BOT and U_PRINT_PM --> + <div class="dropdown-container dropdown-button-control topic-tools"> + <span title="{L_PM_TOOLS}" class="dropdown-trigger dropdown-select dropdown-select-icon tools-icon"><span></span></span> + <div class="dropdown hidden"> + <div class="pointer"><div class="pointer-inner"></div></div> + <ul class="dropdown-contents"> + <!-- IF U_PRINT_PM --><li class="small-icon icon-print"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p">{L_PRINT_PM}</a></li><!-- ENDIF --> + </ul> + </div> + </div> + <!-- ENDIF --> + <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE --> <ul class="linklist"> <li class="rightside pagination"> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 4e3561c4a2..649129923a 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -72,7 +72,7 @@ <fieldset class="polls"> <!-- BEGIN poll_option --> - <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}"> + <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}"> <dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt> <!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF --> <dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd> diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html index fcce2267c4..89f34d1b3a 100644 --- a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html +++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html @@ -1,4 +1,4 @@ -<!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or S_HAS_ATTACHMENTS or S_DISPLAY_TOPIC_TOOLS) --> +<!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or S_HAS_ATTACHMENTS or U_EMAIL_TOPIC or U_PRINT_TOPIC or S_DISPLAY_TOPIC_TOOLS) --> <div class="dropdown-container dropdown-button-control topic-tools"> <span title="{L_TOPIC_TOOLS}" class="dropdown-trigger dropdown-select dropdown-select-icon tools-icon"><span></span></span> <div class="dropdown hidden"> @@ -20,6 +20,8 @@ </li> <!-- ENDIF --> <!-- IF U_BUMP_TOPIC --><li class="small-icon icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF --> + <!-- IF U_EMAIL_TOPIC --><li class="small-icon icon-sendemail"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a></li><!-- ENDIF --> + <!-- IF U_PRINT_TOPIC --><li class="small-icon icon-print"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p">{L_PRINT_TOPIC}</a></li><!-- ENDIF --> <!-- IF S_HAS_ATTACHMENTS --> <li class="small-icon icon-download"> <a class="dropdown-toggle-submenu" href="{U_DOWNLOAD_ALL_ATTACHMENTS}" title="{L_DOWNLOAD_ALL_ATTACHMENTS}">{L_DOWNLOAD_ALL_ATTACHMENTS}</a> diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 850726db89..0d5e1cf829 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -552,12 +552,6 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { margin: 0 1px 0 5px; } -/* Sub-header (navigation bar) ---------------------------------------------- */ -.rtl a.print, .rtl a.sendemail { - text-align: right; -} - /* Icon images ---------------------------------------- */ .rtl .small-icon { diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 93c325e416..3422af8b64 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -101,27 +101,6 @@ .dropdown-visible .dropdown-select.tools-icon:before, .nojs .dropdown-container:hover .dropdown-select.tools-icon:before { background-position: -80px -20px; } -/* Sub-header (navigation bar) ---------------------------------------------- */ -a.print, a.sendemail { - display: block; - overflow: hidden; - height: 18px; - text-indent: -5000px; - text-align: left; - background-repeat: no-repeat; -} - -a.print { - background-image: none; - width: 22px; -} - -a.sendemail { - background-image: none; - width: 22px; -} - /* Icon images ---------------------------------------- */ .small-icon { diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 5f6ca4929c..30650e7411 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -665,14 +665,6 @@ fieldset.polls dd div { Colours and backgrounds for buttons.css -------------------------------------------------------------- */ -a.print { - background-image: url("./images/icon_print.gif"); -} - -a.sendemail { - background-image: url("./images/icon_sendemail.gif"); -} - .buttons div a, .dropdown-select { border-color: #C7C3BF; background-color: #FFFFFF; @@ -736,6 +728,8 @@ a.sendemail { .icon-pm { background-image: url("./images/icon_pm.gif"); } .icon-download { background-image: url("./images/icon_download.gif"); } .icon-mark { background-image: url("./images/icon_mark.gif"); } +.icon-sendemail { background-image: url("./images/icon_sendemail.gif"); } +.icon-print { background-image: url("./images/icon_print.gif"); } /* Profile & navigation icons */ .email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 298d310ab1..3d5a0a433d 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -433,11 +433,11 @@ ul.linklist.bulletin li:before { } ul.linklist.bulletin li:first-child:before, ul.linklist.bulletin li.rightside:last-child:before { - display: none; + content: none; } ul.linklist.bulletin li.no-bulletin:before { - display: none; + content: none; } .responsive-menu:before { @@ -597,9 +597,20 @@ ul.linklist.bulletin li.no-bulletin:before { /* Responsive breadcrumbs ----------------------------------------*/ .breadcrumbs .crumb { + float: left; word-wrap: normal; } +.breadcrumbs .crumb:before { + content: '‹'; + font-weight: bold; + padding: 0 0.5em; +} + +.breadcrumbs .crumb:first-child:before { + content: none; +} + .breadcrumbs .crumb a { display: inline-block; white-space: nowrap; @@ -1078,7 +1089,7 @@ form > p.post-notice strong { .dropdown-extended .footer { text-align: center; - font-size: 1.2em; + font-size: 1.1em; } .dropdown-extended ul li a, .notification_list dt > a, .dropdown-extended .footer > a { @@ -1096,6 +1107,7 @@ form > p.post-notice strong { .notification_list ul li p { margin: 0; + font-size: 1em; } .notification_list div.notifications { diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index 64d2df2d1a..88f2bd65c5 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -284,7 +284,7 @@ fieldset.submit-buttons input { input.inputbox { width: 85%; } input.medium { width: 50%; } input.narrow { width: 25%; } -input.tiny { width: 125px; } +input.tiny { width: 150px; } textarea.inputbox { width: 85%; diff --git a/phpBB/styles/prosilver/theme/images/icon_print.gif b/phpBB/styles/prosilver/theme/images/icon_print.gif Binary files differindex a71dfdde70..e464e304ea 100644..100755 --- a/phpBB/styles/prosilver/theme/images/icon_print.gif +++ b/phpBB/styles/prosilver/theme/images/icon_print.gif diff --git a/phpBB/styles/prosilver/theme/images/icon_sendemail.gif b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif Binary files differindex f6b8aa10e1..92a39c8af9 100644 --- a/phpBB/styles/prosilver/theme/images/icon_sendemail.gif +++ b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index a5a50780fe..307ed0f391 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -80,7 +80,7 @@ <!-- BEGIN poll_option --> <tr> <!-- IF S_CAN_VOTE --> - <td> + <td<!-- IF poll_option.POLL_OPTION_MOST_VOTES --> class="most-votes"<!-- ENDIF -->> <!-- IF S_IS_MULTI_CHOICE --> <input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /> <!-- ELSE --> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ad7e8c29bc..9dc965240f 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -858,6 +858,7 @@ if (!empty($topic_data['poll_start'])) $option_pct_txt = sprintf("%.1d%%", round($option_pct * 100)); $option_pct_rel = ($poll_most > 0) ? $poll_option['poll_option_total'] / $poll_most : 0; $option_pct_rel_txt = sprintf("%.1d%%", round($option_pct_rel * 100)); + $option_most_votes = ($poll_option['poll_option_total'] > 0 && $poll_option['poll_option_total'] == $poll_most) ? true : false; $template->assign_block_vars('poll_option', array( 'POLL_OPTION_ID' => $poll_option['poll_option_id'], @@ -868,6 +869,7 @@ if (!empty($topic_data['poll_start'])) 'POLL_OPTION_PCT' => round($option_pct * 100), 'POLL_OPTION_WIDTH' => round($option_pct * 250), 'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false, + 'POLL_OPTION_MOST_VOTES' => $option_most_votes, )); } |