summaryrefslogtreecommitdiffstats
path: root/lib/general.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-12-20 16:52:43 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-12-20 16:52:43 +0000
commitd8ea07a04acc03160ac73f5db2a9249890e5fd13 (patch)
tree63e0dfedbfc9565a265cb342da405cd79b4ff341 /lib/general.lib.php
parent69c56f829da3fc44e6dbcc14c364901b86f55421 (diff)
downloadampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.tar.gz
ampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.tar.bz2
ampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.zip
sync from 3.5.x and fix display issue on playlist view
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r--lib/general.lib.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index 3c65c178..b488bc2b 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -467,75 +467,4 @@ function __autoload($class) {
} // __autoload
-/**
- * win_checkdnsrr
- * This is a windows emulation of the normal PHP functions
- * not sure how I feel about the exec in here, but it's escaped
- * this most likely won't work on a lot of systems
- */
-function win_checkdnsrr($host, $type='MX') {
- if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { return; }
- if (empty($host)) { return; }
- $types=array('A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY');
- if (!in_array($type,$types)) {
- user_error("checkdnsrr() Type '$type' not supported", E_USER_WARNING);
- return;
- }
- @exec('nslookup -type='.$type.' '.escapeshellcmd($host), $output);
- foreach($output as $line){
- if (preg_match('/^'.$host.'/',$line)) { return true; }
- }
-} // win_checkdnsrr
-
-// See if the function exists, and return as needed
-if (!function_exists('checkdnsrr')) {
- function checkdnsrr($host, $type='MX') {
- return win_checkdnsrr($host, $type);
- }
-}
-
-/**
- * win_getmxrr
- * This emulates the normal PHP function for getting MX records
- * most likely won't work on systems due to use of exec
- */
-function win_getmxrr($hostname, &$mxhosts, &$mxweight=false) {
- if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') return;
- if (!is_array ($mxhosts) ) $mxhosts = array();
- if (empty($hostname)) return;
- $exec='nslookup -type=MX '.escapeshellarg($hostname);
- @exec($exec, $output);
- if (empty($output)) return;
- $i=-1;
- foreach ($output as $line) {
- $i++;
- if (preg_match("/^$hostname\tMX preference = ([0-9]+), mail exchanger = (.+)$/i", $line, $parts)) {
- $mxweight[$i] = trim($parts[1]);
- $mxhosts[$i] = trim($parts[2]);
- }
- if (preg_match('/responsible mail addr = (.+)$/i', $line, $parts)) {
- $mxweight[$i] = $i;
- $mxhosts[$i] = trim($parts[1]);
- }
- }
- return ($i!=-1);
-} // win_getmxrr
-
-// If no getmxrr return
-if (!function_exists('getmxrr')) {
- function getmxrr($hostname, &$mxhosts, &$mxweight=false) {
- return win_getmxrr($hostname, $mxhosts, $mxweight);
- }
-}
-
-/**
- * debug_print
- * print_r with <pre> tag
- */
-function debug_print($var) {
- echo "<pre>";
- print_r($var);
- echo "</pre>";
-}
-
?>