summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-02-09 01:37:03 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-02-09 01:43:37 +0100
commit8c07c091e8b4bfcee33745d6c2e58a35cbf9a44d (patch)
tree40572d50c23bec38f880f35b52d5919418d67f61
parentb7b586a8c405e6e5967c5febcab67caab581ca0c (diff)
downloadaurweb-8c07c091e8b4bfcee33745d6c2e58a35cbf9a44d.tar.xz
Remove LastVoted column
This has been introduced by commit aae43d9 (started working on package comments, 2005-03-05) but it seems to be of no practical use. Remove the field to save some space. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--schema/aur-schema.sql1
-rw-r--r--web/lib/acctfuncs.inc.php3
-rw-r--r--web/lib/pkgfuncs.inc.php6
-rw-r--r--web/template/account_details.php6
-rw-r--r--web/template/account_search_results.php2
-rw-r--r--web/template/search_accounts_form.php1
6 files changed, 0 insertions, 19 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index c01701c..86f7563 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -32,7 +32,6 @@ CREATE TABLE Users (
LangPreference VARCHAR(5) NOT NULL DEFAULT 'en',
IRCNick VARCHAR(32) NOT NULL DEFAULT '',
PGPKey VARCHAR(40) NULL DEFAULT NULL,
- LastVoted BIGINT UNSIGNED NOT NULL DEFAULT 0,
LastLogin BIGINT UNSIGNED NOT NULL DEFAULT 0,
LastLoginIPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0,
InactivityTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index f705574..0207bbd 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -373,9 +373,6 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
case 'i':
$q.= "ORDER BY IRCNick, AccountTypeID ";
break;
- case 'v':
- $q.= "ORDER BY LastVoted, Username ";
- break;
default:
$q.= "ORDER BY Username, AccountTypeID ";
break;
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 59cc975..5800a26 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -1072,12 +1072,6 @@ function pkg_vote ($atype, $ids, $action=true) {
$dbh->exec($q);
if ($action) {
- $q = "UPDATE Users SET LastVoted = UNIX_TIMESTAMP() ";
- $q.= "WHERE ID = $uid";
- $dbh->exec($q);
- }
-
- if ($action) {
return array(true, __("Your votes have been cast for the selected packages."));
} else {
return array(true, __("Your votes have been removed from the selected packages."));
diff --git a/web/template/account_details.php b/web/template/account_details.php
index 680a52e..5ba01d9 100644
--- a/web/template/account_details.php
+++ b/web/template/account_details.php
@@ -44,12 +44,6 @@
</td>
</tr>
<tr>
- <th><?= __("Last Voted") . ":" ?></th>
- <td>
- <?= $row["LastVoted"] ? date("Y-m-d", $row["LastVoted"]) : __("Never"); ?>
- </td>
- </tr>
- <tr>
<th>Links:</th>
<td><ul>
<li><a href="<?= get_uri('/packages/'); ?>?K=<?= $row['Username'] ?>&amp;SeB=m"><?= __("View this user's packages") ?></a></li>
diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php
index ae7c112..bd4ee29 100644
--- a/web/template/account_search_results.php
+++ b/web/template/account_search_results.php
@@ -13,7 +13,6 @@ else:
<th><?= __("Real Name") ?></th>
<th><?= __("IRC Nick") ?></th>
<th><?= __("PGP Key Fingerprint") ?></th>
- <th><?= __("Last Voted") ?></th>
<th><?= __("Edit Account") ?></th>
</tr>
</thead>
@@ -42,7 +41,6 @@ else:
<td><?php $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print "&nbsp;" ?></td>
<td><?php $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print "&nbsp;" ?></td>
<td><?php $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print "&nbsp;" ?></td>
- <td><?php $row["LastVoted"] ? print date("Y-m-d", $row["LastVoted"]) : print __("Never") ?></td>
<td>
<?php
if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer"):
diff --git a/web/template/search_accounts_form.php b/web/template/search_accounts_form.php
index 202b1aa..d7f54be 100644
--- a/web/template/search_accounts_form.php
+++ b/web/template/search_accounts_form.php
@@ -57,7 +57,6 @@
<option value="t"><?= __("Account Type"); ?></option>
<option value="r"><?= __("Real Name"); ?></option>
<option value="i"><?= __("IRC Nick"); ?></option>
- <option value="v"><?= __("Last vote"); ?></option>
</select>
</td>
</tr>