]> git.mjollnir.org Git - moodle.git/commitdiff
Moving from lastIP to lastip everywhere. Bug 5763.
authorstronk7 <stronk7>
Fri, 9 Jun 2006 10:04:43 +0000 (10:04 +0000)
committerstronk7 <stronk7>
Fri, 9 Jun 2006 10:04:43 +0000 (10:04 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged from MOODLE_16_STABLE

lib/datalib.php
lib/db/migrate2utf8.xml
lib/moodlelib.php
mod/chat/lib.php

index 588264fa7bdf051c0cc60e7e886d4162248b46cf..236809db7c65daff90ee6797c74448469ef636fb 100644 (file)
@@ -2832,7 +2832,7 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
         echo '<p>Error: Could not insert a new entry to the Moodle log</p>';  // Don't throw an error
     }
     if ( isset($USER) && (empty($user) || $user==$USER->id) ) {
-        $db->Execute('UPDATE '. $CFG->prefix .'user SET lastIP=\''. $REMOTE_ADDR .'\', lastaccess=\''. $timenow .'\'
+        $db->Execute('UPDATE '. $CFG->prefix .'user SET lastip=\''. $REMOTE_ADDR .'\', lastaccess=\''. $timenow .'\'
                      WHERE id = \''. $userid .'\' ');
         if ($courseid != SITEID && !empty($courseid)) { // logins etc dont't have a courseid and isteacher will break without it.
             if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++;};
index 1da266bd8f158188bd584a4aeed6d86307624dfa..f711e8481e7121e5d97cedcb142c845ca12c56ee 100755 (executable)
         <FIELD name="country" method="NO_CONV" type="char" length="2" dropindex="user_country" addindex="user_country(country(2))"/>
         <FIELD name="theme" method="NO_CONV" type="varchar" length="50" />
         <FIELD name="timezone" method="NO_CONV" type="varchar" length="100" />
-        <FIELD name="lastIP" method="NO_CONV" type="varchar" length="15" />
+        <FIELD name="lastip" method="NO_CONV" type="varchar" length="15" />
         <FIELD name="secret" method="PHP_FUNCTION" type="varchar" length="15">
           <PHP_FUNCTION>
             migrate2utf8_user_secret(RECORDID)
index 9eac003c0d9a7cedb40b66856ba0dcd5ba257c07..69a5e0b26434072a40d40189af606037a7c194cf 100644 (file)
@@ -2432,7 +2432,7 @@ function create_user_record($username, $password, $auth='') {
     update_internal_user_password($newuser, $password, false);
     $newuser->lang = $CFG->lang;
     $newuser->confirmed = 1;
-    $newuser->lastIP = getremoteaddr();
+    $newuser->lastip = getremoteaddr();
     $newuser->timemodified = time();
 
     if (insert_record('user', $newuser)) {
@@ -2522,7 +2522,7 @@ function guest_user() {
         $newuser->confirmed = 1;
         $newuser->site = $CFG->wwwroot;
         $newuser->lang = $CFG->lang;
-        $newuser->lastIP = getremoteaddr();
+        $newuser->lastip = getremoteaddr();
     }
 
     return $newuser;
index 8a4051b07a9cbbea278e970290f5bd942072bdd7..c8d550b08926c289d6d00523ad0f3c5118eafe25 100644 (file)
@@ -384,11 +384,11 @@ function chat_login_user($chatid, $version, $groupid, $course) {
     global $USER;
     if (($version != 'sockets') and $chatuser = get_record_select('chat_users', "chatid='$chatid' AND userid='$USER->id' AND groupid='$groupid'")) {
         $chatuser->version  = $version;
-        $chatuser->ip       = $USER->lastIP;
+        $chatuser->ip       = $USER->lastip;
         $chatuser->lastping = time();
         $chatuser->lang     = current_language();
 
-        // Sometimes $USER->lastIP is not setup properly
+        // Sometimes $USER->lastip is not setup properly
         // during login. Update with current value if possible
         // or provide a dummy value for the db
         if (empty($chatuser->ip)) {
@@ -410,13 +410,13 @@ function chat_login_user($chatid, $version, $groupid, $course) {
         $chatuser->userid   = $USER->id;
         $chatuser->groupid  = $groupid;
         $chatuser->version  = $version;
-        $chatuser->ip       = $USER->lastIP;
+        $chatuser->ip       = $USER->lastip;
         $chatuser->lastping = $chatuser->firstping = $chatuser->lastmessageping = time();
         $chatuser->sid      = random_string(32);
         $chatuser->course   = $course->id; //caching - needed for current_language too
         $chatuser->lang     = current_language(); //caching - to resource intensive to find out later
 
-        // Sometimes $USER->lastIP is not setup properly
+        // Sometimes $USER->lastip is not setup properly
         // during login. Update with current value if possible
         // or provide a dummy value for the db
         if (empty($chatuser->ip)) {