Browse Source

don't use openid CURL wrapper if open_basedir is set (even if safe_mode isn't)

pull/1/head
Friendika 10 years ago
parent
commit
0a485e6664
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      library/openid.php
  2. +2
    -0
      mod/directory.php

+ 1
- 1
library/openid.php View File

@ -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);


+ 2
- 0
mod/directory.php View File

@ -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']);


Loading…
Cancel
Save