aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-31 20:08:32 -0700
committerfriendica <info@friendica.com>2012-03-31 20:08:32 -0700
commitea10bba14711d26dfbefcd83659bb60ae6587e26 (patch)
treebd7e1509b610e7b3ddede2a074eb72e416c10a07 /mod/message.php
parente6fd6bfd89ada9b5aeea8fcac1614546deba85aa (diff)
downloadvolse-hubzilla-ea10bba14711d26dfbefcd83659bb60ae6587e26.tar.gz
volse-hubzilla-ea10bba14711d26dfbefcd83659bb60ae6587e26.tar.bz2
volse-hubzilla-ea10bba14711d26dfbefcd83659bb60ae6587e26.zip
fix "between yourself and You" in mail list
Diffstat (limited to 'mod/message.php')
-rwxr-xr-xmod/message.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/mod/message.php b/mod/message.php
index 949e5616c..c347468d1 100755
--- a/mod/message.php
+++ b/mod/message.php
@@ -192,15 +192,12 @@ function message_content(&$a) {
return $o;
}
- if(($a->argc == 1) || ($a->argc == 2 && $a->argv[1] === 'sent')) {
+ if($a->argc == 1) {
+
+ // list messages
$o .= $header;
- if($a->argc == 2)
- $eq = sprintf( "AND `from-url` = '%s'", dbesc($myprofile));
- else
- $eq = '';
-
$r = q("SELECT count(*) AS `total` FROM `mail`
WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC",
intval(local_user()),
@@ -213,7 +210,7 @@ function message_content(&$a) {
`mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
count( * ) as count
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
- WHERE `mail`.`uid` = %d $eq GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
+ WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
intval(local_user()),
//
intval($a->pager['start']),
@@ -226,7 +223,7 @@ function message_content(&$a) {
$tpl = get_markup_template('mail_list.tpl');
foreach($r as $rr) {
- if ($rr['from-url'] == $myprofile){
+ if (link_compare($rr['from-url'],$myprofile)){
$partecipants = sprintf( t("You and %s"), $rr['name']);
} else {
$partecipants = sprintf( t("%s and You"), $rr['from-name']);