diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-04-01 03:54:58 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-04-01 03:54:58 -0400 |
commit | bbd86382a61ac814a84d50a871cd32989b1d73c3 (patch) | |
tree | b3ce88664fa4b0fb403767673dbfc52a4c52e7b1 | |
parent | ed8c5954a9189569a94e9a519f86ca2c8c88db50 (diff) | |
parent | e97d90820dd03cfbb4599c3fe1551f3d198e5e0c (diff) | |
download | volse-hubzilla-bbd86382a61ac814a84d50a871cd32989b1d73c3.tar.gz volse-hubzilla-bbd86382a61ac814a84d50a871cd32989b1d73c3.tar.bz2 volse-hubzilla-bbd86382a61ac814a84d50a871cd32989b1d73c3.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
line 86: s/Friendika/Friendica/
fix "between yourself and You" in mail list
* master:
-rwxr-xr-x | include/api.php | 2 | ||||
-rwxr-xr-x | mod/message.php | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/include/api.php b/include/api.php index 64772d657..065f14cff 100755 --- a/include/api.php +++ b/include/api.php @@ -83,7 +83,7 @@ $record = $r[0]; } else { logger('API_login failure: ' . print_r($_SERVER,true), LOGGER_DEBUG); - header('WWW-Authenticate: Basic realm="Friendika"'); + header('WWW-Authenticate: Basic realm="Friendica"'); header('HTTP/1.0 401 Unauthorized'); die('This api requires login'); } 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']); |