[xoops-cvslog 364] CVS update: xoops2jp/html/modules/xoopspoll

アーカイブの一覧に戻る

NobuNobu nobun****@users*****
2005年 8月 21日 (日) 13:16:55 JST


Index: xoops2jp/html/modules/xoopspoll/index.php
diff -u xoops2jp/html/modules/xoopspoll/index.php:1.2 xoops2jp/html/modules/xoopspoll/index.php:1.2.12.1
--- xoops2jp/html/modules/xoopspoll/index.php:1.2	Fri Mar 18 21:52:49 2005
+++ xoops2jp/html/modules/xoopspoll/index.php	Sun Aug 21 13:16:55 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: index.php,v 1.2 2005/03/18 12:52:49 onokazu Exp $
+// $Id: index.php,v 1.2.12.1 2005/08/21 04:16:55 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -30,17 +30,17 @@
 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspolloption.php";
 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspolllog.php";
 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspollrenderer.php";
-if ( !empty($HTTP_POST_VARS['poll_id']) ) {
-	$poll_id = intval($HTTP_POST_VARS['poll_id']);
-} elseif (!empty($HTTP_GET_VARS['poll_id'])) {
-	$poll_id = intval($HTTP_GET_VARS['poll_id']);
+if ( !empty($_POST['poll_id']) ) {
+	$poll_id = intval($_POST['poll_id']);
+} elseif (!empty($_GET['poll_id'])) {
+	$poll_id = intval($_GET['poll_id']);
 }
 
 if ( empty($poll_id) ) {
 	$xoopsOption['template_main'] = 'xoopspoll_index.html';
 	include XOOPS_ROOT_PATH."/header.php";
-	$limit = (!empty($HTTP_GET_VARS['limit'])) ? intval($HTTP_GET_VARS['limit']) : 50;
-	$start = (!empty($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : 0;
+	$limit = (!empty($_GET['limit'])) ? intval($_GET['limit']) : 50;
+	$start = (!empty($_GET['start'])) ? intval($_GET['start']) : 0;
     $xoopsTpl->assign('lang_pollslist', _PL_POLLSLIST);
     $xoopsTpl->assign('lang_pollquestion' , _PL_POLLQUESTION);
     $xoopsTpl->assign('lang_pollvoters', _PL_VOTERS);
@@ -67,8 +67,8 @@
 	unset($polls);
 	}
 	include XOOPS_ROOT_PATH."/footer.php";
-} elseif ( !empty($HTTP_POST_VARS['option_id']) ) {
-	$voted_polls = (!empty($HTTP_COOKIE_VARS['voted_polls'])) ? $HTTP_COOKIE_VARS['voted_polls'] : array();
+} elseif ( !empty($_POST['option_id']) ) {
+	$voted_polls = (!empty($_COOKIE['voted_polls'])) ? $_COOKIE['voted_polls'] : array();
 	$mail_author = false;
 	$poll = new XoopsPoll($poll_id);
 	if ( !$poll->hasExpired() ) {
@@ -78,7 +78,7 @@
 					setcookie("voted_polls[$poll_id]", 1, 0);
 					$msg = _PL_ALREADYVOTED;
 				} else {
-					$poll->vote($HTTP_POST_VARS['option_id'], xoops_getenv('REMOTE_ADDR'), $xoopsUser->getVar("uid"));
+					$poll->vote($_POST['option_id'], xoops_getenv('REMOTE_ADDR'), $xoopsUser->getVar("uid"));
 					$poll->updateCount();
 					setcookie("voted_polls[$poll_id]", 1, 0);
 					$msg = _PL_THANKSFORVOTE;
@@ -88,7 +88,7 @@
 					setcookie("voted_polls[$poll_id]", 1, 0);
 					$msg = _PL_ALREADYVOTED;
 				} else {
-					$poll->vote($HTTP_POST_VARS['option_id'], xoops_getenv('REMOTE_ADDR'));
+					$poll->vote($_POST['option_id'], xoops_getenv('REMOTE_ADDR'));
 					$poll->updateCount();
 					setcookie("voted_polls[$poll_id]", 1, 0);
 					$msg = _PL_THANKSFORVOTE;
Index: xoops2jp/html/modules/xoopspoll/pollresults.php
diff -u xoops2jp/html/modules/xoopspoll/pollresults.php:1.2 xoops2jp/html/modules/xoopspoll/pollresults.php:1.2.12.1
--- xoops2jp/html/modules/xoopspoll/pollresults.php:1.2	Fri Mar 18 21:52:49 2005
+++ xoops2jp/html/modules/xoopspoll/pollresults.php	Sun Aug 21 13:16:55 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: pollresults.php,v 1.2 2005/03/18 12:52:49 onokazu Exp $
+// $Id: pollresults.php,v 1.2.12.1 2005/08/21 04:16:55 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -32,7 +32,7 @@
 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspolllog.php";
 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspollrenderer.php";
 
-$poll_id = $HTTP_GET_VARS['poll_id'];
+$poll_id = $_GET['poll_id'];
 
 $poll_id = (!empty($poll_id)) ? intval($poll_id) : 0;
 if (empty($poll_id)) {


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る