Yaron Koren has uploaded a new change for review.

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

Change subject: Error display for missing table in Special:CargoTables
......................................................................

Error display for missing table in Special:CargoTables

Change-Id: I3d5e9d8661c12616348b708c901a8a43260096d4
---
M specials/CargoTables.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/specials/CargoTables.php b/specials/CargoTables.php
index 08b2929..05e2119 100644
--- a/specials/CargoTables.php
+++ b/specials/CargoTables.php
@@ -141,6 +141,14 @@
                        $this->msg( 'cargo-cargotables-tablelist' )->numParams( 
count( $tableNames ) )->parse() ) . "\n";
                $text .= "<ul>\n";
                foreach ( $tableNames as $tableName ) {
+                       if ( !$cdb->tableExists( $tableName ) ) {
+                               $tableText = "$tableName - ";
+                               // @TODO - this should probably be an i18n 
message.
+                               $tableText .= "<span class=\"error\">Table is 
registered, but does not exist!</span>";
+                               $text .= Html::rawElement( 'li', null, 
$tableText );
+                               continue;
+                       }
+
                        $actionLinks = Html::element( 'a', array( 'href' => 
"$ctURL/$tableName", ),
                                        $this->msg( 'view' )->text() );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/320154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d5e9d8661c12616348b708c901a8a43260096d4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to