/*=====================================================================*\
|| ###################################################################
|| # Bugdar
-|| # Copyright ©2002-2007 Blue Static
+|| # Copyright (c)2004-2008 Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
|| ###################################################################
\*=====================================================================*/
-define('SVN', '$Id$');
$focus['showreport'] = 'focus';
if ($_REQUEST['do'] == 'vote')
{
- $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $bugsys->input_clean('bugid', TYPE_UINT));
- $vote = $db->query_first("SELECT *, FIND_IN_SET(" . $bugsys->userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
+ $bug = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $input->inputClean('bugid', TYPE_UINT));
+ $vote = $db->queryFirst("SELECT *, FIND_IN_SET(" . bugdar::$userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
if (!check_bug_permissions($bug))
{
// handle userids
$userids = $vote['userids'];
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
if (trim($vote['userids']))
{
- $userids .= ',' . $bugsys->userinfo['userid'];
+ $userids .= ',' . bugdar::$userinfo['userid'];
}
else
{
- $userids = $bugsys->userinfo['userid'];
+ $userids = bugdar::$userinfo['userid'];
}
}
- $uservote = $bugsys->input_clean('vote', TYPE_INT);
+ $uservote = $input->inputClean('vote', TYPE_INT);
$votefor = $vote['votefor'];
$voteagainst = $vote['voteagainst'];
$message->redirect(T('Your vote has been added.'), "showreport.php?bugid=$bug[bugid]");
}
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
?>
\ No newline at end of file