[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Removed _table param for Special:Drilldown

2018-01-15 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404296 )

Change subject: Removed _table param for Special:Drilldown
..


Removed _table param for Special:Drilldown

Seemed unnecessary, and wasn't working very well.

Change-Id: I603ff2c0866b930ddd41ed711b70d3359415a691
---
M drilldown/CargoSpecialDrilldown.php
1 file changed, 2 insertions(+), 9 deletions(-)

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



diff --git a/drilldown/CargoSpecialDrilldown.php 
b/drilldown/CargoSpecialDrilldown.php
index 9c9eb90..6e3a58a 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -34,14 +34,8 @@
$out->addScript( '' );
 
-   // Get information on current table and the filters
-   // that have already been applied from the query string.
-   $tableName = str_replace( '_', ' ', $request->getVal( '_table' 
) );
-   // if query string did not contain this variable, try the URL
-   if ( !$tableName ) {
-   $queryparts = explode( '/', $query, 1 );
-   $tableName = isset( $queryparts[0] ) ? $queryparts[0] : 
'';
-   }
+   $queryparts = explode( '/', $query, 1 );
+   $tableName = isset( $queryparts[0] ) ? $queryparts[0] : '';
 
// If no table was specified, go with the first table,
// alphabetically.
@@ -1285,7 +1279,6 @@
if ( $this->isReplacementTable ) {
$params['_replacement'] = null;
}
-   $params['_table'] = $this->tableName;
if ( $this->fullTextSearchTerm != '' ) {
$params['_search'] = $this->fullTextSearchTerm;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I603ff2c0866b930ddd41ed711b70d3359415a691
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]: Removed _table param for Special:Drilldown

2018-01-15 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404296 )

Change subject: Removed _table param for Special:Drilldown
..

Removed _table param for Special:Drilldown

Seemed unnecessary, and wasn't working very well.

Change-Id: I603ff2c0866b930ddd41ed711b70d3359415a691
---
M drilldown/CargoSpecialDrilldown.php
1 file changed, 2 insertions(+), 9 deletions(-)


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

diff --git a/drilldown/CargoSpecialDrilldown.php 
b/drilldown/CargoSpecialDrilldown.php
index 9c9eb90..6e3a58a 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -34,14 +34,8 @@
$out->addScript( '' );
 
-   // Get information on current table and the filters
-   // that have already been applied from the query string.
-   $tableName = str_replace( '_', ' ', $request->getVal( '_table' 
) );
-   // if query string did not contain this variable, try the URL
-   if ( !$tableName ) {
-   $queryparts = explode( '/', $query, 1 );
-   $tableName = isset( $queryparts[0] ) ? $queryparts[0] : 
'';
-   }
+   $queryparts = explode( '/', $query, 1 );
+   $tableName = isset( $queryparts[0] ) ? $queryparts[0] : '';
 
// If no table was specified, go with the first table,
// alphabetically.
@@ -1285,7 +1279,6 @@
if ( $this->isReplacementTable ) {
$params['_replacement'] = null;
}
-   $params['_table'] = $this->tableName;
if ( $this->fullTextSearchTerm != '' ) {
$params['_search'] = $this->fullTextSearchTerm;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I603ff2c0866b930ddd41ed711b70d3359415a691
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