[pLog-svn] r4971 - in plog/branches/lifetype-1.2: class/action/admin locale/admin

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Sat Mar 3 20:04:41 EST 2007


Author: jondaley
Date: 2007-03-03 20:04:41 -0500 (Sat, 03 Mar 2007)
New Revision: 4971

Modified:
   plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php
   plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php
Log:
show 'no topic' instead of %s when deleting a comment that doesn't have a topic

Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php	2007-03-04 01:04:10 UTC (rev 4970)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php	2007-03-04 01:04:41 UTC (rev 4971)
@@ -103,17 +103,19 @@
 					
 					// check if the comment really belongs to this blog...
 					$article = $comment->getArticle();
+                    if(!($topic = $comment->getTopic()))
+                        $topic = $this->_locale->tr("comment_no_topic");
 					if( $article->getBlogId() != $this->_blogInfo->getId()) {
 						// if not, then we shouldn't be allowed to remove anything!						
-						$errorMessage .= $this->_locale->pr("error_deleting_comment", $comment->getTopic())."<br/>";
+						$errorMessage .= $this->_locale->pr("error_deleting_comment", $topic)."<br/>";
 					}
 					else {
 						if( !$comments->deleteComment( $commentId ))
-							$errorMessage .= $this->_locale->pr("error_deleting_comment", $comment->getTopic())."<br/>";
+							$errorMessage .= $this->_locale->pr("error_deleting_comment", $topic)."<br/>";
 						else {
 							$totalOk++;
 							if( $totalOk < 2 )
-								$successMessage .= $this->_locale->pr("comment_deleted_ok", $comment->getTopic())."<br/>";
+								$successMessage .= $this->_locale->pr("comment_deleted_ok", $topic)."<br/>";
 							else
 								$successMessage = $this->_locale->pr("comments_deleted_ok", $totalOk );
 							

Modified: plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php	2007-03-04 01:04:10 UTC (rev 4970)
+++ plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php	2007-03-04 01:04:41 UTC (rev 4971)
@@ -188,6 +188,7 @@
 $messages['comment_marked_as_spam_ok'] = 'The comment was marked as spam successfully';
 $messages['error_marking_comment_as_nonspam'] = 'There was an error marking the comment as no spam';
 $messages['comment_marked_as_nonspam_ok'] = 'The comment was marked as no spam successfully';
+$messages['comment_no_topic'] = 'No topic';
 
 // post trackbacks
 $messages['blog'] = 'Blog';



More information about the pLog-svn mailing list