aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorDevlon Duthie <duthied@gmail.com>2011-10-08 16:57:00 -0500
committerDevlon Duthie <duthied@gmail.com>2011-10-08 16:57:00 -0500
commit2cba65bd38ad04280d6843daf345aa4a3c09baf2 (patch)
tree4bec49768b0f29c32ba79cc19fc21c485aa93809 /mod
parent24745314517eac403b421fa17a51bdbec94f3b6e (diff)
downloadvolse-hubzilla-2cba65bd38ad04280d6843daf345aa4a3c09baf2.tar.gz
volse-hubzilla-2cba65bd38ad04280d6843daf345aa4a3c09baf2.tar.bz2
volse-hubzilla-2cba65bd38ad04280d6843daf345aa4a3c09baf2.zip
fix for 'show all notifications' on notifications drop-down to handle installations in sub-directories + fix for friend notifications (eg: joe became friends with sam)
Diffstat (limited to 'mod')
-rw-r--r--mod/notifications.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/notifications.php b/mod/notifications.php
index 403efc5bd..d4cb4101b 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -179,7 +179,7 @@ function notifications_content(&$a) {
$notif_tpl = get_markup_template('notifications.tpl');
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`,
- `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
+ `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`,
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
@@ -217,6 +217,11 @@ function notifications_content(&$a) {
break;
case ACTIVITY_FRIEND:
+
+ $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+ $obj = parse_xml_string($xmlhead.$it['object']);
+ $it['fname'] = $obj->title;
+
$notif_content .= replace_macros($tpl_item_friends,array(
'$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
'$item_image' => $it['author-avatar'],
@@ -250,7 +255,7 @@ function notifications_content(&$a) {
$notif_tpl = get_markup_template('notifications.tpl');
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`,
- `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
+ `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`,
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
@@ -288,6 +293,11 @@ function notifications_content(&$a) {
break;
case ACTIVITY_FRIEND:
+
+ $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+ $obj = parse_xml_string($xmlhead.$it['object']);
+ $it['fname'] = $obj->title;
+
$notif_content .= replace_macros($tpl_item_friends,array(
'$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
'$item_image' => $it['author-avatar'],