diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/event.php | 2 | ||||
-rw-r--r-- | include/network.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/event.php b/include/event.php index d4b81a25f..a9634d7a5 100644 --- a/include/event.php +++ b/include/event.php @@ -292,7 +292,7 @@ function bbtoevent($s) { $ev['nofinish'] = 1; } - logger('bbtoevent: ' . print_r($ev,true)); +// logger('bbtoevent: ' . print_r($ev,true)); return $ev; } diff --git a/include/network.php b/include/network.php index 66716ef9e..0fda80f19 100644 --- a/include/network.php +++ b/include/network.php @@ -91,6 +91,10 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60)); } + if(x($opts,'session') && strpos($url,z_root()) === 0) { + @curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Cookie: PHPSESSID=' . session_id() ]); + } + if(x($opts,'http_auth')) { // "username" . ':' . "password" @curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']); |