[xoops-cvslog 1896] CVS update: xoops2jp/html/kernel

Back to archive index

Minahito minah****@users*****
2006年 1月 24日 (火) 20:26:06 JST


Index: xoops2jp/html/kernel/comment.php
diff -u xoops2jp/html/kernel/comment.php:1.2.8.1 xoops2jp/html/kernel/comment.php:1.2.8.2
--- xoops2jp/html/kernel/comment.php:1.2.8.1	Thu Nov 24 01:32:29 2005
+++ xoops2jp/html/kernel/comment.php	Tue Jan 24 20:26:06 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: comment.php,v 1.2.8.1 2005/11/23 16:32:29 minahito Exp $
+// $Id: comment.php,v 1.2.8.2 2006/01/24 11:26:06 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -59,7 +59,7 @@
     function XoopsComment()
     {
         $this->XoopsObject();
-        $this->initVar('com_id', XOBJ_DTYPE_INT, null, false);
+        $this->initVar('com_id', XOBJ_DTYPE_INT, 0, false);
         $this->initVar('com_pid', XOBJ_DTYPE_INT, 0, false);
         $this->initVar('com_modid', XOBJ_DTYPE_INT, null, false);
         $this->initVar('com_icon', XOBJ_DTYPE_OTHER, null, false);
@@ -104,7 +104,15 @@
 		$ret->setVar('com_modid',$this->getVar('com_modid'));
 		$ret->setVar('com_itemid',$this->getVar('com_itemid'));
 		$ret->setVar('com_exparams',$this->getVar('com_exparams'));
-		
+
+		$title = $this->get('com_title');
+		if (preg_match("/^Re:(.+)$/", $title, $matches)) {
+			$ret->set('com_title', "Re[2]: " . $matches[1]);
+		}
+		elseif (preg_match("/^Re\[(\d+)\]:(.+)$/", $title, $matches)) {
+			$ret->set('com_title', "Re[" . ($matches[1] + 1) . "]: " . $matches[2]);
+		}
+
 		return $ret;
 	}
 }


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