mirror of https://github.com/BOINC/boinc.git
- user web: init DB in banishment vote page
svn path=/trunk/boinc/; revision=14250
This commit is contained in:
parent
6b4d279dde
commit
28a5f1e897
|
@ -11256,3 +11256,9 @@ David 18 Nov 2007
|
|||
pm.inc
|
||||
languages/translations/
|
||||
en.po
|
||||
|
||||
David 18 Nov 2007
|
||||
- user web: init DB in banishment vote page
|
||||
|
||||
html/inc/
|
||||
forum_banishment_vote.inc
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
// TODO: convert to new DB interface
|
||||
// TODO: merge vote_yes() and vote_no() (??????)
|
||||
|
||||
db_init();
|
||||
|
||||
function current_tally($voteid) {
|
||||
$query="select sum(yes) as ayes,count(id)-sum(yes) as nays from banishment_votes where voteid=".$voteid;
|
||||
$result = mysql_query($query);
|
||||
|
@ -15,6 +20,7 @@ function vote_is_in_progress($userid) {
|
|||
$result = mysql_query($query);
|
||||
if (!$result) {
|
||||
echo "Database error attempting to read banishment_vote table 1.<p>";
|
||||
echo "query: $query";
|
||||
return -1;
|
||||
}
|
||||
$foobar = mysql_fetch_object($result);
|
||||
|
|
|
@ -115,7 +115,7 @@ function pm_notification($user) {
|
|||
$output = "";
|
||||
$unread = BoincPrivateMessage::count("userid=$user->id AND opened=0");
|
||||
|
||||
$output .= "Private messages: <a href=\"pm.php?action=inbox\">".tra("Inbox")."</a> ($unread unread)\n";
|
||||
$output .= "<a href=\"pm.php?action=inbox\">".tra("Inbox")."</a> ($unread ".tra("unread").")\n";
|
||||
$output .= "| <a href=\"pm.php?action=new\">".tra("Write")."</a>\n";
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -547,3 +547,5 @@ msgstr ""
|
|||
msgid "Used in URLs"
|
||||
msgstr ""
|
||||
|
||||
msgid "unread"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in New Issue