mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763) Merged (more or less) from MOODLE_16_STABLE
This commit is contained in:
parent
c766b9dfaa
commit
d836482a34
@ -1983,6 +1983,15 @@ function main_upgrade($oldversion=0) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname')");
|
||||
}
|
||||
}
|
||||
|
||||
//Renaming lastIP to lastip (all fields lowercase)
|
||||
if ($oldversion < 2006060900) {
|
||||
//Only if it exists
|
||||
$fields = $db->MetaColumnNames($CFG->prefix.'user');
|
||||
if (in_array('lastIP',$fields)) {
|
||||
table_column("user", "lastIP", "lastip", "varchar", "15", "", "", "not null", "currentlogin");
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -609,7 +609,7 @@ CREATE TABLE `prefix_user` (
|
||||
`lastaccess` int(10) unsigned NOT NULL default '0',
|
||||
`lastlogin` int(10) unsigned NOT NULL default '0',
|
||||
`currentlogin` int(10) unsigned NOT NULL default '0',
|
||||
`lastIP` varchar(15) NOT NULL default '',
|
||||
`lastip` varchar(15) NOT NULL default '',
|
||||
`secret` varchar(15) NOT NULL default '',
|
||||
`picture` tinyint(1) NOT NULL default '0',
|
||||
`url` varchar(255) NOT NULL default '',
|
||||
|
@ -1611,6 +1611,16 @@ function main_upgrade($oldversion=0) {
|
||||
}
|
||||
}
|
||||
|
||||
//Renaming lastIP to lastip (all fields lowercase)
|
||||
if ($oldversion < 2006060900) {
|
||||
//Not needed unded PG because it stores fieldnames lowecase by default
|
||||
//Only if it exists (because MOODLE_16_STABLE could have done this work before. Bug 5763)
|
||||
//$fields = $db->MetaColumnNames($CFG->prefix.'user');
|
||||
//if (in_array('lastIP',$fields)) {
|
||||
// table_column("user", "lastIP", "lastip", "varchar", "15", "", "", "", "currentlogin");
|
||||
//}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ CREATE TABLE prefix_user (
|
||||
lastaccess integer NOT NULL default '0',
|
||||
lastlogin integer NOT NULL default '0',
|
||||
currentlogin integer NOT NULL default '0',
|
||||
lastIP varchar(15) default NULL,
|
||||
lastip varchar(15) default NULL,
|
||||
secret varchar(15) default NULL,
|
||||
picture integer default NULL,
|
||||
url varchar(255) default NULL,
|
||||
|
@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2006060400; // YYYYMMDD = date
|
||||
$version = 2006060900; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.7 dev'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user