diff options
author | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:51:56 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:51:56 +0200 |
commit | cf8995210625b31988dd9ae98435bf183ee799e3 (patch) | |
tree | 297e2ecfcff8e49c725ca3fd469326067d66ad47 /phpBB/includes/functions.php | |
parent | 0ed69d91b2ec7b4b2e86acbc1a9d65b09cad71c1 (diff) | |
parent | 478708346e2b046ae474ffb0c2e451a2690ddd2b (diff) | |
download | forums-cf8995210625b31988dd9ae98435bf183ee799e3.tar forums-cf8995210625b31988dd9ae98435bf183ee799e3.tar.gz forums-cf8995210625b31988dd9ae98435bf183ee799e3.tar.bz2 forums-cf8995210625b31988dd9ae98435bf183ee799e3.tar.xz forums-cf8995210625b31988dd9ae98435bf183ee799e3.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/7717] Localise default extension groups for attachments
[ticket/9598] checkdnsrr() is now available on Windows with PHP 5.3 or later. Change if block order to always call checkdnsrr() if the function is available.
[ticket/9173] No longer limit scope of numbers we store in the config table on
[ticket/9536] Small improvement for query against user/session tables when managing users from the ACP.
[ticket/9526] If an admin changes a user's 'user_allow_viewonline' flag to 'hide me' the admin usually wants that user to be hidden immediately. We therefore have to update his session if one exists.
[ticket/9518] Correctly create new connection on PostgreSQL when new connection is forced.
[ticket/9514] Correctly delete big datasets when deleting a forum including topics/posts on non-MySQL databases.
[ticket/6726] Added localhost/127.0.0.1 note to database server hostname explanation in install language.
[feature/remote_upload-filesize] Also check HTTP content-length before actually starting the file transfer.
[feature/remote_upload-filesize] When transferring files from a remote webserver, abort the transfer as soon as the allowed filesize has been exceeded.
[ticket/9176] Take current board timezone settings into account when setting board date format.
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4f52c7c2ce..36f5093e1f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -175,11 +175,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false) switch ($db->sql_layer) { case 'firebird': - $sql_update = 'CAST(CAST(config_value as integer) + ' . (int) $increment . ' as VARCHAR(255))'; - break; - case 'postgres': - $sql_update = 'int4(config_value) + ' . (int) $increment; + $sql_update = 'CAST(CAST(config_value as DECIMAL(255, 0)) + ' . (int) $increment . ' as VARCHAR(255))'; break; // MySQL, SQlite, mssql, mssql_odbc, oracle @@ -3409,13 +3406,14 @@ function phpbb_checkdnsrr($host, $type = '') { $type = (!$type) ? 'MX' : $type; - if (DIRECTORY_SEPARATOR == '\\') + // Call checkdnsrr() if available. This is also the case on Windows with PHP 5.3 or later. + if (function_exists('checkdnsrr')) + { + // The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain) + return checkdnsrr($host . '.', $type); + } + else if (DIRECTORY_SEPARATOR == '\\' && function_exists('exec')) { - if (!function_exists('exec')) - { - return NULL; - } - // @exec('nslookup -retry=1 -timout=1 -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host) . '.', $output); @@ -3441,11 +3439,6 @@ function phpbb_checkdnsrr($host, $type = '') return false; } - else if (function_exists('checkdnsrr')) - { - // The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain) - return (checkdnsrr($host . '.', $type)) ? true : false; - } return NULL; } |