Yaron Koren has submitted this change and it was merged.
Change subject: Better handling for "undeclared" tables
......................................................................
Better handling for "undeclared" tables
Change-Id: Ia8003179261c3e0cb2f84fc7d2e94fd1ccba7ccf
---
M specials/CargoTables.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Yaron Koren: Verified; Looks good to me, approved
diff --git a/specials/CargoTables.php b/specials/CargoTables.php
index 270b037..ac34c7b 100644
--- a/specials/CargoTables.php
+++ b/specials/CargoTables.php
@@ -146,10 +146,10 @@
}
// "Declared by" text
- $templatesThatDeclareThisTable =
$templatesThatDeclareTables[$tableName];
- if ( count( $templatesThatDeclareThisTable ) == 0 ) {
+ if ( !array_key_exists( $tableName,
$templatesThatDeclareTables ) ) {
$declaringTemplatesText = $this->msg(
'cargo-cargotables-notdeclared' )->text();
} else {
+ $templatesThatDeclareThisTable =
$templatesThatDeclareTables[$tableName];
$templateLinks = array();
foreach ( $templatesThatDeclareThisTable as
$templateID ) {
$templateTitle = Title::newFromID(
$templateID );
--
To view, visit https://gerrit.wikimedia.org/r/189754
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8003179261c3e0cb2f84fc7d2e94fd1ccba7ccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits