[geeklog-cvs] geeklog-1.3/public_html/admin poll.php,1.42,1.43 trackback.php,1.9,1.10
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Feb 5 13:48:41 EST 2005
Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv29104
Modified Files:
poll.php trackback.php
Log Message:
Fixed function getItemInfo (Thanks, Mike)
Index: poll.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/poll.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** poll.php 10 Dec 2004 09:56:34 -0000 1.42
--- poll.php 5 Feb 2005 18:48:39 -0000 1.43
***************
*** 9,18 ****
// | Geeklog poll administration page |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony at tonybibbs.com |
! // | Mark Limburg - mlimburg at users.sourceforge.net |
! // | Jason Whittenburg - jwhitten at securitygeeks.com |
! // | Dirk Haun - dirk at haun-online.de |
// +---------------------------------------------------------------------------+
// | |
--- 9,18 ----
// | Geeklog poll administration page |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2005 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
! // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
! // | Jason Whittenburg - jwhitten AT securitygeeks DOT com |
! // | Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
// | |
***************
*** 61,65 ****
// to the script. This will sometimes cause errors but it will allow you to see
// the data being passed in a POST operation
! // echo COM_debug($HTTP_POST_VARS);
/**
--- 61,65 ----
// to the script. This will sometimes cause errors but it will allow you to see
// the data being passed in a POST operation
! // echo COM_debug($_POST);
/**
***************
*** 154,157 ****
--- 154,161 ----
}
+ if ($commentcode != -1) {
+ $commentcode = 0;
+ }
+
$sql .= ",'$statuscode','$commentcode',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon";
***************
*** 436,467 ****
$display = '';
! if (isset ($HTTP_POST_VARS['mode'])) {
! $mode = $HTTP_POST_VARS['mode'];
! } else {
! $mode = $HTTP_GET_VARS['mode'];
}
if ($mode == 'edit') {
$display .= COM_siteHeader ('menu');
! $display .= editpoll (COM_applyFilter ($HTTP_GET_VARS['qid']));
$display .= COM_siteFooter ();
} else if (($mode == $LANG25[14]) && !empty ($LANG25[14])) { // save
! $qid = COM_applyFilter ($HTTP_POST_VARS['qid']);
if (!empty ($qid)) {
$voters = 0;
! for ($i = 0; $i < sizeof ($HTTP_POST_VARS['answer']); $i++) {
! $voters = $voters + $HTTP_POST_VARS['votes'][$i];
}
! $display .= savepoll ($qid, $HTTP_POST_VARS['mainpage'],
! $HTTP_POST_VARS['question'], $voters,
! COM_applyFilter ($HTTP_POST_VARS['statuscode'], true),
! COM_applyFilter ($HTTP_POST_VARS['commentcode'], true),
! $HTTP_POST_VARS['answer'], $HTTP_POST_VARS['votes'],
! $HTTP_POST_VARS['owner_id'],
! $HTTP_POST_VARS['group_id'],
! $HTTP_POST_VARS['perm_owner'],
! $HTTP_POST_VARS['perm_group'],
! $HTTP_POST_VARS['perm_members'],
! $HTTP_POST_VARS['perm_anon']);
} else {
$display .= COM_siteHeader ('menu');
--- 440,465 ----
$display = '';
! $mode = '';
! if (isset ($_REQUEST['mode'])) {
! $mode = $_REQUEST['mode'];
}
if ($mode == 'edit') {
$display .= COM_siteHeader ('menu');
! $display .= editpoll (COM_applyFilter ($_GET['qid']));
$display .= COM_siteFooter ();
} else if (($mode == $LANG25[14]) && !empty ($LANG25[14])) { // save
! $qid = COM_applyFilter ($_POST['qid']);
if (!empty ($qid)) {
$voters = 0;
! for ($i = 0; $i < sizeof ($_POST['answer']); $i++) {
! $voters = $voters + $_POST['votes'][$i];
}
! $display .= savepoll ($qid, $_POST['mainpage'], $_POST['question'],
! $voters, COM_applyFilter ($_POST['statuscode'], true),
! $_POST['commentcode'] $_POST['answer'], $_POST['votes'],
! $_POST['owner_id'], $_POST['group_id'],
! $_POST['perm_owner'], $_POST['perm_group'],
! $_POST['perm_members'], $_POST['perm_anon']);
} else {
$display .= COM_siteHeader ('menu');
***************
*** 474,480 ****
}
} else if (($mode == $LANG25[16]) && !empty ($LANG25[16])) { // delete
! $qid = COM_applyFilter ($HTTP_POST_VARS['qid']);
if (!isset ($qid) || empty ($qid)) {
! COM_errorLog ('Attempted to delete poll qid=' . $HTTP_POST_VARS['qid']);
$display .= COM_refresh ($_CONF['site_admin_url'] . '/poll.php');
} else {
--- 472,478 ----
}
} else if (($mode == $LANG25[16]) && !empty ($LANG25[16])) { // delete
! $qid = COM_applyFilter ($_POST['qid']);
if (!isset ($qid) || empty ($qid)) {
! COM_errorLog ('Attempted to delete poll qid=' . $_POST['qid']);
$display .= COM_refresh ($_CONF['site_admin_url'] . '/poll.php');
} else {
***************
*** 483,498 ****
} else { // 'cancel' or no mode at all
$display .= COM_siteHeader ('menu');
! if (isset ($HTTP_POST_VARS['msg'])) {
! $msg = COM_applyFilter ($HTTP_POST_VARS['msg'], true);
! } else {
! $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
}
! if (isset ($msg) && ($msg > 0)) {
$display .= COM_showMessage ($msg);
}
! if (isset ($HTTP_POST_VARS['page'])) {
! $page = $HTTP_POST_VARS['page'];
! } else {
! $page = $HTTP_GET_VARS['page'];
}
$display .= listpolls ($page);
--- 481,494 ----
} else { // 'cancel' or no mode at all
$display .= COM_siteHeader ('menu');
! $msg = 0;
! if (isset ($_REQUEST['msg'])) {
! $msg = COM_applyFilter ($_REQUEST['msg'], true);
}
! if ($msg > 0) {
$display .= COM_showMessage ($msg);
}
! $page = 1;
! if (isset ($_REQUEST['page'])) {
! $page = $_REQUEST['page'];
}
$display .= listpolls ($page);
Index: trackback.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/trackback.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** trackback.php 3 Feb 2005 19:57:40 -0000 1.9
--- trackback.php 5 Feb 2005 18:48:39 -0000 1.10
***************
*** 408,414 ****
{
if ($type == 'article') {
! return STORY_getItemInfo ($id, 'title');
} else {
! return PLG_getItemInfo ($type, $id, 'title');
}
}
--- 408,414 ----
{
if ($type == 'article') {
! return STORY_getItemInfo ($id, $what);
} else {
! return PLG_getItemInfo ($type, $id, $what);
}
}
More information about the geeklog-cvs
mailing list