[pLog-svn] r3072 - in plog/trunk: class/dao locale

reto at devel.lifetype.net reto at devel.lifetype.net
Thu Mar 16 16:18:04 GMT 2006


Author: reto
Date: 2006-03-16 16:18:03 +0000 (Thu, 16 Mar 2006)
New Revision: 3072

Modified:
   plog/trunk/class/dao/articlenotifications.class.php
   plog/trunk/locale/locale_en_UK.php
Log:
fixing bug http://bugs.lifetype.net/view.php?id=481 and adding another string to locale_en_UK.php

Modified: plog/trunk/class/dao/articlenotifications.class.php
===================================================================
--- plog/trunk/class/dao/articlenotifications.class.php	2006-03-14 17:27:27 UTC (rev 3071)
+++ plog/trunk/class/dao/articlenotifications.class.php	2006-03-16 16:18:03 UTC (rev 3072)
@@ -15,7 +15,7 @@
 	{
 
 		var $_config;
-
+        var $_locale;
     	/**
          * Constructor. Does nothing yet.
          */
@@ -24,6 +24,7 @@
         	$this->Model();
 
             $this->_config =& Config::getConfig();
+            $this->_locale =& Locales::getLocale( $this->_config->getValue( "default_locale" ));
         }
 
         /**
@@ -80,12 +81,13 @@
          {
             include_once( PLOG_CLASS_PATH."class/mail/emailservice.class.php" );
             include_once( PLOG_CLASS_PATH."class/mail/emailmessage.class.php" );
-
+            
+            
             // $this->log->info( "sending notification to ".$userInfo->getEmail());
             $message = new EmailMessage();
             $message->setFrom( $this->_config->getValue( "post_notification_source_address" ));
             $message->addTo( $userInfo->getEmail());
-            $message->setSubject( "LifeType Notification system" );
+            $message->setSubject( $this->_locale->tr("notification_subject" ) );
             $message->setBody( $body );
             $message->setCharset( $charset );
 
@@ -102,7 +104,8 @@
          function notifyUsers( $postId, $blogInfo, $message = null)
          {
             include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
-
+            
+            
          	$blogId = $blogInfo->getId();
          	$artNotifs = $this->getArticleNotifications( $postId, $blogId );
 
@@ -125,7 +128,7 @@
             foreach( $artNotifs as $notif ) {
             	$userInfo = $users->getUserInfoFromId( $notif->getUserId());
                 $message = $this->renderMessageTemplate( $article, $blogInfo );
-            	$this->notifyUser( $notif, $userInfo, "LifeType Notification", $message, $charset );
+            	$this->notifyUser( $notif, $userInfo, $this->_locale->tr("notification_subject" ), $message, $charset );
             }
          }
 

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2006-03-14 17:27:27 UTC (rev 3071)
+++ plog/trunk/locale/locale_en_UK.php	2006-03-16 16:18:03 UTC (rev 3072)
@@ -999,4 +999,7 @@
 $messages['error_incorrect_user'] = 'User is not valid';
 $messages['select'] = 'Select';
 $messages['remove_selected'] = 'Remove Selected';
+
+$messages['notification_subject'] = 'LifeType Notification System';
+$messages['error_no_trackback_links_sent'] = 'Warning: No Trackbacks where sent.';
 ?>
\ No newline at end of file



More information about the pLog-svn mailing list