Yaron Koren has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/404746 )
Change subject: Added "table exists" check for replacement tables
......................................................................
Added "table exists" check for replacement tables
Change-Id: I6ac47b70dd32031503cf56da4d08ee4f5ce0359b
---
M specials/CargoTables.php
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo
refs/changes/46/404746/2
diff --git a/specials/CargoTables.php b/specials/CargoTables.php
index 28836b4..f23ec3a 100644
--- a/specials/CargoTables.php
+++ b/specials/CargoTables.php
@@ -347,6 +347,14 @@
$tableText .= ')';
if ( $hasReplacementTable ) {
+ if ( !$cdb->tableExists( $tableName . '__NEXT'
) ) {
+ $tableText .= "\n<div
class=\"cargoReplacementTableInfo\">";
+ $tableText .= $tableName . '__NEXT - ';
+ $tableText .= '<span class="error">' .
$this->msg( "cargo-cargotables-nonexistenttable" )->parse() . '</span>';
+ $tableText .= "</div>";
+ $text .= Html::rawElement( 'li', null,
$tableText );
+ continue;
+ }
global $wgUser;
$numRowsText = $this->displayNumRowsForTable(
$cdb, $tableName . '__NEXT' );
$actionLinks =
$this->displayActionLinksForTable( $tableName, true, false, null );
--
To view, visit https://gerrit.wikimedia.org/r/404746
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ac47b70dd32031503cf56da4d08ee4f5ce0359b
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