Merge branch 'maint'

This commit is contained in:
Lukas Fleischer 2016-03-13 13:17:15 +01:00
commit 3ec3dfb6aa
4 changed files with 9 additions and 4 deletions

View file

@ -35,7 +35,7 @@ CREATE TABLE Users (
IRCNick VARCHAR(32) NOT NULL DEFAULT '',
PGPKey VARCHAR(40) NULL DEFAULT NULL,
LastLogin BIGINT UNSIGNED NOT NULL DEFAULT 0,
LastLoginIPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0,
LastLoginIPAddress VARCHAR(40) NULL DEFAULT NULL,
InactivityTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CommentNotify TINYINT(1) NOT NULL DEFAULT 1,

5
upgrading/4.2.1.txt Normal file
View file

@ -0,0 +1,5 @@
1. Convert the LastLoginIPAddress column to VARCHAR(40):
----
ALTER TABLE Users MODIFY LastLoginIPAddress VARCHAR(40) NULL DEFAULT NULL;
----

View file

@ -557,8 +557,8 @@ function try_login() {
}
$q = "UPDATE Users SET LastLogin = UNIX_TIMESTAMP(), ";
$q.= "LastLoginIPAddress = " . $dbh->quote(ip2long($_SERVER['REMOTE_ADDR'])) . " ";
$q.= "WHERE ID = '$userID'";
$q.= "LastLoginIPAddress = " . $dbh->quote($_SERVER['REMOTE_ADDR']) . " ";
$q.= "WHERE ID = $userID";
$dbh->exec($q);
/* Set the SID cookie. */

View file

@ -1,4 +1,4 @@
<h3><?= __("Recent Updates") ?> <span class="more">(<a href="<?= get_uri('/packages/') ?>?SB=l&amp;SO=d"><?= _('more') ?></a>)</span></h3>
<h3><?= __("Recent Updates") ?> <span class="more">(<a href="<?= get_uri('/packages/') ?>?SB=l&amp;SO=d"><?= __('more') ?></a>)</span></h3>
<a href="<?= get_uri('/rss/') ?>" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/rss.svg" alt="RSS Feed" /></a>