aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-27 19:21:41 -0700
committerfriendica <info@friendica.com>2014-10-27 19:23:40 -0700
commit9cc76cb33da489c01731ecb5195f8bb3d51ce513 (patch)
treeab725c297ed5feba03826ead5126b2d9cb078183 /mod
parent1b53d1c1d32072c71451cfd1a49b89ecfcd8b615 (diff)
downloadvolse-hubzilla-9cc76cb33da489c01731ecb5195f8bb3d51ce513.tar.gz
volse-hubzilla-9cc76cb33da489c01731ecb5195f8bb3d51ce513.tar.bz2
volse-hubzilla-9cc76cb33da489c01731ecb5195f8bb3d51ce513.zip
several unrelated things - auto_follow wasn't working for new accounts, error returned in private mention to a collection, and added auto-completion to photo tags; though it only matches people so the hover text is now wrong. Also made the photo edit form XHTML (XML) compliant.
Diffstat (limited to 'mod')
-rw-r--r--mod/acl.php8
-rw-r--r--mod/item.php3
2 files changed, 6 insertions, 5 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 7eb180cc4..01f5103f1 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -87,7 +87,7 @@ function acl_init(&$a){
$contact_count = (int)$r[0]['c'];
}
- elseif ($type == 'a') {
+ elseif (($type == 'a')||($type == 'p')) {
// autocomplete for Contacts
@@ -168,7 +168,7 @@ function acl_init(&$a){
intval(XCHAN_FLAGS_DELETED)
);
}
- elseif($type == 'a') {
+ elseif(($type == 'a') || ($type == 'p')) {
$r = q("SELECT abook_id as id, xchan_name as name, xchan_hash as hash, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag , abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel = %d
and not (xchan_flags & %d)
@@ -204,7 +204,7 @@ function acl_init(&$a){
$r = array();
- if($type == 'm' || $type == 'a') {
+ if($type == 'm' || $type == 'a' || $type == 'p') {
$x = array();
$x['query'] = $search;
$x['photos'] = array();
@@ -216,7 +216,7 @@ function acl_init(&$a){
$x['photos'][] = $g['micro'];
$x['links'][] = $g['url'];
$x['suggestions'][] = $g['name'];
- $x['data'][] = $g['id'];
+ $x['data'][] = (($type === 'p') ? '@' . str_replace(' ','_',$g['name']) : $g['id']);
}
}
echo json_encode($x);
diff --git a/mod/item.php b/mod/item.php
index dd6d0e217..22d285571 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -1181,9 +1181,10 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) {
if(local_user() && local_user() == $profile_uid) {
require_once('include/group.php');
$grp = group_byname($profile_uid,$name);
+
if($grp) {
$g = q("select hash from groups where id = %d and visible = 1 limit 1",
- intval($grp[0]['id'])
+ intval($grp)
);
if($g && $exclusive) {
$access_tag .= 'gid:' . $g[0]['hash'];