[Fusionforge-commits] r7128 - trunk/gforge/www/my
Roland Mas
lolando at libremir.placard.fr.eu.org
Fri Mar 6 13:32:36 CET 2009
Author: lolando
Date: 2009-03-06 13:32:36 +0100 (Fri, 06 Mar 2009)
New Revision: 7128
Modified:
trunk/gforge/www/my/diary.php
Log:
Fixed gettext invocation
Modified: trunk/gforge/www/my/diary.php
===================================================================
--- trunk/gforge/www/my/diary.php 2009-03-06 12:00:34 UTC (rev 7127)
+++ trunk/gforge/www/my/diary.php 2009-03-06 12:32:36 UTC (rev 7128)
@@ -79,25 +79,31 @@
$result=db_query($sql);
$rows=db_numrows($result);
- if ($result && $rows > 0) {
- $tolist=implode(util_result_column_to_array($result),', ');
-
- $to = ''; // send to noreply@
- $subject = "[ SF User Notes: ". $u->getRealName() ."] ".stripslashes($summary);
-
- $body = util_line_wrap(stripslashes($details)).
- "\n\n______________________________________________________________________".
- "\nYou are receiving this email because you elected to monitor this user.".
- "\nTo stop monitoring this user, login to ".$GLOBALS['sys_name']." and visit: ".
- "\nhttp://".$GLOBALS['sys_default_domain']."/developer/monitor.php?diary_user=". user_getid();
-
- util_send_message($to, $subject, $body, $to, $tolist);
-
-
+ if ($result) {
+ if ($rows > 0) {
+ $tolist=implode(util_result_column_to_array($result),', ');
+
+ $to = ''; // send to noreply@
+ $subject = "[ SF User Notes: ". $u->getRealName() ."] ".stripslashes($summary);
+
+ $body = util_line_wrap(stripslashes($details)).
+ "\n\n______________________________________________________________________".
+ "\nYou are receiving this email because you elected to monitor this user.".
+ "\nTo stop monitoring this user, login to ".$GLOBALS['sys_name']." and visit: ".
+ "\nhttp://".$GLOBALS['sys_default_domain']."/developer/monitor.php?diary_user=". user_getid();
+
+ util_send_message($to, $subject, $body, $to, $tolist);
+
+ $feedback .= " ".sprintf(ngettext("email sent to %s monitoring user",
+ "email sent to %s monitoring users",
+ $rows),
+ $rows);
+ } else {
+ $feedback .= " "._("email not sent - no one monitoring") ;
+ }
} else {
echo db_error();
}
- $feedback .= " ".sprintf(ngettext("email not sent - no one monitoring","email sent - %s people monitoring",$rows), $rows);
} else {
//don't send an email to monitoring users
More information about the Fusionforge-commits
mailing list