aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 22de82cb29..40d07ff770 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -266,6 +266,27 @@ function phpbb_mt_rand($min, $max)
}
/**
+* Wrapper for getdate() which returns the equivalent array for UTC timestamps.
+*
+* @param int $time Unix timestamp (optional)
+*
+* @return array Returns an associative array of information related to the timestamp.
+* See http://www.php.net/manual/en/function.getdate.php
+*/
+function phpbb_gmgetdate($time = false)
+{
+ if ($time === false)
+ {
+ $time = time();
+ }
+
+ // getdate() interprets timestamps in local time.
+ // What follows uses the fact that getdate() and
+ // date('Z') balance each other out.
+ return getdate($time - date('Z'));
+}
+
+/**
* Return formatted string for filesizes
*
* @param int $value filesize in bytes
@@ -3714,10 +3735,19 @@ function phpbb_checkdnsrr($host, $type = 'MX')
{
return true;
}
+ break;
default:
- case 'A':
case 'AAAA':
+ // AAAA records returned by nslookup on Windows XP/2003 have this format.
+ // Later Windows versions use the A record format below for AAAA records.
+ if (stripos($line, "$host AAAA IPv6 address") === 0)
+ {
+ return true;
+ }
+ // No break
+
+ case 'A':
if (!empty($host_matches))
{
// Second line