r104459 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104458‎ | r104459 | r104460 >
Date:17:26, 28 November 2011
Author:kipcool
Status:deferred
Tags:
Comment:
Just formatting. Using elseif instead of "else if" and added some extra brackets.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/Controller.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Editor.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialOWStatistics.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Transaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataTables.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -103,35 +103,44 @@
104104 }
105105
106106 if ( $search != '' ) {
107 - if ( $query == 'transaction' )
 107+ if ( $query == 'transaction' ) {
108108 $searchCondition = " AND $rowText LIKE " . $dbr->addQuotes( "%$search%" );
109 - else if ( $query == 'class' )
 109+ }
 110+ elseif ( $query == 'class' ) {
110111 $searchCondition = " AND $rowText LIKE " . $dbr->addQuotes( "$search%" );
111 - else if ( $query == "$wgDefinedMeaningAttributes" or // should be 'relation-type' in html, there is a bug I cannot find
 112+ }
 113+ elseif ( $query == "$wgDefinedMeaningAttributes" or // should be 'relation-type' in html, there is a bug I cannot find
112114 $query == "$wgLinkAttribute" or
113115 $query == "$wgOptionAttribute" or
114116 $query == 'translated-text-attribute' or
115117 $query == 'text-attribute' )
 118+ {
116119 $searchCondition = " HAVING $rowText LIKE " . $dbr->addQuotes( "$search%" );
117 - else if ( $query == 'language' )
 120+ }
 121+ elseif ( $query == 'language' ) {
118122 $searchCondition = " HAVING $rowText LIKE " . $dbr->addQuotes( "%$search%" );
119 - else if ( $query == 'relation-type' ) // not sure in which case 'relation-type' happens...
 123+ }
 124+ elseif ( $query == 'relation-type' ) { // not sure in which case 'relation-type' happens...
120125 $searchCondition = " WHERE $rowText LIKE " . $dbr->addQuotes( "$search%" );
121 - else
 126+ }
 127+ else {
122128 $searchCondition = " AND $rowText LIKE " . $dbr->addQuotes( "$search%" );
 129+ }
 130+ } else {
 131+ $searchCondition = "";
123132 }
124 - else
125 - $searchCondition = "";
126133
127 - if ( $query == 'transaction' )
 134+ if ( $query == 'transaction' ) {
128135 $orderBy = 'transaction_id DESC';
129 - else
 136+ } else {
130137 $orderBy = $rowText;
 138+ }
131139
132140 $sql .= $searchCondition . " ORDER BY $orderBy LIMIT ";
133141
134 - if ( $offset > 0 )
 142+ if ( $offset > 0 ) {
135143 $sql .= " $offset, ";
 144+ }
136145
137146 // print only 10 results
138147 $sql .= "10";
@@ -184,8 +193,7 @@
185194
186195 $dbr->freeResult( $queryResult );
187196 $output = $editor->view( new IdStack( $prefix . 'table' ), $recordSet );
188 - // $output="<table><tr><td>HELLO ERIK!</td></tr></table>";
189 - // wfDebug($output);
 197+
190198 echo $output;
191199 }
192200
Index: trunk/extensions/Wikidata/OmegaWiki/Controller.php
@@ -111,12 +111,14 @@
112112 $languageId = $definitionRecord->language;
113113 $text = $definitionRecord->text;
114114
115 - if ( $languageId != 0 && $text != '' )
 115+ if ( $languageId != 0 && $text != '' ) {
116116 addDefinedMeaningAlternativeDefinition( $definedMeaningId, $languageId, $text, $sourceId );
 117+ }
117118 }
118119 }
119 - else if ( $alternativeDefinition != '' )
 120+ elseif ( $alternativeDefinition != '' ) {
120121 addDefinedMeaningAlternativeDefinition( $definedMeaningId, $this->filterLanguageId, $alternativeDefinition, $sourceId );
 122+ }
121123 }
122124
123125 public function remove( $keyPath ) {
@@ -286,12 +288,14 @@
287289 $text = $definitionRecord->text;
288290 $languageId = $definitionRecord->language;
289291
290 - if ( $languageId != 0 && $text != "" )
 292+ if ( $languageId != 0 && $text != "" ) {
291293 createNewDefinedMeaning( $expressionId, $languageId, $text );
 294+ }
292295 }
293296 }
294 - else if ( $translatedContent != "" )
 297+ elseif ( $translatedContent != "" ) {
295298 createNewDefinedMeaning( $expressionId, $this->filterLanguageId, $translatedContent );
 299+ }
296300 }
297301 }
298302
@@ -331,7 +335,7 @@
332336 }
333337 }
334338 }
335 - else if ( $translatedContent != "" ) {
 339+ elseif ( $translatedContent != "" ) {
336340 $expression = findOrCreateExpression( $this->spelling, $expressionLanguageId );
337341 createNewDefinedMeaning( $expression->id, $this->filterLanguageId, $translatedContent );
338342 }
@@ -463,12 +467,14 @@
464468 $languageId = $textValueRecord->language;
465469 $text = $textValueRecord->text;
466470
467 - if ( $languageId != 0 && $text != '' )
 471+ if ( $languageId != 0 && $text != '' ) {
468472 addTranslatedTextAttributeValue( $objectId, $textAttributeId, $languageId, $text );
 473+ }
469474 }
470475 }
471 - else if ( $textValue != '' )
 476+ elseif ( $textValue != '' ) {
472477 addTranslatedTextAttributeValue( $objectId, $textAttributeId, $this->filterLanguageId, $textValue );
 478+ }
473479 }
474480 }
475481
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -1354,14 +1354,16 @@
13551355
13561356 $version = (int) $_POST[$idStack->getId()];
13571357
1358 - if ( $version > 0 )
 1358+ if ( $version > 0 ) {
13591359 rollBackTranslatedContentToVersion( $translatedContentId, $languageId, $version );
 1360+ }
13601361
13611362 $idStack->popAttribute();
13621363 $idStack->popAttribute();
13631364 }
1364 - else if ( $rollBackAction == 'remove' )
 1365+ elseif ( $rollBackAction == 'remove' ) {
13651366 removeTranslatedText( $translatedContentId, $languageId );
 1367+ }
13661368 }
13671369
13681370 function getTranslatedContentFromHistory( $translatedContentId, $languageId, $addTransactionId ) {
@@ -1427,10 +1429,12 @@
14281430 }
14291431
14301432 function rollBackRelation( $rollBackAction, $relationId, $firstMeaningId, $relationTypeId, $secondMeaningId, $operation ) {
1431 - if ( shouldRemove( $rollBackAction, $operation ) )
 1433+ if ( shouldRemove( $rollBackAction, $operation ) ) {
14321434 removeRelationWithId( $relationId );
1433 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1435+ }
 1436+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
14341437 addRelation( $firstMeaningId, $relationTypeId, $secondMeaningId );
 1438+ }
14351439 }
14361440
14371441 function rollBackClassMemberships( $idStack, $classMemberships ) {
@@ -1462,10 +1466,12 @@
14631467 }
14641468
14651469 function rollBackClassMembership( $rollBackAction, $classMembershipId, $classId, $classMemberId, $operation ) {
1466 - if ( shouldRemove( $rollBackAction, $operation ) )
 1470+ if ( shouldRemove( $rollBackAction, $operation ) ) {
14671471 removeClassMembershipWithId( $classMembershipId );
1468 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1472+ }
 1473+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
14691474 addClassMembership( $classMemberId, $classId );
 1475+ }
14701476 }
14711477
14721478 function rollBackClassAttributes( $idStack, $classAttributes ) {
@@ -1499,10 +1505,12 @@
15001506 }
15011507
15021508 function rollBackClassAttribute( $rollBackAction, $classAttributeId, $classId, $levelId, $attributeId, $type, $operation ) {
1503 - if ( shouldRemove( $rollBackAction, $operation ) )
 1509+ if ( shouldRemove( $rollBackAction, $operation ) ) {
15041510 removeClassAttributeWithId( $classAttributeId );
1505 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1511+ }
 1512+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
15061513 addClassAttribute( $classId, $levelId, $attributeId, $type );
 1514+ }
15071515 }
15081516
15091517 function rollBackTranslatedTextProperties( $idStack, $translatedTextProperties ) {
@@ -1535,10 +1543,12 @@
15361544 }
15371545
15381546 function rollBackTranslatedTextProperty( $rollBackAction, $valueId, $objectId, $attributeId, $translatedContentId, $operation ) {
1539 - if ( shouldRemove( $rollBackAction, $operation ) )
 1547+ if ( shouldRemove( $rollBackAction, $operation ) ) {
15401548 removeTranslatedTextAttributeValue( $valueId );
1541 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1549+ }
 1550+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
15421551 createTranslatedTextAttributeValue( $valueId, $objectId, $attributeId, $translatedContentId );
 1552+ }
15431553 }
15441554
15451555 function rollBackLinkAttributes( $idStack, $linkAttributes ) {
@@ -1573,10 +1583,12 @@
15741584 }
15751585
15761586 function rollBackLinkAttribute( $rollBackAction, $valueId, $objectId, $attributeId, $url, $label, $operation ) {
1577 - if ( shouldRemove( $rollBackAction, $operation ) )
 1587+ if ( shouldRemove( $rollBackAction, $operation ) ) {
15781588 removeLinkAttributeValue( $valueId );
1579 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1589+ }
 1590+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
15801591 createLinkAttributeValue( $valueId, $objectId, $attributeId, $url, $label );
 1592+ }
15811593 }
15821594
15831595 function rollBackTextAttributes( $idStack, $textAttributes ) {
@@ -1609,10 +1621,12 @@
16101622 }
16111623
16121624 function rollBackTextAttribute( $rollBackAction, $valueId, $objectId, $attributeId, $text, $operation ) {
1613 - if ( shouldRemove( $rollBackAction, $operation ) )
 1625+ if ( shouldRemove( $rollBackAction, $operation ) ) {
16141626 removeTextAttributeValue( $valueId );
1615 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1627+ }
 1628+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
16161629 createTextAttributeValue( $valueId, $objectId, $attributeId, $text );
 1630+ }
16171631 }
16181632
16191633 function rollBackSyntranses( $idStack, $syntranses ) {
@@ -1645,10 +1659,12 @@
16461660 }
16471661
16481662 function rollBackSyntrans( $rollBackAction, $syntransId, $definedMeaningId, $expressionId, $identicalMeaning, $operation ) {
1649 - if ( shouldRemove( $rollBackAction, $operation ) )
 1663+ if ( shouldRemove( $rollBackAction, $operation ) ) {
16501664 removeSynonymOrTranslationWithId( $syntransId );
1651 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1665+ }
 1666+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
16521667 createSynonymOrTranslation( $definedMeaningId, $expressionId, $identicalMeaning );
 1668+ }
16531669 }
16541670
16551671 function rollBackAlternativeDefinitionTexts( $idStack, $alternativeDefinitionTexts ) {
@@ -1710,10 +1726,12 @@
17111727 }
17121728
17131729 function rollBackAlternativeDefinition( $rollBackAction, $definedMeaningId, $translatedContentId, $sourceId, $operation ) {
1714 - if ( shouldRemove( $rollBackAction, $operation ) )
 1730+ if ( shouldRemove( $rollBackAction, $operation ) ) {
17151731 removeDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId );
1716 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1732+ }
 1733+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
17171734 createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceId );
 1735+ }
17181736 }
17191737
17201738 function rollBackCollectionMemberships( $idStack, $collectionMemberships ) {
@@ -1746,10 +1764,12 @@
17471765 }
17481766
17491767 function rollBackCollectionMembership( $rollBackAction, $collectionId, $collectionMemberId, $sourceIdentifier, $operation ) {
1750 - if ( shouldRemove( $rollBackAction, $operation ) )
 1768+ if ( shouldRemove( $rollBackAction, $operation ) ) {
17511769 removeDefinedMeaningFromCollection( $collectionMemberId, $collectionId );
1752 - else if ( shouldRestore( $rollBackAction, $operation ) )
 1770+ }
 1771+ elseif ( shouldRestore( $rollBackAction, $operation ) ) {
17531772 addDefinedMeaningToCollection( $collectionMemberId, $collectionId, $sourceIdentifier );
 1773+ }
17541774 }
17551775
17561776
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -344,7 +344,9 @@
345345 $dbr = wfGetDB( DB_SLAVE );
346346 if ( $relationTypeId == null ) {
347347 if ( $lhs == null ) {
348 - if ( $rhs == null ) return $result;
 348+ if ( $rhs == null ) {
 349+ return $result;
 350+ }
349351 $query = "SELECT rel.relationtype_mid FROM {$dc}_meaning_relations rel " .
350352 "INNER JOIN {$dc}_defined_meaning dm ON rel.relationtype_mid=dm.defined_meaning_id " .
351353 "WHERE rel.meaning2_mid={$rhs} " .
@@ -352,7 +354,7 @@
353355 "AND" . getLatestTransactionRestriction( 'dm' ) .
354356 "GROUP BY rel.relationtype_mid";
355357 }
356 - else if ( $rhs == null ) {
 358+ elseif ( $rhs == null ) {
357359 $query = "SELECT rel.relationtype_mid FROM {$dc}_meaning_relations rel " .
358360 "INNER JOIN {$dc}_defined_meaning dm ON rel.relationtype_mid=dm.defined_meaning_id " .
359361 "WHERE rel.meaning1_mid={$lhs} " .
@@ -368,8 +370,10 @@
369371 "AND" . getLatestTransactionRestriction( 'dm' );
370372 }
371373 }
372 - else if ( $lhs == null ) {
373 - if ( $rhs == null ) return $result;
 374+ elseif ( $lhs == null ) {
 375+ if ( $rhs == null ) {
 376+ return $result;
 377+ }
374378 $query = "SELECT rel.meaning1_mid FROM {$dc}_meaning_relations rel " .
375379 "INNER JOIN {$dc}_defined_meaning dm ON rel.meaning1_mid=dm.defined_meaning_id " .
376380 "WHERE rel.meaning2_mid={$rhs} AND rel.relationtype_mid={$relationTypeId} " .
@@ -395,8 +399,9 @@
396400 }
397401
398402 function addClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) {
399 - if ( !classAttributeExists( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) )
 403+ if ( !classAttributeExists( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) ) {
400404 createClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType );
 405+ }
401406 }
402407
403408 function classAttributeExists( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) {
@@ -414,8 +419,9 @@
415420
416421 $dc = wdGetDataSetContext();
417422
418 - if ( $objectId == 0 )
 423+ if ( $objectId == 0 ) {
419424 $objectId = newObjectId( "{$dc}_class_attributes" );
 425+ }
420426
421427 $dbw = wfGetDB( DB_MASTER );
422428 $sql = "INSERT INTO {$dc}_class_attributes(object_id, class_mid, level_mid, attribute_mid, attribute_type, add_transaction_id) " .
@@ -429,10 +435,11 @@
430436 $queryResult = $dbr->query( "SELECT object_id FROM {$dc}_class_attributes " .
431437 "WHERE class_mid=$classMeaningId AND level_mid =$levelMeaningId AND attribute_mid=$attributeMeaningId AND attribute_type = " . $dbr->addQuotes( $attributeType ) );
432438
433 - if ( $classAttribute = $dbr->fetchObject( $queryResult ) )
 439+ if ( $classAttribute = $dbr->fetchObject( $queryResult ) ) {
434440 return $classAttribute->object_id;
435 - else
 441+ } else {
436442 return 0;
 443+ }
437444 }
438445
439446 function removeClassAttributeWithId( $classAttributeId ) {
@@ -449,18 +456,20 @@
450457 $queryResult = $dbr->query( "SELECT class_membership_id FROM {$dc}_class_membership " .
451458 "WHERE class_mid=$classId AND class_member_mid=$classMemberId LIMIT 1" );
452459
453 - if ( $classMembership = $dbr->fetchObject( $queryResult ) )
 460+ if ( $classMembership = $dbr->fetchObject( $queryResult ) ) {
454461 return $classMembership->class_membership_id;
455 - else
 462+ } else {
456463 return 0;
 464+ }
457465 }
458466
459467 function createClassMembership( $classMemberId, $classId ) {
460468 $dc = wdGetDataSetContext();
461469 $classMembershipId = getClassMembershipId( $classMemberId, $classId );
462470
463 - if ( $classMembershipId == 0 )
 471+ if ( $classMembershipId == 0 ) {
464472 $classMembershipId = newObjectId( "{$dc}_class_membership" );
 473+ }
465474
466475 $dbw = wfGetDB( DB_MASTER );
467476 $sql = "INSERT INTO {$dc}_class_membership(class_membership_id, class_mid, class_member_mid, add_transaction_id) " .
@@ -479,8 +488,9 @@
480489 }
481490
482491 function addClassMembership( $classMemberId, $classId ) {
483 - if ( !classMembershipExists( $classMemberId, $classId ) )
 492+ if ( !classMembershipExists( $classMemberId, $classId ) ) {
484493 createClassMembership( $classMemberId, $classId );
 494+ }
485495 }
486496
487497 function removeClassMembership( $classMemberId, $classId ) {
@@ -526,24 +536,27 @@
527537 " FROM {$dc}_syntrans" .
528538 " WHERE syntrans_sid=$syntransId AND remove_transaction_id IS NULL LIMIT 1" );
529539
530 - if ( $syntrans = $dbr->fetchObject( $queryResult ) )
 540+ if ( $syntrans = $dbr->fetchObject( $queryResult ) ) {
531541 updateSynonymOrTranslation( $syntrans->defined_meaning_id, $syntrans->expression_id, $identicalMeaning );
 542+ }
532543 }
533544
534545 function updateDefinedMeaningDefinition( $definedMeaningId, $languageId, $text ) {
535546 $definitionId = getDefinedMeaningDefinitionId( $definedMeaningId );
536547
537 - if ( $definitionId != 0 )
 548+ if ( $definitionId != 0 ) {
538549 updateTranslatedText( $definitionId, $languageId, $text );
 550+ }
539551 }
540552
541553 function updateOrAddDefinedMeaningDefinition( $definedMeaningId, $languageId, $text ) {
542554 $definitionId = getDefinedMeaningDefinitionId( $definedMeaningId );
543555
544 - if ( $definitionId != 0 )
 556+ if ( $definitionId != 0 ) {
545557 updateTranslatedText( $definitionId, $languageId, $text );
546 - else
 558+ } else {
547559 addDefinedMeaningDefiningDefinition( $definedMeaningId, $languageId, $text );
 560+ }
548561 }
549562
550563 function updateTranslatedText( $setId, $languageId, $text ) {
@@ -574,10 +587,12 @@
575588 function translatedTextExists( $textId, $languageId ) {
576589 $dc = wdGetDataSetContext();
577590
578 - if ( is_null( $textId ) )
 591+ if ( is_null( $textId ) ) {
579592 throw new Exception( "textId is null" );
580 - if ( is_null( $languageId ) )
 593+ }
 594+ if ( is_null( $languageId ) ) {
581595 throw new Exception( "languageId is null" );
 596+ }
582597
583598 $dbr = wfGetDB( DB_SLAVE );
584599 $queryResult = $dbr->query(
@@ -631,10 +646,11 @@
632647 function addDefinedMeaningDefinition( $definedMeaningId, $languageId, $text ) {
633648 $definitionId = getDefinedMeaningDefinitionId( $definedMeaningId );
634649
635 - if ( $definitionId == 0 )
 650+ if ( $definitionId == 0 ) {
636651 addDefinedMeaningDefiningDefinition( $definedMeaningId, $languageId, $text );
637 - else
 652+ } else {
638653 addTranslatedTextIfNotPresent( $definitionId, $languageId, $text );
 654+ }
639655 }
640656
641657 function createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceMeaningId ) {
@@ -704,8 +720,9 @@
705721 }
706722
707723 function addDefinedMeaningToCollectionIfNotPresent( $definedMeaningId, $collectionId, $internalId ) {
708 - if ( !definedMeaningInCollection( $definedMeaningId, $collectionId ) )
 724+ if ( !definedMeaningInCollection( $definedMeaningId, $collectionId ) ) {
709725 addDefinedMeaningToCollection( $definedMeaningId, $collectionId, $internalId );
 726+ }
710727 }
711728
712729 function getDefinedMeaningFromCollection( $collectionId, $internalMemberId ) {
@@ -714,10 +731,11 @@
715732 $query = "SELECT member_mid FROM {$dc}_collection_contents WHERE collection_id=$collectionId AND internal_member_id=" . $dbr->addQuotes( $internalMemberId ) . " AND " . getLatestTransactionRestriction( "{$dc}_collection_contents" ) . " LIMIT 1" ;
716733 $queryResult = $dbr->query( $query );
717734
718 - if ( $definedMeaningObject = $dbr->fetchObject( $queryResult ) )
 735+ if ( $definedMeaningObject = $dbr->fetchObject( $queryResult ) ) {
719736 return $definedMeaningObject->member_mid;
720 - else
 737+ } else {
721738 return null;
 739+ }
722740 }
723741
724742 function removeDefinedMeaningFromCollection( $definedMeaningId, $collectionId ) {
@@ -938,8 +956,9 @@
939957 }
940958
941959 function addOptionAttributeValue( $objectId, $optionId ) {
942 - if ( !optionAttributeValueExists( $objectId, $optionId ) )
 960+ if ( !optionAttributeValueExists( $objectId, $optionId ) ) {
943961 createOptionAttributeValue( $objectId, $optionId );
 962+ }
944963 }
945964
946965 function createOptionAttributeValue( $objectId, $optionId ) {
@@ -977,8 +996,9 @@
978997 }
979998
980999 function addOptionAttributeOption( $attributeId, $optionMeaningId, $languageId ) {
981 - if ( !optionAttributeOptionExists( $attributeId, $optionMeaningId, $languageId ) )
 1000+ if ( !optionAttributeOptionExists( $attributeId, $optionMeaningId, $languageId ) ) {
9821001 createOptionAttributeOption( $attributeId, $optionMeaningId, $languageId );
 1002+ }
9831003 }
9841004
9851005 function createOptionAttributeOption( $attributeId, $optionMeaningId, $languageId ) {
@@ -1047,10 +1067,11 @@
10481068 " AND dm.meaning_text_tcid=tc.translated_content_id AND tc.language_id=$languageId " .
10491069 " AND t.text_id=tc.text_id LIMIT 1" );
10501070
1051 - if ( $definition = $dbr->fetchObject( $queryResult ) )
 1071+ if ( $definition = $dbr->fetchObject( $queryResult ) ) {
10521072 return $definition->text_text;
1053 - else
 1073+ } else {
10541074 return "";
 1075+ }
10551076 }
10561077
10571078 /**
@@ -1068,10 +1089,11 @@
10691090 " AND dm.meaning_text_tcid=tc.translated_content_id " .
10701091 " AND t.text_id=tc.text_id LIMIT 1" );
10711092
1072 - if ( $definition = $dbr->fetchObject( $queryResult ) )
 1093+ if ( $definition = $dbr->fetchObject( $queryResult ) ) {
10731094 return $definition->text_text;
1074 - else
 1095+ } else {
10751096 return "";
 1097+ }
10761098 }
10771099
10781100 /**
@@ -1083,16 +1105,17 @@
10841106 global $wgLang;
10851107 $userLanguageId = getLanguageIdForCode( $wgLang->getCode() ) ;
10861108
1087 - if ( $userLanguageId > 0 )
 1109+ if ( $userLanguageId > 0 ) {
10881110 $result = getDefinedMeaningDefinitionForLanguage( $definedMeaningId, $userLanguageId );
1089 - else
 1111+ } else {
10901112 $result = "";
1091 -
 1113+ }
10921114 if ( $result == "" ) {
10931115 $result = getDefinedMeaningDefinitionForLanguage( $definedMeaningId, 85 );
10941116
1095 - if ( $result == "" )
 1117+ if ( $result == "" ) {
10961118 $result = getDefinedMeaningDefinitionForAnyLanguage( $definedMeaningId );
 1119+ }
10971120 }
10981121 return $result;
10991122 }
@@ -1118,7 +1141,9 @@
11191142
11201143 $res = $dbr->query( $actual_query );
11211144 $row = $dbr->fetchObject( $res );
1122 - if ( isset( $row->spelling ) ) return $row->spelling;
 1145+ if ( isset( $row->spelling ) ) {
 1146+ return $row->spelling;
 1147+ }
11231148 }
11241149
11251150 $fallbackLanguageId = $dbr->addQuotes( $fallbackLanguageId );
@@ -1126,13 +1151,17 @@
11271152
11281153 $res = $dbr->query( $fallback_query );
11291154 $row = $dbr->fetchObject( $res );
1130 - if ( isset( $row->spelling ) ) return $row->spelling;
 1155+ if ( isset( $row->spelling ) ) {
 1156+ return $row->spelling;
 1157+ }
11311158
11321159 $final_fallback = "select spelling from {$dc}_syntrans,{$dc}_expression where {$dc}_syntrans.defined_meaning_id=$definedMeaningId and {$dc}_expression.expression_id={$dc}_syntrans.expression_id and {$dc}_expression.remove_transaction_id is NULL LIMIT 1";
11331160
11341161 $res = $dbr->query( $final_fallback );
11351162 $row = $dbr->fetchObject( $res );
1136 - if ( isset( $row->spelling ) ) return $row->spelling;
 1163+ if ( isset( $row->spelling ) ) {
 1164+ return $row->spelling;
 1165+ }
11371166 return null;
11381167
11391168 }
@@ -1168,10 +1197,11 @@
11691198 "(SELECT expression_id FROM {$dc}_expression WHERE spelling LIKE " . $dbr->addQuotes( $name ) . " limit 1) limit 1)";
11701199 $queryResult = $dbr->query( $query );
11711200
1172 - if ( $collectionObject = $dbr->fetchObject( $queryResult ) )
 1201+ if ( $collectionObject = $dbr->fetchObject( $queryResult ) ) {
11731202 return $collectionObject->collection_id;
1174 - else
 1203+ } else {
11751204 return null;
 1205+ }
11761206 }
11771207
11781208 function getCollectionContents( $collectionId ) {
@@ -1189,8 +1219,9 @@
11901220
11911221 $collectionContents = array();
11921222
1193 - while ( $collectionEntry = $dbr->fetchObject( $queryResult ) )
 1223+ while ( $collectionEntry = $dbr->fetchObject( $queryResult ) ) {
11941224 $collectionContents[$collectionEntry->internal_member_id] = $collectionEntry->member_mid;
 1225+ }
11951226
11961227 return $collectionContents;
11971228 }
@@ -1219,37 +1250,39 @@
12201251 }
12211252
12221253 function getCollectionMemberId( $collectionId, $sourceIdentifier ) {
1223 - $dc = wdGetDataSetContext();
1224 - $dbr = & wfGetDB( DB_SLAVE );
1225 - $queryResult = $dbr->query(
 1254+ $dc = wdGetDataSetContext();
 1255+ $dbr = & wfGetDB( DB_SLAVE );
 1256+ $queryResult = $dbr->query(
12261257 "SELECT member_mid" .
12271258 " FROM {$dc}_collection_contents " .
1228 - " WHERE collection_id=$collectionId" .
1229 - " AND internal_member_id=" . $dbr->addQuotes( $sourceIdentifier ) .
1230 - " AND " . getLatestTransactionRestriction( "{$dc}_collection_contents" ) . " LIMIT 1"
1231 - );
 1259+ " WHERE collection_id=$collectionId" .
 1260+ " AND internal_member_id=" . $dbr->addQuotes( $sourceIdentifier ) .
 1261+ " AND " . getLatestTransactionRestriction( "{$dc}_collection_contents" ) . " LIMIT 1"
 1262+ );
12321263
1233 - if ( $collectionEntry = $dbr->fetchObject( $queryResult ) )
1234 - return $collectionEntry->member_mid;
1235 - else
1236 - return 0;
 1264+ if ( $collectionEntry = $dbr->fetchObject( $queryResult ) ) {
 1265+ return $collectionEntry->member_mid;
 1266+ } else {
 1267+ return 0;
 1268+ }
12371269 }
12381270
12391271 function getAnyDefinedMeaningWithSourceIdentifier( $sourceIdentifier ) {
1240 - $dc = wdGetDataSetContext();
1241 - $dbr = & wfGetDB( DB_SLAVE );
1242 - $queryResult = $dbr->query(
 1272+ $dc = wdGetDataSetContext();
 1273+ $dbr = & wfGetDB( DB_SLAVE );
 1274+ $queryResult = $dbr->query(
12431275 "SELECT member_mid" .
12441276 " FROM {$dc}_collection_contents " .
1245 - " WHERE internal_member_id=" . $dbr->addQuotes( $sourceIdentifier ) .
1246 - " AND " . getLatestTransactionRestriction( "{$dc}_collection_contents" ) .
1247 - " LIMIT 1"
1248 - );
 1277+ " WHERE internal_member_id=" . $dbr->addQuotes( $sourceIdentifier ) .
 1278+ " AND " . getLatestTransactionRestriction( "{$dc}_collection_contents" ) .
 1279+ " LIMIT 1"
 1280+ );
12491281
1250 - if ( $collectionEntry = $dbr->fetchObject( $queryResult ) )
1251 - return $collectionEntry->member_mid;
1252 - else
1253 - return 0;
 1282+ if ( $collectionEntry = $dbr->fetchObject( $queryResult ) ) {
 1283+ return $collectionEntry->member_mid;
 1284+ } else {
 1285+ return 0;
 1286+ }
12541287 }
12551288
12561289 function getExpressionMeaningIds( $spelling, $dc = null ) {
@@ -1550,10 +1583,11 @@
15511584 " LIMIT 1"
15521585 );
15531586
1554 - if ( $expression = $dbr->fetchObject( $queryResult ) )
 1587+ if ( $expression = $dbr->fetchObject( $queryResult ) ) {
15551588 return $expression->spelling;
1556 - else
 1589+ } else {
15571590 return "";
 1591+ }
15581592 }
15591593
15601594 /**
@@ -1573,10 +1607,11 @@
15741608 " AND " . getLatestTransactionRestriction( "{$dc}_expression" ) .
15751609 " LIMIT 1" );
15761610
1577 - if ( $expression = $dbr->fetchObject( $queryResult ) )
 1611+ if ( $expression = $dbr->fetchObject( $queryResult ) ) {
15781612 return $expression->spelling;
1579 - else
 1613+ } else {
15801614 return "";
 1615+ }
15811616 }
15821617
15831618 /**
@@ -1593,11 +1628,11 @@
15941629
15951630 list( $definingExpressionId, $definingExpression, $definingExpressionLanguage ) = definingExpressionRow( $definedMeaningId );
15961631
1597 - if ( $userLanguageId > 0 )
 1632+ if ( $userLanguageId > 0 ) {
15981633 $result = definedMeaningExpressionForLanguage( $definedMeaningId, $userLanguageId );
1599 - else
 1634+ } else {
16001635 $result = "";
1601 -
 1636+ }
16021637 if ( $result == "" ) {
16031638 // if no expression exists for the specified language : look for an expression in English
16041639 $result = definedMeaningExpressionForLanguage( $definedMeaningId, 85 );
@@ -1605,8 +1640,9 @@
16061641 if ( $result == "" ) {
16071642 $result = definedMeaningExpressionForAnyLanguage( $definedMeaningId );
16081643
1609 - if ( $result == "" )
 1644+ if ( $result == "" ) {
16101645 $result = $definingExpression;
 1646+ }
16111647 }
16121648 }
16131649
@@ -1699,10 +1735,11 @@
17001736 if ( in_array( $row['language_id'], $languages ) ) {
17011737 // $key becomes something like trans_23
17021738 $key = 'trans_' . $row['language_id'];
1703 - if ( !isset( $data[$key] ) )
 1739+ if ( !isset( $data[$key] ) ) {
17041740 $data[$key] = $row['spelling'];
1705 - else
 1741+ } else {
17061742 $data[$key] = $data[$key] . '|' . $row['spelling'];
 1743+ }
17071744 }
17081745 }
17091746 $dbr->freeResult( $translations );
@@ -1764,26 +1801,29 @@
17651802 $this->classAttributes[] = $classAttribute;
17661803 }
17671804 }
1768 -
 1805+
17691806 public function filterClassAttributesOnLevelAndType( $levelName, $type ) {
17701807 $result = array();
17711808
1772 - foreach ( $this->classAttributes as $classAttribute )
1773 - if ( $classAttribute->levelName == $levelName && $classAttribute->type == $type )
 1809+ foreach ( $this->classAttributes as $classAttribute ) {
 1810+ if ( $classAttribute->levelName == $levelName && $classAttribute->type == $type ) {
17741811 $result[] = $classAttribute->attributeId;
 1812+ }
 1813+ }
17751814
17761815 return $result;
17771816 }
1778 -
 1817+
17791818 public function filterClassAttributesOnLevel( $levelName ) {
17801819 $result = array();
17811820
1782 - foreach ( $this->classAttributes as $classAttribute )
1783 - if ( $classAttribute->levelName == $levelName )
 1821+ foreach ( $this->classAttributes as $classAttribute ) {
 1822+ if ( $classAttribute->levelName == $levelName ) {
17841823 $result[] = $classAttribute->attributeId;
 1824+ }
 1825+ }
17851826
17861827 return $result;
17871828 }
1788 -
17891829 }
17901830
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialOWStatistics.php
@@ -26,16 +26,17 @@
2727
2828 $wgOut->addHTML( $headerText ) ;
2929
30 - if ( $showstat == 'dm' )
 30+ if ( $showstat == 'dm' ) {
3131 $wgOut->addHTML( $this->getDefinedMeaningPerLanguage () );
32 - else if ( $showstat == 'def' )
 32+ } elseif ( $showstat == 'def' ) {
3333 $wgOut->addHTML( $this->getDefinitionPerLanguage () );
34 - else if ( $showstat == 'syntrans' )
 34+ } elseif ( $showstat == 'syntrans' ) {
3535 $wgOut->addHTML( $this->getSyntransPerLanguage () );
36 - else if ( $showstat == 'exp' )
 36+ } elseif ( $showstat == 'exp' ) {
3737 $wgOut->addHTML ( $this->getExpressionPerLanguage () ) ;
38 - else if ( $showstat == 'annot' )
 38+ } elseif ( $showstat == 'annot' ) {
3939 $wgOut->addHTML ( $this->getAnnotationStats () ) ;
 40+ }
4041 }
4142
4243 function linkHeader ( $text, $val , $showstat ) {
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -124,14 +124,16 @@
125125 $attribute->type->getAttributes(),
126126 $this->filterStructuresOnAttribute( $structures, $attribute )
127127 );
128 -
129 - if ( count( $filteredAttributes ) > 0 )
 128+
 129+ if ( count( $filteredAttributes ) > 0 ) {
130130 $result[] = new Attribute( $attribute->id, $attribute->name, new Structure( $filteredAttributes ) );
 131+ }
131132 }
132 - else if ( $this->attributeInStructures( $attribute, $structures ) )
 133+ elseif ( $this->attributeInStructures( $attribute, $structures ) ) {
133134 $result[] = $attribute;
 135+ }
134136 }
135 -
 137+
136138 return $result;
137139 }
138140
@@ -141,8 +143,9 @@
142144 foreach ( $this->getEditors() as $editor ) {
143145 $visibleStructure = $editor->getTableStructureForView( $idPath, $value->getAttributeValue( $editor->getAttribute() ) );
144146
145 - if ( count( $visibleStructure->getAttributes() ) > 0 )
 147+ if ( count( $visibleStructure->getAttributes() ) > 0 ) {
146148 $visibleStructures[] = $visibleStructure;
 149+ }
147150 }
148151
149152 return $this->filterAttributesByStructures(
@@ -159,18 +162,20 @@
160163 $leadingAttributes = array();
161164 $childEditors = $editor->getEditors();
162165
163 - for ( $i = $showPropertyColumn ? 0 : 1; $i < 2; $i++ )
 166+ for ( $i = $showPropertyColumn ? 0 : 1; $i < 2; $i++ ) {
164167 $leadingAttributes[] = $childEditors[$i]->getAttribute();
165 -
 168+ }
 169+
166170 return new Structure( array_merge( $leadingAttributes, $suffixAttributes ) );
167171 }
168172
169173 public function view( IdStack $idPath, $value ) {
170174 $visibleAttributes = array();
171175
172 - if ( $this->showPropertyColumn )
 176+ if ( $this->showPropertyColumn ) {
173177 $visibleAttributes[] = $this->propertyAttribute;
174 -
 178+ }
 179+
175180 $visibleAttributes[] = $this->valueAttribute;
176181
177182 $idPath->pushAnnotationAttribute( $this->getAttribute() );
@@ -657,9 +662,9 @@
658663 $editor = new RecordSetTableEditor( $o->linkAttributeValues, new SimplePermissionController( true ), $showEditFieldChecker, new AllowAddController( true ), true, false, $controller );
659664 $editor->addEditor( new LinkAttributeEditor( $o->linkAttribute, new SimplePermissionController( false ), true, $attributeIDFilter, $levelDefinedMeaningName ) );
660665
661 - if ( $viewInformation->viewOrEdit == "view" )
 666+ if ( $viewInformation->viewOrEdit == "view" ) {
662667 $linkEditor = new LinkEditor( $o->link, new SimplePermissionController( true ), true );
663 - else {
 668+ } else {
664669 $linkEditor = new RecordTableCellEditor( $o->link );
665670 $linkEditor->addEditor( new ShortTextEditor( $o->linkURL, new SimplePermissionController( true ), true ) );
666671 $linkEditor->addEditor( new ShortTextEditor( $o->linkLabel, new SimplePermissionController( true ), true ) );
Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php
@@ -222,12 +222,13 @@
223223
224224 $action = $wgRequest->getText( 'action' );
225225
226 - if ( $action == 'edit' )
 226+ if ( $action == 'edit' ) {
227227 return getLatestTransactionRestriction( $table );
228 - else if ( $action == 'history' )
 228+ } elseif ( $action == 'history' ) {
229229 return '1';
230 - else
 230+ } else {
231231 return getLatestTransactionRestriction( $table );
 232+ }
232233 }
233234
234235 function getOperationSelectColumn( $table, $transactionId ) {
@@ -243,19 +244,21 @@
244245 $dbr = wfGetDB( DB_SLAVE );
245246 $queryResult = $dbr->query( "SELECT user_name FROM user WHERE user_id=$userId" );
246247
247 - if ( $user = $dbr->fetchObject( $queryResult ) )
 248+ if ( $user = $dbr->fetchObject( $queryResult ) ) {
248249 return $user->user_name;
249 - else
 250+ } else {
250251 return "";
 252+ }
251253 }
252254
253255 function getUserLabel( $userId, $userIP ) {
254 - if ( $userId > 0 )
 256+ if ( $userId > 0 ) {
255257 return getUserName( $userId );
256 - else if ( $userIP != "" )
 258+ } elseif ( $userIP != "" ) {
257259 return $userIP;
258 - else
 260+ } else {
259261 return "Unknown";
 262+ }
260263 }
261264
262265 function expandUserIDsInRecordSet( RecordSet $recordSet, Attribute $userID, Attribute $userIP ) {
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php
@@ -624,13 +624,15 @@
625625 if ( $childEditor instanceof RecordTableCellEditor ) {
626626 $type = $this->getTableStructureShowingData( $viewOrEdit, $childEditor, $idPath, $value, $attributePath );
627627
628 - if ( count( $type->getAttributes() ) > 0 )
 628+ if ( count( $type->getAttributes() ) > 0 ) {
629629 $attributes[] = new Attribute( $childAttribute->id, $childAttribute->name, $type );
 630+ }
630631 }
631 - else if ( ( $viewOrEdit == "view" && $this->columnShowsData( $childEditor, $value, $attributePath ) ) ||
632 - ( $viewOrEdit == "edit" ) && $childEditor->showEditField( $idPath ) )
 632+ elseif ( ( $viewOrEdit == "view" && $this->columnShowsData( $childEditor, $value, $attributePath ) ) ||
 633+ ( $viewOrEdit == "edit" ) && $childEditor->showEditField( $idPath ) ) {
633634 $attributes[] = new Attribute( $childAttribute->id, $childAttribute->name, 'short-text' );
634 -
 635+ }
 636+
635637 array_pop( $attributePath );
636638 }
637639
@@ -640,9 +642,10 @@
641643 public function viewHeader( IdStack $idPath, Structure $visibleStructure ) {
642644 $result = '<table id="' . $idPath->getId() . '" class="wiki-data-table">';
643645
644 - foreach ( getStructureAsTableHeaderRows( $visibleStructure, 0, $idPath ) as $headerRow )
 646+ foreach ( getStructureAsTableHeaderRows( $visibleStructure, 0, $idPath ) as $headerRow ) {
645647 $result .= '<tr>' . $headerRow . '</tr>' . EOL;
646 -
 648+ }
 649+
647650 return $result;
648651 }
649652
@@ -671,10 +674,11 @@
672675 }
673676
674677 public function getTableStructureForView( IdStack $idPath, RecordSet $value ) {
675 - if ( $this->hideEmptyColumns )
 678+ if ( $this->hideEmptyColumns ) {
676679 return $this->getTableStructureShowingData( "view", $this, $idPath, $value );
677 - else
 680+ } else {
678681 return $this->getTableStructure( $this );
 682+ }
679683 }
680684
681685 public function getTableStructureForEdit( IdStack $idPath, RecordSet $value ) {
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataTables.php
@@ -133,12 +133,13 @@
134134 }
135135
136136 public function getIndexes( $purpose ) {
137 - if ( $purpose == "WebSite" )
 137+ if ( $purpose == "WebSite" ) {
138138 return $this->getWebSiteIndexes();
139 - else if ( $purpose == "MassUpdate" )
 139+ } elseif ( $purpose == "MassUpdate" ) {
140140 return $this->getMassUpdateIndexes();
141 - else
 141+ } else {
142142 return null;
 143+ }
143144 }
144145 }
145146
@@ -180,15 +181,15 @@
181182 protected function createVersionedIndexes( $name, $versionedEnd, $versionedStart, $unversioned, array $columns ) {
182183 $result = array();
183184
184 - if ( $versionedEnd )
 185+ if ( $versionedEnd ) {
185186 $result[] = new TableIndex( "versioned_end_" . $name, array_merge( array( $this->removeTransactionId ), $columns ) );
186 -
187 - if ( $versionedStart )
 187+ }
 188+ if ( $versionedStart ) {
188189 $result[] = new TableIndex( "versioned_start_" . $name, array_merge( array( $this->addTransactionId ), $columns ) );
189 -
190 - if ( $unversioned )
 190+ }
 191+ if ( $unversioned ) {
191192 $result[] = new TableIndex( "unversioned_" . $name, $columns );
192 -
 193+ }
193194 return $result;
194195 }
195196 }
@@ -723,10 +724,11 @@
724725 public function getTableWithIdentifier( $identifier ) {
725726 $prefixedIdentifier = $this->dataSetPrefix . "_" . $identifier;
726727
727 - if ( isset( $this->tableLookupMap[$prefixedIdentifier] ) )
 728+ if ( isset( $this->tableLookupMap[$prefixedIdentifier] ) ) {
728729 return $this->tableLookupMap[$prefixedIdentifier];
729 - else
 730+ } else {
730731 return null;
 732+ }
731733 }
732734 }
733735
@@ -740,23 +742,25 @@
741743 function genericSelect( $selectCommand, array $expressions, array $tables, array $restrictions ) {
742744 $result = $selectCommand . " " . $expressions[0]->toExpression();
743745
744 - for ( $i = 1; $i < count( $expressions ); $i++ )
 746+ for ( $i = 1; $i < count( $expressions ); $i++ ) {
745747 $result .= ", " . $expressions[$i]->toExpression();
746 -
 748+ }
747749 if ( count( $tables ) > 0 ) {
748750 $result .= " FROM " . $tables[0]->getIdentifier();
749751
750 - for ( $i = 1; $i < count( $tables ); $i++ )
 752+ for ( $i = 1; $i < count( $tables ); $i++ ) {
751753 $result .= ", " . $tables[$i]->getIdentifier();
 754+ }
752755 }
753756
754757 if ( count( $restrictions ) > 0 ) {
755758 $result .= " WHERE (" . $restrictions[0] . ")";
756759
757 - for ( $i = 1; $i < count( $restrictions ); $i++ )
 760+ for ( $i = 1; $i < count( $restrictions ); $i++ ) {
758761 $result .= " AND (" . $restrictions[$i] . ")";
 762+ }
759763 }
760 -
 764+
761765 return new SelectExpression( $result );
762766 }
763767
@@ -769,9 +773,11 @@
770774 }
771775
772776 function genericSelectLatest( $selectCommand, array $expressions, array $tables, array $restrictions ) {
773 - foreach ( $tables as $table )
774 - if ( $table->isVersioned )
 777+ foreach ( $tables as $table ) {
 778+ if ( $table->isVersioned ) {
775779 $restrictions[] = $table->removeTransactionId->toExpression() . " IS NULL";
 780+ }
 781+ }
776782
777783 return genericSelect( $selectCommand, $expressions, $tables, $restrictions );
778784 }
@@ -785,16 +791,18 @@
786792 }
787793
788794 function expressionToSQL( $expression ) {
789 - if ( is_int( $expression ) )
 795+ if ( is_int( $expression ) ) {
790796 return $expression;
791 - else if ( is_string( $expression ) ) {
 797+ }
 798+ elseif ( is_string( $expression ) ) {
792799 $dbr = wfGetDB( DB_SLAVE );
793800 return $dbr->addQuotes( $expression );
794801 }
795 - else if ( is_object( $expression ) && $expression instanceof DatabaseExpression )
 802+ elseif ( is_object( $expression ) && $expression instanceof DatabaseExpression ) {
796803 return $expression->toExpression();
797 - else
 804+ } else {
798805 throw new Exception( "Cannot convert expression to SQL: " . $expression );
 806+ }
799807 }
800808
801809 function equals( $expression1, $expression2 ) {
@@ -808,13 +816,14 @@
809817 function inArray( DatabaseExpression $expression, $values ) {
810818 $sqlValues = array();
811819
812 - foreach ( $values as $value )
 820+ foreach ( $values as $value ) {
813821 $sqlValues[] = expressionToSQL( $value );
814 -
815 - if ( count( $values ) > 0 )
 822+ }
 823+ if ( count( $values ) > 0 ) {
816824 return new DefaultDatabaseExpression( $expression->toExpression() . " IN (" . join( $sqlValues, ", " ) . ")" );
817 - else
 825+ } else {
818826 return new DefaultDatabaseExpression( 1 );
 827+ }
819828 }
820829
821830 function sqlOr( $expression1, $expression2 ) {

Status & tagging log