[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "table exists" check for replacement tables

2018-01-17 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
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(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  jenkins-bot: Verified



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";
+   $tableText .= $tableName . '__NEXT - ';
+   $tableText .= '' . 
$this->msg( "cargo-cargotables-nonexistenttable" )->parse() . '';
+   $tableText .= "";
+   $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: merged
Gerrit-Change-Id: I6ac47b70dd32031503cf56da4d08ee4f5ce0359b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "table exists" check for replacement tables

2018-01-17 Thread Yaron Koren (Code Review)
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";
+   $tableText .= $tableName . '__NEXT - ';
+   $tableText .= '' . 
$this->msg( "cargo-cargotables-nonexistenttable" )->parse() . '';
+   $tableText .= "";
+   $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 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits