diff options
27 files changed, 82 insertions, 60 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 92bcf90039..dd8f4c279d 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -573,7 +573,11 @@ function validate_range($value_ary, &$error) 'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1), 'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535), 'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff), - 'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff), + // Do not use (int) 0x80000000 - it evaluates to different + // values on 32-bit and 64-bit systems. + // Apparently -2147483648 is a float on 32-bit systems, + // despite fitting in an int, thus explicit cast is needed. + 'INT' => array('php_type' => 'int', 'min' => (int) -2147483648, 'max' => (int) 0x7fffffff), 'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127), 'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255), diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 5c1876d006..524a28561e 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -88,11 +88,11 @@ class acm if (!phpbb_is_writable($this->cache_dir)) { // We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload()) - die($this->cache_dir . ' is NOT writable.'); + die('Fatal: ' . $this->cache_dir . ' is NOT writable.'); exit; } - die('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx); + die('Fatal: Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx); exit; } diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php index f706c98d43..27422513d9 100644 --- a/phpBB/includes/captcha/captcha_gd_wave.php +++ b/phpBB/includes/captcha/captcha_gd_wave.php @@ -62,8 +62,8 @@ class captcha 'y' => mt_rand(10, 17) ), 'lower_left' => array( - 'x' => mt_rand($img_x - 5, $img_x - 45), - 'y' => mt_rand($img_y - 0, $img_y - 15) + 'x' => mt_rand($img_x - 45, $img_x - 5), + 'y' => mt_rand($img_y - 15, $img_y - 0), ), ); diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index e537aabf56..009b514e52 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -46,12 +46,9 @@ var onload_functions = new Array(); var onunload_functions = new Array(); - <!-- IF S_USER_PM_POPUP --> - if ({S_NEW_PM}) - { - var url = '{UA_POPUP_PM}'; - window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400'); - } + <!-- IF S_USER_PM_POPUP and S_NEW_PM --> + var url = '{UA_POPUP_PM}'; + window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400'); <!-- ENDIF --> /** diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 5d74ff9d8f..3f215def72 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -171,7 +171,7 @@ dl.details dd { border-color: #4692BF; } -.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { +.pagination span a, .pagination span a:link, .pagination span a:visited { color: #5C758C; background-color: #ECEDEE; border-color: #B4BAC0; @@ -183,6 +183,12 @@ dl.details dd { color: #FFF; } +.pagination span a:active { + color: #5C758C; + background-color: #ECEDEE; + border-color: #B4BAC0; +} + /* Pagination in viewforum for multipage topics */ .row .pagination { background-image: url("{T_THEME_PATH}/images/icon_pages.gif"); @@ -304,12 +310,12 @@ a.topictitle:active { color: #0D4473; } -.signature a, .signature a:visited, .signature a:active, .signature a:hover { +.signature a, .signature a:visited, .signature a:hover, .signature a:active { background-color: transparent; } /* Profile links */ -.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a { +.postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color: #105289; } @@ -317,6 +323,10 @@ a.topictitle:active { color: #D31141; } +.postprofile a:active { + color: #105289; +} + /* Profile searchresults */ .search .postprofile a { color: #105289; diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css index ea9ca8f4b1..a406114054 100644 --- a/phpBB/styles/prosilver/theme/links.css +++ b/phpBB/styles/prosilver/theme/links.css @@ -103,14 +103,14 @@ a.topictitle:active { color: #404040; } -.signature a, .signature a:visited, .signature a:active, .signature a:hover { +.signature a, .signature a:visited, .signature a:hover, .signature a:active { border: none; text-decoration: underline; background-color: transparent; } /* Profile links */ -.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a { +.postprofile a:link, .postprofile a:visited, .postprofile dt.author a { font-weight: bold; color: #898989; text-decoration: none; @@ -121,6 +121,14 @@ a.topictitle:active { color: #d3d3d3; } +/* CSS spec requires a:link, a:visited, a:hover and a:active rules to be specified in this order. */ +/* See http://www.phpbb.com/bugs/phpbb3/59685 */ +.postprofile a:active { + font-weight: bold; + color: #898989; + text-decoration: none; +} + /* Profile searchresults */ .search .postprofile a { diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css index 68600b030b..2cfcd4da20 100644 --- a/phpBB/styles/prosilver/theme/print.css +++ b/phpBB/styles/prosilver/theme/print.css @@ -60,7 +60,7 @@ h3 { font-size: 14pt; margin-top: 1em; } } /* CSS2 Print tip from: http://www.alistapart.com/articles/goingtoprint/ */ -.postbody a:link, .postbody a:visited, .postbody a:active, .postbody a:hover { +.postbody a:link, .postbody a:visited, .postbody a:hover, .postbody a:active { text-decoration: underline; padding: 0.1em 0.2em; margin: -0.1em -0.2em; @@ -141,4 +141,4 @@ div.spacer { clear: both; } /* Accessibility tweaks: Mozilla.org */ .skip_link { display: none; } -dl.codebox dt { display: none; }
\ No newline at end of file +dl.codebox dt { display: none; } diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 48f6202c4f..be4c7b5b4c 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -28,11 +28,8 @@ <script type="text/javascript"> // <![CDATA[ -<!-- IF S_USER_PM_POPUP --> - if ({S_NEW_PM}) - { - popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg'); - } +<!-- IF S_USER_PM_POPUP and S_NEW_PM --> + popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg'); <!-- ENDIF --> function popup(url, width, height, name) diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index 726efdca0a..c2b6718d87 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -210,13 +210,13 @@ p.topicdetails { margin: 1px 0; } -.postreported, .postreported a:visited, .postreported a:hover, .postreported a:link, .postreported a:active { +.postreported, .postreported a:link, .postreported a:visited, .postreported a:hover, .postreported a:active { margin: 1px 0; color: red; font-weight:bold; } -.postapprove, .postapprove a:visited, .postapprove a:hover, .postapprove a:link, .postapprove a:active { +.postapprove, .postapprove a:link, .postapprove a:visited, .postapprove a:hover, .postapprove a:active { color: green; font-weight:bold; } @@ -386,12 +386,13 @@ hr { unicode-bidi: embed; } +/* CSS spec requires a:link, a:visited, a:hover and a:active rules to be specified in this order. */ +/* See http://www.phpbb.com/bugs/phpbb3/59685 */ a:link { color: #006597; text-decoration: none; } -a:active, a:visited { color: #005784; text-decoration: none; @@ -402,6 +403,11 @@ a:hover { text-decoration: underline; } +a:active { + color: #005784; + text-decoration: none; +} + a.forumlink { color: #069; font-weight: bold; @@ -667,4 +673,4 @@ pre { .username-coloured { font-weight: bold; -}
\ No newline at end of file +} diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php index 987de5cbff..533416f14b 100644 --- a/tests/dbal/select_test.php +++ b/tests/dbal/select_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_dbal_select_test extends phpbb_database_test_case { diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php index a24b6efcc4..4709d45fa5 100644 --- a/tests/dbal/write_test.php +++ b/tests/dbal/write_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_dbal_write_test extends phpbb_database_test_case { diff --git a/tests/network/checkdnsrr_test.php b/tests/network/checkdnsrr_test.php index 9410deaf64..5a756dcef8 100644 --- a/tests/network/checkdnsrr_test.php +++ b/tests/network/checkdnsrr_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; /** * @group slow diff --git a/tests/random/gen_rand_string_test.php b/tests/random/gen_rand_string_test.php index fa519f134c..115c55e4e2 100644 --- a/tests/random/gen_rand_string_test.php +++ b/tests/random/gen_rand_string_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_random_gen_rand_string_test extends phpbb_test_case { diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php index 93c761c8d0..fa9104e71d 100644 --- a/tests/regex/censor_test.php +++ b/tests/regex/censor_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_censor_test extends phpbb_test_case { diff --git a/tests/regex/email_test.php b/tests/regex/email_test.php index 5d6e207cbb..0695b801d5 100644 --- a/tests/regex/email_test.php +++ b/tests/regex/email_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_email_test extends phpbb_test_case { diff --git a/tests/regex/ipv4_test.php b/tests/regex/ipv4_test.php index 735a2c4384..9829547508 100644 --- a/tests/regex/ipv4_test.php +++ b/tests/regex/ipv4_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_ipv4_test extends phpbb_test_case { diff --git a/tests/regex/ipv6_test.php b/tests/regex/ipv6_test.php index 187588f861..1b2018403c 100644 --- a/tests/regex/ipv6_test.php +++ b/tests/regex/ipv6_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_ipv6_test extends phpbb_test_case { diff --git a/tests/regex/url_test.php b/tests/regex/url_test.php index 246cbf549c..c3a336063a 100644 --- a/tests/regex/url_test.php +++ b/tests/regex/url_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_regex_url_test extends phpbb_test_case { diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php index 0901b43920..fa17b1909f 100644 --- a/tests/request/request_var_test.php +++ b/tests/request/request_var_test.php @@ -7,8 +7,8 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; -require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; class phpbb_request_request_var_test extends phpbb_test_case { diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index ff0ab4d1bb..71c7a3a397 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -7,10 +7,10 @@ * */ -require_once __DIR__ . '/base.php'; +require_once dirname(__FILE__) . '/base.php'; -require_once __DIR__ . '/../../phpBB/includes/functions.php'; -require_once __DIR__ . '/../../phpBB/includes/session.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/session.php'; class phpbb_security_extract_current_page_test extends phpbb_security_test_base { diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php index c53414e7df..70ba8527b1 100644 --- a/tests/security/redirect_test.php +++ b/tests/security/redirect_test.php @@ -7,10 +7,10 @@ * */ -require_once __DIR__ . '/base.php'; +require_once dirname(__FILE__) . '/base.php'; -require_once __DIR__ . '/../../phpBB/includes/functions.php'; -require_once __DIR__ . '/../../phpBB/includes/session.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/session.php'; class phpbb_security_redirect_test extends phpbb_security_test_base { diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 35df17e4c6..1b2f35f210 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -7,8 +7,8 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; -require_once __DIR__ . '/../../phpBB/includes/template.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/template.php'; class phpbb_template_template_test extends phpbb_test_case { diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index a325855da4..32d2696f1c 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -111,9 +111,9 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test 'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '', ); } - else if (file_exists(__DIR__ . '/../test_config.php')) + else if (file_exists(dirname(__FILE__) . '/../test_config.php')) { - include(__DIR__ . '/../test_config.php'); + include(dirname(__FILE__) . '/../test_config.php'); return array( 'dbms' => $dbms, @@ -129,7 +129,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test // Silently use sqlite return array( 'dbms' => 'sqlite', - 'dbhost' => __DIR__ . '/../phpbb_unit_tests.sqlite2', // filename + 'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename 'dbport' => '', 'dbname' => '', 'dbuser' => '', @@ -340,7 +340,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test } } - $sql = $this->split_sql_file(file_get_contents(__DIR__ . "/../../phpBB/install/schemas/{$dbms['SCHEMA']}_schema.sql"), $config['dbms']); + $sql = $this->split_sql_file(file_get_contents(dirname(__FILE__) . "/../../phpBB/install/schemas/{$dbms['SCHEMA']}_schema.sql"), $config['dbms']); foreach ($sql as $query) { @@ -376,7 +376,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test $config = $this->get_database_config(); - require_once __DIR__ . '/../../phpBB/includes/db/' . $config['dbms'] . '.php'; + require_once dirname(__FILE__) . '/../../phpBB/includes/db/' . $config['dbms'] . '.php'; $dbal = 'dbal_' . $config['dbms']; $db = new $dbal(); $db->sql_connect($config['dbhost'], $config['dbuser'], $config['dbpasswd'], $config['dbname'], $config['dbport']); diff --git a/tests/text_processing/make_clickable_test.php b/tests/text_processing/make_clickable_test.php index 75a35daf82..29b982d709 100644 --- a/tests/text_processing/make_clickable_test.php +++ b/tests/text_processing/make_clickable_test.php @@ -7,8 +7,8 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; -require_once __DIR__ . '/../../phpBB/includes/functions_content.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; class phpbb_text_processing_make_clickable_test extends phpbb_test_case { diff --git a/tests/utf/normalizer_test.php b/tests/utf/normalizer_test.php index 9a9011c0fe..38b4ec1b6b 100644 --- a/tests/utf/normalizer_test.php +++ b/tests/utf/normalizer_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/utf/utf_normalizer.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_normalizer.php'; /** * @group slow @@ -16,8 +16,8 @@ class phpbb_utf_normalizer_test extends phpbb_test_case { static public function setUpBeforeClass() { - self::download('http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt', __DIR__.'/data'); - self::download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt', __DIR__.'/data'); + self::download('http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt', dirname(__FILE__).'/data'); + self::download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt', dirname(__FILE__).'/data'); } public function test_normalizer() @@ -62,7 +62,7 @@ class phpbb_utf_normalizer_test extends phpbb_test_case $tested_chars = array(); - $fp = fopen(__DIR__.'/data/NormalizationTest.txt', 'rb'); + $fp = fopen(dirname(__FILE__).'/data/NormalizationTest.txt', 'rb'); while (!feof($fp)) { $line = fgets($fp); @@ -117,7 +117,7 @@ class phpbb_utf_normalizer_test extends phpbb_test_case */ public function test_invariants(array $tested_chars) { - $fp = fopen(__DIR__.'/data/UnicodeData.txt', 'rb'); + $fp = fopen(dirname(__FILE__).'/data/UnicodeData.txt', 'rb'); while (!feof($fp)) { diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php index 148297ad4b..e5a771eafa 100644 --- a/tests/utf/utf8_clean_string_test.php +++ b/tests/utf/utf8_clean_string_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; class phpbb_utf_utf8_clean_string_test extends phpbb_test_case { diff --git a/tests/utf/utf8_wordwrap_test.php b/tests/utf/utf8_wordwrap_test.php index fbc947b92a..03fa9dc38c 100644 --- a/tests/utf/utf8_wordwrap_test.php +++ b/tests/utf/utf8_wordwrap_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; class phpbb_utf_utf8_wordwrap_test extends phpbb_test_case { |