diff options
author | pafcu <pafcu@iki.fi> | 2014-10-16 16:06:20 +0300 |
---|---|---|
committer | pafcu <pafcu@iki.fi> | 2014-10-16 16:06:20 +0300 |
commit | 865f804cfb86f12573ece550e1a7cf28172f6749 (patch) | |
tree | 5484d212498eea4ab0e98e531dc06d5623cb8364 /include | |
parent | aa0aa22b8ad5db1589331e985e82781949985269 (diff) | |
parent | e1f88fd15d75f81af5017860b9f197771326c9b7 (diff) | |
download | volse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.tar.gz volse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.tar.bz2 volse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.zip |
Merge pull request #1 from friendica/master
Sync with upstream
Diffstat (limited to 'include')
-rw-r--r-- | include/acl_selectors.php | 3 | ||||
-rw-r--r-- | include/api.php | 5 | ||||
-rw-r--r-- | include/taxonomy.php | 2 | ||||
-rw-r--r-- | include/text.php | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 0b68ba227..5adafff2c 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -248,8 +248,7 @@ function populate_acl($defaults = null,$show_jotnets = true) { '$aclModalTitle' => t('Permissions'), '$aclModalDismiss' => t('Close') )); - - + return $o; } diff --git a/include/api.php b/include/api.php index 2505def4c..8b52253dd 100644 --- a/include/api.php +++ b/include/api.php @@ -197,7 +197,10 @@ require_once('include/items.php'); case "json": header ("Content-Type: application/json"); foreach($r as $rr) - return json_encode($rr); + $json = json_encode($rr); + if ($_GET['callback']) + $json = $_GET['callback']."(".$json.")"; + return $json; break; case "rss": header ("Content-Type: application/rss+xml"); diff --git a/include/taxonomy.php b/include/taxonomy.php index 92003328f..35605da22 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -154,7 +154,7 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $ } function tags_sort($a,$b) { - if($a[0] == $b[0]) + if(strtolower($a[0]) == strtolower($b[0])) return 0; return((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); } diff --git a/include/text.php b/include/text.php index 0e38de2d2..fca23ca22 100644 --- a/include/text.php +++ b/include/text.php @@ -619,8 +619,8 @@ function get_tags($s) { } if(substr($mtch,-1,1) === '.') $mtch = substr($mtch,0,-1); - // ignore strictly numeric tags like #1 - if((strpos($mtch,'#') === 0) && ( ctype_digit(substr($mtch,1)) || substr($mtch,1,1) === '^')) + // ignore strictly numeric tags like #1 or #^ bookmarks or ## double hash + if((strpos($mtch,'#') === 0) && ( ctype_digit(substr($mtch,1)) || substr($mtch,1,1) === '^') || substr($mtch,1,1) === '#') continue; // try not to catch url fragments if(strpos($s,$mtch) && preg_match('/[a-zA-z0-9\/]/',substr($s,strpos($s,$mtch)-1,1))) |