diff options
author | Max Kostikov <max@kostikov.co> | 2018-12-20 20:51:26 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-12-20 20:51:26 +0100 |
commit | 89e734dcca1525fa804343d6ecf5286ce70b05ba (patch) | |
tree | 10d0a3614e9f97f5065ea53fff1c3d5fcd292c16 /include | |
parent | 3a662555768840d18c6dbba027af644eda54f20e (diff) | |
parent | 090fe394e4733aea9e9ca2e9a93c2c27b266d065 (diff) | |
download | volse-hubzilla-89e734dcca1525fa804343d6ecf5286ce70b05ba.tar.gz volse-hubzilla-89e734dcca1525fa804343d6ecf5286ce70b05ba.tar.bz2 volse-hubzilla-89e734dcca1525fa804343d6ecf5286ce70b05ba.zip |
Merge branch 'dev' into 'dev'
Sync dev
See merge request kostikov/core!1
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 2 | ||||
-rw-r--r-- | include/follow.php | 4 | ||||
-rw-r--r-- | include/network.php | 10 | ||||
-rw-r--r-- | include/zot.php | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index c5d6ef998..817986da0 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1021,7 +1021,7 @@ function bbcode($Text, $options = []) { } // Check for colored text if (strpos($Text,'[/hl]') !== false) { - $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text); + $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span class=\"default-highlight\">$1</span>", $Text); $Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text); } diff --git a/include/follow.php b/include/follow.php index 964c43ff2..038e6e9c0 100644 --- a/include/follow.php +++ b/include/follow.php @@ -266,9 +266,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } } else { - $closeness = get_pconfig($uid,'system','new_abook_closeness'); - if($closeness === false) - $closeness = 80; + $closeness = get_pconfig($uid,'system','new_abook_closeness',80); $r = abook_store_lowlevel( [ diff --git a/include/network.php b/include/network.php index e07001fa3..8ac71011e 100644 --- a/include/network.php +++ b/include/network.php @@ -120,6 +120,9 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { @curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']); } + if(array_key_exists('http_version',$opts)) + @curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']); + if(x($opts,'cookiejar')) @curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']); if(x($opts,'cookiefile')) @@ -157,7 +160,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { // Pull out multiple headers, e.g. proxy and continuation headers // allow for HTTP/2.x without fixing code - while(preg_match('/^HTTP\/[1-3].+? [1-5][0-9][0-9]/',$base)) { + while(preg_match('/^HTTP\/[1-3](\.\d)? [1-5][0-9][0-9]/',$base)) { $chunk = substr($base,0,strpos($base,"\r\n\r\n")+4); $header .= $chunk; $base = substr($base,strlen($chunk)); @@ -290,6 +293,9 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) { @curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']); } + if(array_key_exists('http_version',$opts)) + @curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']); + if(x($opts,'cookiejar')) @curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']); if(x($opts,'cookiefile')) @@ -323,7 +329,7 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) { // Pull out multiple headers, e.g. proxy and continuation headers // allow for HTTP/2.x without fixing code - while(preg_match('/^HTTP\/[1-3].+? [1-5][0-9][0-9]/',$base)) { + while(preg_match('/^HTTP\/[1-3](\.\d)? [1-5][0-9][0-9]/',$base)) { $chunk = substr($base,0,strpos($base,"\r\n\r\n")+4); $header .= $chunk; $base = substr($base,strlen($chunk)); diff --git a/include/zot.php b/include/zot.php index d031b4a96..9934dae07 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1232,6 +1232,7 @@ function zot_fetch($arr) { $datatosend = json_encode(crypto_encapsulate(json_encode($data),$hub['hubloc_sitekey'], $algorithm)); $import = zot_zot($url,$datatosend); + } else { $algorithm = zot_best_algorithm($hub['site_crypto']); @@ -4913,6 +4914,7 @@ function zot_reply_pickup($data) { dbesc($data['secret']), dbesc($data['callback']) ); + if(! $r) { $ret['message'] = 'nothing to pick up'; logger('mod_zot: pickup: ' . $ret['message']); |