r89511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89510‎ | r89511 | r89512 >
Date:17:46, 5 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r89501
Modified paths:
  • /trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php
@@ -164,7 +164,11 @@
165165 }
166166
167167 if ( $var !== false ) {
168 - $var = efSRFGetNextDV( $field )->getShortWikiText();
 168+ $dataValue = efSRFGetNextDV( $field );
 169+
 170+ if ( $dataValue !== false ) {
 171+ $var = $dataValue->getShortWikiText();
 172+ }
169173 }
170174 else {
171175 switch ( $label ) {
@@ -177,13 +181,11 @@
178182 $var = $GLOBALS['wgLang']->listToText( $wikiTexts );
179183 break;
180184 case 'date':
181 - $value = efSRFGetNextDV( $field );
 185+ $dataValue = efSRFGetNextDV( $field );
182186
183 - if ( get_class( $value ) == 'SMWTimeValue' ) {
184 - if ( $value !== false ) {
185 - $year = $value->getYear();
186 - $month = $value->getMonth();
187 - }
 187+ if ( $dataValue !== false && get_class( $dataValue ) == 'SMWTimeValue' ) {
 188+ $year = $dataValue->getYear();
 189+ $month = $dataValue->getMonth();
188190 }
189191 break;
190192 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89501made compat fixes for SMW 1.6 to BibTeX format and somewhat decreased it's co...jeroendedauw14:16, 5 June 2011