Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189754

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/54/189754/1

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: newchange
Gerrit-Change-Id: Ia8003179261c3e0cb2f84fc7d2e94fd1ccba7ccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to