diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-28 11:09:22 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-28 11:09:22 +0200 |
commit | 9f576369a97009bc93f4f724f85024410c3899df (patch) | |
tree | adc2c68e8729ff783eca9cd259bc5b8fe394d2e6 /Zotlabs/Lib | |
parent | 911510f9996dc43bd3440884325326b7e99ea12f (diff) | |
parent | 7d7f43c2056fd50ff26aed5df553bf4936ead196 (diff) | |
download | volse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.tar.gz volse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.tar.bz2 volse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.zip |
Merge branch 'dev' into sabre32
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/SuperCurl.php | 15 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/Zotlabs/Lib/SuperCurl.php b/Zotlabs/Lib/SuperCurl.php index 40ca1addb..fd47c399c 100644 --- a/Zotlabs/Lib/SuperCurl.php +++ b/Zotlabs/Lib/SuperCurl.php @@ -26,6 +26,7 @@ class SuperCurl { private $request_method = 'GET'; private $upload = false; + private $cookies = false; private function set_data($s) { @@ -62,6 +63,11 @@ class SuperCurl { case 'http_auth': $this->auth = $v; break; + case 'magicauth': + $this->magicauth = $v; + \Zotlabs\Daemon\Master::Summon([ 'CurlAuth', $v ]); + sleep(2); + break; case 'custom': $this->request_method = $v; break; @@ -90,8 +96,17 @@ class SuperCurl { function exec() { $opts = $this->curlopts; + $url = $this->url; if($this->auth) $opts['http_auth'] = $this->auth; + if($this->magicauth) { + $opts['cookiejar'] = 'store/[data]/cookie_' . $this->magicauth; + $opts['cookiefile'] = 'store/[data]/cookie_' . $this->magicauth; + $opts['cookie'] = 'PHPSESSID=' . trim(file_get_contents('store/[data]/cookien_' . $this->magicauth)); + $c = channelx_by_n($this->magicauth); + if($c) + $url = zid($this->url,$c['channel_address'] . '@' . \App::get_hostname()); + } if($this->custom) $opts['custom'] = $this->custom; if($this->headers) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index f724ac95d..6625b7b52 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -418,7 +418,7 @@ class ThreadItem { if(($nb_children > $visible_comments) || ($thread_level > 1)) { $result['children'][0]['comment_firstcollapsed'] = true; $result['children'][0]['num_comments'] = $comment_count_txt; - $result['children'][0]['hide_text'] = t('[+] show all'); + $result['children'][0]['hide_text'] = sprintf( t('%s show all'), '<i class="fa fa-chevron-down"></i>'); if($thread_level > 1) { $result['children'][$nb_children - 1]['comment_lastcollapsed'] = true; } |