diff options
author | Friendika <info@friendika.com> | 2011-01-02 21:01:07 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-02 21:01:07 -0800 |
commit | 0a485e66647fb58e58e1a4bcab350109ff28cb22 (patch) | |
tree | a1f539c76910e5c224ddae3ec610a8dc6e2ab34a | |
parent | 0fb3aa1b57dc2a1d58a839bc99d2098003778d33 (diff) | |
download | volse-hubzilla-0a485e66647fb58e58e1a4bcab350109ff28cb22.tar.gz volse-hubzilla-0a485e66647fb58e58e1a4bcab350109ff28cb22.tar.bz2 volse-hubzilla-0a485e66647fb58e58e1a4bcab350109ff28cb22.zip |
don't use openid CURL wrapper if open_basedir is set (even if safe_mode isn't)
-rw-r--r-- | library/openid.php | 2 | ||||
-rw-r--r-- | mod/directory.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/library/openid.php b/library/openid.php index eec652bb1..3c58beb8a 100644 --- a/library/openid.php +++ b/library/openid.php @@ -276,7 +276,7 @@ class LightOpenID protected function request($url, $method='GET', $params=array()) { - if(function_exists('curl_init') && !ini_get('safe_mode')) { + if(function_exists('curl_init') && !ini_get('safe_mode') && (! strlen(ini_get('open_basedir')))) { return $this->request_curl($url, $method, $params); } return $this->request_streams($url, $method, $params); diff --git a/mod/directory.php b/mod/directory.php index 062aae516..e1c83f05e 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -40,6 +40,8 @@ function directory_content(&$a) { $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); + + $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra "); if(count($r)) $a->set_pager_total($r[0]['total']); |