[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't disable images whilst opting into beta
..


Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
(cherry picked from commit 391d6f37e3efee931ed1317b39f1c31d6c9d4ed0)
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context->setMobileMode( $group );
$imagesDisabled = !$request->getBool( 'enableImages' );
-   if ( $context->imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? "off" : "on";
+   if ( $request->getVal( 'enableImages' ) !== null ) {
+   if ( $context->imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+   }
+   $context->setDisableImagesCookie( $imagesDisabled );
}
-   $context->setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Robmoen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't disable images whilst opting into beta
..

Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
(cherry picked from commit 391d6f37e3efee931ed1317b39f1c31d6c9d4ed0)
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/18/209318/1

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context->setMobileMode( $group );
$imagesDisabled = !$request->getBool( 'enableImages' );
-   if ( $context->imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? "off" : "on";
+   if ( $request->getVal( 'enableImages' ) !== null ) {
+   if ( $context->imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+   }
+   $context->setDisableImagesCookie( $imagesDisabled );
}
-   $context->setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen 
Gerrit-Reviewer: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't disable images whilst opting into beta
..

Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
(cherry picked from commit 391d6f37e3efee931ed1317b39f1c31d6c9d4ed0)
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/17/209317/1

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context->setMobileMode( $group );
$imagesDisabled = !$request->getBool( 'enableImages' );
-   if ( $context->imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? "off" : "on";
+   if ( $request->getVal( 'enableImages' ) !== null ) {
+   if ( $context->imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+   }
+   $context->setDisableImagesCookie( $imagesDisabled );
}
-   $context->setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen 
Gerrit-Reviewer: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't disable images whilst opting into beta
..


Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jhernandez: Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context->setMobileMode( $group );
$imagesDisabled = !$request->getBool( 'enableImages' );
-   if ( $context->imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? "off" : "on";
+   if ( $request->getVal( 'enableImages' ) !== null ) {
+   if ( $context->imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+   }
+   $context->setDisableImagesCookie( $imagesDisabled );
}
-   $context->setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Don't disable images whilst opting into beta
..

Don't disable images whilst opting into beta

Far too mean to be trolling like this.
Bug: T98187

Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/92/209192/1

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context->setMobileMode( $group );
$imagesDisabled = !$request->getBool( 'enableImages' );
-   if ( $context->imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? "off" : "on";
+   if ( $request->getVal( 'enableImages' ) !== null ) {
+   if ( $context->imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+   }
+   $context->setDisableImagesCookie( $imagesDisabled );
}
-   $context->setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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