r111117 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111116‎ | r111117 | r111118 >
Date:22:45, 9 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix issue with date values
Modified paths:
  • /trunk/extensions/EducationProgram/actions/EditCourseAction.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPDBObject.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPHTMLDateField.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/actions/EditCourseAction.php
@@ -242,7 +242,7 @@
243243 */
244244 protected function handleKnownField( $name, $value ) {
245245 if ( in_array( $name, array( 'end', 'start' ) ) ) {
246 - $value = wfTimestamp( TS_MW, strtotime( $value ) );
 246+ $value = wfTimestamp( TS_MW, strtotime( $value. ' UTC' ) );
247247 }
248248
249249 return $value;
Index: trunk/extensions/EducationProgram/includes/EPHTMLDateField.php
@@ -27,7 +27,7 @@
2828 }
2929
3030 function getInputHTML( $value ) {
31 - $value = explode( 'T', wfTimestamp( TS_ISO_8601, strtotime( $value ) ) );
 31+ $value = explode( 'T', wfTimestamp( TS_ISO_8601, strtotime( $value . ' UTC' ) ) );
3232 return parent::getInputHTML( $value[0] );
3333 }
3434
Index: trunk/extensions/EducationProgram/includes/EPDBObject.php
@@ -1278,7 +1278,6 @@
12791279 $excluded = $excludeSummaryFields && in_array( $name, $this->getSummaryFields() );
12801280
12811281 if ( !$excluded && $object->getField( $name ) !== $value ) {
1282 - //q($name, $value, $object->getField( $name ));
12831282 return true;
12841283 }
12851284 }

Status & tagging log