aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-01-06 09:11:48 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-01-06 09:11:48 +0100
commitf9b0af6f2f0c57481a0b5b3dc269b2389f3fa872 (patch)
treef06c87479be60f3c601cbeed6088e6e74d97785c /mod
parentefe308b5ac9ac7e8d399fb880f31b6967de8fec1 (diff)
parentc3ada095f4156bba01e77d2d250d5821ba5e859e (diff)
downloadvolse-hubzilla-f9b0af6f2f0c57481a0b5b3dc269b2389f3fa872.tar.gz
volse-hubzilla-f9b0af6f2f0c57481a0b5b3dc269b2389f3fa872.tar.bz2
volse-hubzilla-f9b0af6f2f0c57481a0b5b3dc269b2389f3fa872.zip
Merge remote-tracking branch 'friendica/master'
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php6
-rw-r--r--mod/network.php23
-rw-r--r--mod/photos.php1
-rw-r--r--mod/ping.php6
4 files changed, 24 insertions, 12 deletions
diff --git a/mod/item.php b/mod/item.php
index d4d337584..6b294b93e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -586,11 +586,9 @@ function item_post(&$a) {
// preview mode - prepare the body for display and send it via json
if($preview) {
- $b = prepare_body($datarray,true);
require_once('include/conversation.php');
- $o = conversation(&$a,array(array_merge($datarray,$contact_record)),'search',false);
- $json = array('preview' => $o);
- echo json_encode($json);
+ $o = conversation(&$a,array(array_merge($contact_record,$datarray)),'search',false,true);
+ echo json_encode(array('preview' => $o));
killme();
}
diff --git a/mod/network.php b/mod/network.php
index 397a701da..9318d20ca 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -10,6 +10,8 @@ function network_init(&$a) {
$group_id = (($a->argc > 1 && intval($a->argv[1])) ? intval($a->argv[1]) : 0);
require_once('include/group.php');
+ require_once('include/contact_widgets.php');
+
if(! x($a->page,'aside'))
$a->page['aside'] = '';
@@ -42,6 +44,7 @@ function network_init(&$a) {
}
$a->page['aside'] .= group_side('network','network',true,$group_id);
+ $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(($_GET['nets']) ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
}
@@ -52,7 +55,8 @@ function saved_searches($search) {
. ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '')
. ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '')
. ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '')
- . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '');
+ . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '')
+ . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '');
$o = '';
@@ -203,7 +207,7 @@ function network_content(&$a, $update = 0) {
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment');
$liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0);
$conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
-
+ $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
if(($a->argc > 2) && $a->argv[2] === 'new')
$nouveau = true;
@@ -259,10 +263,12 @@ function network_content(&$a, $update = 0) {
// that belongs to you, hence you can see all of it. We will filter by group if
// desired.
-
+
$sql_options = (($star) ? " and starred = 1 " : '');
$sql_options .= (($bmark) ? " and bookmark = 1 " : '');
+ $sql_nets = (($nets) ? sprintf(" and `contact`.`network` = '%s' ", dbesc($nets)) : '');
+
// We'll need the following line if starred/bookmarks are allowed in comments in the future
// $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
@@ -336,6 +342,7 @@ function network_content(&$a, $update = 0) {
. ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '')
. ((x($_GET,'liked')) ? '&liked=' . $_GET['liked'] : '')
. ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '')
+ . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '')
. "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
}
@@ -374,7 +381,7 @@ function network_content(&$a, $update = 0) {
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
$sql_extra2
- $sql_extra ",
+ $sql_extra $sql_nets ",
intval($_SESSION['uid'])
);
@@ -399,7 +406,7 @@ function network_content(&$a, $update = 0) {
$simple_update
AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- $sql_extra
+ $sql_extra $sql_nets
ORDER BY `item`.`received` DESC $pager_sql ",
intval($_SESSION['uid'])
);
@@ -423,7 +430,7 @@ function network_content(&$a, $update = 0) {
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`unseen` = 1
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- $sql_extra ",
+ $sql_extra $sql_nets ",
intval(local_user())
);
}
@@ -433,7 +440,7 @@ function network_content(&$a, $update = 0) {
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` = `item`.`id`
- $sql_extra
+ $sql_extra $sql_nets
ORDER BY `item`.$ordering DESC $pager_sql ",
intval(local_user())
);
@@ -459,7 +466,7 @@ function network_content(&$a, $update = 0) {
AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` IN ( %s )
- $sql_extra ",
+ $sql_extra $sql_nets",
intval(local_user()),
dbesc($parents_str)
);
diff --git a/mod/photos.php b/mod/photos.php
index 12225b5c5..7ec6c8794 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1203,6 +1203,7 @@ function photos_content(&$a) {
'$myphoto' => $contact['thumb'],
'$comment' => t('Comment'),
'$submit' => t('Submit'),
+ '$preview' => t('Preview'),
'$ww' => ''
));
}
diff --git a/mod/ping.php b/mod/ping.php
index df07cb768..35f6c53ae 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -190,6 +190,12 @@ function ping_init(&$a) {
};
}
+ if (count($cit)){
+ foreach ($cit as $i) {
+ echo xmlize( $a->get_baseurl().'/display/'.$a->user['nickname']."/".$i['parent'], $i['author-name'], $i['author-link'], $i['author-avatar'], relative_date($i['created']), t("{0} mentioned you in a post") );
+ };
+ }
+
echo " </notif>";
}
echo " <sysmsgs>";