Demon has submitted this change and it was merged.
Change subject: Small change
......................................................................
Small change
-- used foreach block instead of two separate insert statements
Change-Id: I6a59f8d8cc6b6529cbb562c763d45334d5b7873b
---
M model/EventLocation.php
1 file changed, 13 insertions(+), 4 deletions(-)
Approvals:
Demon: Verified; Looks good to me, approved
Freakolowsky: Looks good to me, but someone else must approve
diff --git a/model/EventLocation.php b/model/EventLocation.php
index 91ec8f7..5f64c0e 100644
--- a/model/EventLocation.php
+++ b/model/EventLocation.php
@@ -78,11 +78,20 @@
{
$revision = $status->value['revision'];
$locationId = $revision->getPage();
+ $insertProps = array( array( 'prop' => 'cvext-type',
'value' => 'location'),
+ array( 'prop' => 'cvext-location-conf',
'value' => $cid ) );
$dbw = wfGetDB( DB_MASTER );
- $dbw->insert( 'page_props', array( 'pp_page' =>
$locationId, 'pp_propname' => 'cvext-type', 'pp_value' => 'location' ),
- __METHOD__, array() );
- $dbw->insert( 'page_props', array( 'pp_page' =>
$locationId, 'pp_propname' => 'cvext-location-conf', 'pp_value' => $cid ),
- __METHOD__, array() );
+ foreach ( $insertProps as $property ) {
+ $dbw->insert( 'page_props',
+ array(
+ 'pp_page' => $locationId,
+ 'pp_propname' =>
$property['prop'],
+ 'pp_value' => $property['value']
+ ),
+ __METHOD__,
+ array()
+ );
+ }
return new self( $roomNo, $description, $url,
$locationId, $cid );
}
else
--
To view, visit https://gerrit.wikimedia.org/r/26942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6a59f8d8cc6b6529cbb562c763d45334d5b7873b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConventionExtension
Gerrit-Branch: master
Gerrit-Owner: Chughakshay16 <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Freakolowsky <[email protected]>
Gerrit-Reviewer: preilly <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits