Skip to content
This repository
Browse code

FIX: Missing last login time (fixes 7666)

Add in missing user login time
  • Loading branch information...
commit ae52be54f01ae51c0ff4143a6a2b1535f58f6770 1 parent 023721a
Naomi Guyer authored August 07, 2012 wilr committed August 10, 2012
5  forms/DatetimeField.php
@@ -290,6 +290,7 @@ class DatetimeField_Readonly extends DatetimeField {
290 290
 	function Field($properties = array()) {
291 291
 		$valDate = $this->dateField->dataValue();
292 292
 		$valTime = $this->timeField->dataValue();
  293
+		
293 294
 		if($valDate && $valTime) {
294 295
 			$format = sprintf(
295 296
 				$this->getConfig('datetimeorder'), 
@@ -302,9 +303,9 @@ function Field($properties = array()) {
302 303
 				$this->dateField->getLocale()
303 304
 			);
304 305
 			$val = $valueObj->toString($format);
  306
+			
305 307
 		} else {
306  
-			// TODO Localization
307  
-			$val = '<i>(not set)</i>';
  308
+			$val = sprintf('<em>%s</em>', _t('DatetimeField.NOTSET', 'Not set'));
308 309
 		}
309 310
 		
310 311
 		return "<span class=\"readonly\" id=\"" . $this->id() . "\">$val</span>";
7  security/Member.php
@@ -1143,8 +1143,9 @@ public function getCMSFields() {
1143 1143
 		
1144 1144
 		$mainFields->removeByName('Salt');
1145 1145
 		$mainFields->removeByName('NumVisit');
1146  
-		$mainFields->removeByName('LastVisited');
1147  
-	
  1146
+
  1147
+		$mainFields->makeFieldReadonly('LastVisited');
  1148
+
1148 1149
 		$fields->removeByName('Subscriptions');
1149 1150
 
1150 1151
 		// Groups relation will get us into logical conflicts because
@@ -1214,7 +1215,7 @@ public function getCMSFields() {
1214 1215
 			)
1215 1216
 		);
1216 1217
 		$timeFormatField->setValue($this->TimeFormat);
1217  
-		
  1218
+
1218 1219
 		$this->extend('updateCMSFields', $fields);
1219 1220
 		
1220 1221
 		return $fields;

0 notes on commit ae52be5

Please sign in to comment.
Something went wrong with that request. Please try again.