[xoops-cvslog 2717] CVS update: xoops2jp/html/modules/base/class

Back to archive index

Minahito minah****@users*****
2006年 4月 11日 (火) 12:10:19 JST


Index: xoops2jp/html/modules/base/class/comment.php
diff -u xoops2jp/html/modules/base/class/comment.php:1.1.2.6 xoops2jp/html/modules/base/class/comment.php:1.1.2.7
--- xoops2jp/html/modules/base/class/comment.php:1.1.2.6	Thu Mar 30 23:55:02 2006
+++ xoops2jp/html/modules/base/class/comment.php	Tue Apr 11 12:10:19 2006
@@ -63,15 +63,38 @@
 	var $mPrimary = "com_id";
 	var $mClass = "BaseCommentObject";
 	
+	function insert(&$comment, $force = false)
+	{
+		if (parent::insert($comment, $force)) {
+			$root =& XCube_Root::getSingleton();
+			$eventArgs = array();
+			$eventArgs['comment'] =& $comment;
+			$root->mEventManager->raiseEvent('Module.Legacy.Comment.Update.Success', $this, $eventArgs);
+			
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
+	
 	/**
 	 * Delete $comment and childlen of $comment.
 	 */
-	function delete(&$comment)
+	function delete(&$comment, $force = false)
 	{
 		$criteria =& new Criteria('com_pid', $comment->get('com_id'));
 		$this->deleteAll($criteria);
 		
-		return parent::delete($comment);
+		if (parent::delete($comment, $force)) {
+			$root =& XCube_Root::getSingleton();
+			$eventArgs = array();
+			$eventArgs['comment'] =& $comment;
+			$root->mEventManager->raiseEvent('Module.Legacy.Comment.Delete.Success', $this, $eventArgs);
+		}
+		else{
+			return false;
+		}
 	}
 
 	/**


xoops-cvslog メーリングリストの案内
Back to archive index