[xoops-cvslog 2337] CVS update: xoops2jp/html/include

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 2月 20日 (月) 17:45:23 JST


Index: xoops2jp/html/include/comment_view.php
diff -u xoops2jp/html/include/comment_view.php:1.2.8.1 xoops2jp/html/include/comment_view.php:1.2.8.2
--- xoops2jp/html/include/comment_view.php:1.2.8.1	Wed Jan 25 16:10:46 2006
+++ xoops2jp/html/include/comment_view.php	Mon Feb 20 17:45:23 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: comment_view.php,v 1.2.8.1 2006/01/25 07:10:46 minahito Exp $
+// $Id: comment_view.php,v 1.2.8.2 2006/02/20 08:45:23 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -29,11 +29,15 @@
 // Project: The XOOPS Project (http://www.xoops.org/)                        //
 // ------------------------------------------------------------------------- //
 
+//
+// Kick direct access
+//
 if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
 	exit();
 }
-include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
-include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
+
+require_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+require_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
 
 if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
 
@@ -41,7 +45,7 @@
 	$groups = ( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
 	$xoopsTpl->assign( 'xoops_iscommentadmin', $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_COMMENT, $groups) );
 
- 	include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+ 	require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
 	$comment_config = $xoopsModule->getInfo('comments');
 	$com_itemid = (trim($comment_config['itemName']) != '' && isset($_GET[$comment_config['itemName']])) ? intval($_GET[$comment_config['itemName']]) : 0;
 
@@ -112,7 +116,7 @@
 				// Show specific thread tree
 				$comments =& $comment_handler->getThread($com_rootid, $com_id);
 				if (false != $comments) {
-					include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+					require_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
 					$renderer =& XoopsCommentRenderer::instance($xoopsTpl);
 					$renderer->setComments($comments);
 					$renderer->renderThreadView($com_id, $admin_view);
@@ -125,7 +129,7 @@
 					for ($i = 0; $i < $c_count; $i++) {
 						$comments =& $comment_handler->getThread($top_comments[$i]->getVar('com_rootid'), $top_comments[$i]->getVar('com_id'));
 						if (false != $comments) {
-							include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+							require_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
 							$renderer =& XoopsCommentRenderer::instance($xoopsTpl);
 							$renderer->setComments($comments);
 							$renderer->renderThreadView($top_comments[$i]->getVar('com_id'), $admin_view);
@@ -165,8 +169,9 @@
 		$renderTarget->setAttribute('com_itemid', $com_itemid);
 		$renderTarget->setAttribute('com_anonpost', $xoopsModuleConfig['com_anonpost']);
 		
+		$postcomment_link = "";
 		if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) {
-			$postcomment_link = 'comment_new.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode;
+			$postcomment_link = 'comment_new.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode;
 		}
 		
 		$link_extra = '';
@@ -193,6 +198,7 @@
 
 		$renderTarget->setAttribute("extraParams", $fetchParams);
 		$renderTarget->setAttribute("link_extra", $link_extra);
+		$renderTarget->setAttribute("postcomment_link", $postcomment_link);
 		
 		$renderer =& $root->getRenderSystem('Legacy_RenderSystem');
 		$renderer->renderWithTarget($renderTarget);


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index