diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2014-10-16 21:37:14 +0200 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2014-10-16 21:37:14 +0200 |
commit | e425def2a2d81dc39e113a343eeab51764ce1163 (patch) | |
tree | 6535fba49d62e8ba504d73d4623616118ee3ec73 /include | |
parent | 6867a8a7f6060c82cba3a34cd944a3737e8e263e (diff) | |
parent | 865f804cfb86f12573ece550e1a7cf28172f6749 (diff) | |
download | volse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.tar.gz volse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.tar.bz2 volse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.zip |
Merge branch 'master' of https://github.com/pafcu/red
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))) |