diff --git a/boot.php b/boot.php index 5d476649d8..eae44c6729 100644 --- a/boot.php +++ b/boot.php @@ -241,6 +241,14 @@ function fetch_url($url,$binary = false) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true); curl_setopt($ch, CURLOPT_MAXREDIRS,8); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); + $prx = get_config('system','proxy'); + if(strlen($prx)) { + curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); + curl_setopt($ch, CURLOPT_PROXY, $prx); + $prxusr = get_config('system','proxyuser'); + if(strlen($prxusr)) + curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr); + } if($binary) curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); @@ -261,6 +269,14 @@ function post_url($url,$params) { curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); + $prx = get_config('system','proxy'); + if(strlen($prx)) { + curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); + curl_setopt($ch, CURLOPT_PROXY, $prx); + $prxusr = get_config('system','proxyuser'); + if(strlen($prxusr)) + curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr); + } $s = curl_exec($ch); curl_close($ch); diff --git a/include/dba.php b/include/dba.php index 0500682306..9e44db5fbb 100644 --- a/include/dba.php +++ b/include/dba.php @@ -46,7 +46,7 @@ class dba { else $mesg = $result->num_rows.' results' . EOL; - $str = 'SQL = ' . $sql . EOL . 'SQL returned ' . $mesg . EOL; + $str = 'SQL = ' . printable($sql) . EOL . 'SQL returned ' . $mesg . EOL; switch($this->debug) { case 3: diff --git a/include/notifier.php b/include/notifier.php index dcc7724547..149ce765cb 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -1,21 +1,21 @@ set_baseurl(get_config('system',url')); diff --git a/mod/contacts.php b/mod/contacts.php index 2a767102fa..45c0040c8f 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -209,17 +209,31 @@ function contacts_content(&$a) { } + if(($a->argc == 2) && ($a->argv[1] == 'all')) $sql_extra = ''; else $sql_extra = " AND `blocked` = 0 "; + $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); + $tpl = file_get_contents("view/contacts-top.tpl"); $o .= replace_macros($tpl,array( '$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ), - '$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')) + '$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')), + '$search' => $search, + '$finding' => (strlen($search) ? '