From e80c20d2584e17b43dd456bbb4b3dc0f8c11eeb4 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 17:55:20 -0700 Subject: Don't recognise hashtags starting with #, e.g. ### --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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))) -- cgit v1.2.3 From ae9e1fa688c90e128637b5c44cf4705287f6cfa1 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 18:35:56 -0700 Subject: missing event permissions --- include/acl_selectors.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 0b68ba227..3cdbd411c 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -248,7 +248,8 @@ function populate_acl($defaults = null,$show_jotnets = true) { '$aclModalTitle' => t('Permissions'), '$aclModalDismiss' => t('Close') )); - + + logger($o); return $o; -- cgit v1.2.3 From 4cbe69685965eaa8900d927a55487599b4683b2e Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 15 Oct 2014 18:36:36 -0700 Subject: remove log statement --- include/acl_selectors.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 3cdbd411c..5adafff2c 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -249,8 +249,6 @@ function populate_acl($defaults = null,$show_jotnets = true) { '$aclModalDismiss' => t('Close') )); - logger($o); - return $o; } -- cgit v1.2.3 From e1f88fd15d75f81af5017860b9f197771326c9b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 16 Oct 2014 02:02:11 -0700 Subject: jsonp support (thankxs fabrixxm) --- include/api.php | 5 ++++- include/taxonomy.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') 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); } -- cgit v1.2.3