[MediaWiki-commits] [Gerrit] translatewiki[master]: repoupdate: Avoid false unknown project messages

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328631 )

Change subject: repoupdate: Avoid false unknown project messages
..


repoupdate: Avoid false unknown project messages

Because exit was removed from doUpdate so that multiple doUpdates
can be called per invocation, other code now started continuing
to the block that announces unknown projects.

Change-Id: I16d756577d271286946d6c38914e92aab1f21a14
---
M bin/repoupdate
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/bin/repoupdate b/bin/repoupdate
index c93ec96..9208d75 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -63,6 +63,7 @@
if [ "$i" = "$PROJECT" ]
then
doUpdate "$PROJECT" "$CLUPDATE"
+   exit 0
fi
 done
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16d756577d271286946d6c38914e92aab1f21a14
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...linux44[master]: Update to 4.4.37

2016-12-21 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328633 )

Change subject: Update to 4.4.37
..

Update to 4.4.37

Change-Id: I78d2581a5b53f54d1e32eb3a1f5c48ae3ca364f6
---
M debian/changelog
M debian/patches/series
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/linux44 
refs/changes/33/328633/1

diff --git a/debian/changelog b/debian/changelog
index 8ff6384..a59f197 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,9 +27,12 @@
   * Update to 4.4.35:
 https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.35
   * Update to 4.4.36:
-https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.35
+https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.36
 - CVE-2016-8650 [f5527f3f002b0a6b376163613b82f69de073]
 - CVE-2016-9756 [2117d5398c81554fbf803f5fd1dc55eb78216c0c]
+  * Update to 4.4.37:
+https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.37
+- CVE-2016-9794 [3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4]
 
  -- Moritz Muehlenhoff   Tue, 15 Nov 2016 14:42:40 
+0100
 
diff --git a/debian/patches/series b/debian/patches/series
index d8b7463..02a82f7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -137,3 +137,4 @@
 bugfix/all/stable-4.4.34.patch
 bugfix/all/stable-4.4.35.patch
 bugfix/all/stable-4.4.36.patch
+bugfix/all/stable-4.4.37.patch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78d2581a5b53f54d1e32eb3a1f5c48ae3ca364f6
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/linux44
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmflib: replace carbon with install1001 in ipresolve tests

2016-12-21 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328600 )

Change subject: wmflib: replace carbon with install1001 in ipresolve tests
..


wmflib: replace carbon with install1001 in ipresolve tests

Bug: T123733
Change-Id: I2f2d84e6d9acded711d809607bb395201ca2581c
---
M modules/wmflib/spec/functions/ipresolve_spec.rb
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/wmflib/spec/functions/ipresolve_spec.rb 
b/modules/wmflib/spec/functions/ipresolve_spec.rb
index 01a5e77..5628c1c 100644
--- a/modules/wmflib/spec/functions/ipresolve_spec.rb
+++ b/modules/wmflib/spec/functions/ipresolve_spec.rb
@@ -2,19 +2,19 @@
 describe 'ipresolve' do
 
   it "should resolve ipv4 addresses by default" do
-should run.with_params('carbon.wikimedia.org').and_return('208.80.154.10')
+should 
run.with_params('install1001.wikimedia.org').and_return('208.80.154.83')
   end
   it "should resolve ipv4 addresses when explicitly asked to" do
-should run.with_params('carbon.wikimedia.org', 
'4').and_return('208.80.154.10')
+should run.with_params('install1001.wikimedia.org', 
'4').and_return('208.80.154.83')
   end
 
   it "should resolve ipv6 addresses" do
-should run.with_params('carbon.wikimedia.org', 
'6').and_return('2620::861:1:208:80:154:10')
+should run.with_params('install1001.wikimedia.org', 
'6').and_return('2620::861:1:208:80:154:83')
   end
 
   it "should be able to perform a reverse DNS lookup" do
-should run.with_params('2620::861:1:208:80:154:10', 
'ptr').and_return('carbon.wikimedia.org')
-should run.with_params('208.80.154.10', 
'ptr').and_return('carbon.wikimedia.org')
+should run.with_params('2620::861:1:208:80:154:83', 
'ptr').and_return('install1001.wikimedia.org')
+should run.with_params('208.80.154.83', 
'ptr').and_return('install1001.wikimedia.org')
   end
 
   it "fails when resolving an inexistent name" do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f2d84e6d9acded711d809607bb395201ca2581c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Giuseppe Lavagetto 
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...Wikibase[master]: Use EntityTitleStoreLookup where necesarry

2016-12-21 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328632 )

Change subject: Use EntityTitleStoreLookup where necesarry
..

Use EntityTitleStoreLookup where necesarry

Change generic title lookups into EntityTitleStoreLookup in cases where
the additional guarantee is crucial.

Bug: T152498
Change-Id: I26452c9fd9eddee07008b19df1373e2e1cfd5f07
---
M repo/includes/Api/ModifyEntity.php
M repo/includes/Content/EntityHandler.php
M repo/includes/EditEntity.php
M repo/includes/EditEntityFactory.php
M repo/includes/Interactors/ItemMergeInteractor.php
M repo/includes/Interactors/RedirectCreationInteractor.php
M repo/includes/Store/Sql/SqlStore.php
M repo/includes/Store/Sql/WikiPageEntityRedirectLookup.php
M repo/includes/Store/Sql/WikiPageEntityStore.php
M repo/tests/phpunit/includes/Api/CreateRedirectTest.php
M repo/tests/phpunit/includes/Api/MergeItemsTest.php
M repo/tests/phpunit/includes/EditEntityTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
M repo/tests/phpunit/includes/Specials/SpecialMergeItemsTest.php
M repo/tests/phpunit/includes/Specials/SpecialRedirectEntityTest.php
M repo/tests/phpunit/includes/Specials/SpecialWikibaseRepoPageTestBase.php
M repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php
M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityRedirectLookupTest.php
M repo/tests/phpunit/includes/Store/StoreTest.php
M repo/tests/phpunit/includes/UpdateRepo/UpdateRepoOnDeleteJobTest.php
M repo/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveJobTest.php
22 files changed, 80 insertions(+), 80 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/32/328632/1

diff --git a/repo/includes/Api/ModifyEntity.php 
b/repo/includes/Api/ModifyEntity.php
index 71b9ebf..677a646 100644
--- a/repo/includes/Api/ModifyEntity.php
+++ b/repo/includes/Api/ModifyEntity.php
@@ -14,7 +14,7 @@
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Lib\Store\EntityRevisionLookup;
-use Wikibase\Lib\Store\EntityTitleLookup;
+use Wikibase\Repo\Store\EntityTitleStoreLookup;
 use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Repo\Store\EntityPermissionChecker;
 use Wikibase\Repo\WikibaseRepo;
@@ -44,7 +44,7 @@
protected $siteLinkTargetProvider;
 
/**
-* @var EntityTitleLookup
+* @var EntityTitleStoreLookup
 */
private $titleLookup;
 
@@ -131,7 +131,7 @@
}
 
/**
-* @return EntityTitleLookup
+* @return EntityTitleStoreLookup
 */
protected function getTitleLookup() {
return $this->titleLookup;
diff --git a/repo/includes/Content/EntityHandler.php 
b/repo/includes/Content/EntityHandler.php
index ac57e82..291867a 100644
--- a/repo/includes/Content/EntityHandler.php
+++ b/repo/includes/Content/EntityHandler.php
@@ -473,7 +473,7 @@
 *
 * @since 0.5
 *
-* @see EntityTitleLookup::getTitleForId
+* @see EntityTitleStoreLookup::getTitleForId
 *
 * @param EntityId $id
 *
diff --git a/repo/includes/EditEntity.php b/repo/includes/EditEntity.php
index 6eb21a1..e9110ba 100644
--- a/repo/includes/EditEntity.php
+++ b/repo/includes/EditEntity.php
@@ -17,7 +17,7 @@
 use Wikibase\DataModel\Services\Diff\EntityPatcher;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\EntityStore;
-use Wikibase\Lib\Store\EntityTitleLookup;
+use Wikibase\Repo\Store\EntityTitleStoreLookup;
 use Wikibase\Lib\Store\StorageException;
 use Wikibase\Repo\Hooks\EditFilterHookRunner;
 use Wikibase\Repo\Store\EntityPermissionChecker;
@@ -41,7 +41,7 @@
private $entityRevisionLookup;
 
/**
-* @var EntityTitleLookup
+* @var EntityTitleStoreLookup
 */
private $titleLookup;
 
@@ -172,7 +172,7 @@
/**
 * @since 0.5
 *
-* @param EntityTitleLookup $titleLookup
+* @param EntityTitleStoreLookup $titleLookup
 * @param EntityRevisionLookup $entityLookup
 * @param EntityStore $entityStore
 * @param EntityPermissionChecker $permissionChecker
@@ -193,7 +193,7 @@
 * @throws InvalidArgumentException
 */
public function __construct(
-   EntityTitleLookup $titleLookup,
+   EntityTitleStoreLookup $titleLookup,
EntityRevisionLookup $entityLookup,
EntityStore $entityStore,
EntityPermissionChecker $permissionChecker,
diff --git a/repo/includes/EditEntityFactory.php 
b/repo/includes/EditEntityFactory.php
index e289547..73198f3 100644
--- a/repo/includes/EditEntityFactory.php
+++ b/repo/includes/EditEntityFactory.php
@@ -9,7 +9,7 @@
 use Wikibase\DataModel\Services\Diff\EntityPatcher;
 use 

[MediaWiki-commits] [Gerrit] translatewiki[master]: repoupdate: Avoid false unknown project messages

2016-12-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328631 )

Change subject: repoupdate: Avoid false unknown project messages
..

repoupdate: Avoid false unknown project messages

Because exit was removed from doUpdate so that multiple doUpdates
can be called per invocation, other code now started continuing
to the block that announces unknown projects.

Change-Id: I16d756577d271286946d6c38914e92aab1f21a14
---
M bin/repoupdate
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/31/328631/1

diff --git a/bin/repoupdate b/bin/repoupdate
index c93ec96..9208d75 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -63,6 +63,7 @@
if [ "$i" = "$PROJECT" ]
then
doUpdate "$PROJECT" "$CLUPDATE"
+   exit 0
fi
 done
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16d756577d271286946d6c38914e92aab1f21a14
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] operations...linux44[master]: Update to 4.4.36

2016-12-21 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328546 )

Change subject: Update to 4.4.36
..


Update to 4.4.36

Change-Id: I03efd5d914cc2624723b3a906284ec9b55b3f58b
---
M debian/changelog
A debian/patches/bugfix/all/stable-4.4.36.patch
M debian/patches/series
3 files changed, 919 insertions(+), 0 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index 9028944..8ff6384 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,10 @@
 - CVE-2015-8964 [dd42bf1197144ede075a9d4793123f7689e164bc]
   * Update to 4.4.35:
 https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.35
+  * Update to 4.4.36:
+https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.35
+- CVE-2016-8650 [f5527f3f002b0a6b376163613b82f69de073]
+- CVE-2016-9756 [2117d5398c81554fbf803f5fd1dc55eb78216c0c]
 
  -- Moritz Muehlenhoff   Tue, 15 Nov 2016 14:42:40 
+0100
 
diff --git a/debian/patches/bugfix/all/stable-4.4.36.patch 
b/debian/patches/bugfix/all/stable-4.4.36.patch
new file mode 100644
index 000..0db6e38
--- /dev/null
+++ b/debian/patches/bugfix/all/stable-4.4.36.patch
@@ -0,0 +1,914 @@
+diff --git a/Makefile b/Makefile
+index f88830af1533..705eb9e38fce 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 4
+-SUBLEVEL = 35
++SUBLEVEL = 36
+ EXTRAVERSION =
+ NAME = Blurry Fish Butt
+ 
+diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
+index cda6dbbe9842..fd5979f28ada 100644
+--- a/arch/parisc/kernel/cache.c
 b/arch/parisc/kernel/cache.c
+@@ -351,6 +351,7 @@ void __init parisc_setup_cache_timing(void)
+ {
+   unsigned long rangetime, alltime;
+   unsigned long size, start;
++  unsigned long threshold;
+ 
+   alltime = mfctl(16);
+   flush_data_cache();
+@@ -364,17 +365,12 @@ void __init parisc_setup_cache_timing(void)
+   printk(KERN_DEBUG "Whole cache flush %lu cycles, flushing %lu bytes %lu 
cycles\n",
+   alltime, size, rangetime);
+ 
+-  /* Racy, but if we see an intermediate value, it's ok too... */
+-  parisc_cache_flush_threshold = size * alltime / rangetime;
+-
+-  parisc_cache_flush_threshold = 
L1_CACHE_ALIGN(parisc_cache_flush_threshold);
+-  if (!parisc_cache_flush_threshold)
+-  parisc_cache_flush_threshold = FLUSH_THRESHOLD;
+-
+-  if (parisc_cache_flush_threshold > cache_info.dc_size)
+-  parisc_cache_flush_threshold = cache_info.dc_size;
+-
+-  printk(KERN_INFO "Setting cache flush threshold to %lu kB\n",
++  threshold = L1_CACHE_ALIGN(size * alltime / rangetime);
++  if (threshold > cache_info.dc_size)
++  threshold = cache_info.dc_size;
++  if (threshold)
++  parisc_cache_flush_threshold = threshold;
++  printk(KERN_INFO "Cache flush threshold set to %lu KiB\n",
+   parisc_cache_flush_threshold/1024);
+ 
+   /* calculate TLB flush threshold */
+@@ -383,7 +379,7 @@ void __init parisc_setup_cache_timing(void)
+   flush_tlb_all();
+   alltime = mfctl(16) - alltime;
+ 
+-  size = PAGE_SIZE;
++  size = 0;
+   start = (unsigned long) _text;
+   rangetime = mfctl(16);
+   while (start < (unsigned long) _end) {
+@@ -396,13 +392,10 @@ void __init parisc_setup_cache_timing(void)
+   printk(KERN_DEBUG "Whole TLB flush %lu cycles, flushing %lu bytes %lu 
cycles\n",
+   alltime, size, rangetime);
+ 
+-  parisc_tlb_flush_threshold = size * alltime / rangetime;
+-  parisc_tlb_flush_threshold *= num_online_cpus();
+-  parisc_tlb_flush_threshold = PAGE_ALIGN(parisc_tlb_flush_threshold);
+-  if (!parisc_tlb_flush_threshold)
+-  parisc_tlb_flush_threshold = FLUSH_TLB_THRESHOLD;
+-
+-  printk(KERN_INFO "Setting TLB flush threshold to %lu kB\n",
++  threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime);
++  if (threshold)
++  parisc_tlb_flush_threshold = threshold;
++  printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",
+   parisc_tlb_flush_threshold/1024);
+ }
+ 
+diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
+index b743a80eaba0..675521919229 100644
+--- a/arch/parisc/kernel/pacache.S
 b/arch/parisc/kernel/pacache.S
+@@ -96,7 +96,7 @@ fitmanyloop: /* Loop if LOOP 
>= 2 */
+ 
+ fitmanymiddle:/* Loop if LOOP >= 2 */
+   addib,COND(>)   -1, %r31, fitmanymiddle /* Adjusted inner loop 
decr */
+-  pitlbe  0(%sr1, %r28)
++  pitlbe  %r0(%sr1, %r28)
+   pitlbe,m%arg1(%sr1, %r28)   /* Last pitlbe and addr adjust 
*/
+   addib,COND(>)   -1, %r29, fitmanymiddle /* Middle loop decr */
+   

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Code style and IDEA warning fixes for CentralAuthUser

2016-12-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328627 )

Change subject: Code style and IDEA warning fixes for CentralAuthUser
..

Code style and IDEA warning fixes for CentralAuthUser

Change-Id: I9453b7d32afa8f2a03396fbe3d2e8ed8a3a9c793
---
M includes/CentralAuthUser.php
1 file changed, 87 insertions(+), 83 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/27/328627/1

diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 46e1734..02f56a8 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -24,9 +24,9 @@
/*private*/ var $mStateDirty = false;
/*private*/ var $mDelayInvalidation = 0;
 
-   var $mAttachedArray, $mEmail, $mEmailAuthenticated, $mHomeWiki, 
$mHidden, $mLocked, $mAttachedList, $mAuthenticationTimestamp;
+   var $mAttachedarray, $mEmail, $mEmailAuthenticated, $mHomeWiki, 
$mHidden, $mLocked, $mAttachedList, $mAuthenticationTimestamp;
var $mGroups, $mRights, $mPassword, $mAuthToken, $mSalt, $mGlobalId, 
$mFromMaster, $mIsAttached, $mRegistration, $mGlobalEditCount;
-   var $mBeingRenamed, $mBeingRenamedArray;
+   var $mBeingRenamed, $mBeingRenamedarray;
protected $mAttachedInfo;
/** @var integer */
protected $mCasToken = 0;
@@ -207,7 +207,7 @@
 * @return Database
 */
public static function getLocalDB( $wikiID ) {
-   return wfGetLB( $wikiID )->getConnection( DB_MASTER, array(), 
$wikiID );
+   return wfGetLB( $wikiID )->getConnection( DB_MASTER, [], 
$wikiID );
}
 
/**
@@ -266,8 +266,8 @@
'gu_locked', 'gu_hidden', 'gu_registration', 
'gu_email',
'gu_email_authenticated', 'gu_home_db', 
'gu_cas_token'
),
-   'where' => array(),
-   'options' => array(),
+   'where' => [],
+   'options' => [],
'joinConds' => array(
'localuser' => array( 'LEFT OUTER JOIN', array( 
'gu_name=lu_name', 'lu_wiki' => wfWikiID() ) )
),
@@ -317,7 +317,7 @@
 */
public static function newUnattached( $name, $fromMaster = false ) {
$caUser = new self( $name );
-   $caUser->loadFromRow( false, array(), $fromMaster );
+   $caUser->loadFromRow( false, [], $fromMaster );
return $caUser;
}
 
@@ -328,7 +328,7 @@
protected function resetState() {
$this->mGlobalId = null;
$this->mGroups = null;
-   $this->mAttachedArray = null;
+   $this->mAttachedarray = null;
$this->mAttachedList = null;
$this->mHomeWiki = null;
}
@@ -388,15 +388,15 @@
__METHOD__
);
 
-   $sets = array();
+   $sets = [];
foreach ( $resSets as $row ) {
/* @var $row object */
$sets[$row->ggr_group] = WikiSet::newFromRow( $row );
}
 
// Grab the user's rights/groups.
-   $rights = array();
-   $groups = array();
+   $rights = [];
+   $groups = [];
 
foreach ( $res as $row ) {
/** @var $set User|bool */
@@ -465,10 +465,10 @@
$this->mFromMaster = $fromMaster;
 
if ( $renameUser ) {
-   $this->mBeingRenamedArray = $renameUser;
-   $this->mBeingRenamed = implode( '|', 
$this->mBeingRenamedArray );
+   $this->mBeingRenamedarray = $renameUser;
+   $this->mBeingRenamed = implode( '|', 
$this->mBeingRenamedarray );
} else {
-   $this->mBeingRenamedArray = array();
+   $this->mBeingRenamedarray = [];
$this->mBeingRenamed = '';
}
}
@@ -520,7 +520,7 @@
 
$this->loadAttached();
 
-   $this->mIsAttached = $this->exists() && in_array( wfWikiID(), 
$this->mAttachedArray );
+   $this->mIsAttached = $this->exists() && in_array( wfWikiID(), 
$this->mAttachedarray );
$this->mFromMaster = false;
}
 
@@ -800,8 +800,8 @@
static function storeMigrationData( $wiki, $users ) {
if ( $users ) {
$dbw = CentralAuthUtils::getCentralDB();
-   $globalTuples = array();
-   $tuples = array();
+   $globalTuples = [];
+   $tuples = [];
foreach ( $users as $name ) {

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove FileRepoStatus references

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328464 )

Change subject: Remove FileRepoStatus references
..


Remove FileRepoStatus references

Change-Id: I03190273670f5c255423cf59019cbf12220c5498
---
M includes/filerepo/FileRepo.php
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
M includes/upload/UploadFromChunks.php
M tests/phpunit/includes/filerepo/StoreBatchTest.php
5 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index be37011..0e4b2f0 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -1059,7 +1059,7 @@
 
/**
 * Pick a random name in the temp zone and store a file to it.
-* Returns a FileRepoStatus object with the file Virtual URL in the 
value,
+* Returns a Status object with the file Virtual URL in the value,
 * file can later be disposed using FileRepo::freeTemp().
 *
 * @param string $originalName The base name of the file as specified
@@ -1143,7 +1143,7 @@
 * Copy or move a file either from a storage path, virtual URL,
 * or file system path, into this repository at the specified 
destination location.
 *
-* Returns a FileRepoStatus object. On success, the value contains 
"new" or
+* Returns a Status object. On success, the value contains "new" or
 * "archived", to indicate whether the file was new with that name.
 *
 * Options to $options include:
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 8be662f..be78462 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1792,7 +1792,7 @@
 
/**
 * Move or copy a file to its public location. If a file exists at the
-* destination, move it to an archive. Returns a FileRepoStatus object 
with
+* destination, move it to an archive. Returns a Status object with
 * the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 011ba87..16fe72d 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1572,7 +1572,7 @@
 
/**
 * Move or copy a file to its public location. If a file exists at the
-* destination, move it to an archive. Returns a FileRepoStatus object 
with
+* destination, move it to an archive. Returns a Status object with
 * the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
@@ -1590,7 +1590,7 @@
}
 
/**
-* Move or copy a file to a specified location. Returns a FileRepoStatus
+* Move or copy a file to a specified location. Returns a Status
 * object with the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
@@ -2086,7 +2086,7 @@
/** @var bool Whether to suppress all suppressable fields when deleting 
*/
private $suppress;
 
-   /** @var FileRepoStatus */
+   /** @var Status */
private $status;
 
/** @var User */
@@ -2993,7 +2993,7 @@
}
 
/**
-* Verify the database updates and return a new FileRepoStatus 
indicating how
+* Verify the database updates and return a new Status indicating how
 * many rows would be updated.
 *
 * @return Status
@@ -3036,7 +3036,7 @@
}
 
/**
-* Do the database updates and return a new FileRepoStatus indicating 
how
+* Do the database updates and return a new Status indicating how
 * many rows where updated.
 */
protected function doDBUpdates() {
diff --git a/includes/upload/UploadFromChunks.php 
b/includes/upload/UploadFromChunks.php
index 449fc05..03b9821 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -113,7 +113,7 @@
 
/**
 * Append the final chunk and ready file for parent::performUpload()
-* @return FileRepoStatus
+* @return Status
 */
public function concatenateChunks() {
$chunkIndex = $this->getChunkIndex();
@@ -313,7 +313,7 @@
 *
 * @param string $chunkPath
 * @throws UploadChunkFileException
-* @return FileRepoStatus
+* @return Status
 */
private function outputChunk( $chunkPath ) {
// Key is fileKey + chunk index
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a caught_by context field to exceptions

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328619 )

Change subject: Add a caught_by context field to exceptions
..


Add a caught_by context field to exceptions

This distinguishes random errors caught and explicitly logged by various
callers from those that were only caught by the registered exception handler.
The later are likely to have more visibily impact on the user.

Change-Id: Icb4c4e9376270c5475c95cf40708a7ca3e4e0a49
---
M includes/exception/MWExceptionHandler.php
1 file changed, 29 insertions(+), 13 deletions(-)

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



diff --git a/includes/exception/MWExceptionHandler.php 
b/includes/exception/MWExceptionHandler.php
index 3d8ddb8..bef379e 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -26,6 +26,8 @@
  * @ingroup Exception
  */
 class MWExceptionHandler {
+   const CAUGHT_BY_HANDLER = 'mwe_handler'; // error reported by this 
exception handler
+   const CAUGHT_BY_OTHER = 'other'; // error reported by direct 
logException() call
 
/**
 * @var string $reservedMemory
@@ -130,10 +132,10 @@
// which would result in an exception loop. PHP may 
escalate such
// errors to "Exception thrown without a stack frame" 
fatals, but
// it's better to be explicit here.
-   self::logException( $e2 );
+   self::logException( $e2, self::CAUGHT_BY_HANDLER );
}
 
-   self::logException( $e );
+   self::logException( $e, self::CAUGHT_BY_HANDLER );
self::report( $e );
 
// Exit value should be nonzero for the benefit of shell jobs
@@ -293,6 +295,7 @@
'trace' => static::redactTrace( $trace ),
],
'exception_id' => wfRandomString( 8 ),
+   'caught_by' => self::CAUGHT_BY_HANDLER
] );
 
// Remember call so we don't double process via HHVM's fatal
@@ -464,12 +467,14 @@
 * logger.
 *
 * @param Exception|Throwable $e
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return array
 */
-   public static function getLogContext( $e ) {
+   public static function getLogContext( $e, $catcher = 
self::CAUGHT_BY_OTHER ) {
return [
'exception' => $e,
'exception_id' => WebRequest::getRequestId(),
+   'caught_by' => $catcher
];
}
 
@@ -481,11 +486,13 @@
 * will be redacted as per getRedactedTraceAsArray().
 *
 * @param Exception|Throwable $e
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return array
 * @since 1.26
 */
-   public static function getStructuredExceptionData( $e ) {
+   public static function getStructuredExceptionData( $e, $catcher = 
self::CAUGHT_BY_OTHER ) {
global $wgLogExceptionBacktrace;
+
$data = [
'id' => WebRequest::getRequestId(),
'type' => get_class( $e ),
@@ -494,6 +501,7 @@
'message' => $e->getMessage(),
'code' => $e->getCode(),
'url' => self::getURL() ?: null,
+   'caught_by' => $catcher
];
 
if ( $e instanceof ErrorException &&
@@ -509,7 +517,7 @@
 
$previous = $e->getPrevious();
if ( $previous !== null ) {
-   $data['previous'] = self::getStructuredExceptionData( 
$previous );
+   $data['previous'] = self::getStructuredExceptionData( 
$previous, $catcher );
}
 
return $data;
@@ -566,11 +574,17 @@
 * @param Exception|Throwable $e
 * @param bool $pretty Add non-significant whitespace to improve 
readability (default: false).
 * @param int $escaping Bitfield consisting of FormatJson::.*_OK class 
constants.
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return string|false JSON string if successful; false upon failure
 */
-   public static function jsonSerializeException( $e, $pretty = false, 
$escaping = 0 ) {
-   $data = self::getStructuredExceptionData( $e );
-   return FormatJson::encode( $data, $pretty, $escaping );
+   public static function jsonSerializeException(
+   $e, $pretty = false, $escaping = 0, $catcher = 
self::CAUGHT_BY_OTHER
+   ) {
+   return 

[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:

2016-12-21 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328625 )

Change subject: Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:
..


Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:

Fix grunt deploy

Change-Id: I3f4146d2ef0fae895dd31fdac439b61ac125cc5c
---
R css/embed.style.min.04ed3089c4af13ff8b2e.css
M css/images/layers-2x.png
M css/images/layers.png
M css/images/marker-icon-2x.png
M css/images/marker-icon.png
M css/images/marker-shadow.png
A css/style.min.0de20a57bfe7529c7ae2.css
D css/style.min.c29b4c7f7fff75c32eef.css
M embed.html
M i18n/ar.json
M i18n/azb.json
M i18n/bgn.json
M i18n/br.json
M i18n/bs.json
M i18n/hr.json
M i18n/is.json
M i18n/jv.json
M i18n/latn.json
M i18n/nah.json
M i18n/nl.json
M i18n/nso.json
M i18n/sa.json
M i18n/th.json
M i18n/tr.json
M index.html
D js/embed.vendor.min.0adf6705e0a33abaa757.js
A js/embed.vendor.min.3a318f47b4548ca5d2b0.js
D js/embed.wdqs.min.bfd4e3ab22d0dbda2338.js
A js/embed.wdqs.min.eb5fad09e447397570ed.js
D js/vendor.min.48395aa071f2cad21d93.js
A js/vendor.min.5088fa2672bbff9ee391.js
D js/wdqs.min.5d5edffec1334d46a761.js
A js/wdqs.min.f5dde98fd36ca2066032.js
33 files changed, 148 insertions(+), 148 deletions(-)

Approvals:
  Smalyshev: Verified; Looks good to me, approved




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f4146d2ef0fae895dd31fdac439b61ac125cc5c
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix grunt deploy

2016-12-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328626 )

Change subject: Fix grunt deploy
..

Fix grunt deploy

Change-Id: Ib988a6dd757cd9c6c79e548d68052bba167b40f0
---
M Gruntfile.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/26/328626/1

diff --git a/Gruntfile.js b/Gruntfile.js
index ef48d8a..be7df7c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -177,7 +177,7 @@
commitDeploy: {// get gui commit message and use it for 
deploy commit
command: [
'lastrev=$(git rev-parse HEAD)',
-   'message=$(git log -1 
--pretty=%B)',
+   'message=$(git log -1 
--pretty=%B | grep -v Change-Id)',
'newmessage=$(cat 
<

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:

2016-12-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328625 )

Change subject: Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:
..

Merging from c4ca5263ec51437ba8fcb1f397b37a6c369e0a8a:

Fix grunt deploy

Change-Id: I3f4146d2ef0fae895dd31fdac439b61ac125cc5c
---
R css/embed.style.min.04ed3089c4af13ff8b2e.css
M css/images/layers-2x.png
M css/images/layers.png
M css/images/marker-icon-2x.png
M css/images/marker-icon.png
M css/images/marker-shadow.png
A css/style.min.0de20a57bfe7529c7ae2.css
D css/style.min.c29b4c7f7fff75c32eef.css
M embed.html
M i18n/ar.json
M i18n/azb.json
M i18n/bgn.json
M i18n/br.json
M i18n/bs.json
M i18n/hr.json
M i18n/is.json
M i18n/jv.json
M i18n/latn.json
M i18n/nah.json
M i18n/nl.json
M i18n/nso.json
M i18n/sa.json
M i18n/th.json
M i18n/tr.json
M index.html
D js/embed.vendor.min.0adf6705e0a33abaa757.js
A js/embed.vendor.min.3a318f47b4548ca5d2b0.js
D js/embed.wdqs.min.bfd4e3ab22d0dbda2338.js
A js/embed.wdqs.min.eb5fad09e447397570ed.js
D js/vendor.min.48395aa071f2cad21d93.js
A js/vendor.min.5088fa2672bbff9ee391.js
D js/wdqs.min.5d5edffec1334d46a761.js
A js/wdqs.min.f5dde98fd36ca2066032.js
33 files changed, 148 insertions(+), 148 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/25/328625/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f4146d2ef0fae895dd31fdac439b61ac125cc5c
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Stylelint: Fix Unexpected value "none" for property "border"

2016-12-21 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328624 )

Change subject: Stylelint: Fix Unexpected value "none" for property "border"
..

Stylelint: Fix Unexpected value "none" for property "border"

Bug: T152079
Change-Id: I685d95d741fc6aced66e907f9745f9b971b47d1b
---
M modules/dashboard/styles/ext.cx.suggestionlist.less
M modules/source/styles/ext.cx.source.selector.less
M modules/tools/styles/ext.cx.tools.categories.less
M modules/tools/styles/ext.cx.tools.formatter.less
M modules/tools/styles/ext.cx.tools.less
M modules/tools/styles/ext.cx.tools.linker.less
M modules/tools/styles/ext.cx.tools.linter.less
M modules/tools/styles/ext.cx.tools.mtabuse.less
M modules/tools/styles/ext.cx.tools.template.card.less
M modules/ui/styles/mw.cx.ui.Header.less
10 files changed, 11 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/24/328624/1

diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less 
b/modules/dashboard/styles/ext.cx.suggestionlist.less
index cf51826..5a1582a 100644
--- a/modules/dashboard/styles/ext.cx.suggestionlist.less
+++ b/modules/dashboard/styles/ext.cx.suggestionlist.less
@@ -12,7 +12,7 @@
 .cx-suggestionlist h2,
 .cx-suggestionlist__public-title {
.mw-ui-one-whole;
-   border-bottom: none;
+   border-bottom: 0;
 }
 
 .cx-suggestionlist__public {
diff --git a/modules/source/styles/ext.cx.source.selector.less 
b/modules/source/styles/ext.cx.source.selector.less
index 25f7361..efc3343 100644
--- a/modules/source/styles/ext.cx.source.selector.less
+++ b/modules/source/styles/ext.cx.source.selector.less
@@ -125,7 +125,7 @@
margin: 5px 10px 0;
font-size: medium;
appearance: none;
-   border: none;
+   border: 0;
padding: 2px;
 
&[type='search'] {
diff --git a/modules/tools/styles/ext.cx.tools.categories.less 
b/modules/tools/styles/ext.cx.tools.categories.less
index 97fbdec..90e9809 100644
--- a/modules/tools/styles/ext.cx.tools.categories.less
+++ b/modules/tools/styles/ext.cx.tools.categories.less
@@ -104,7 +104,7 @@
 
.cx-category-disabled {
color: #999;
-   border: none;
+   border: 0;
cursor: default;
}
 
diff --git a/modules/tools/styles/ext.cx.tools.formatter.less 
b/modules/tools/styles/ext.cx.tools.formatter.less
index 1bbeafc..34ab8ff 100644
--- a/modules/tools/styles/ext.cx.tools.formatter.less
+++ b/modules/tools/styles/ext.cx.tools.formatter.less
@@ -10,7 +10,7 @@
cursor: pointer;
min-width: 30px;
height: 30px;
-   border: none;
+   border: 0;
border-right: 1px solid #fbfbfb;
background-color: transparent;
color: @gray-dark;
diff --git a/modules/tools/styles/ext.cx.tools.less 
b/modules/tools/styles/ext.cx.tools.less
index 117a7ec..8d4d9b9 100644
--- a/modules/tools/styles/ext.cx.tools.less
+++ b/modules/tools/styles/ext.cx.tools.less
@@ -11,7 +11,7 @@
font-size: 16px;
width: 100%;
height: 2.5em;
-   border: none;
+   border: 0;
background: none;
outline: none;
 }
diff --git a/modules/tools/styles/ext.cx.tools.linker.less 
b/modules/tools/styles/ext.cx.tools.linker.less
index 23874d8..60179a7 100644
--- a/modules/tools/styles/ext.cx.tools.linker.less
+++ b/modules/tools/styles/ext.cx.tools.linker.less
@@ -37,7 +37,7 @@
background-position: left 5px center;
background-repeat: no-repeat;
background-size: 20px;
-   border: none;
+   border: 0;
font-size: medium;
display: none;
}
@@ -46,7 +46,7 @@
.mw-ui-item;
.mw-ui-one-whole;
float: none;
-   border: none;
+   border: 0;
font-size: medium;
padding: 2px 2px 2px 30px;
.background-image-svg('../images/external_link.svg', 
'../images/external_link.png');
diff --git a/modules/tools/styles/ext.cx.tools.linter.less 
b/modules/tools/styles/ext.cx.tools.linter.less
index 583bec9..a6b37ff 100644
--- a/modules/tools/styles/ext.cx.tools.linter.less
+++ b/modules/tools/styles/ext.cx.tools.linter.less
@@ -26,7 +26,7 @@
background-position: left 10px center;
background-size: 40px;
padding: 10px 15px 10px 50px;
-   border: none;
+   border: 0;
margin: 0;
 }
 
diff --git a/modules/tools/styles/ext.cx.tools.mtabuse.less 
b/modules/tools/styles/ext.cx.tools.mtabuse.less
index 1e5500f..b7e45ac 100644
--- a/modules/tools/styles/ext.cx.tools.mtabuse.less
+++ 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Cleanup a few things with account registration form

2016-12-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328620 )

Change subject: Cleanup a few things with account registration form
..

Cleanup a few things with account registration form

* Change the form to use clean_confirm() instead of clean()
* Move register.js to parsley-bootstrap.js so it can be reused

Change-Id: Ic9f15748101e38978d10bdbfbf29f319e22c73a7
---
R static/js/parsley-bootstrap.js
M striker/register/forms.py
M striker/templates/register/base.html
3 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/20/328620/1

diff --git a/static/js/register.js b/static/js/parsley-bootstrap.js
similarity index 100%
rename from static/js/register.js
rename to static/js/parsley-bootstrap.js
diff --git a/striker/register/forms.py b/striker/register/forms.py
index 8781da9..8e17941 100644
--- a/striker/register/forms.py
+++ b/striker/register/forms.py
@@ -22,9 +22,9 @@
 
 from django import forms
 from django.core import validators
-from django.core.exceptions import ValidationError
 from django.utils.safestring import mark_safe
 from django.utils.translation import ugettext_lazy as _
+
 from parsley.decorators import parsleyfy
 
 from striker.register import utils
@@ -193,14 +193,13 @@
 widget=forms.PasswordInput
 )
 
-def clean(self):
+def clean_confirm(self):
 """Validate that both password entries match."""
-super(Password, self).clean()
 passwd = self.cleaned_data.get('passwd')
 confirm = self.cleaned_data.get('confirm')
 if passwd != confirm:
-self.add_error(
-'confirm', ValidationError(_('Passwords do not match.')))
+raise forms.ValidationError(_('Passwords do not match.'))
+return confirm
 
 
 @parsleyfy
diff --git a/striker/templates/register/base.html 
b/striker/templates/register/base.html
index da0f929..f987b58 100644
--- a/striker/templates/register/base.html
+++ b/striker/templates/register/base.html
@@ -77,6 +77,6 @@
 {% block js %}
 {{ block.super }}
 
-
+
 {% endblock %}
 {# vim:sw=2:ts=2:sts=2:et:ft=htmldjango: #}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9f15748101e38978d10bdbfbf29f319e22c73a7
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Remove some vertical whitespace on linked accounts screen

2016-12-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328621 )

Change subject: Remove some vertical whitespace on linked accounts screen
..

Remove some vertical whitespace on linked accounts screen

Change-Id: I01b60b22333ba34a9745ce747730ec9146966862
---
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/profile/settings/accounts/phabricator.html
M striker/templates/profile/settings/accounts/sul.html
3 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/21/328621/1

diff --git a/striker/templates/profile/settings/accounts/ldap.html 
b/striker/templates/profile/settings/accounts/ldap.html
index f151a67..60c0032 100644
--- a/striker/templates/profile/settings/accounts/ldap.html
+++ b/striker/templates/profile/settings/accounts/ldap.html
@@ -6,7 +6,7 @@
   {% fa_icon "user-circle" "lg" "fw" 
aria_hidden="true" %} {% trans "Wikitech/Labs/Gerrit LDAP account" %}
   
   
-
+
   {% trans "Username" %}{{ user.ldapname }}
   {% trans "Shell account name" %}{{ user.shellname }}
   {% trans "Email" %}{{ user.ldapemail }}
diff --git a/striker/templates/profile/settings/accounts/phabricator.html 
b/striker/templates/profile/settings/accounts/phabricator.html
index 3860a78..4c10646 100644
--- a/striker/templates/profile/settings/accounts/phabricator.html
+++ b/striker/templates/profile/settings/accounts/phabricator.html
@@ -8,14 +8,14 @@
   {% fa_icon "circle" 
"stack-2x" "fw" aria_hidden="true" %}{% fa_icon "cog" "stack-1x" "fw" "inverse" 
aria_hidden="true" %} {% trans "Phabricator account" %}
   
   
-
+
   {% trans "Username" %}{{ user.phabname }}
   {% trans "Real name" %}{{ user.phabrealname }}
   {% trans "Profile" %}{{ 
user.phaburl }}
 
   
   
-{% trans "Refresh Phabricator data" %}
+{% trans "Refresh Phabricator data" %}
   
 
 {% else %}
diff --git a/striker/templates/profile/settings/accounts/sul.html 
b/striker/templates/profile/settings/accounts/sul.html
index 52bf5f3..2957e0e 100644
--- a/striker/templates/profile/settings/accounts/sul.html
+++ b/striker/templates/profile/settings/accounts/sul.html
@@ -8,14 +8,14 @@
   {% fa_icon "wikipedia-w" "lg" "fw" 
aria_hidden="true" %} {% trans "Wikimedia account" %}
   
   
-
+
   {% trans "Username" %}{{ user.sulname }}
   {% trans "Real name" %}{{ user.realname }}
   {% trans "Email" %}{{ user.sulemail }}
 
   
   
-{% trans "Refresh OAuth credentials" %}
+{% trans "Refresh OAuth credentials" %}
   
 
 {% else %}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01b60b22333ba34a9745ce747730ec9146966862
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Allow changing LDAP password

2016-12-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328622 )

Change subject: Allow changing LDAP password
..

Allow changing LDAP password

Bug: T153935
Change-Id: I04b1bf0b5cf7122e23364505c39689e9a691181e
---
M striker/labsauth/models.py
M striker/profile/forms.py
M striker/profile/urls.py
M striker/profile/views.py
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/profile/settings/base.html
A striker/templates/profile/settings/change-password.html
7 files changed, 140 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/22/328622/1

diff --git a/striker/labsauth/models.py b/striker/labsauth/models.py
index 88c8d8e..771e6a8 100644
--- a/striker/labsauth/models.py
+++ b/striker/labsauth/models.py
@@ -30,6 +30,7 @@
 from django.utils.translation import ugettext_lazy as _
 
 from ldapdb.models import fields as ldap_fields
+import ldap
 import ldapdb.models
 import mwoauth
 
@@ -109,12 +110,28 @@
 verbose_name_plural = _('users')
 
 def set_password(self, raw_password):
-"""Can't change password."""
-return
+# Set password by directly manipulating the associated LDAP record.
+# The ldap-auth backend we use does not support password
+# checks/changes.
+ldapuser = self.ldapuser
+ldapuser.password = raw_password
+ldapuser.save()
 
 def check_password(self, raw_password):
-"""Can't be used directly for authn."""
-return False
+"""Return a boolean of whether the raw_password was correct."""
+# Validate the current password by doing an authbind as the user.
+# The ldap-auth backend we use does not support password
+# checks/changes.
+try:
+con = ldap.initialize(settings.AUTH_LDAP_SERVER_URI)
+if settings.AUTH_LDAP_START_TLS:
+con.start_tls_s()
+con.simple_bind_s(self.ldap_dn, raw_password)
+except ldap.INVALID_CREDENTIALS:
+return False
+else:
+con.unbind()
+return True
 
 def set_unusable_password(self):
 return
diff --git a/striker/profile/forms.py b/striker/profile/forms.py
index bfae5b4..3087835 100644
--- a/striker/profile/forms.py
+++ b/striker/profile/forms.py
@@ -19,7 +19,10 @@
 # along with Striker.  If not, see .
 
 from django import forms
+from django.conf import settings
 from django.utils.translation import ugettext_lazy as _
+
+from parsley.decorators import parsleyfy
 
 from striker.profile import utils
 
@@ -78,3 +81,57 @@
 _('Invalid public key.'), code='key_invalid')
 self.key = key
 return pub_key
+
+
+@parsleyfy
+class PasswordChangeForm(forms.Form):
+class Meta:
+parsley_extras = {
+'confirm': {
+'equalto': 'passwd',
+'error-message': _('Passwords do not match.'),
+}
+}
+
+old_password = forms.CharField(
+label=_('Old password'),
+widget=forms.PasswordInput(
+attrs={
+'autofocus': 'autofocus',
+}
+)
+)
+passwd = forms.CharField(
+label=_('New password'),
+min_length=10,
+widget=forms.PasswordInput
+)
+confirm = forms.CharField(
+label=_('Confirm new password'),
+widget=forms.PasswordInput
+)
+
+def __init__(self, user=None, *args, **kwargs):
+self.user = user
+super(PasswordChangeForm, self).__init__(*args, **kwargs)
+
+def clean_old_password(self):
+old_password = self.cleaned_data.get('old_password')
+if not self.user.check_password(old_password):
+raise forms.ValidationError(
+_('Your old password was entered incorrectly. '
+  'Please enter it again.'),
+code='password_incorrect')
+return old_password
+
+def clean_confirm(self):
+"""Validate that both password entries match."""
+passwd = self.cleaned_data.get('passwd')
+confirm = self.cleaned_data.get('confirm')
+if passwd != confirm:
+raise forms.ValidationError(_('Passwords do not match.'))
+return confirm
+
+def save(self):
+self.user.set_password(self.cleaned_data['passwd'])
+return self.user
diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index e6a4b5a..8d21080 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -55,4 +55,9 @@
 'striker.profile.views.ssh_key_add',
 name='ssh_key_add'
 ),
+urls.url(
+r'^settings/change_password$',
+'striker.profile.views.change_password',
+name='change_password'
+),
 ]
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 2f5c00e..9f84b04 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Update list of supported browsers

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328515 )

Change subject: Update list of supported browsers
..


Update list of supported browsers

As per: https://www.mediawiki.org/wiki/Compatibility#Modern

Bug: T152079
Change-Id: I2bf701271815aa0a1d7fa2e33a417ef7f885f61c
---
M .stylelintrc
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 905b08c..f6d88e2 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -2,11 +2,11 @@
"extends": "stylelint-config-wikimedia",
"rules": {
"no-browser-hacks": [ true, {
-   "browsers": [ "Chrome >= 1", "Firefox >= 12", "Explorer 
>= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile 
>= 10", "Android >= 4", "not BlackBerry >= 1", "ChromeAndroid >= 1", 
"FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ]
+   "browsers": [ "last 2 Chrome versions", "last 2 Firefox 
versions", "Explorer >= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12.1", "Safari 
>= 5.1", "ExplorerMobile >= 10", "Android >= 4", "not BlackBerry >= 1", 
"ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not 
OperaMini >= 1" ]
} ],
 
"no-unsupported-browser-features": [ true, {
-   "browsers": [ "Chrome >= 1", "Firefox >= 12", "Explorer 
>= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile 
>= 10", "Android >= 4", "not BlackBerry >= 1", "ChromeAndroid >= 1", 
"FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ]
+   "browsers": [ "last 2 Chrome versions", "last 2 Firefox 
versions", "Explorer >= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12.1", "Safari 
>= 5.1", "ExplorerMobile >= 10", "Android >= 4", "not BlackBerry >= 1", 
"ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not 
OperaMini >= 1" ]
} ]
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bf701271815aa0a1d7fa2e33a417ef7f885f61c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
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...UniversalLanguageSelector[master]: Start showing warnings for deprecated PHP entry point

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328471 )

Change subject: Start showing warnings for deprecated PHP entry point
..


Start showing warnings for deprecated PHP entry point

Change-Id: I0ef9a614048ec139f15353eac554a91500119eca
---
M UniversalLanguageSelector.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php
index 2bfd3d3..e85a361 100644
--- a/UniversalLanguageSelector.php
+++ b/UniversalLanguageSelector.php
@@ -22,11 +22,11 @@
wfLoadExtension( 'UniversalLanguageSelector' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['UniversalLanguageSelector'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for UniversalLanguageSelector 
extension. ' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'Universal Language Selector extension requires MediaWiki 1.25 or 
later' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ef9a614048ec139f15353eac554a91500119eca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Santhosh 
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/core[master]: Add a caught_by context field to exceptions

2016-12-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328619 )

Change subject: Add a caught_by context field to exceptions
..

Add a caught_by context field to exceptions

This distinguishes random errors caught and explicitly logged by various
callers from those that were only caught by the registered exception handler.
The later are likely to have more visibily impact on the user.

Change-Id: Icb4c4e9376270c5475c95cf40708a7ca3e4e0a49
---
M includes/exception/MWExceptionHandler.php
1 file changed, 29 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/328619/1

diff --git a/includes/exception/MWExceptionHandler.php 
b/includes/exception/MWExceptionHandler.php
index 3d8ddb8..bef379e 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -26,6 +26,8 @@
  * @ingroup Exception
  */
 class MWExceptionHandler {
+   const CAUGHT_BY_HANDLER = 'mwe_handler'; // error reported by this 
exception handler
+   const CAUGHT_BY_OTHER = 'other'; // error reported by direct 
logException() call
 
/**
 * @var string $reservedMemory
@@ -130,10 +132,10 @@
// which would result in an exception loop. PHP may 
escalate such
// errors to "Exception thrown without a stack frame" 
fatals, but
// it's better to be explicit here.
-   self::logException( $e2 );
+   self::logException( $e2, self::CAUGHT_BY_HANDLER );
}
 
-   self::logException( $e );
+   self::logException( $e, self::CAUGHT_BY_HANDLER );
self::report( $e );
 
// Exit value should be nonzero for the benefit of shell jobs
@@ -293,6 +295,7 @@
'trace' => static::redactTrace( $trace ),
],
'exception_id' => wfRandomString( 8 ),
+   'caught_by' => self::CAUGHT_BY_HANDLER
] );
 
// Remember call so we don't double process via HHVM's fatal
@@ -464,12 +467,14 @@
 * logger.
 *
 * @param Exception|Throwable $e
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return array
 */
-   public static function getLogContext( $e ) {
+   public static function getLogContext( $e, $catcher = 
self::CAUGHT_BY_OTHER ) {
return [
'exception' => $e,
'exception_id' => WebRequest::getRequestId(),
+   'caught_by' => $catcher
];
}
 
@@ -481,11 +486,13 @@
 * will be redacted as per getRedactedTraceAsArray().
 *
 * @param Exception|Throwable $e
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return array
 * @since 1.26
 */
-   public static function getStructuredExceptionData( $e ) {
+   public static function getStructuredExceptionData( $e, $catcher = 
self::CAUGHT_BY_OTHER ) {
global $wgLogExceptionBacktrace;
+
$data = [
'id' => WebRequest::getRequestId(),
'type' => get_class( $e ),
@@ -494,6 +501,7 @@
'message' => $e->getMessage(),
'code' => $e->getCode(),
'url' => self::getURL() ?: null,
+   'caught_by' => $catcher
];
 
if ( $e instanceof ErrorException &&
@@ -509,7 +517,7 @@
 
$previous = $e->getPrevious();
if ( $previous !== null ) {
-   $data['previous'] = self::getStructuredExceptionData( 
$previous );
+   $data['previous'] = self::getStructuredExceptionData( 
$previous, $catcher );
}
 
return $data;
@@ -566,11 +574,17 @@
 * @param Exception|Throwable $e
 * @param bool $pretty Add non-significant whitespace to improve 
readability (default: false).
 * @param int $escaping Bitfield consisting of FormatJson::.*_OK class 
constants.
+* @param string $catcher CAUGHT_BY_* class constant indicating what 
caught the error
 * @return string|false JSON string if successful; false upon failure
 */
-   public static function jsonSerializeException( $e, $pretty = false, 
$escaping = 0 ) {
-   $data = self::getStructuredExceptionData( $e );
-   return FormatJson::encode( $data, $pretty, $escaping );
+   public static function jsonSerializeException(
+   $e, $pretty = false, $escaping = 0, $catcher = 
self::CAUGHT_BY_OTHER
+   ) {
+   return 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Make mediawiki/core cloning shallow by default

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328617 )

Change subject: Make mediawiki/core cloning shallow by default
..


Make mediawiki/core cloning shallow by default

Bug: T152801
Change-Id: If91559165e168555d785ea869eca43b941a392e5
---
M puppet/modules/mediawiki/manifests/init.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 15cfc3b..e94d439 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -41,6 +41,10 @@
 # [*branch*]
 #   Version to check out
 #
+# [*git_depth*]
+#  Git cloning depth - undef for normal, a number for a shallow clone with
+#  that many revisions.
+#
 # [*server_url*]
 #   Full base URL of host (example: 'http://mywiki.net:8080').
 #
@@ -56,6 +60,7 @@
 $page_dir,
 $composer_fragment_dir,
 $branch = undef,
+$git_depth  = undef,
 $server_url = undef,
 ) {
 Exec {
@@ -80,6 +85,7 @@
 git::clone { 'mediawiki/core':
 directory => $dir,
 branch=> $branch,
+depth => $git_depth,
 }
 
 mediawiki::skin { 'Vector': }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If91559165e168555d785ea869eca43b941a392e5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Include DB shard as a logstash column

2016-12-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328618 )

Change subject: Include DB shard as a logstash column
..

Include DB shard as a logstash column

Change-Id: I2bf3561579c088e91b52a3bc4348598c52aaacec
---
M wmf-config/logging.php
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/18/328618/1

diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 45a8eb4..4142508 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -87,7 +87,19 @@
$record['extra']['normalized_message'] = 
substr( $nm, 0, 255 );
return $record;
};
-   },
+   }
+   ],
+   'shard' => [
+   'factory' => function () {
+   /** Adds the database shard name (e.g. s1, s2, ...) */
+   return function( array $record ) {
+   global $wgLBFactoryConf, $wgDBname;
+
+   return isset( 
$wgLBFactoryConf['sectionsByDB'][$wgDBname] )
+   ? 
$wgLBFactoryConf['sectionsByDB'][$wgDBname]
+   : 's3';
+   };
+   }
],
 ];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bf3561579c088e91b52a3bc4348598c52aaacec
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Fix obsolete tags linting + ignore BIG

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327564 )

Change subject: Linter: Fix obsolete tags linting + ignore BIG
..


Linter: Fix obsolete tags linting + ignore BIG

* Use the list of obsolete tags from the constants list
  and build a regexp from that.

* Ignore BIG since it seems all editors provide buttons to
  add them to wikitext.

Change-Id: I05e55753e307f4536ccb276e36db86d60d532e3f
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 31 insertions(+), 16 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 05973c3..7a29817 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -14,6 +14,7 @@
 
 var DU = require('../../../utils/DOMUtils.js').DOMUtils;
 var Util = require('../../../utils/Util.js').Util;
+var Consts = require('../../../config/WikitextConstants.js').WikitextConstants;
 
 /*
  * Log Transclusion with more than one parts
@@ -212,14 +213,23 @@
return nextSibling;
 }
 
-/*
- * Log obsolete HTML tags like BIG, CENTER, FONT, STRIKE, and TT
- * See - http://www.w3.org/TR/html5/obsolete.html#non-conforming-features
- */
-function logObsoleteHTMLTags(env, c, dp, tplInfo) {
-   var re = /^(BIG|CENTER|FONT|STRIKE|TT)$/;
+var obsoleteTagsRE = null;
 
-   if (!(dp.autoInsertedStart && dp.autoInsertedEnd) && 
re.test(c.nodeName)) {
+function logObsoleteHTMLTags(env, c, dp, tplInfo) {
+   if (!obsoleteTagsRE) {
+   var elts = [];
+   Consts.HTML.OlderHTMLTags.forEach(function(tag) {
+   // Looks like all existing editors let editors add the 
 tag.
+   // VE has a button to add , it seems so does the 
WikiEditor
+   // and JS wikitext editor. So, don't flag BIG as an 
obsolete tag.
+   if (tag !== 'BIG') {
+   elts.push(tag);
+   }
+   });
+   obsoleteTagsRE = new RegExp('^(' + elts.join('|') + ')$');
+   }
+
+   if (!(dp.autoInsertedStart && dp.autoInsertedEnd) && 
obsoleteTagsRE.test(c.nodeName)) {
var templateInfo;
if (tplInfo) {
templateInfo = { name: 
DU.findEnclosingTemplateName(tplInfo) };
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index f5a4b86..df42707 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -62,32 +62,37 @@
});
});
it('should lint obsolete tags correctly', function() {
-   return 
parseWT('foobar').then(function(result) {
+   return parseWT('foobar').then(function(result) 
{
result.should.have.length(1);
result[0].should.have.a.property("type", 
"obsolete-tag");
-   result[0].dsr.should.include.members([ 0, 14, 
5, 6 ]);
+   result[0].dsr.should.include.members([ 0, 12, 
4, 5 ]);
result[0].should.have.a.property("params");
-   result[0].params.should.have.a.property("name", 
"big");
+   result[0].params.should.have.a.property("name", 
"tt");
+   });
+   });
+   it('should not lint big as an obsolete tag', function() {
+   return 
parseWT('foobar').then(function(result) {
+   result.should.have.length(0);
});
});
it('should lint obsolete tags found in transclusions 
correctly', function() {
-   return 
parseWT('{{1x|foo}}foo').then(function(result) {
+   return 
parseWT('{{1x|foo}}foo').then(function(result) {
result.should.have.length(1);
result[0].should.have.a.property("type", 
"obsolete-tag");
-   result[0].dsr.should.include.members([ 0, 32, 
null, null ]);
+   result[0].dsr.should.include.members([ 0, 30, 
null, null ]);
result[0].should.have.a.property("params");
-   result[0].params.should.have.a.property("name", 
"big");
+   result[0].params.should.have.a.property("name", 
"tt");
});
});
it('should not lint auto-inserted obsolete tags', function() {
-   return 
parseWT('foo\n\n\nbar').then(function(result) {
+   return 
parseWT('foo\n\n\nbar').then(function(result) {
// 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Make mediawiki/core cloning shallow by default

2016-12-21 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328617 )

Change subject: Make mediawiki/core cloning shallow by default
..

Make mediawiki/core cloning shallow by default

Bug: T153578
Change-Id: If91559165e168555d785ea869eca43b941a392e5
---
M puppet/modules/mediawiki/manifests/init.pp
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/17/328617/1

diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 15cfc3b..e94d439 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -41,6 +41,10 @@
 # [*branch*]
 #   Version to check out
 #
+# [*git_depth*]
+#  Git cloning depth - undef for normal, a number for a shallow clone with
+#  that many revisions.
+#
 # [*server_url*]
 #   Full base URL of host (example: 'http://mywiki.net:8080').
 #
@@ -56,6 +60,7 @@
 $page_dir,
 $composer_fragment_dir,
 $branch = undef,
+$git_depth  = undef,
 $server_url = undef,
 ) {
 Exec {
@@ -80,6 +85,7 @@
 git::clone { 'mediawiki/core':
 directory => $dir,
 branch=> $branch,
+depth => $git_depth,
 }
 
 mediawiki::skin { 'Vector': }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If91559165e168555d785ea869eca43b941a392e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: grrrrit: Fully ignore L10n-bot

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328616 )

Change subject: git: Fully ignore L10n-bot
..


git: Fully ignore L10n-bot

Change-Id: Ica68f37edd66a633d4052cc0e3f61010a7ea1e53
---
M git.py
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/git.py b/git.py
index 1aca5a0..c83f2d3 100644
--- a/git.py
+++ b/git.py
@@ -47,6 +47,8 @@
 owner = event['change']['owner']['name']
 if ret['user'] != owner:
 ret['owner'] = owner
+if ret['user'] == 'L10n-bot':
+return None
 elif event['type'] == 'draft-published':
 ret = {
 'type': 'Draft' + event['patchSet']['number'],
@@ -108,6 +110,8 @@
 ret['user'] = 'jerkins-bot'  # For MaxSem
 elif approval['type'] == 'Code-Review' and value != 0:
 ret['approvals']['C'] = value
+if ret['user'] == 'L10n-bot':
+return None
 elif event['type'] == 'change-merged':
 ret = process_simple(event, 'Merged', 'submitter')
 if ret['user'] == 'jenkins-bot' and ret['owner'] == 'L10n-bot':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica68f37edd66a633d4052cc0e3f61010a7ea1e53
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: grrrrit: Fully ignore L10n-bot

2016-12-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328616 )

Change subject: git: Fully ignore L10n-bot
..

git: Fully ignore L10n-bot

Change-Id: Ica68f37edd66a633d4052cc0e3f61010a7ea1e53
---
M git.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/16/328616/1

diff --git a/git.py b/git.py
index 1aca5a0..c83f2d3 100644
--- a/git.py
+++ b/git.py
@@ -47,6 +47,8 @@
 owner = event['change']['owner']['name']
 if ret['user'] != owner:
 ret['owner'] = owner
+if ret['user'] == 'L10n-bot':
+return None
 elif event['type'] == 'draft-published':
 ret = {
 'type': 'Draft' + event['patchSet']['number'],
@@ -108,6 +110,8 @@
 ret['user'] = 'jerkins-bot'  # For MaxSem
 elif approval['type'] == 'Code-Review' and value != 0:
 ret['approvals']['C'] = value
+if ret['user'] == 'L10n-bot':
+return None
 elif event['type'] == 'change-merged':
 ret = process_simple(event, 'Merged', 'submitter')
 if ret['user'] == 'jenkins-bot' and ret['owner'] == 'L10n-bot':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica68f37edd66a633d4052cc0e3f61010a7ea1e53
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid pointless use of isset() in LBFactoryMulti()

2016-12-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328615 )

Change subject: Avoid pointless use of isset() in LBFactoryMulti()
..

Avoid pointless use of isset() in LBFactoryMulti()

Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640
---
M includes/libs/rdbms/lbfactory/LBFactoryMulti.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/328615/1

diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php 
b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php
index 1d22873..4158e61 100644
--- a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php
+++ b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php
@@ -260,7 +260,7 @@
throw new InvalidArgumentException( __METHOD__ . ": 
Unknown cluster \"$cluster\"" );
}
$template = $this->serverTemplate;
-   if ( isset( $this->externalTemplateOverrides ) ) {
+   if ( $this->externalTemplateOverrides ) {
$template = $this->externalTemplateOverrides + 
$template;
}
if ( isset( $this->templateOverridesByCluster[$cluster] ) ) {
@@ -348,7 +348,7 @@
$serverInfo = $template;
if ( $master ) {
$serverInfo['master'] = true;
-   if ( isset( $this->masterTemplateOverrides ) ) {
+   if ( $this->masterTemplateOverrides ) {
$serverInfo = 
$this->masterTemplateOverrides + $serverInfo;
}
$master = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Suppress breaking on table pipe in tags

2016-12-21 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328613 )

Change subject: Suppress breaking on table pipe in tags
..

Suppress breaking on table pipe in tags

 * Just does what the FIXME from 566f4c0f said to do.

 * The passing test was brought over in 2291f85ed which mentions where
   this got "broken" in cf9fb74f.  I put broken in quotes because that
   was still the right thing to do, just incomplete.

Change-Id: Ia44c2a6e235d78f9f4a825fe6cd2d1dee8e2d9bd
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests-blacklist.js
2 files changed, 14 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/13/328613/1

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 9c3d1ec..7867874 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1223,10 +1223,9 @@
   = & {
   // By the time we get to `doTableStuff` in the php parser, we've already
   // safely encoded element attributes. See 55313f4e in core.
-  // FIXME: Also need to handle the || case here, which probably means
-  // pushing 'table'. See the failing test, "! and || in element attributes
-  // should not be parsed as /".
-  return stops.push('tableCellArg', false);
+  stops.push('table', false);
+  stops.push('tableCellArg', false);
+  return true;
 }
 "<" end:"/"?
 name:$(tn:tag_name & {
@@ -1237,6 +1236,7 @@
 selfclose:"/"?
 bad_ws:space* // No need to preserve this -- canonicalize on RT via dirty 
diff
 ">" {
+stops.pop('table');
 stops.pop('tableCellArg');
 stops.pop('extTag');
 
@@ -1264,7 +1264,7 @@
 return maybeExtensionTag(res);
 }
 / "<" "/"? tag_name & { return stops.pop('extTag'); }
-/ & { return stops.pop('tableCellArg'); }
+/ & { stops.pop('table'); return stops.pop('tableCellArg'); }
 
 /*
  * A variant of xmlish_tag, but also checks if the tag name is a block-level
@@ -1273,7 +1273,13 @@
  * following paragraphs.
  */
 block_tag
-  = & { return stops.push('tableCellArg', false); }
+  = & {
+  // By the time we get to `doTableStuff` in the php parser, we've already
+  // safely encoded element attributes. See 55313f4e in core.
+  stops.push('table', false);
+  stops.push('tableCellArg', false);
+  return true;
+}
 "<" end:"/"?
 name:$(tn:tag_name & {
   return isXMLTag(tn, true);  // NOTE: 'extTag' stop was pushed.
@@ -1282,13 +1288,14 @@
 space_or_newline*
 selfclose:"/"?
 ">" {
+  stops.pop('table');
   stops.pop('tableCellArg');
   stops.pop('extTag');
   var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, 
selfclose, tsrOffsets());
   return [maybeExtensionTag(t)];
 }
 / "<" "/"? tag_name & { return stops.pop('extTag'); }
-/ & { return stops.pop('tableCellArg'); }
+/ & { stops.pop('table'); return stops.pop('tableCellArg'); }
 
 // A generic attribute that can span multiple lines.
 generic_newline_attribute
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 94a6bac..8226da6 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -55,7 +55,6 @@
 add("wt2html", "Definition Lists: colons and tables 1", "\n 
x\n\n\n 
y\n");
 add("wt2html", "Bug 2702: Mismatched ,  and  tags are invalid", "http://example.com\; 
data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text\nhttp://example.com\; 
data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'>text\nSomething http://example.com\; 
data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in
 italic\nSomething http://example.com\; 
data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed, even 
bold'\nNow http://example.com\; 
data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both");
 add("wt2html", "External link containing double-single-quotes in text embedded 
in italics (bug 4598 sanity check)", "Some http://example.com/\; 
data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty
 italics and stuff!");
-add("wt2html", "! and || in element attributes should not be parsed as 
/", "\n div 
style=\"color: red !important;\" data-contrived=\"put this here \">hi\n");
 add("wt2html", "Self-link to numeric title", "0");
 add("wt2html", " inside a link", "Main Page the main page [it's not very good]");
 add("wt2html", "Interlanguage link with spacing", "Blah blah blah\nhttp://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\"},\"sa\":{\"href\":\;
   zh  :Chinese \"},\"dsr\":[15,43,null,null]}'/>");

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Give a chance to break on | in element attribute name in tem...

2016-12-21 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328614 )

Change subject: Give a chance to break on | in element attribute name in 
template
..

Give a chance to break on | in element attribute name in template

 * This is similar to cf9fb74f where it doesn't affect the rendering
   since we send the whole src to the mw api.

 * The new wt2wt failure is because we need a html/parsoid section to
   add the autoInsertedEnd for the bold.  Not adding that here because
   the output is wrong.  A simplified example of what's going on is
   {{{test|hi=ho}}}.  The php parser will output hi=ho, but Parsoid
   tokenizes the argument as KV(hi, ho) and only outputs the value, ho.
   Will be fixed in a follow up.

Change-Id: I84752b22463f31c9a1f484d1c9977734a6ccbb99
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 21 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/14/328614/1

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 7867874..5e5996b 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1353,7 +1353,7 @@
 // by html5 and what's necessary to give directive a chance.
 // See: http://www.w3.org/TR/html5/syntax.html#attributes-0
 generic_attribute_name
-  = r:( $[^ \t\r\n\0/=>"'<&{}\-]+
+  = r:( $[^ \t\r\n\0/=>"'<&{}\-!|]+
 / !inline_breaks
   // \0/=>"' is the html5 attribute name set we do not want.
   t:( directive / !( space_or_newline / [\0/=>"'] ) c:. { return c; }
@@ -1368,7 +1368,7 @@
 
 // Same as generic_attribute_name, except for accepting tags and wikilinks.
 // (That doesn't make sense (ie. match php) in the generic case.)
-// We also give a chance to break on !, |, and \[ (see T2553).
+// We also give a chance to break on \[ (see T2553).
 table_attribute_name
   = r:( $[^ \t\r\n\0/=>"'<&{}\-!|\[]+
 / !inline_breaks
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 8226da6..f4d4273 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -166,7 +166,7 @@
 add("wt2html", "Self closed html pairs (bug 5487)", "Centered
 text\nIn
 div text");
 add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__");
 add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE
 YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n");
-add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "\nblah\" 
onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE 
CURSOR OVER HERE");
+add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "blah\" onmouseover=\"alert('hello 
world');\" align=\"left\"MOVE MOUSE 
CURSOR OVER HERE");
 add("wt2html", "Inline HTML vs wiki block nesting", "Bold
 paragraph\n\nNew wiki paragraph");
 add("wt2html", "Special page transclusion", "Parser
 function implementation for pf_special missing in Parsoid.");
 add("wt2html", "Special page transclusion twice (bug 5021)", "Parser
 function implementation for pf_special missing in Parsoid.\nParser
 function implementation for pf_special missing in Parsoid.");
@@ -337,6 +337,7 @@
 add("wt2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; 
onmouseover=\"alert('hello world');\"\n|\n|}");
 add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}");
 add("wt2wt", "Fuzz testing: Parser24", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR 
OVER THIS TEXT\n{|\n\n|\n|}");
+add("wt2wt", "Fuzz testing: Parser25 (bug 6055)", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE 
CURSOR OVER HERE'''\n");
 add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew 
wiki paragraph\n");
 add("wt2wt", "Mixing markup for italics and bold", 
"'''bold''bold''bolditalics'\n");
 add("wt2wt", "Illegal character references (T106578)", "; Null: \n; FF: 
\n; CR: \n; Control (low): \n; Control (high):  \n; 
Surrogate: \n; This is an okay astral character: ");
@@ -1942,6 +1943,15 @@
 add("selser", "Fuzz testing: Parser24 [[2,2],[4],[2,2]]", 
"hndosskzwiiwl8fr{{{|\nsk3rl6utosgojemi>\n\n\njzny1t7i47mygb9\n{|\n\n||}");
 add("selser", "Fuzz testing: Parser24 [[4,3],3,1]", "ajjrvymgwee45cdi\n{| 
data-foobar=\"q3u36zzq1lg3z0k9\"\n\n||}");
 add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR 
OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR 
OVER THIS TEXT\n|");
+add("selser", "Fuzz testing: Parser25 (bug 6055) [0,2]", "{{{\n| \n\n}}}zstgbb6nw6nr8uxr\n\nblah\" onmouseover=\"alert('hello 
world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE");
+add("selser", "Fuzz testing: Parser25 (bug 6055) [0,1]", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" 
align=\"left\"'''MOVE MOUSE 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Suppress breaking on tableCellArg in block tags too

2016-12-21 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328612 )

Change subject: Suppress breaking on tableCellArg in block tags too
..

Suppress breaking on tableCellArg in block tags too

 * The same comment as for xmlish_tag applies.

 * Should have been part of 566f4c0f but it's only in adeb4e47 and
   c1a5cfd1 that block_tag and xmlish_tag are converging.

Change-Id: I7ad6435206841844505a7751101ad1e8b99a87b3
---
M lib/wt2html/pegTokenizer.pegjs
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/12/328612/1

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 624bc17..9c3d1ec 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1273,7 +1273,8 @@
  * following paragraphs.
  */
 block_tag
-  = "<" end:"/"?
+  = & { return stops.push('tableCellArg', false); }
+"<" end:"/"?
 name:$(tn:tag_name & {
   return isXMLTag(tn, true);  // NOTE: 'extTag' stop was pushed.
 })
@@ -1281,11 +1282,13 @@
 space_or_newline*
 selfclose:"/"?
 ">" {
+  stops.pop('tableCellArg');
   stops.pop('extTag');
   var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, 
selfclose, tsrOffsets());
   return [maybeExtensionTag(t)];
 }
 / "<" "/"? tag_name & { return stops.pop('extTag'); }
+/ & { return stops.pop('tableCellArg'); }
 
 // A generic attribute that can span multiple lines.
 generic_newline_attribute

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ad6435206841844505a7751101ad1e8b99a87b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Support disabling rating input.

2016-12-21 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328595 )

Change subject: Support disabling rating input.
..


Support disabling rating input.

Change-Id: I3a9d06baf6a7b7a4fbefb0ca5939633beb28d164
---
M libs/PF_rating.js
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/libs/PF_rating.js b/libs/PF_rating.js
index d54e18d..6dbd451 100644
--- a/libs/PF_rating.js
+++ b/libs/PF_rating.js
@@ -6,6 +6,7 @@
var curValue = $(this).attr('data-curvalue');
var numStars = $(this).attr('data-numstars');
var allowsHalf = $(this).attr('data-allows-half');
+   var disabled = $(this).attr('disabled');
var ratingsSettings = {
normalFill: '#ddd',
starWidth: starWidth,
@@ -18,12 +19,15 @@
} else {
ratingsSettings.halfStar = true;
}
+   if ( disabled === "disabled" ) {
+   ratingsSettings.readOnly = true;
+   }
 
$(this).rateYo(ratingsSettings)
.on("rateyo.set", function (e, data) {
- 
+
$(this).parent().children(":hidden").attr("value", 
data.rating);
});
};
 
-}( jQuery, mediaWiki, pf ) );
\ No newline at end of file
+}( jQuery, mediaWiki, pf ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a9d06baf6a7b7a4fbefb0ca5939633beb28d164
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
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] operations/puppet[production]: Move shinkengen from using LDAP to the OpenStack APIs

2016-12-21 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328611 )

Change subject: Move shinkengen from using LDAP to the OpenStack APIs
..

Move shinkengen from using LDAP to the OpenStack APIs

Not tested.

Change-Id: I0bda5e651cf265c984f0f19abdfaf821efeaeb9e
---
M modules/shinken/files/shinkengen
M modules/shinken/manifests/shinkengen.pp
M modules/shinken/templates/shinkengen.yaml.erb
3 files changed, 37 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/328611/1

diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen
index 310aae1..1e39c0d 100755
--- a/modules/shinken/files/shinkengen
+++ b/modules/shinken/files/shinkengen
@@ -14,7 +14,7 @@
 #   limitations under the License.
 #
 """
-Generates config about labs instances for shinken, taking info from LDAP.
+Generates config about labs instances for shinken, taking info from OpenStack 
and our puppetmaster.
 
 Emits a host definition for each instance in the whitelisted projects
 (whitelist in the config file).
@@ -34,9 +34,13 @@
 import argparse
 import sys
 import yaml
-import ldap3
 import requests
 from collections import OrderedDict
+
+from keystoneclient.session import Session as KeystoneSession
+from keystoneclient.auth.identity.v3 import Password as KeystonePassword
+
+from novaclient import client as novaclient
 
 
 class ConfigObject():
@@ -58,48 +62,32 @@
 return 'define %s {\n%s}\n' % (self.type, config_str)
 
 
-class LDAPSource(object):
-"""
-A source of information about labs instances, querying LDAP
-"""
-def __init__(self, server, bindas, passwd):
-server = ldap3.Server(server)
-self.conn = ldap3.Connection(server, read_only=True,
- user=bindas, password=passwd)
-self.conn.bind()
-self.conn.start_tls()
+def get_instances(project, observer_pass):
+client = novaclient.Client(
+"2.0",
+session=KeystoneSession(auth=KeystonePassword(
+auth_url="http://labcontrol1001.wikimedia.org:5000/v3;,
+username="novaobserver",
+password=observer_pass,
+project_name=project,
+user_domain_name='default',
+project_domain_name='default'
+))
+)
 
-def get_instances(self, project):
-"""
-Get info about all instances in the given project.
+hosts = []
+for instance in client.servers.list():
+hosts.append({
+'ip': [
+str(ip['addr']) for ip in instance.addresses['public']
+if ip['OS-EXT-IPS:type'] == 'fixed'
+][0],
+'project': project,
+'name': instance.name,
+'fqdn': '.'.join([instance.name, project, 'eqiad', 'wmflabs'])
+})
 
-Returns the following information for each instance in given project:
-- ec2id: Permanent id for this particular instance
-- ip: Internal IP of this instance
-- region: Which OpenStack Region this Instance is in
-- puppetClasses: List of puppet classes applied to this instance 
via
- configure page in wikitech.
-- project: Name of project the instance is contained in
-- name: Name of the instance
-"""
-self.conn.search('ou=hosts,dc=wikimedia,dc=org',
- '(dc=*.%s.eqiad.wmflabs)' % project,
- ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
- attributes=ldap3.ALL_ATTRIBUTES)
-hosts = []
-for responseitem in self.conn.response:
-hostinfo = responseitem['attributes']
-ip = [a for a in hostinfo['aRecord'] if a.startswith('10.')][0]
-instancename, projectname, site, realm = 
hostinfo['dc'][0].split(".")
-hosts.append({
-'ip': ip,
-'puppetClasses': hostinfo.get('puppetClass', []),
-'project': project,
-'name': instancename,
-'fqdn': hostinfo['dc'][0]
-})
-
-return hosts
+return hosts
 
 def get_instance_roles(project, fqdn):
 url = 
'http://labcontrol1001.wikimedia.org:8100/v1/{project}/node/{fqdn}'.format(
@@ -117,12 +105,8 @@
 with open('/etc/shinkengen.yaml') as f:
 config = yaml.load(f)
 
-ldapsource = LDAPSource(config['ldap']['server'],
-config['ldap']['bindas'],
-config['ldap']['password'])
-
 for project in config['projects']:
-instances = ldapsource.get_instances(project)
+instances = get_instances(project, config['observer_pass'])
 host_configs = []
 for instance in instances:
 co = ConfigObject('host')
@@ -134,7 +118,7 @@
 # particular roles with checks.  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Default block-cookies to 24 hours only

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328353 )

Change subject: Default block-cookies to 24 hours only
..


Default block-cookies to 24 hours only

Rather than use wgCookieExpiration as the basis for the maximum
life of a block cookie, just use 1 day.

Tests have been updated also.

Bug: T153347
Change-Id: I3447d97af3170308834f365c5c600430f47c66a7
---
M includes/Block.php
M tests/phpunit/includes/user/UserTest.php
2 files changed, 20 insertions(+), 21 deletions(-)

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



diff --git a/includes/Block.php b/includes/Block.php
index 792bcd9..20cb614 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -1446,8 +1446,7 @@
 
/**
 * Set the 'BlockID' cookie to this block's ID and expiry time. The 
cookie's expiry will be
-* the same as the block's, unless it's greater than 
$wgCookieExpiration in which case
-* $wgCookieExpiration will be used instead (defaults to 30 days).
+* the same as the block's, to a maximum of 24 hours.
 *
 * An empty value can also be set, in order to retain the cookie but 
remove the block ID
 * (e.g. as used in User::getBlockedStatus).
@@ -1457,18 +1456,18 @@
 */
public function setCookie( WebResponse $response, $setEmpty = false ) {
// Calculate the default expiry time.
-   $config = RequestContext::getMain()->getConfig();
-   $defaultExpiry = wfTimestamp() + $config->get( 
'CookieExpiration' );
+   $maxExpiryTime = wfTimestamp( TS_MW, wfTimestamp() + ( 24 * 60 
* 60 ) );
 
// Use the Block's expiry time only if it's less than the 
default.
-   $expiry = wfTimestamp( TS_UNIX, $this->getExpiry() );
-   if ( $expiry > $defaultExpiry ) {
-   // The *default* default expiry is 30 days.
-   $expiry = $defaultExpiry;
+   $expiryTime = $this->getExpiry();
+   if ( $expiryTime === 'infinity' || $expiryTime > $maxExpiryTime 
) {
+   $expiryTime = $maxExpiryTime;
}
 
+   // Set the cookie. Reformat the MediaWiki datetime as a Unix 
timestamp for the cookie.
$cookieValue = $setEmpty ? '' : $this->getId();
-   $response->setCookie( 'BlockID', $cookieValue, $expiry );
+   $expiryValue = DateTime::createFromFormat( "YmdHis", 
$expiryTime );
+   $response->setCookie( 'BlockID', $cookieValue, 
$expiryValue->format( "U" ) );
}
 
/**
diff --git a/tests/phpunit/includes/user/UserTest.php 
b/tests/phpunit/includes/user/UserTest.php
index 7cbae2d..5d9cda7 100644
--- a/tests/phpunit/includes/user/UserTest.php
+++ b/tests/phpunit/includes/user/UserTest.php
@@ -603,10 +603,10 @@
$user1tmp = $this->getTestUser()->getUser();
$request1 = new FauxRequest();
$request1->getSession()->setUser( $user1tmp );
-   $expiryFiveDays = time() + ( 5 * 24 * 60 * 60 );
+   $expiryFiveHours = wfTimestamp() + ( 5 * 60 * 60 );
$block = new Block( [
'enableAutoblock' => true,
-   'expiry' => wfTimestamp( TS_MW, $expiryFiveDays ),
+   'expiry' => wfTimestamp( TS_MW, $expiryFiveHours ),
] );
$block->setTarget( $user1tmp );
$block->insert();
@@ -625,7 +625,7 @@
$cookies = $request1->response()->getCookies();
$this->assertArrayHasKey( 'wmsitetitleBlockID', $cookies );
$this->assertEquals( $block->getId(), 
$cookies['wmsitetitleBlockID']['value'] );
-   $this->assertEquals( $expiryFiveDays, 
$cookies['wmsitetitleBlockID']['expire'] );
+   $this->assertEquals( $expiryFiveHours, 
$cookies['wmsitetitleBlockID']['expire'] );
 
// 2. Create a new request, set the cookies, and see if the 
(anon) user is blocked.
$request2 = new FauxRequest();
@@ -696,14 +696,12 @@
 
/**
 * When a user is autoblocked and a cookie is set to track them, the 
expiry time of the cookie
-* should match the block's expiry. If the block is infinite, the 
cookie expiry time should
-* match $wgCookieExpiration. If the expiry time is changed, the 
cookie's should change with it.
+* should match the block's expiry, to a maximum of 24 hours. If the 
expiry time is changed,
+* the cookie's should change with it.
 */
public function testAutoblockCookieInfiniteExpiry() {
-   $cookieExpiration = 20 * 24 * 60 * 60; // 20 days
$this->setMwGlobals( [
'wgCookieSetOnAutoblock' => true,
-   'wgCookieExpiration' 

[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from e2246685b2bd6163c0b8fc93ab8f11d16f590e20:

2016-12-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328610 )

Change subject: Merging from e2246685b2bd6163c0b8fc93ab8f11d16f590e20:
..

Merging from e2246685b2bd6163c0b8fc93ab8f11d16f590e20:

Avoid static binding to leaflet and d3

Change-Id: Ibb0ef4c003b362e65c030198ce68d7bb11551b3d
---
R css/embed.style.min.04ed3089c4af13ff8b2e.css
M css/images/layers-2x.png
M css/images/layers.png
M css/images/marker-icon-2x.png
M css/images/marker-icon.png
M css/images/marker-shadow.png
A css/style.min.0de20a57bfe7529c7ae2.css
D css/style.min.c29b4c7f7fff75c32eef.css
A dist/dist/polestar/LICENSE
A dist/dist/polestar/bower_components/zeroclipboard/dist/ZeroClipboard.swf
A dist/dist/polestar/embed.html
A dist/dist/polestar/scripts/app.js
A dist/dist/polestar/scripts/vendor.js
A dist/dist/polestar/styles/app.css
A dist/dist/polestar/styles/vendor.css
A dist/polestar/LICENSE
A dist/polestar/bower_components/zeroclipboard/dist/ZeroClipboard.swf
A dist/polestar/embed.html
A dist/polestar/scripts/app.js
A dist/polestar/scripts/vendor.js
A dist/polestar/styles/app.css
A dist/polestar/styles/vendor.css
M embed.html
M i18n/ar.json
M i18n/azb.json
M i18n/bgn.json
M i18n/bs.json
M i18n/hr.json
M i18n/is.json
M i18n/jv.json
M i18n/latn.json
M i18n/nah.json
M i18n/nl.json
M i18n/nso.json
M i18n/sa.json
M i18n/th.json
M i18n/tr.json
M index.html
D js/embed.vendor.min.0adf6705e0a33abaa757.js
A js/embed.vendor.min.3a318f47b4548ca5d2b0.js
D js/embed.wdqs.min.bfd4e3ab22d0dbda2338.js
A js/embed.wdqs.min.eb5fad09e447397570ed.js
D js/vendor.min.48395aa071f2cad21d93.js
A js/vendor.min.5088fa2672bbff9ee391.js
D js/wdqs.min.5d5edffec1334d46a761.js
A js/wdqs.min.f5dde98fd36ca2066032.js
46 files changed, 941 insertions(+), 147 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/10/328610/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb0ef4c003b362e65c030198ce68d7bb11551b3d
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Don't use wikitech API to find labs instances in n...

2016-12-21 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328609 )

Change subject: labstore: Don't use wikitech API to find labs instances in 
nfs-exportd
..

labstore: Don't use wikitech API to find labs instances in nfs-exportd

Use the OpenStack API instead. The new observer credentials will do
for this purpose.

Some parts tested.

Bug: T104575
Change-Id: Iff63395c01ac3dd0dd6edd3a437c88bf7aa28e71
---
M modules/labstore/files/nfs-exportd
1 file changed, 33 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/328609/1

diff --git a/modules/labstore/files/nfs-exportd 
b/modules/labstore/files/nfs-exportd
index 1e33d9a..79b1edd 100755
--- a/modules/labstore/files/nfs-exportd
+++ b/modules/labstore/files/nfs-exportd
@@ -19,17 +19,19 @@
 #  THIS FILE IS MANAGED BY PUPPET
 #
 
-from urllib.request import urlopen
 import ipaddress
 import argparse
 import yaml
-import json
 import os
 import time
 import logging
 import sys
 import subprocess
 
+from keystoneclient.session import Session as KeystoneSession
+from keystoneclient.auth.identity.v3 import Password as KeystonePassword
+
+from novaclient import client as novaclient
 
 # Volumes that need an entry in exports.d
 VOLUMES_NEEDING_EXPORTS = ['project', 'home', 'tools-home', 'tools-project']
@@ -72,30 +74,33 @@
 )
 
 
-def get_instance_ips(project):
+def get_instance_ips(project, observer_pass):
 """
 Return a list of Instance internal IPs for a given project
 
 This uses the Wikitech API to fetch this data
 """
-url = ("https://wikitech.wikimedia.org/w/api.php; +
-   "?action=query=novainstances=%s" +
-   "=eqiad=json") % project
-try:
-data = json.loads(urlopen(url, timeout=15).read().decode('utf-8'))
-except:
-logging.exception('Error fetching instance ip list for project %s', 
project)
-sys.exit(1)
-
+client = novaclient.Client(
+"2.0",
+session=KeystoneSession(auth=KeystonePassword(
+auth_url="http://labcontrol1001.wikimedia.org:5000/v3;,
+username="novaobserver",
+password=observer_pass,
+project_name=project,
+user_domain_name='default',
+project_domain_name='default'
+))
+)
 ips = []
-if 'query' in data and 'novainstances' in data['query']:
-for instance in data['query']['novainstances']:
-# Only provide internal IPs!
-ips += [ip for ip in instance['ip']
-if is_valid_ipv4(ip) and ip.startswith('10.')]
+for instance in client.servers.list():
+# Only provide internal IPs!
+ips += [
+str(ip['addr']) for ip in instance.addresses['public']
+if ip['OS-EXT-IPS:type'] == 'fixed' and is_valid_ipv4(ip)
+]
 return ips
 
-def get_projects_with_nfs(mounts_config):
+def get_projects_with_nfs(mounts_config, observer_pass):
 """
 Get populated project objects that need NFS exports
 :param mounts_config: dict
@@ -112,7 +117,7 @@
 continue
 else:
 continue
-project = Project(name, config['gid'], get_instance_ips(name), mounts)
+project = Project(name, config['gid'], get_instance_ips(name, 
observer_pass), mounts)
 projects.append(project)
 logging.debug('project %s has %s instances',
  name, len(project.instance_ips))
@@ -154,12 +159,12 @@
 logging.info("found %s public NFS exports" % (len(public_paths)))
 return public_paths
 
-def write_project_exports(mounts_config, exports_d_path):
+def write_project_exports(mounts_config, exports_d_path, observer_pass):
 """ output project export definitions
 :param mounts_config: dict of defined exports
 """
 project_paths = []
-projects = get_projects_with_nfs(mounts_config)
+projects = get_projects_with_nfs(mounts_config, observer_pass)
 for project in projects:
 logging.debug('writing exports file for %s', project.name)
 path = os.path.join(exports_d_path, '%s.exports' % project.name)
@@ -182,6 +187,12 @@
 '--config-path',
 default='/etc/nfs-mounts.yaml',
 help='Path to YAML file containing config of which exports to 
maintain',
+)
+
+argparser.add_argument(
+'--observer-pass',
+required=True,
+help='Password for the OpenStack observer account',
 )
 
 argparser.add_argument(
@@ -223,7 +234,7 @@
 for filename in os.listdir(exports_d_path)]
 
 public_paths = write_public_exports(config['public'], exports_d_path)
-project_paths = write_project_exports(config, exports_d_path)
+project_paths = write_project_exports(config, exports_d_path, 
args.observer_pass)
 
 # compile list of entries in export_d path that are not defined in 

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Avoid static binding to leaflet and d3

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328511 )

Change subject: Avoid static binding to leaflet and d3
..


Avoid static binding to leaflet and d3

Change-Id: Ibb0ef4c003b362e65c030198ce68d7bb11551b3d
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 28 insertions(+), 27 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index 8b6e73b..cc61721 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -42,6 +42,28 @@
 *
 */
function SELF() {
+   this._getMarkerGroupColor = d3.scale.category10();
+
+   ScrollToTopButton = L.Control.extend( {
+   options: {
+   position: 'topright'
+   },
+
+   onAdd: function( map ) {
+   var container = L.DomUtil.create( 'button' );
+   $( container ).addClass( 'btn btn-default' );
+   $( container ).append( $( '  ' ) );
+
+   container.onclick = function() {
+   if ( map.isFullscreen() ) {
+   map.toggleFullscreen();
+   }
+   $( window ).scrollTop( 0, 0 );
+   };
+
+   return container;
+   }
+   } );
}
 
SELF.prototype = new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser();
@@ -57,6 +79,12 @@
 * @private
 **/
SELF.prototype._markerGroups = null;
+
+   /**
+* Maps group name to a certain color
+* @private
+*/
+   SELF.prototype._getMarkerGroupColor = null;
 
/**
 * Draw a map to the given element
@@ -234,12 +262,6 @@
};
 
/**
-* Maps group name to a certain color
-* @private
-*/
-   SELF.prototype._getMarkerGroupColor = d3.scale.category10();
-
-   /**
 * @private
 * @param {string} group
 */
@@ -310,27 +332,6 @@
 
L.tileLayer( layer.url, layer.options ).addTo( this._map );
};
-
-   ScrollToTopButton = L.Control.extend( {
-   options: {
-   position: 'topright'
-   },
-
-   onAdd: function( map ) {
-   var container = L.DomUtil.create( 'button' );
-   $( container ).addClass( 'btn btn-default' );
-   $( container ).append( $( '  ' ) );
-
-   container.onclick = function() {
-   if ( map.isFullscreen() ) {
-   map.toggleFullscreen();
-   }
-   $( window ).scrollTop( 0, 0 );
-   };
-
-   return container;
-   }
-   } );
 
/**
 * Receiving data from the a visit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb0ef4c003b362e65c030198ce68d7bb11551b3d
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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/core[master]: Allow HTML tags in LanguageConverter output.

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327778 )

Change subject: Allow HTML tags in LanguageConverter output.
..


Allow HTML tags in LanguageConverter output.

A "remove HTML tags to avoid disrupting the layout" block is removed
(previously added in f16d1e4ed70cd5a8fa6ae6ca8bb71bfe62f4f47e).

This is a follow-up to I9b099273203482ffb570a5654d8ba50c833e526d.

Bug: T54192
Change-Id: I565fac58b3b0da7bfaedf64f5001c364f52e2244
---
M languages/LanguageConverter.php
M tests/parser/parserTests.txt
2 files changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index 5a9f652..06fec44 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -415,8 +415,6 @@
$attr = 
$this->recursiveConvertTopLevel( $attr, $toVariant );
}
 
-   // Remove HTML tags to avoid disrupting 
the layout
-   $attr = preg_replace( '/<[^>]+>/', '', 
$attr );
if ( $attr !== $attrs[$attrName] ) {
$attrs[$attrName] = $attr;
$changed = true;
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index b34a03f..317ab0f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -14155,6 +14155,19 @@
 !! end
 
 !! test
+Escape HTML special chars in image alt text with LanguageConverter
+!! options
+language=zh
+!! wikitext
+[[File:Foobar.jpg|& < > "]]
+!! html/php
+http://example.com/images/3/3a/Foobar.jpg; width="1941" height="220" />
+
+!! html/parsoid
+
+!! end
+
+!! test
 Entities in file name and attributes
 !! wikitext
 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 
solution|[[7%25 solution

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I565fac58b3b0da7bfaedf64f5001c364f52e2244
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Liangent 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: graphite: Don't use wikitech API to find labs projects/insta...

2016-12-21 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328608 )

Change subject: graphite: Don't use wikitech API to find labs projects/instances
..

graphite: Don't use wikitech API to find labs projects/instances

Use the OpenStack API instead. The new observer credentials will do
for this purpose.

Also get rid of the (seemingly now unused) HOSTNAME_MAPPING.

Some parts tested.

Bug: T104575
Change-Id: Ia7ae8975bb79a1587ae5cbbb66849f9d042e7ae2
---
M modules/graphite/files/archive-instances
M modules/graphite/manifests/labs/archiver.pp
2 files changed, 26 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/328608/1

diff --git a/modules/graphite/files/archive-instances 
b/modules/graphite/files/archive-instances
index dfda3f5..2745754 100755
--- a/modules/graphite/files/archive-instances
+++ b/modules/graphite/files/archive-instances
@@ -16,22 +16,27 @@
 '''
 import os
 import time
-import urllib.request
-import codecs
-import json
 import logging
+import sys
 
+from keystoneclient.session import Session as KeystoneSession
+from keystoneclient.auth.identity.v3 import Password as KeystonePassword
+from keystoneclient.client import Client as KeystoneClient
 
-# Hostname Mapping, for hosts that have a different name in graphite
-# and on wikitech. This seems like a bug in diamond that needs to be
-# fixed. In the mean time, update this mapping! Can be moved into
-# an external file if this gets too big.
-# Maps hostname as in wikitech to graphite metric name.
-HOSTNAME_MAPPING = {
-'tools-webproxy': 'tools',
-}
+from novaclient import client as novaclient
 
 WHISPER_PATH = '/srv/carbon/whisper'
+
+
+def get_keystone_session(project_name):
+return KeystoneSession(auth=KeystonePassword(
+auth_url="http://labcontrol1001.wikimedia.org:5000/v3;,
+username="novaobserver",
+password=sys.argv[1],
+project_name=project_name,
+user_domain_name='default',
+project_domain_name='default'
+))
 
 
 def archive_host(project_name, host_name):
@@ -74,30 +79,20 @@
 '''
 Get hosts that are currently present in the given project
 '''
-req = urllib.request.urlopen(
-'https://wikitech.wikimedia.org/w/api.php' +
-
'?action=query=novainstances=%s=eqiad=json' % (
-project_name,
-)
-)
-reader = codecs.getreader('utf-8')
-data = json.load(reader(req))
-logging.info('Fetched instance list for project %s', project_name)
-return [HOSTNAME_MAPPING.get(instance['name'], instance['name'])
-for instance in data['query']['novainstances']]
+client = novaclient.Client("2.0", 
session=get_keystone_session(project_name))
+return [instance.name for instance in client.servers.list()]
 
 
 def get_projects_list():
 '''
 Get a list of all active projects from the wikitech API
 '''
-req = urllib.request.urlopen(
-
'https://wikitech.wikimedia.org/w/api.php?action=query=novaprojects=json'
+keystone_client = KeystoneClient(
+session=get_keystone_session('observer'),
+endpoint="http://labcontrol1001.wikimedia.org:5000/v3;,
+interface='public'
 )
-reader = codecs.getreader('utf-8')
-data = json.load(reader(req))
-return data['query']['novaprojects']
-
+return [project.name for project in keystone_client.projects.list()]
 
 def get_deleted_instances():
 '''
diff --git a/modules/graphite/manifests/labs/archiver.pp 
b/modules/graphite/manifests/labs/archiver.pp
index db83b09..adb3b7d 100644
--- a/modules/graphite/manifests/labs/archiver.pp
+++ b/modules/graphite/manifests/labs/archiver.pp
@@ -10,9 +10,11 @@
 mode   => '0700',
 }
 
+$novaconfig = hiera_hash('novaconfig', {})
+$observer_pass = $novaconfig['observer_password']
 cron { 'archive-deleted-instances':
 ensure  => present,
-command => '/usr/local/bin/archive-instances',
+command => "/usr/local/bin/archive-instances ${observer_pass}",
 user=> '_graphite',
 minute  => 0,
 hour=> 13,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7ae8975bb79a1587ae5cbbb66849f9d042e7ae2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Do not write address to the database if all data is empty.

2016-12-21 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328607 )

Change subject: Do not write address to the database if all data is empty.
..

Do not write address to the database if all data is empty.

Bug: T153804

Change-Id: I65b1b410dc5f3401174fa5dd19bd6900990a97ad
---
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 100 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/07/328607/1

diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index 5c23e3e..c1d2284 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -232,19 +232,14 @@
 public function testRecurring() {
 civicrm_initialize();
 $subscr_id = mt_rand();
-$values = array( 'subscr_id' => $subscr_id );
-$signup_message = new RecurringSignupMessage( $values );
+$values = $this->processRecurringSignup($subscr_id);
+
 $message = new RecurringPaymentMessage( $values );
 $message2 = new RecurringPaymentMessage( $values );
 
-$subscr_time = strtotime( $signup_message->get( 'subscr_date' ) );
-exchange_rate_cache_set( 'USD', $subscr_time, 1 );
-exchange_rate_cache_set( $signup_message->get('mc_currency'), 
$subscr_time, 3 );
 $payment_time = strtotime( $message->get( 'payment_date' ) );
 exchange_rate_cache_set( 'USD', $payment_time, 1 );
 exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
-
-$this->recurringConsumer->processMessage($signup_message->getBody());
 
 $msg = $message->getBody();
 db_insert('contribution_tracking')
@@ -280,6 +275,39 @@
 db_delete('contribution_tracking')
 ->condition('id', $msg['custom'])
 ->execute();
+}
+
+/**
+ *  Test that the a blank address is not written to the DB.
+ */
+public function testRecurringBlankEmail() {
+  civicrm_initialize();
+  $subscr_id = mt_rand();
+  $values = $this->processRecurringSignup($subscr_id);
+
+  $message = new RecurringPaymentMessage($values);
+  $this->setExchangeRates($message->get('payment_date'), array('USD' => 1, 
$message->get('mc_currency') => 3));
+  $messageBody = $message->getBody();
+
+  $addressFields = array('address_city', "address_country_code", 
"address_country", "address_state","address_street", "address_zip");
+  foreach ($addressFields as $addressField) {
+$messageBody[$addressField] = '';
+  }
+
+  db_insert('contribution_tracking')
+->fields(array('id' => $messageBody['custom']))
+->execute();
+
+  $this->recurringConsumer->processMessage($messageBody);
+
+  $contributions = wmf_civicrm_get_contributions_from_gateway_id(
+$message->getGateway(),
+$message->getGatewayTxnId()
+  );
+  $addresses = $this->callAPISuccess('Address', 'get', array('contact_id' 
=> $contributions[0]['contact_id'], 'sequential' => 1));
+  $this->assertEquals(1, $addresses['count']);
+  // The address created by the sign up (Lockwood Rd) should not have been 
overwritten by the blank.
+  $this->assertEquals('5109 Lockwood Rd', 
$addresses['values'][0]['street_address']);
 }
 
 /**
@@ -427,4 +455,20 @@
),
);
}
+
+  /**
+   * Process the original recurring sign up message.
+   *
+   * @param string $subscr_id
+   * @return array
+   */
+  private function processRecurringSignup($subscr_id) {
+$values = array('subscr_id' => $subscr_id);
+$signup_message = new RecurringSignupMessage($values);
+$subscr_time = strtotime($signup_message->get('subscr_date'));
+exchange_rate_cache_set('USD', $subscr_time, 1);
+exchange_rate_cache_set($signup_message->get('mc_currency'), $subscr_time, 
3);
+$this->recurringConsumer->processMessage($signup_message->getBody());
+return $values;
+  }
 }
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 6ffde7d..a3e8b65 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1452,6 +1452,34 @@
 }
 
 /**
+ * We do not store empty emails or placeholder emails.
+ *
+ * @param array $address
+ * @return bool
+ */
+function wmf_civicrm_is_address_valid($address) {
+  $meaningfulFields = array(
+'street_address',
+'supplemental_address_1',
+'city',
+'postal_code',
+'country_id',
+'state_province_id',
+  );
+  foreach ($meaningfulFields as $field) {
+if (!empty($address[$field])) {
+ 

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Avoid security exception for illegal localStorage access

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328492 )

Change subject: Avoid security exception for illegal localStorage access
..


Avoid security exception for illegal localStorage access

Change-Id: I5962ab9cc74dee56d641281dfa9250ad1e62dab6
---
M wikibase/queryService/ui/editor/Editor.js
1 file changed, 15 insertions(+), 10 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/wikibase/queryService/ui/editor/Editor.js 
b/wikibase/queryService/ui/editor/Editor.js
index 59be04b..d3258c7 100644
--- a/wikibase/queryService/ui/editor/Editor.js
+++ b/wikibase/queryService/ui/editor/Editor.js
@@ -3,8 +3,7 @@
 wikibase.queryService.ui = wikibase.queryService.ui || {};
 wikibase.queryService.ui.editor = wikibase.queryService.ui.editor || {};
 
-wikibase.queryService.ui.editor.Editor = ( function( $, wikibase, CodeMirror, 
WikibaseRDFTooltip,
-   localStorage ) {
+wikibase.queryService.ui.editor.Editor = ( function( $, wikibase, CodeMirror, 
WikibaseRDFTooltip ) {
'use strict';
 
var CODEMIRROR_DEFAULTS = {
@@ -241,8 +240,11 @@
 * @param {string} value
 */
SELF.prototype.storeValue = function( value ) {
-   if ( localStorage ) {
-   localStorage.setItem( LOCAL_STORAGE_KEY, value );
+   try {
+   if ( localStorage ) {
+   localStorage.setItem( LOCAL_STORAGE_KEY, value 
);
+   }
+   } catch ( e ) {
}
};
 
@@ -250,12 +252,15 @@
 * Restores the value from the local storage
 */
SELF.prototype.restoreValue = function() {
-   if ( localStorage ) {
-   var value = localStorage.getItem( LOCAL_STORAGE_KEY );
-   if ( value ) {
-   this.setValue( value );
-   this.refresh();
+   try {
+   if ( localStorage ) {
+   var value = localStorage.getItem( 
LOCAL_STORAGE_KEY );
+   if ( value ) {
+   this.setValue( value );
+   this.refresh();
+   }
}
+   } catch ( e ) {
}
};
 
@@ -271,4 +276,4 @@
 
return SELF;
 
-}( jQuery, wikibase, CodeMirror, window.localStorage ) );
+}( jQuery, wikibase, CodeMirror ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5962ab9cc74dee56d641281dfa9250ad1e62dab6
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Change build folder from 'dist' to 'build'

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328487 )

Change subject: Change build folder from 'dist' to 'build'
..


Change build folder from 'dist' to 'build'

Change-Id: I46e9370dacd6a0d475cd3163550bf6e4f7f34967
---
M .gitignore
M Gruntfile.js
2 files changed, 28 insertions(+), 28 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/.gitignore b/.gitignore
index d53b594..7f581eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@
 .project
 .tmp
 .settings
-dist
+build
 .idea
diff --git a/Gruntfile.js b/Gruntfile.js
index 4c8489f..ef48d8a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -3,7 +3,7 @@
'use strict';
require( 'load-grunt-tasks' )( grunt );
var pkg = grunt.file.readJSON( 'package.json' );
-   var dist = 'dist';
+   var buildFolder = 'build';
 
grunt.initConfig( {
pkg: pkg,
@@ -12,7 +12,7 @@
jshintrc: true
},
all: [
-   '**/*.js', '!dist/**'
+   '**/*.js', '!dist/**', '!' + 
buildFolder + '/**'
]
},
jscs: {
@@ -20,7 +20,7 @@
},
jsonlint: {
all: [
-   '**/*.json', '!node_modules/**', 
'!vendor/**', '!dist/**', '!polestar/**'
+   '**/*.json', '!node_modules/**', 
'!vendor/**', '!dist/**', '!' + buildFolder + '/**', '!polestar/**'
]
},
qunit: {
@@ -36,10 +36,10 @@
},
clean: {
release: [
-   dist
+   buildFolder
],
deploy: [
-   dist + '/*', dist + '!.git/**'
+   buildFolder + '/*', buildFolder + 
'!.git/**'
]
},
useminPrepare: {
@@ -47,7 +47,7 @@
'index.html', 'embed.html'
],
options: {
-   dest: dist
+   dest: buildFolder
}
},
concat: {},
@@ -61,7 +61,7 @@
src: [

'**/*.{eot,ttf,woff,woff2}'
],
-   dest: dist + '/fonts/',
+   dest: buildFolder + 
'/fonts/',
filter: 'isFile'
},
{// uls images
@@ -70,7 +70,7 @@
src: [

'**/jquery.uls/images/*.{png,jpg,svg}'
],
-   dest: dist + '/images/',
+   dest: buildFolder + 
'/images/',
filter: 'isFile'
},
{// leaflet fullscreen images
@@ -79,7 +79,7 @@
src: [

'**/leaflet-fullscreen/**/*.png'
],
-   dest: dist + '/css/',
+   dest: buildFolder + 
'/css/',
filter: 'isFile'
},
{// leaflet images
@@ -88,7 +88,7 @@
src: [

'**/leaflet/dist/images/*.png'
],
-   dest: dist + 
'/css/images',
+   dest: buildFolder + 
'/css/images',
filter: 'isFile'
  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove absented file long gone

2016-12-21 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328596 )

Change subject: remove absented file long gone
..


remove absented file long gone

Change-Id: Idb67dc632a5258a426f8b52b5adb0950f534dd3d
---
M modules/scap/manifests/scripts.pp
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/modules/scap/manifests/scripts.pp 
b/modules/scap/manifests/scripts.pp
index 424aa8c..c4b7d65 100644
--- a/modules/scap/manifests/scripts.pp
+++ b/modules/scap/manifests/scripts.pp
@@ -64,9 +64,6 @@
 mode   => '0555',
 source => 'puppet:///modules/scap/purge-varnish',
 }
-file { '/usr/local/bin/refreshWikiversionsCDB':
-ensure => absent,
-}
 file { '/usr/local/bin/set-group-write':
 owner  => 'root',
 group  => 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb67dc632a5258a426f8b52b5adb0950f534dd3d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dzahn 
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/vagrant[master]: Update path to fr-tools requirements.txt

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328605 )

Change subject: Update path to fr-tools requirements.txt
..


Update path to fr-tools requirements.txt

Change-Id: I15ea622271ea8e6e78a1ce349adaad971a27d9a8
---
M puppet/modules/crm/manifests/tools.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 4fe3aee..d7a7c23 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -44,7 +44,7 @@
 }
 
 exec { 'frtools_python_requirements':
-command => "pip install -r ${dir}/silverpop_export/requirements.txt",
+command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
 Package['libmysqlclient-dev'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15ea622271ea8e6e78a1ce349adaad971a27d9a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Dduvall 
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...CentralAuth[master]: Adding $writing param to match param signature of parent fun...

2016-12-21 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328606 )

Change subject: Adding $writing param to match param signature of parent 
function
..

Adding $writing param to match param signature of parent function

Otherwise, you get a strict standards warning from PHP.

Change-Id: I92b1805f976def747e4e25e54756e86566478732
---
M includes/specials/SpecialGlobalGroupMembership.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/06/328606/1

diff --git a/includes/specials/SpecialGlobalGroupMembership.php 
b/includes/specials/SpecialGlobalGroupMembership.php
index e173abd..dfe8563 100644
--- a/includes/specials/SpecialGlobalGroupMembership.php
+++ b/includes/specials/SpecialGlobalGroupMembership.php
@@ -76,9 +76,10 @@
 
/**
 * @param string $username
+* @param bool $writing
 * @return Status
 */
-   function fetchUser( $username ) {
+   function fetchUser( $username, $writing = true ) {
if ( $username[0] == '#' ) {
$id = intval( substr( $username, 1 ) );
$user = CentralAuthGroupMembershipProxy::newFromId( $id 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92b1805f976def747e4e25e54756e86566478732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update path to fr-tools requirements.txt

2016-12-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328605 )

Change subject: Update path to fr-tools requirements.txt
..

Update path to fr-tools requirements.txt

Change-Id: I15ea622271ea8e6e78a1ce349adaad971a27d9a8
---
M puppet/modules/crm/manifests/tools.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/05/328605/1

diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 4fe3aee..d7a7c23 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -44,7 +44,7 @@
 }
 
 exec { 'frtools_python_requirements':
-command => "pip install -r ${dir}/silverpop_export/requirements.txt",
+command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
 Package['libmysqlclient-dev'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15ea622271ea8e6e78a1ce349adaad971a27d9a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: remove wikipedia.org.br

2016-12-21 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327280 )

Change subject: remove wikipedia.org.br
..


remove wikipedia.org.br

This domain is not registered by WMF anymore
nor is it pointing to WMF nameservers.

We should not have domains in our config that we
don't control anymore.

Bug: T137105
Change-Id: I26a989b609b257d70c8d342905bd5e8273c7ced4
---
D templates/wikipedia.org.br
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/templates/wikipedia.org.br b/templates/wikipedia.org.br
deleted file mode 12
index f8431e2..000
--- a/templates/wikipedia.org.br
+++ /dev/null
@@ -1 +0,0 @@
-wikipedia.org
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26a989b609b257d70c8d342905bd5e8273c7ced4
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...web[master]: More options for the number of shown rows of resultset.

2016-12-21 Thread XXN (Code Review)
XXN has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328602 )

Change subject: More options for the number of shown rows of resultset.
..

More options for the number of shown rows of resultset.

T126540

Change-Id: I1bf416da39a033776a602e85d345247414f8204d
---
M quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.js
M quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.min.js
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/quarry/web 
refs/changes/02/328602/2

diff --git a/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.js 
b/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.js
index 8ca3b5d..4deefe9 100644
--- a/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.js
+++ b/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.js
@@ -9609,7 +9609,7 @@
 *  } );
 *} );
 */
-   "aLengthMenu": [ 10, 25, 50, 100 ],
+   "aLengthMenu": [ 10, 25, 50, 100, 200, 300, 500 ],


/**
diff --git 
a/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.min.js 
b/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.min.js
index 3248d74..3739379 100644
--- a/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.min.js
+++ b/quarry/web/static/vendor/datatables-1.10.2/js/jquery.dataTables.min.js
@@ -127,7 +127,7 @@
 !0;u(b,"aoDestroyCallback","destroy",[b]);a||(new 
q(b)).columns().visible(!0);l.unbind(".DT").find(":not(tbody 
*)").unbind(".DT");h(za).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));i.detach();l.detach();b.aaSorting=[];b.aaSortingFixed=[];sa(b);h(m).removeClass(b.asStripeClasses.join("
 "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" 
"+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&
 (h("th span."+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, 
td",g).each(function(){var 
a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));!a&&(e,b.nTableReinsertBefore);f.children().detach();f.append(m);i.css("width",b.sDestroyWidth).removeClass(d.sTable);(o=b.asDestroyStripes.length)&().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])});c=h.inArray(b,p.settings);-1!==c&(c,1)})});p.version="1.10.2";p.settings=
 
[];p.models={};p.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};p.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};p.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",
-sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,
+sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100,200,300,500],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,
 
fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return
 
a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return
 
JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,
 
fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:":
 activate to sort column 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HTMLMultiSelect should allow a parameter specifying which op...

2016-12-21 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328603 )

Change subject: HTMLMultiSelect should allow a parameter specifying which 
options are disabled
..

HTMLMultiSelect should allow a parameter specifying which options are disabled

Bug: T153751
Change-Id: I3bcf6720c960e0be962e0f3f37a22ec8778db1d1
---
M includes/htmlform/HTMLFormField.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/328603/1

diff --git a/includes/htmlform/HTMLFormField.php 
b/includes/htmlform/HTMLFormField.php
index 804bbff..f1d2e0c 100644
--- a/includes/htmlform/HTMLFormField.php
+++ b/includes/htmlform/HTMLFormField.php
@@ -995,7 +995,7 @@
 * @return array Attributes
 */
public function getAttributes( array $list ) {
-   static $boolAttribs = [ 'disabled', 'required', 'autofocus', 
'multiple', 'readonly' ];
+   static $boolAttribs = [ 'required', 'autofocus', 'multiple', 
'readonly' ];
 
$ret = [];
foreach ( $list as $key ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bcf6720c960e0be962e0f3f37a22ec8778db1d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: OOjs UI should allow `disabled` to contain an array

2016-12-21 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328601 )

Change subject: OOjs UI should allow `disabled` to contain an array
..

OOjs UI should allow `disabled` to contain an array

Bug: T153927
Change-Id: I32fa20e4adb23960d9db6bf6023f79bf128fb600
---
M php/Element.php
M php/Widget.php
M php/widgets/CheckboxMultiselectInputWidget.php
3 files changed, 30 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/01/328601/1

diff --git a/php/Element.php b/php/Element.php
index 9441c7f..962b650 100644
--- a/php/Element.php
+++ b/php/Element.php
@@ -267,13 +267,13 @@
 */
public static function configFromHtmlAttributes( array $attrs ) {
$booleanAttrs = [
-   'disabled' => true,
'required' => true,
'autofocus' => true,
'multiple' => true,
'readonly' => true,
];
$attributeToConfig = [
+   'disabled' => 'disabled',
'maxlength' => 'maxLength',
'readonly' => 'readOnly',
'tabindex' => 'tabIndex',
diff --git a/php/Widget.php b/php/Widget.php
index b5ec488..b41bbf5 100644
--- a/php/Widget.php
+++ b/php/Widget.php
@@ -64,10 +64,14 @@
 * @return $this
 */
public function setDisabled( $disabled ) {
-   $this->disabled = !!$disabled;
-   $this->toggleClasses( [ 'oo-ui-widget-disabled' ], 
$this->disabled );
-   $this->toggleClasses( [ 'oo-ui-widget-enabled' ], 
!$this->disabled );
-   $this->setAttributes( [ 'aria-disabled' => $this->disabled ? 
'true' : 'false' ] );
+   if( gettype($disabled) == 'array' ) {
+   $this->disabled = $disabled;
+   } else {
+   $this->disabled = !!$disabled;
+   $this->toggleClasses( [ 'oo-ui-widget-disabled' ], 
$this->disabled );
+   $this->toggleClasses( [ 'oo-ui-widget-enabled' ], 
!$this->disabled );
+   $this->setAttributes( [ 'aria-disabled' => 
$this->disabled ? 'true' : 'false' ] );
+   }
 
return $this;
}
diff --git a/php/widgets/CheckboxMultiselectInputWidget.php 
b/php/widgets/CheckboxMultiselectInputWidget.php
index a9b8da4..a221556 100644
--- a/php/widgets/CheckboxMultiselectInputWidget.php
+++ b/php/widgets/CheckboxMultiselectInputWidget.php
@@ -99,6 +99,26 @@
}
 
/**
+* Get the value for the `disabled` parameter
+*
+* If `disabled` is an array, check if the current option
+* is in that array, if so return true, else return false.
+*
+* If `disabled` is not an array, then you would expect it to be boolean
+* so simply pass its value.
+*
+* @param OOUI\CheckboxMultiselectInputWidget $widget The 
checkboxmultiselect object
+* @param string $option The value of the current object
+*/
+   protected function getDisabled( $widget, $option ){
+   if( gettype( $widget->isDisabled() ) == 'array' ) {
+   return in_array( $option, $widget->isDisabled() );
+   } else {
+   return $widget->isDisabled();
+   }
+   }
+
+   /**
 * Set the options available for this input.
 *
 * @param array[] $options Array of menu options in the format
@@ -117,7 +137,7 @@
new CheckboxInputWidget( [
'name' => $name,
'value' => $optValue,
-   'disabled' => $this->isDisabled(),
+   'disabled' => $this->getDisabled( 
$this, $optValue ),
] ),
[
'label' => isset( $opt['label'] ) ? 
$opt['label'] : $optValue,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32fa20e4adb23960d9db6bf6023f79bf128fb600
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Add comments in some places where we really want to treat me...

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328323 )

Change subject: Add comments in some places where we really want to treat 
messages as HTML
..


Add comments in some places where we really want to treat messages as HTML

Change-Id: I439338dabd4b031ed1c4cfc9d89af5a6f2971676
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8bb7d28..c14deff 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1447,6 +1447,7 @@
);
}
 
+   // Intentionally treated as HTML
$( '#footer-info-lastmod' ).html( ' ' + mw.msg(
'lastmodifiedat',
lastModified.date,
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index 38504e5..9bba961 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -242,6 +242,7 @@
if ( 
result.parse.parsedsummary[ '*' ] === '' ) {

dialog.$reviewEditSummary.parent().addClass( 'oo-ui-element-hidden' );
} else {
+   // Intentionally 
treated as HTML

dialog.$reviewEditSummary.html( ve.msg( 'parentheses', 
result.parse.parsedsummary[ '*' ] ) );
}
} ).fail( function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I439338dabd4b031ed1c4cfc9d89af5a6f2971676
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmflib: replace carbon with install1001 in ipresolve tests

2016-12-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328600 )

Change subject: wmflib: replace carbon with install1001 in ipresolve tests
..

wmflib: replace carbon with install1001 in ipresolve tests

Bug: T123733
Change-Id: I2f2d84e6d9acded711d809607bb395201ca2581c
---
M modules/wmflib/spec/functions/ipresolve_spec.rb
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/328600/1

diff --git a/modules/wmflib/spec/functions/ipresolve_spec.rb 
b/modules/wmflib/spec/functions/ipresolve_spec.rb
index 01a5e77..17aa5f9 100644
--- a/modules/wmflib/spec/functions/ipresolve_spec.rb
+++ b/modules/wmflib/spec/functions/ipresolve_spec.rb
@@ -2,19 +2,19 @@
 describe 'ipresolve' do
 
   it "should resolve ipv4 addresses by default" do
-should run.with_params('carbon.wikimedia.org').and_return('208.80.154.10')
+should run.with_params('carbon.wikimedia.org').and_return('208.80.154.83')
   end
   it "should resolve ipv4 addresses when explicitly asked to" do
-should run.with_params('carbon.wikimedia.org', 
'4').and_return('208.80.154.10')
+should run.with_params('install1001.wikimedia.org', 
'4').and_return('208.80.154.83')
   end
 
   it "should resolve ipv6 addresses" do
-should run.with_params('carbon.wikimedia.org', 
'6').and_return('2620::861:1:208:80:154:10')
+should run.with_params('install1001.wikimedia.org', 
'6').and_return('2620::861:1:208:80:154:83')
   end
 
   it "should be able to perform a reverse DNS lookup" do
-should run.with_params('2620::861:1:208:80:154:10', 
'ptr').and_return('carbon.wikimedia.org')
-should run.with_params('208.80.154.10', 
'ptr').and_return('carbon.wikimedia.org')
+should run.with_params('2620::861:1:208:80:154:83', 
'ptr').and_return('install1001.wikimedia.org')
+should run.with_params('208.80.154.83', 
'ptr').and_return('install1001.wikimedia.org')
   end
 
   it "fails when resolving an inexistent name" do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f2d84e6d9acded711d809607bb395201ca2581c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ganglia: switch eqiad aggregator from carbon to install1001

2016-12-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328599 )

Change subject: ganglia: switch eqiad aggregator from carbon to install1001
..

ganglia: switch eqiad aggregator from carbon to install1001

Bug: T123733
Change-Id: Ib2db17637711e5ae22ee4c07dcb558e6b13dca27
---
M modules/ganglia/manifests/configuration.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/328599/1

diff --git a/modules/ganglia/manifests/configuration.pp 
b/modules/ganglia/manifests/configuration.pp
index 721548e..2576e83 100644
--- a/modules/ganglia/manifests/configuration.pp
+++ b/modules/ganglia/manifests/configuration.pp
@@ -6,7 +6,7 @@
 $url = 'http://ganglia.wikimedia.org'
 $gmetad_hosts = [ '208.80.154.53']
 $aggregator_hosts = {
-'eqiad' => [ ipresolve('carbon.wikimedia.org') ],
+'eqiad' => [ ipresolve('install1001.wikimedia.org') ],
 'esams' => [ ipresolve('bast3001.wikimedia.org') ],
 'codfw' => [ ipresolve('install2001.wikimedia.org') ],
 'ulsfo' => [ ipresolve('bast4001.wikimedia.org') ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2db17637711e5ae22ee4c07dcb558e6b13dca27
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Register shortcuts for minoredit/watchlist

2016-12-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328598 )

Change subject: Register shortcuts for minoredit/watchlist
..

Register shortcuts for minoredit/watchlist

Bug: T153925
Change-Id: I3f569a75a66e816d0a5c4ad966344100510a4f2b
---
M extension.json
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js
3 files changed, 72 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/98/328598/1

diff --git a/extension.json b/extension.json
index a194c1e..5a9f1c3 100644
--- a/extension.json
+++ b/extension.json
@@ -519,6 +519,10 @@
"accesskey-diff",
"accesskey-preview",
"accesskey-save",
+   "accesskey-minoredit",
+   "accesskey-watch",
+   "tooltip-minoredit",
+   "tooltip-watch",
"newsectionsummary"
],
"targets": [
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 7589d92..789efa6 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -1851,11 +1851,13 @@
  * Show a save dialog
  *
  * @param {string} [action] Window action to trigger after opening
+ * @param {string} [checkboxName] Checkbox to toggle when opening
  *
  * @fires saveWorkflowBegin
  */
-ve.init.mw.ArticleTarget.prototype.showSaveDialog = function ( action ) {
-   var target = this;
+ve.init.mw.ArticleTarget.prototype.showSaveDialog = function ( action, 
checkboxName ) {
+   var checkbox,
+   target = this;
 
if ( !( this.edited || this.restoring ) ) {
return;
@@ -1868,7 +1870,7 @@
 
// Get the save dialog
this.getSurface().getDialogs().getWindow( 'mwSave' ).done( function ( 
win ) {
-   var data,
+   var data, checked,
windowAction = ve.ui.actionFactory.create( 'window', 
target.getSurface() );
 
if ( !target.saveDialog ) {
@@ -1894,6 +1896,14 @@
return;
}
 
+   if ( checkboxName && ( checkbox = target.checkboxesByName[ 
checkboxName ] ) ) {
+   checked = !checkbox.isSelected();
+   // Wait for native access key change to happen
+   setTimeout( function () {
+   checkbox.setSelected( checked );
+   } );
+   }
+
// When calling review/preview action, switch to those panels 
immediately
if ( action === 'review' || action === 'preview' ) {
data.initialPanel = action;
diff --git a/modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js 
b/modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js
index 2899672..3289cca 100644
--- a/modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js
+++ b/modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js
@@ -45,8 +45,8 @@
  * @method
  * @return {boolean} Action was executed
  */
-ve.ui.MWSaveDialogAction.prototype.save = function () {
-   ve.init.target.showSaveDialog();
+ve.ui.MWSaveDialogAction.prototype.save = function ( checkbox ) {
+   ve.init.target.showSaveDialog( null, checkbox );
return true;
 };
 
@@ -100,42 +100,61 @@
);
} );
 }
+ve.ui.commandRegistry.register(
+   new ve.ui.Command(
+   'saveMinoredit', 'mwSaveDialog', 'save',
+   { args: [ 'wpMinoredit' ], supportedSelections: [ 'linear', 
'table' ] }
+   )
+);
+ve.ui.commandRegistry.register(
+   new ve.ui.Command(
+   'saveWatchthis', 'mwSaveDialog', 'save',
+   { args: [ 'wpWatchthis' ], supportedSelections: [ 'linear', 
'table' ] }
+   )
+);
+
 ( function () {
var accessKeyPrefix = 
$.fn.updateTooltipAccessKeys.getAccessKeyPrefix().replace( /-/g, '+' ),
-   saveShortcut = ve.msg( 'accesskey-save' ),
-   changesShortcut = ve.msg( 'accesskey-diff' ),
-   previewShortcut = ve.msg( 'accesskey-preview' );
+   shortcuts = [
+   {
+   command: 'showSave',
+   accessKey: 'accesskey-save',
+   label: function () { return 
ve.init.target.getSaveButtonLabel(); }
+   },
+   {
+   command: 'showChanges',
+   accessKey: 'accesskey-diff',
+   label: OO.ui.deferMsg( 
'visualeditor-savedialog-label-review' )
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: switch tftp server from carbon to install1001

2016-12-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328597 )

Change subject: openstack: switch tftp server from carbon to install1001
..

openstack: switch tftp server from carbon to install1001

We want to stop using carbon (precise) and replace it
with install1001. We have already switched the TFTP for
all subnets in production in I8ed5efb77b23cde6.

Bug: T123733
Bug: T132757
Change-Id: Ife721b89b037f93fc80bd3cc3ec0c7e85b78906e
---
M modules/openstack/manifests/nova/network.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/328597/1

diff --git a/modules/openstack/manifests/nova/network.pp 
b/modules/openstack/manifests/nova/network.pp
index 34442ba..7195ac4 100644
--- a/modules/openstack/manifests/nova/network.pp
+++ b/modules/openstack/manifests/nova/network.pp
@@ -4,7 +4,7 @@
 class openstack::nova::network($novaconfig, 
$openstack_version=$::openstack::version) {
 include openstack::repo
 
-$tftp_host = 'carbon.wikimedia.org'
+$tftp_host = 'install1001.wikimedia.org'
 
 package {  [ 'nova-network', 'dnsmasq' ]:
 ensure  => present,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife721b89b037f93fc80bd3cc3ec0c7e85b78906e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove absented file long gone

2016-12-21 Thread Matanya (Code Review)
Matanya has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328596 )

Change subject: remove absented file long gone
..

remove absented file long gone

Change-Id: Idb67dc632a5258a426f8b52b5adb0950f534dd3d
---
M modules/scap/manifests/scripts.pp
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/328596/1

diff --git a/modules/scap/manifests/scripts.pp 
b/modules/scap/manifests/scripts.pp
index 424aa8c..c4b7d65 100644
--- a/modules/scap/manifests/scripts.pp
+++ b/modules/scap/manifests/scripts.pp
@@ -64,9 +64,6 @@
 mode   => '0555',
 source => 'puppet:///modules/scap/purge-varnish',
 }
-file { '/usr/local/bin/refreshWikiversionsCDB':
-ensure => absent,
-}
 file { '/usr/local/bin/set-group-write':
 owner  => 'root',
 group  => 'root',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb67dc632a5258a426f8b52b5adb0950f534dd3d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Support disabling rating input.

2016-12-21 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328595 )

Change subject: Support disabling rating input.
..

Support disabling rating input.

Change-Id: I3a9d06baf6a7b7a4fbefb0ca5939633beb28d164
---
M libs/PF_rating.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/95/328595/1

diff --git a/libs/PF_rating.js b/libs/PF_rating.js
index d54e18d..55e7317 100644
--- a/libs/PF_rating.js
+++ b/libs/PF_rating.js
@@ -6,6 +6,7 @@
var curValue = $(this).attr('data-curvalue');
var numStars = $(this).attr('data-numstars');
var allowsHalf = $(this).attr('data-allows-half');
+   var disabled = $(this).attr('disabled');
var ratingsSettings = {
normalFill: '#ddd',
starWidth: starWidth,
@@ -18,6 +19,9 @@
} else {
ratingsSettings.halfStar = true;
}
+   if ( disabled !== null ) {
+   ratingsSettings.readOnly = true;
+   }
 
$(this).rateYo(ratingsSettings)
.on("rateyo.set", function (e, data) {
@@ -26,4 +30,4 @@
});
};
 
-}( jQuery, mediaWiki, pf ) );
\ No newline at end of file
+}( jQuery, mediaWiki, pf ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a9d06baf6a7b7a4fbefb0ca5939633beb28d164
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update Reading Web roles

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326241 )

Change subject: Update Reading Web roles
..


Update Reading Web roles

* add RelatedArticles
* add WikidataPageBanner
* add QuickSurveys
* remove Gather

The roles uses the minimal required dependencies (relatedarticles
does not install BetaFeatures; wikidatapagebanner does not install
Wikibase or PageImages); those can be installed as separate roles
if needed.

Bug: T152036
Change-Id: I4f8567454b48c1a7ccddc9f1c72df3bc746159dd
---
D puppet/modules/role/manifests/gather.pp
A puppet/modules/role/manifests/quicksurveys.pp
A puppet/modules/role/manifests/relatedarticles.pp
A puppet/modules/role/manifests/wikidatapagebanner.pp
4 files changed, 49 insertions(+), 14 deletions(-)

Approvals:
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified
  Jhobs: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, but someone else must approve



diff --git a/puppet/modules/role/manifests/gather.pp 
b/puppet/modules/role/manifests/gather.pp
deleted file mode 100644
index d0d360d..000
--- a/puppet/modules/role/manifests/gather.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-# == Class: role::gather
-# Configures Gather, the MediaWiki extension which powers Special:Gather
-#
-class role::gather {
-include ::role::mediawiki
-include ::role::mobilefrontend
-include ::role::pageimages
-include ::role::textextracts
-
-mediawiki::extension { 'Gather':
-browser_tests => true,
-needs_update  => true,
-}
-}
diff --git a/puppet/modules/role/manifests/quicksurveys.pp 
b/puppet/modules/role/manifests/quicksurveys.pp
new file mode 100644
index 000..7e5c5ed
--- /dev/null
+++ b/puppet/modules/role/manifests/quicksurveys.pp
@@ -0,0 +1,14 @@
+# == Class: role::quicksurveys
+#
+# Installs the QuickSurveys[1] extension which shows simple, low-friction
+# in-article surveys.
+#
+# [1] https://www.mediawiki.org/wiki/Extension:QuickSurveys
+#
+class role::quicksurveys {
+include role::eventlogging
+
+mediawiki::extension { 'QuickSurveys':
+needs_update => true,
+}
+}
diff --git a/puppet/modules/role/manifests/relatedarticles.pp 
b/puppet/modules/role/manifests/relatedarticles.pp
new file mode 100644
index 000..359a807
--- /dev/null
+++ b/puppet/modules/role/manifests/relatedarticles.pp
@@ -0,0 +1,20 @@
+# == Class: role::relatedarticles
+#
+# Installs the RelatedArticles[1] extension which shows some related
+# articles (based on content similarity, can be overriden via a parser
+# tag).
+#
+# [1] https://www.mediawiki.org/wiki/Extension:RelatedArticles
+#
+class role::relatedarticles {
+mediawiki::extension { 'RelatedArticles':
+settings => {
+wgRelatedArticlesShowInSidebar   => false,
+wgRelatedArticlesShowInFooter=> true,
+wgRelatedArticlesUseCirrusSearch => true,
+},
+require  => MediaWiki::Extension['Cards'],
+}
+
+mediawiki::extension { 'Cards': }
+}
diff --git a/puppet/modules/role/manifests/wikidatapagebanner.pp 
b/puppet/modules/role/manifests/wikidatapagebanner.pp
new file mode 100644
index 000..f603f8a
--- /dev/null
+++ b/puppet/modules/role/manifests/wikidatapagebanner.pp
@@ -0,0 +1,15 @@
+# == Class: role::wikidatapagebanner
+#
+# Installs the WikidataPageBanner[1] extension which adds banners on the top
+# of some wiki pages (taking file names from Wikidata, or a parser tag).
+#
+# [1] https://www.mediawiki.org/wiki/Extension:WikidataPageBanner
+#
+class role::wikidatapagebanner {
+mediawiki::extension { 'WikidataPageBanner':
+settings => {
+wgWPBBannerProperty  => 'P948',
+wgWPBEnableDefaultBanner => true,
+},
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f8567454b48c1a7ccddc9f1c72df3bc746159dd
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhobs 
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...Math[master]: Add class `mwe-math-element` to math elements

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326996 )

Change subject: Add class `mwe-math-element` to math elements
..


Add class `mwe-math-element` to math elements

This is the fix for the bug that makes the whole page scroll when long 
equations are present in the wiki article.

Bug: T134281
Change-Id: I29f8df027384098cd0923bcfa23a914c8d887bba
---
M MathMathML.php
M MathSource.php
M MathTexvc.php
M extension.json
M modules/ext.math.css
5 files changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/MathMathML.php b/MathMathML.php
index 40bc77c..681b90b 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -418,6 +418,7 @@
 * @return string the class name
 */
private function getClassName( $fallback = false ) {
+   global $wgMathElementClassName;
$class = 'mwe-math-';
if ( $fallback ) {
$class .= 'fallback-image-';
@@ -434,7 +435,7 @@
$class .= ' mwe-math-mathml-a11y';
// @codingStandardsIgnoreEnd
}
-   return $class;
+   return $class . " $wgMathElementClassName";
}
 
/**
diff --git a/MathSource.php b/MathSource.php
index 93d403d..792e755 100644
--- a/MathSource.php
+++ b/MathSource.php
@@ -35,11 +35,13 @@
function getHtmlOutput() {
# No need to render or parse anything more!
# New lines are replaced with spaces, which avoids confusing 
our parser (bugs 23190, 22818)
+   global $wgMathElementClassName;
if ( $this->getMathStyle() == 'display' ) {
$class = 'mwe-math-fallback-source-display';
} else {
$class = 'mwe-math-fallback-source-inline';
}
+   $class .= " $wgMathElementClassName";
return Xml::element( 'span',
$this->getAttributes(
'span',
diff --git a/MathTexvc.php b/MathTexvc.php
index 6c61d86..aa64ea0 100644
--- a/MathTexvc.php
+++ b/MathTexvc.php
@@ -137,6 +137,7 @@
 * @return string img HTML
 */
public function getMathImageHTML() {
+   global $wgMathElementClassName;
$url = $this->getMathImageUrl();
$attributes = [
// the former class name was 'tex'
@@ -148,6 +149,7 @@
// if DisplayStyle is true, the equation will be 
centered in a new line
$attributes[ 'class' ] = 
'mwe-math-fallback-image-display tex';
}
+   $attributes[ 'class' ] .= " $wgMathElementClassName";
return Xml::element( 'img',
$this->getAttributes(
'img',
diff --git a/extension.json b/extension.json
index a059655..c9ce093 100644
--- a/extension.json
+++ b/extension.json
@@ -115,7 +115,8 @@
],
"MathEnableWikibaseDataType": true,
"Texvc": false,
-   "TexvcBackgroundColor": "transparent"
+   "TexvcBackgroundColor": "transparent",
+   "MathElementClassName": "mw-math-element"
},
"VisualEditorPluginModules": [
"ext.math.visualEditor"
diff --git a/modules/ext.math.css b/modules/ext.math.css
index 69ea129..9892ce2 100644
--- a/modules/ext.math.css
+++ b/modules/ext.math.css
@@ -57,3 +57,7 @@
 img.tex {
vertical-align: middle;
 }
+.mwe-math-element {
+   overflow-x: auto;
+   max-width: 100%;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29f8df027384098cd0923bcfa23a914c8d887bba
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: TameeshB 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: TameeshB 
Gerrit-Reviewer: TheDJ 
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...Configure[master]: The Configure extension misses API i18n messages

2016-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328594 )

Change subject: The Configure extension misses API i18n messages
..

The Configure extension misses API i18n messages

Adds following missing api i18n messages:
* apihelp-configure-description
* apihelp-configure-param-prop
* apihelp-configure-param-prop-versionlist
* apihelp-configure-param-prop-wikilist
* apihelp-configure-param-prop-settings
* apihelp-configure-param-prop-extensions
* apihelp-configure-param-prop-ajax
* apihelp-configure-param-version
* apihelp-configure-param-wiki
* apihelp-configure-param-group
* apihelp-configure-param-ajaxgroup
* apihelp-configure-param-ajaxsetting

Bug: T153585
Change-Id: Iec016e11e762d12010aeaefa376a471db3376fed
---
M Configure.api.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 47 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure 
refs/changes/94/328594/1

diff --git a/Configure.api.php b/Configure.api.php
index 2346335..a762651 100644
--- a/Configure.api.php
+++ b/Configure.api.php
@@ -380,79 +380,23 @@
}
 
protected function getAllowedParams() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'versionlist',
-   'wikilist',
-   'settings',
-   'extensions',
-   'ajax',
-   ),
-   ApiBase::PARAM_DFLT => 
'versionlist|wikilist',
-   ),
-   'version' => null,
-   'wiki' => null,
-   'group' => false,
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   } else {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'ajax',
-   ),
-   ),
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   }
-   }
-
-   protected function getParamDescription() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- versionlist: Get the list of old 
configurations',
-   '- wikilist:Get the list the wikis 
to configuration',
-   '- settings:Get settings of a 
specific version',
-   '- extensions:  List of installed 
extensions',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'version' => 'Version to get settings from',
-   'wiki' => 'Wiki to get settings from (default: 
current wiki)',
-   'group' => 'Whether to group settings',
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   } else {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   }
-   }
-
-   protected function getDescription() {
-   return 'Configure extension\'s API module';
-   }
-
-   protected function getExamples() {
return array(
-   'api.php?action=configure',
+   'prop' => array(
+   

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Highlight sparklines according to date range selection on KP...

2016-12-21 Thread Chelsyx (Code Review)
Chelsyx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328593 )

Change subject: Highlight sparklines according to date range selection on KPI 
summary page
..

Highlight sparklines according to date range selection on KPI summary page

Bug: T150215
Change-Id: Ib0e06619b3c3e7069fcd227528bc87dd9a1c0bea
---
M server.R
1 file changed, 81 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/93/328593/1

diff --git a/server.R b/server.R
index d5d34a8..62678bd 100644
--- a/server.R
+++ b/server.R
@@ -572,10 +572,27 @@
   dplyr::select(Median) %>%
   unlist(use.names = FALSE) %>%
   round(2)
-sparkline::sparkline(values = output_sl, type = "line",
+sl1 <- sparkline::sparkline(values = output_sl, type = "line",
  height = 50, width = '100%',
  lineColor = 'black', fillColor = 'transparent',
+ chartRangeMin = min(output_sl), chartRangeMax = 
max(output_sl),
  highlightLineColor = 'orange', highlightSpotColor = 
'orange')
+# highlight selected date range
+if (input$kpi_summary_date_range_selector == "weekly"){
+  output_highlight <- c(rep(NA, length(output_sl)-7), 
output_sl[(length(output_sl)-6):length(output_sl)])
+} else if (input$kpi_summary_date_range_selector == "monthly"){
+  output_highlight <- c(rep(NA, length(output_sl)-30), 
output_sl[(length(output_sl)-29):length(output_sl)])
+} else if (input$kpi_summary_date_range_selector == "quarterly"){
+  output_highlight <- output_sl
+} else {
+  return(sl1)
+}
+sl2 <- sparkline::sparkline(values = output_highlight, type = "line",
+height = 50, width = '100%', lineWidth = 2,
+lineColor = 'red', chartRangeMin = 
min(output_sl), chartRangeMax = max(output_sl),
+minSpotColor = F, maxSpotColor = F, 
disableInteraction = T,
+highlightLineColor = NULL, highlightSpotColor 
= NULL)
+return(sparkline::spk_composite(sl1, sl2))
   })
   output$sparkline_zero_results <- sparkline:::renderSparkline({
 if(input$kpi_summary_date_range_selector == "all"){
@@ -588,10 +605,27 @@
   dplyr::select(rate) %>%
   unlist(use.names = FALSE) %>%
   round(2)
-sparkline::sparkline(values = output_sl, type = "line",
- height = 50, width = '100%',
- lineColor = 'black', fillColor = 'transparent',
- highlightLineColor = 'orange', highlightSpotColor = 
'orange')
+sl1 <- sparkline::sparkline(values = output_sl, type = "line",
+height = 50, width = '100%',
+lineColor = 'black', fillColor = 'transparent',
+chartRangeMin = min(output_sl), chartRangeMax 
= max(output_sl),
+highlightLineColor = 'orange', 
highlightSpotColor = 'orange')
+# highlight selected date range
+if (input$kpi_summary_date_range_selector == "weekly"){
+  output_highlight <- c(rep(NA, length(output_sl)-7), 
output_sl[(length(output_sl)-6):length(output_sl)])
+} else if (input$kpi_summary_date_range_selector == "monthly"){
+  output_highlight <- c(rep(NA, length(output_sl)-30), 
output_sl[(length(output_sl)-29):length(output_sl)])
+} else if (input$kpi_summary_date_range_selector == "quarterly"){
+  output_highlight <- output_sl
+} else {
+  return(sl1)
+}
+sl2 <- sparkline::sparkline(values = output_highlight, type = "line",
+height = 50, width = '100%', lineWidth = 2,
+lineColor = 'red', chartRangeMin = 
min(output_sl), chartRangeMax = max(output_sl),
+minSpotColor = F, maxSpotColor = F, 
disableInteraction = T,
+highlightLineColor = NULL, highlightSpotColor 
= NULL)
+return(sparkline::spk_composite(sl1, sl2))
   })
   output$sparkline_api_usage <- sparkline:::renderSparkline({
 if(input$kpi_summary_date_range_selector == "all"){
@@ -609,10 +643,27 @@
   dplyr::summarize(total = sum(events)) %>%
   dplyr::select(total) %>%
   unlist(use.names = FALSE)
-sparkline::sparkline(values = output_sl, type = "line",
- height = 50, width = '100%',
- lineColor = 'black', fillColor = 'transparent',
- highlightLineColor = 'orange', highlightSpotColor = 
'orange')
+sl1 <- sparkline::sparkline(values = output_sl, type = "line",
+height = 50, width = '100%',
+lineColor = 'black', fillColor = 'transparent',
+chartRangeMin 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Make the tplarg rule resemble template

2016-12-21 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328592 )

Change subject: Make the tplarg rule resemble template
..

Make the tplarg rule resemble template

Change-Id: Ib2d73d0621493575546534109a9522fbcfddf16d
---
M lib/wt2html/pegTokenizer.pegjs
M lib/wt2html/tokenizer.utils.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
4 files changed, 22 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/92/328592/1

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 624bc17..fd28707 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -842,24 +842,26 @@
 
 tplarg
   = "{{{"
-name:template_param_value?
-params:( nl_comment_space*
-  '|' nl_comment_space*
-   r:(
-&'}}}' { return new KV('', ''); }
+target:template_param_value?
+params:(nl_comment_space* "|"
+r:( p0:("" { return endOffset(); })
+v:nl_comment_space*
+p:("" { return endOffset(); })
+& "|"
+{ return new KV('', tu.flattenIfArray(v), [p0, p0, p0, 
p]); } // empty argument
 / template_param
-   ) { return r; }
-   )*
+  ) { return r; }
+)*
 nl_comment_space*
 "}}}" {
-  if (name) {
-params.unshift(new KV(tu.flattenIfArray(name.tokens), '', 
name.srcOffsets));
-  } else {
-params.unshift(new KV('', ''));
-  }
+  if (target === null) { target = { tokens: '' }; }
+  // Insert target as first positional attribute, so that it can be
+  // generically expanded. The TemplateHandler then needs to shift it out
+  // again.
+  params.unshift(new KV(tu.flattenIfArray(target.tokens), '', 
target.srcOffsets));
   var obj = new SelfclosingTagTk('templatearg', params, { tsr: 
tsrOffsets(), src: text() });
   return obj;
-  }
+}
 
 template_param
   = name:template_param_name
diff --git a/lib/wt2html/tokenizer.utils.js b/lib/wt2html/tokenizer.utils.js
index c09ed65..514ae78 100644
--- a/lib/wt2html/tokenizer.utils.js
+++ b/lib/wt2html/tokenizer.utils.js
@@ -203,6 +203,7 @@
input.substr(pos, 10) === 
'{{!}}{{!}}')
);
case '}':
+   // NOTE: This will also break `tplarg`
return counters.template && input[pos + 1] === 
"}";
case ':':
return counters.colon &&
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 94a6bac..5110cbb 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -167,7 +167,6 @@
 add("wt2html", "Self closed html pairs (bug 5487)", "Centered
 text\nIn
 div text");
 add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__");
 add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE
 YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n");
-add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "\nblah\" 
onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE 
CURSOR OVER HERE");
 add("wt2html", "Inline HTML vs wiki block nesting", "Bold
 paragraph\n\nNew wiki paragraph");
 add("wt2html", "Special page transclusion", "Parser
 function implementation for pf_special missing in Parsoid.");
 add("wt2html", "Special page transclusion twice (bug 5021)", "Parser
 function implementation for pf_special missing in Parsoid.\nParser
 function implementation for pf_special missing in Parsoid.");
@@ -1075,7 +1074,6 @@
 add("html2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; 
onmouseover=\"alert('hello world');\"\n|\n|}\n");
 add("html2wt", "Fuzz testing: Parser22", 
"http://===r:::https://b\n\n{|\n|\n|}\n");
 add("html2wt", "Fuzz testing: Parser24", "\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS 
TEXT\n\n{|\n|\n|}\n");
-add("html2wt", "Fuzz testing: Parser25 (bug 6055)", ",  (Bug 6171)", "{|  \n| Some 
tabular data\n| More tabular data ...\n| And yet som tabular data  
\n|}\n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 67abba0..6163291 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -17705,12 +17705,16 @@
 
 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR 
OVER HERE
-!! html
+!! html/php
 LI CLASS=blah" onmouseover="alert('hello world');" align="left"MOVE 
MOUSE CURSOR OVER HERE
 
+!! html/parsoid
+ 
+
+blah" onmouseover="alert('hello world');" align="left"MOVE MOUSE CURSOR OVER HERE
 !! end
 
-!!test
+!! test
 Fuzz testing: URL adjacent extension (with space, clean)
 !! wikitext
 http://example.com 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [TEST]

2016-12-21 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328591 )

Change subject: [TEST]
..

[TEST]

Bug: T152801
Change-Id: I23d9bc34268e02cf107916c41eadbd67fa2b19ac
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/328591/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23d9bc34268e02cf107916c41eadbd67fa2b19ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki...PureWikiDeletion[master]: Removed deprecated hooks usages

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328569 )

Change subject: Removed deprecated hooks usages
..


Removed deprecated hooks usages

Bug: T151973
Change-Id: I306d285338e3de49a46e55f765ee6a0a59138baf
---
M PureWikiDeletion.hooks.php
M PureWikiDeletion.php
2 files changed, 41 insertions(+), 26 deletions(-)

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



diff --git a/PureWikiDeletion.hooks.php b/PureWikiDeletion.hooks.php
index 1b1d0ff..52326e1 100644
--- a/PureWikiDeletion.hooks.php
+++ b/PureWikiDeletion.hooks.php
@@ -32,30 +32,43 @@
 * After a page is saved, add or remove it from the blank_page table if
 * it has been blanked or unblanked, respectively; if blanked, redirect
 * the user to the "Action complete" page
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param $isMinor
+* @param $isWatch
+* @param $section
+* @param $flags
+* @param Revision $revision
+* @param $status
+* @param $baseRevId
+* @param $redirect
+* @return bool
 */
-   public static function PureWikiDeletionSaveCompleteHook( &$article, 
&$user, $text, $summary,
-   $minoredit, &$watchthis, $sectionanchor, &$flags, $revision, 
&$status, $baseRevId,
-   &$redirect ) {
-   global $wgOut, $wgInterWikiIntegrationInEffect;
+   public static function PureWikiDeletionSaveCompleteHook( $wikiPage, 
$user, $content, $summary,
+   $isMinor, $isWatch, $section, $flags, $revision, $status, 
$baseRevId, &$redirect ) {
+   global $wgOut;
if ( !isset( $revision ) ) {
return true;
}
-   $mTitle = $article->getTitle();
+   $mTitle = $wikiPage->getTitle();
if ( $mTitle->getNamespace() == NS_FILE ) {
return true;
}
$blankRevId = $revision->getId();
-   if ( $text == "" ) {
+   if ( $content == "" ) {
if ( $summary == wfMessage( 'autosumm-blank' 
)->inContentLanguage()->text() ) {
$hasHistory = false;
-   $summary = $article->generateReason( 
$hasHistory );
+   $summary = $content->getContentHandler()
+   ->getAutoDeleteReason( $mTitle, 
$hasHistory );
}
$dbw = wfGetDB( DB_MASTER );
$blank_row = array(
-   'blank_page_id'   => $article->getID(),
+   'blank_page_id'   => $wikiPage->getId(),
'blank_user_id'   => $user->getId(),
'blank_user_name' => $user->getName(),
-   'blank_timestamp' => $revision->getTimeStamp(),
+   'blank_timestamp' => $revision->getTimestamp(),
'blank_summary'   => $summary,
'blank_parent_id' => $revision->getParentId()
);
@@ -70,29 +83,26 @@
 
Article::onArticleDelete( $mTitle );
$mTitle->resetArticleID( 0 );
-   if ( $user->getOption( 'watchblank' ) ) {
-   $watchthis = true;
-   }
Hooks::run ( 'PureWikiDeletionArticleBlankComplete', 
array ( $mTitle ) );
$redirect = false;
-   $wgOut->setPagetitle( wfMessage( 'actioncomplete' ) );
+   $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$loglink = wfMessage( 'blank-log-link' )->text();
$wgOut->addWikiMsg( 'purewikideletion-blankedtext', 
$mTitle->getPrefixedText(), $loglink );
$wgOut->returnToMain( false );
} else {
$dbr = wfGetDB( DB_SLAVE );
-   $blank_page_id = $article->getID();
+   $blank_page_id = $wikiPage->getId();
$result = $dbr->selectRow( 'blanked_page', 
'blank_page_id',
array( "blank_page_id" => $blank_page_id ) );
if ( !$result ) {
return true;
} else {
if ( $summary == '' ) {
-   $summary = $article->getAutosummary( 
'', $text, EDIT_NEW );
+   $summary = 

[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: The Configure extension misses API i18n messages

2016-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328589 )

Change subject: The Configure extension misses API i18n messages
..

The Configure extension misses API i18n messages

Adds following missing api i18n messages:
* apihelp-configure-description
* apihelp-configure-param-prop
* apihelp-configure-param-prop-versionlist
* apihelp-configure-param-prop-wikilist
* apihelp-configure-param-prop-settings
* apihelp-configure-param-prop-extensions
* apihelp-configure-param-prop-ajax
* apihelp-configure-param-version
* apihelp-configure-param-wiki
* apihelp-configure-param-group
* apihelp-configure-param-ajaxgroup
* apihelp-configure-param-ajaxsetting

Bug: T153585
Change-Id: Ia2c7c0565835b2814fce27537c3e542c57cc1adf
---
M Configure.api.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 56 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure 
refs/changes/89/328589/1

diff --git a/Configure.api.php b/Configure.api.php
index 2346335..1160b32 100644
--- a/Configure.api.php
+++ b/Configure.api.php
@@ -380,79 +380,32 @@
}
 
protected function getAllowedParams() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'versionlist',
-   'wikilist',
-   'settings',
-   'extensions',
-   'ajax',
-   ),
-   ApiBase::PARAM_DFLT => 
'versionlist|wikilist',
-   ),
-   'version' => null,
-   'wiki' => null,
-   'group' => false,
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   } else {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'ajax',
-   ),
-   ),
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   }
-   }
-
-   protected function getParamDescription() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- versionlist: Get the list of old 
configurations',
-   '- wikilist:Get the list the wikis 
to configuration',
-   '- settings:Get settings of a 
specific version',
-   '- extensions:  List of installed 
extensions',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'version' => 'Version to get settings from',
-   'wiki' => 'Wiki to get settings from (default: 
current wiki)',
-   'group' => 'Whether to group settings',
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   } else {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   }
-   }
-
-   protected function getDescription() {
-   return 'Configure extension\'s API module';
-   }
-
-   protected function getExamples() {
return array(
-   'api.php?action=configure',
+   'prop' => array(
+   

[MediaWiki-commits] [Gerrit] operations...wikistats[master]: make display.php tables sortable again

2016-12-21 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328588 )

Change subject: make display.php tables sortable again
..


make display.php tables sortable again

When we set the pageLength to 50 (to get more than
the default 10 rows), the sorting arrows disappeard.

When we remove PageLength the arrows for sorting were
back but also just 10 rows.

We have to specify both things.

Bug: T153762
Change-Id: I8a44aa6d282992be695b3ac2144983af4d442f17
---
M var/www/wikistats/display.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index 2f3a945..e8945f4 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -244,7 +244,10 @@
 
 
 $(document).ready(function() {
-$('#table').DataTable( "pageLength": 50 } );
+$('#table').DataTable( {
+"pageLength": 50,
+"paging": true,
+} );
 });
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a44aa6d282992be695b3ac2144983af4d442f17
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: make display.php tables sortable again

2016-12-21 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328588 )

Change subject: make display.php tables sortable again
..

make display.php tables sortable again

Bug: T153762
Change-Id: I8a44aa6d282992be695b3ac2144983af4d442f17
---
M var/www/wikistats/display.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/88/328588/1

diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index 2f3a945..e8945f4 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -244,7 +244,10 @@
 
 
 $(document).ready(function() {
-$('#table').DataTable( "pageLength": 50 } );
+$('#table').DataTable( {
+"pageLength": 50,
+"paging": true,
+} );
 });
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a44aa6d282992be695b3ac2144983af4d442f17
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix failing tests after regression introduced in adb0d36

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328584 )

Change subject: Fix failing tests after regression introduced in adb0d36
..


Fix failing tests after regression introduced in adb0d36

Change-Id: I039f875a9d135abbddc11f180947208c086a95a4
---
M tests/site_tests.py
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/tests/site_tests.py b/tests/site_tests.py
index 9aaf19f..96cb3af 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -124,12 +124,15 @@
 old = self.site.siteinfo('general')
 self.assertIn('DUMMY', old)
 self.assertNotEqual(self.site.siteinfo('general', force=True), old)
-self.assertOneDeprecationParts('Calling siteinfo', 'itself', 4)
+self.assertOneDeprecationParts('Calling siteinfo',
+   'itself as a dictionary',
+   4)
 
 def test_siteinfo_dump(self):
 """Test calling the Siteinfo with dump=True."""
 self.assertIn('statistics', self.site.siteinfo('statistics', 
dump=True))
-self.assertOneDeprecationParts('Calling siteinfo', 'itself')
+self.assertOneDeprecationParts('Calling siteinfo',
+   'itself as a dictionary')
 
 def test_language_method(self):
 """Test if the language method returns the same as the lang 
property."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I039f875a9d135abbddc11f180947208c086a95a4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
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...VisualEditor[master]: Preserve checkbox data when switching from VE to NWE

2016-12-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328587 )

Change subject: Preserve checkbox data when switching from VE to NWE
..

Preserve checkbox data when switching from VE to NWE

Bug: T153889
Change-Id: Ifc41ea9320c9f2627efff6f33d4ad87c59fad496
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/87/328587/1

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8bb7d28..23105d8 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1672,6 +1672,7 @@
data.basetimestamp = target.baseTimeStamp;
data.starttimestamp = target.startTimeStamp;
data.oldid = target.revid;
+   data.checkboxes = target.checkboxes;
return response;
} );
}
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 0a4713e..7589d92 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -272,6 +272,8 @@
this.startTimeStamp = data.starttimestamp;
this.revid = data.oldid;
 
+   this.checkboxes = data.checkboxes;
+
aboutDoc = this.doc.documentElement.getAttribute( 'about' );
if ( aboutDoc ) {
docRevIdMatches = aboutDoc.match( /revision\/([0-9]*)$/ 
);
@@ -327,8 +329,6 @@
this.documentReady( this.doc );
}
 
-   data = response ? ( response.visualeditor || response.visualeditoredit 
) : {};
-
this.checkboxFields = [];
this.checkboxesByName = {};
this.$otherFields = $( [] );
@@ -338,13 +338,13 @@
);
}
 
-   if ( data.checkboxes ) {
+   if ( this.checkboxes ) {
defaults = {};
$( '.editCheckboxes input' ).each( function () {
defaults[ this.name ] = this.checked;
} );
 
-   $checkboxes = $( '' ).html( ve.getObjectValues( 
data.checkboxes ).join( '' ) );
+   $checkboxes = $( '' ).html( ve.getObjectValues( 
this.checkboxes ).join( '' ) );
$checkboxes.find( 'input[type=checkbox]' ).each( function () {
var $label, title, checkbox,
$this = $( this ),
@@ -1190,6 +1190,7 @@
this.submitting = false;
this.baseTimeStamp = null;
this.startTimeStamp = null;
+   this.checkboxes = null;
this.doc = null;
this.originalHtml = null;
this.section = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc41ea9320c9f2627efff6f33d4ad87c59fad496
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix wrong CSS class name for anonymous edit warning

2016-12-21 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328586 )

Change subject: Fix wrong CSS class name for anonymous edit warning
..

Fix wrong CSS class name for anonymous edit warning

I missed this in Iad93f70.

Change-Id: I479332764dd5b2e3f1c5ab097dfc1a145d5288de
---
M repo/includes/Specials/SpecialModifyEntity.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/86/328586/1

diff --git a/repo/includes/Specials/SpecialModifyEntity.php 
b/repo/includes/Specials/SpecialModifyEntity.php
index 8326c42..1f894be 100644
--- a/repo/includes/Specials/SpecialModifyEntity.php
+++ b/repo/includes/Specials/SpecialModifyEntity.php
@@ -246,13 +246,14 @@
$this->getOutput()->addModuleStyles( array( 'wikibase.special' 
) );
 
if ( $this->getUser()->isAnon() ) {
-   $this->showErrorHTML(
+   $this->getOutput()->addHTML( Html::rawElement(
+   'p',
+   [ 'class' => 'warning' ],
$this->msg(
'wikibase-anonymouseditwarning',
$this->msg( 'wikibase-entity-item' 
)->text()
-   )->parse(),
-   'warning'
-   );
+   )->parse()
+   ) );
}
 
// Form header

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I479332764dd5b2e3f1c5ab097dfc1a145d5288de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove dead code

2016-12-21 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328585 )

Change subject: Remove dead code
..

Remove dead code

I was routinely scanning for unused code and found all this.

Change-Id: Ieddd8b781cebc29978d71bd0c1841eef2437fcdc
---
M client/WikibaseClient.hooks.php
M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
M lib/WikibaseLib.php
M repo/maintenance/updateUnits.php
M repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php
M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php
6 files changed, 6 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/85/328585/1

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 4af375e..1151ce3 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -419,7 +419,6 @@
$wikibaseClient->getTermBuffer()
);
$idParser = $wikibaseClient->getEntityIdParser();
-   $title = $context->getTitle();
 
$infoActionHookHandler = new InfoActionHookHandler(
$namespaceChecker,
diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
index 0ae2d4e..191d2d1 100644
--- 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
@@ -272,7 +272,7 @@
 * @return StatementGroupRendererFactory
 */
private function getStatementGroupRendererFactory( EntityId $entityId, 
$propertyLabelOrId, $type ) {
-   $renderer = $this->getRenderer( $entityId, $propertyLabelOrId, 
$type );
+   $renderer = $this->getRenderer( $entityId, $propertyLabelOrId );
 
$rendererFactory = $this->getMockBuilder( 
StatementGroupRendererFactory::class )
->disableOriginalConstructor()
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 68a6573..b7a474d 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -54,7 +54,7 @@
 }
 
 call_user_func( function() {
-   global $wgExtensionCredits, $wgJobClasses, $wgHooks, 
$wgResourceModules, $wgMessagesDirs;
+   global $wgExtensionCredits, $wgHooks, $wgResourceModules, 
$wgMessagesDirs;
 
$wgExtensionCredits['wikibase'][] = array(
'path' => __DIR__,
diff --git a/repo/maintenance/updateUnits.php b/repo/maintenance/updateUnits.php
index fb90e84..b4aaa9d 100644
--- a/repo/maintenance/updateUnits.php
+++ b/repo/maintenance/updateUnits.php
@@ -27,17 +27,18 @@
  */
 class UpdateUnits extends Maintenance {
 
-
/** Base URI
 * @var string
 */
private $baseUri;
+
/**
 * Length of the base URI.
 * Helper variable to speed up cutting it out.
 * @var int
 */
private $baseLen;
+
/**
 * @var SPARQLClient
 */
@@ -237,15 +238,6 @@
}
 
/**
-* Format units as JSON
-* @param $convertUnits
-* @return string
-*/
-   private function formatJSON( $convertUnits ) {
-   return json_encode( $convertUnits, JSON_PRETTY_PRINT );
-   }
-
-   /**
 * Get units that are used at least $min times.
 * We don't care about units that have been used less than 10 times, 
for now.
 * Only top 200 will be returned (though so far we don't have that 
many).
@@ -324,19 +316,6 @@
 }
 QUERY;
return $this->client->query( $unitsQuery );
-   }
-
-   /**
-* Format units as CSV
-* @param $convertUnits
-* @return string
-*/
-   private function formatCSV( $convertUnits ) {
-   $str = '';
-   foreach ( $convertUnits as $name => $data ) {
-   $str .= "$name,$data[0],$data[1]\n";
-   }
-   return $str;
}
 
protected function error( $err, $die = 0 ) {
diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php 
b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php
index 50f1014..1b8666e 100644
--- a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php
+++ b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php
@@ -24,7 +24,7 @@
$request = new FauxRequest( $formData, true );
 
/** @var \FauxResponse $webResponse */
-   list( $output, $webResponse ) = $this->executeSpecialPage( '', 
$request );
+   list( , $webResponse ) = $this->executeSpecialPage( '', 
$request );
 
$entityId = $this->extractEntityIdFromUrl( 
$webResponse->getHeader( 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix failing tests after regression introduced in I0e53be3c8c...

2016-12-21 Thread Magul (Code Review)
Magul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328584 )

Change subject: Fix failing tests after regression introduced in 
I0e53be3c8cbbf6a533ddbb0b38855fcff8cf5e2f
..

Fix failing tests after regression introduced in 
I0e53be3c8cbbf6a533ddbb0b38855fcff8cf5e2f

Change-Id: I039f875a9d135abbddc11f180947208c086a95a4
---
M tests/site_tests.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/328584/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 9aaf19f..96cb3af 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -124,12 +124,15 @@
 old = self.site.siteinfo('general')
 self.assertIn('DUMMY', old)
 self.assertNotEqual(self.site.siteinfo('general', force=True), old)
-self.assertOneDeprecationParts('Calling siteinfo', 'itself', 4)
+self.assertOneDeprecationParts('Calling siteinfo',
+   'itself as a dictionary',
+   4)
 
 def test_siteinfo_dump(self):
 """Test calling the Siteinfo with dump=True."""
 self.assertIn('statistics', self.site.siteinfo('statistics', 
dump=True))
-self.assertOneDeprecationParts('Calling siteinfo', 'itself')
+self.assertOneDeprecationParts('Calling siteinfo',
+   'itself as a dictionary')
 
 def test_language_method(self):
 """Test if the language method returns the same as the lang 
property."""

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I039f875a9d135abbddc11f180947208c086a95a4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Refactor ve.dm.TransactionBuilder#newFromWrap

2016-12-21 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328583 )

Change subject: Refactor ve.dm.TransactionBuilder#newFromWrap
..

Refactor ve.dm.TransactionBuilder#newFromWrap

Change-Id: I81c4548cfd596eceba30fc84bc45f81adbd240c0
---
M src/dm/ve.dm.TransactionBuilder.js
1 file changed, 79 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/83/328583/1

diff --git a/src/dm/ve.dm.TransactionBuilder.js 
b/src/dm/ve.dm.TransactionBuilder.js
index 6c54999..6f63056 100644
--- a/src/dm/ve.dm.TransactionBuilder.js
+++ b/src/dm/ve.dm.TransactionBuilder.js
@@ -614,7 +614,7 @@
  * @return {ve.dm.Transaction}
  */
 ve.dm.TransactionBuilder.static.newFromWrap = function ( doc, range, 
unwrapOuter, wrapOuter, unwrapEach, wrapEach ) {
-   var i, j, unwrapOuterData, startOffset, unwrapEachData, closingWrapEach,
+   var i, startOffset, closingUnwrapEach, closingWrapEach, endOffset, ptr,
txBuilder = new ve.dm.TransactionBuilder(),
depth = 0;
 
@@ -628,83 +628,99 @@
}
return closings;
}
-   /* closingUnwrapEach = */ closingArray( unwrapEach );
+   closingUnwrapEach = closingArray( unwrapEach );
closingWrapEach = closingArray( wrapEach );
 
// TODO: check for and fix nesting validity like fixupInsertion does
-   if ( range.start > unwrapOuter.length ) {
-   // Retain up to the first thing we're unwrapping
-   // The outer unwrapping takes place *outside*
-   // the range, so compensate for that
-   txBuilder.pushRetain( range.start - unwrapOuter.length );
-   } else if ( range.start < unwrapOuter.length ) {
-   throw new Error( 'unwrapOuter is longer than the data preceding 
the range' );
-   }
 
-   // Replace the opening elements for the outer unwrap
-   if ( wrapOuter.length > 0 || unwrapOuter.length > 0 ) {
-   // Verify that wrapOuter matches the data at this position
-   unwrapOuterData = doc.data.slice( range.start - 
unwrapOuter.length, range.start );
-   for ( i = 0; i < unwrapOuterData.length; i++ ) {
-   if ( unwrapOuterData[ i ].type !== unwrapOuter[ i 
].type ) {
-   throw new Error( 'Element in unwrapOuter does 
not match: expected ' +
-   unwrapOuter[ i ].type + ' but found ' + 
unwrapOuterData[ i ].type );
+   /**
+* Match items before/after an offset, skipping over MetaItems
+*
+* @param {string} direction Direction of match, backwards|forwards
+* @param {number} offset First boundary for the matching items
+* @param {Object[]} matchList List of objects with .type properties to 
compare
+* @param {string} matchName Description of the match, for error 
messages
+* @return {number} Other slice boundary for the matching items
+* @throws {Error} Unmatched item foo in matchName [(found bar)]
+*/
+   function match( direction, offset, matchList, matchName ) {
+   var start, stop, step, i, item;
+   if ( direction === 'forwards' ) {
+   start = 0;
+   stop = matchList.length;
+   step = 1;
+   // Inclusive 'from' slice boundary
+   offset--;
+   } else {
+   start = matchList.length - 1;
+   stop = -1;
+   step = -1;
+   }
+   for ( i = start; i !== stop; i += step ) {
+   offset += step;
+   item = doc.data.data[ offset ];
+   if ( item.type !== matchList[ i ].type ) {
+   throw new Error( 'Unmatched item ' + matchList[ 
i ].type + ' in ' +
+   matchName + ' (found ' + item.type + 
')' );
}
}
-   // Instead of putting in unwrapOuter as given, put it in the
-   // way it appears in the model so we pick up any attributes
-   txBuilder.pushReplace( doc, range.start - unwrapOuter.length, 
unwrapOuter.length, ve.copy( wrapOuter ) );
+   if ( direction === 'forwards' ) {
+   // Exclusive 'to' slice boundary
+   offset++;
+   }
+   return offset;
}
+   // Verify the data before range.start matches unwrapOuter, and find 
where to retain up to
+   ptr = match( 'backwards', range.start, unwrapOuter, 'unwrapOuter' );
+   txBuilder.pushRetain( ptr );
+   // Replace wrapper
+   txBuilder.pushReplace( doc, ptr, range.start - ptr, ve.copy( wrapOuter 
) );
 
-   if ( 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add configuration for query endpoint URL

2016-12-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328582 )

Change subject: Add configuration for query endpoint URL
..

Add configuration for query endpoint URL

Bug: T153897
Change-Id: I2312b1c138175d8c1f0fbb9d103a9e9dd949bffa
---
M hieradata/labs/wikidata-query/common.yaml
M hieradata/role/common/wdqs.yaml
M modules/wdqs/manifests/init.pp
M modules/wdqs/templates/vars.yaml.erb
4 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/328582/1

diff --git a/hieradata/labs/wikidata-query/common.yaml 
b/hieradata/labs/wikidata-query/common.yaml
index 10e0830..8553ccf 100644
--- a/hieradata/labs/wikidata-query/common.yaml
+++ b/hieradata/labs/wikidata-query/common.yaml
@@ -3,4 +3,5 @@
 "wdqs::use_git_deploy": false
 "wdqs::package_dir": '/srv/wdqs/blazegraph'
 "wdqs::data_dir": '/srv/wdqs/blazegraph'
+"wdqs::endpoint": ''
 
diff --git a/hieradata/role/common/wdqs.yaml b/hieradata/role/common/wdqs.yaml
index 3e9e5d0..be3590b 100644
--- a/hieradata/role/common/wdqs.yaml
+++ b/hieradata/role/common/wdqs.yaml
@@ -1,6 +1,7 @@
 wdqs::gui::log_aggregator:  'logstash1001.eqiad.wmnet:10514'
 wdqs::updater::options: '-n wdq -- -b 500'
 wdqs::service::config_file: /etc/wdqs/RWStore.properties
+wdqs::endpoint: 'https://query.wikidata.org'
 admin::groups:
   - wdqs-admins
 cluster: wdqs
diff --git a/modules/wdqs/manifests/init.pp b/modules/wdqs/manifests/init.pp
index c1da181..a296454 100644
--- a/modules/wdqs/manifests/init.pp
+++ b/modules/wdqs/manifests/init.pp
@@ -8,12 +8,14 @@
 # - $package_dir:  Directory where the service should be installed.
 # - $data_dir: Directory where the database should be stored
 # - $log_dir: Directory where the logs go
+# - $endpoint: External endpoint name
 class wdqs(
 $use_git_deploy = true,
 $username = 'blazegraph',
 $package_dir = '/srv/deployment/wdqs/wdqs',
 $data_dir = '/var/lib/wdqs',
 $log_dir = '/var/log/wdqs',
+$endpoint = '',
 ) {
 
 $deploy_user = 'deploy-service'
diff --git a/modules/wdqs/templates/vars.yaml.erb 
b/modules/wdqs/templates/vars.yaml.erb
index f65c330..3ba5b15 100644
--- a/modules/wdqs/templates/vars.yaml.erb
+++ b/modules/wdqs/templates/vars.yaml.erb
@@ -1,2 +1,3 @@
 ---
 data_dir: <%= @data_dir %>
+endpoint: <%= @endpoint %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2312b1c138175d8c1f0fbb9d103a9e9dd949bffa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Echo] Fix conig error. Add path

2016-12-21 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328581 )

Change subject: [Echo] Fix conig error. Add path
..


[Echo] Fix conig error. Add path

Change-Id: Ib1a081d62c17a76f5863bee659c7139f3d090255
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 7268365..0644f3a 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -912,6 +912,7 @@
 Dynamic Sidebar
 
 Echo - Interface
+file = Echo/i18n/%CODE%.json
 id = ext-echo-interface
 aliasfile = Echo/Echo.alias.php
 optional = echo-badge-count

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1a081d62c17a76f5863bee659c7139f3d090255
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Echo] Fix conig error. Add path

2016-12-21 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328581 )

Change subject: [Echo] Fix conig error. Add path
..

[Echo] Fix conig error. Add path

Change-Id: Ib1a081d62c17a76f5863bee659c7139f3d090255
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/81/328581/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 7268365..0644f3a 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -912,6 +912,7 @@
 Dynamic Sidebar
 
 Echo - Interface
+file = Echo/i18n/%CODE%.json
 id = ext-echo-interface
 aliasfile = Echo/Echo.alias.php
 optional = echo-badge-count

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1a081d62c17a76f5863bee659c7139f3d090255
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unassign main page from newsletter upon deletion of page

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328494 )

Change subject: Unassign main page from newsletter upon deletion of page
..


Unassign main page from newsletter upon deletion of page

Main page is now unassigned after deleting newsletter

Bug: T153690
Change-Id: I3ce5df266e2b1edfd571a0708c72a25881b71578
---
M Newsletter.hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/NewsletterDb.php
M includes/NewsletterEditPage.php
M includes/specials/SpecialNewsletterCreate.php
A sql/nl_main_page_id-drop-index.sql
A sql/nl_newsletters-add-unique.sql
M sql/nl_newsletters.sql
9 files changed, 28 insertions(+), 10 deletions(-)

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



diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 79da03f..3c74ba5 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -84,6 +84,8 @@
$updater->addExtensionTable( 'nl_subscriptions', __DIR__ . 
'/sql/nl_subscriptions.sql' );
$updater->addExtensionTable( 'nl_publishers', __DIR__ . 
'/sql/nl_publishers.sql' );
$updater->addExtensionField( 'nl_newsletters', 'nl_active', 
__DIR__ . '/sql/nl_newsletters-add-active.sql' );
+   $updater->dropExtensionIndex( 'nl_newsletters', 
'nl_main_page_id', __DIR__ . '/sql/nl_main_page_id-drop-index.sql' );
+   $updater->addExtensionIndex( 'nl_newsletters', 
'nl_main_page_active', __DIR__ . '/sql/nl_newsletters-add-unique.sql' );
 
return true;
}
@@ -222,7 +224,15 @@
if ( !$newsletter->canRestore( $user ) ) {
throw new PermissionsError( 
'newsletter-restore' );
}
-   $success = 
NewsletterStore::getDefaultInstance()->restoreNewsletter( $newsletterName );
+   $store = NewsletterStore::getDefaultInstance();
+   $rows = $store->newsletterExistsForMainPage( 
$newsletter->getPageId() );
+
+   foreach ( $rows as $row ) {
+   if ( (int)$row->nl_main_page_id === 
$newsletter->getPageId() && (int)$row->nl_active === 1 ) {
+   throw new ErrorPageError( 
'newsletter-mainpage-in-use','newsletter-mainpage-in-use' );
+   }
+   }
+   $success = $store->restoreNewsletter( $newsletterName );
if ( $success ) {
return true;
}
diff --git a/i18n/en.json b/i18n/en.json
index 71ff0f0..422d9db 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -23,6 +23,7 @@
"newsletter-create-mainpage-error": "Invalid newsletter main page 
entered. Please try again.",
"newsletter-mainpage-non-existent": "The newsletter main page does not 
exist. Please enter a valid existing page.",
"newsletter-mainpage-in-use": "An existing newsletter has the same main 
page. Please enter another title.",
+   "newsletter-mainpage-in-use-title": "An existing newsletter has the 
same main page.",
"newsletter-create-short-description-error": "The description is too 
short (less than 30 characters). Please try again.",
"newsletter-subtitlelinks-list": "List of newsletters",
"newsletter-subtitlelinks-create": "Create a new newsletter",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 41173b1..633a18b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -30,6 +30,7 @@
"newsletter-create-mainpage-error": "Error message shown on 
[[Special:CreateNewsletter]] if the page entered on main page field does not 
exist.",
"newsletter-mainpage-non-existent": "Error message shown if the 
newsletter main page doesn't exist.",
"newsletter-mainpage-in-use": "Error message shown if the newsletter's 
main page is already in use by another newsletter.",
+   "newsletter-mainpage-in-use-title": "Title for 
\"newsletter-mainpage-in-use\"",
"newsletter-create-short-description-error": "Error message shown on 
[[Special:CreateNewsletter]] if the text entered in the description field is 
too short.",
"newsletter-subtitlelinks-list": "Label for link to 
[[Special:Newsletters]] shown under the header on Newsletter special 
pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-create}}",
"newsletter-subtitlelinks-create": "Label for link to 
[[Special:CreateNewsletter]] shown under the header on Newsletter special 
pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-list}}",
diff --git a/includes/NewsletterDb.php b/includes/NewsletterDb.php
index 3564ac3..3faf358 100644
--- a/includes/NewsletterDb.php
+++ b/includes/NewsletterDb.php
@@ -444,7 +444,7 @@
 
$res = $dbr->select(
'nl_newsletters',
-   array( 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add `.cache` to .gitignore

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328508 )

Change subject: Add `.cache` to .gitignore
..


Add `.cache` to .gitignore

`pytest` creates a directory named`.cache` when running tests. This directory
is ignored on many python projects and is also included in github's default
gitignore file:
https://github.com/github/gitignore/blob/master/Python.gitignore#L43

Change-Id: Ic880337a12af50f0d086a0b586417472e1ef1618
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 69fba31..eb433f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
 *apicache*
 *pycache*
 /cache/*
+.cache
 .idea
 pywikibot.egg-info/
 pywikibot/families/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic880337a12af50f0d086a0b586417472e1ef1618
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
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...JsonConfig[master]: Added nstab-data message i18n

2016-12-21 Thread Base (Code Review)
Base has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328577 )

Change subject: Added nstab-data message i18n
..

Added nstab-data message i18n

Added i18n for Data namespace tab interface message

Change-Id: I2685e6fcbc629c6ade9c4598a71f993a8308a079
---
M i18n/en.json
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig 
refs/changes/77/328577/1

diff --git a/i18n/en.json b/i18n/en.json
index 9349ef3..1547ae9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -60,5 +60,6 @@
"apihelp-jsondata-example-1": "Get JSON content of the Sample.tab page, 
localized to user's language",
"apihelp-jsondata-example-2": "Get JSON content of the Sample.tab page 
localized to French",
"apierror-jsonconfig-paramrequired": "Parameter $1 is 
required for this command.",
-   "apierror-jsonconfig-badtitle": "The page specified by 
namespace and title parameters is either invalid or is 
not registered in JsonConfig configuration."
+   "apierror-jsonconfig-badtitle": "The page specified by 
namespace and title parameters is either invalid or is 
not registered in JsonConfig configuration.",
+   "nstab-data": "Data"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2685e6fcbc629c6ade9c4598a71f993a8308a079
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Base 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Split simple and js-based styles

2016-12-21 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328576 )

Change subject: Split simple and js-based styles
..

Split simple and js-based styles

Change-Id: I07b10c74cc83a126518108810eba199839443dce
---
M extension.json
M includes/Hooks.php
A modules/ext.ores.highlighter.css
M modules/ext.ores.styles.css
4 files changed, 31 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/76/328576/1

diff --git a/extension.json b/extension.json
index b12c36a..cc83d03 100644
--- a/extension.json
+++ b/extension.json
@@ -92,11 +92,19 @@
"remoteExtPath": "ORES/modules"
},
"ResourceModules": {
-   "ext.ores.highlight": {
+   "ext.ores.highlighter": {
"position": "top",
"scripts": [
"ext.ores.highlighter.js"
],
+   "styles": "ext.ores.highlighter.css",
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
+   "ext.ores.simple": {
+   "position": "top",
"styles": "ext.ores.styles.css",
"targets": [
"desktop",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 3f64f3c..91bcdb9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -538,7 +538,8 @@
'oresThresholds',
[ 'damaging' => $wgOresDamagingThresholds ]
);
-   $out->addModules( 'ext.ores.highlight' );
+   $out->addModules( 'ext.ores.highlighter' );
+   $out->addModuleStyles( 'ext.ores.simple' );
}
return true;
}
diff --git a/modules/ext.ores.highlighter.css b/modules/ext.ores.highlighter.css
new file mode 100644
index 000..768b5d2
--- /dev/null
+++ b/modules/ext.ores.highlighter.css
@@ -0,0 +1,20 @@
+/**
+ * Make the whole row orange
+ */
+li.damaging,
+tr.damaging {
+   background: #fef6e7;
+   line-height: 1.8;
+}
+
+.damaging[data-ores-damaging='softest'] {
+   background-color: #fc3;
+}
+
+.damaging[data-ores-damaging='soft'] {
+   background-color: #ffe18d;
+}
+
+.damaging[data-ores-damaging='hard'] {
+   background-color: #fef6e7;
+}
diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 358357f..158745b 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -5,24 +5,3 @@
font-weight: bold;
color: #f00;
 }
-
-/**
- * Make the whole row orange
- */
-li.damaging,
-tr.damaging {
-   background: #fef6e7;
-   line-height: 1.8;
-}
-
-.damaging[data-ores-damaging='softest'] {
-   background-color: #fc3;
-}
-
-.damaging[data-ores-damaging='soft'] {
-   background-color: #ffe18d;
-}
-
-.damaging[data-ores-damaging='hard'] {
-   background-color: #fef6e7;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07b10c74cc83a126518108810eba199839443dce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Use renamed TransactionBuilder

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328574 )

Change subject: Use renamed TransactionBuilder
..


Use renamed TransactionBuilder

Change-Id: If2ab254f02ffccc6b7d1a5b4234f0fcf384d731d
---
M modules/ve-graph/ve.dm.MWGraphModel.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-graph/ve.dm.MWGraphModel.js 
b/modules/ve-graph/ve.dm.MWGraphModel.js
index ff0cc0b..a90f3b3 100644
--- a/modules/ve-graph/ve.dm.MWGraphModel.js
+++ b/modules/ve-graph/ve.dm.MWGraphModel.js
@@ -245,7 +245,7 @@
// Send transaction
mwData.body.extsrc = this.getSpecString();
surfaceModel.change(
-   ve.dm.Transaction.newFromAttributeChanges(
+   ve.dm.TransactionBuilder.static.newFromAttributeChanges(
surfaceModel.getDocument(),
node.getOffset(),
{ mw: mwData }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2ab254f02ffccc6b7d1a5b4234f0fcf384d731d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: api_tests.py: Skip test_valid_lagpattern if there is no repl...

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328499 )

Change subject: api_tests.py: Skip test_valid_lagpattern if there is no 
replication
..


api_tests.py: Skip test_valid_lagpattern if there is no replication

site.siteinfo(): Issue a more clear deprecation warning by explicitly stating
that siteinfo should now be used as a dictionary instead.

Bug: T153838
Change-Id: I0e53be3c8cbbf6a533ddbb0b38855fcff8cf5e2f
---
M pywikibot/site.py
M tests/api_tests.py
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index a1346ba..b3054fe 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1730,7 +1730,9 @@
 
 def __call__(self, key='general', force=False, dump=False):
 """DEPRECATED: Return the entry for key or dump the complete cache."""
-issue_deprecation_warning('Calling siteinfo', 'itself', 2)
+issue_deprecation_warning(
+'Calling siteinfo', 'itself as a dictionary', 2
+)
 if not dump:
 return self.get(key, expiry=0 if force else False)
 else:
diff --git a/tests/api_tests.py b/tests/api_tests.py
index 9da8d8e..008b85e 100644
--- a/tests/api_tests.py
+++ b/tests/api_tests.py
@@ -1047,6 +1047,11 @@
 def test_valid_lagpattern(self):
 """Test whether api.lagpattern is valid."""
 mysite = self.get_site()
+if mysite.siteinfo['dbrepllag'][0]['lag'] == -1:
+raise unittest.SkipTest(
+'{0} is not running on a replicated database cluster.'
+.format(mysite)
+)
 mythrottle = DummyThrottle(mysite)
 mysite._throttle = mythrottle
 params = {'action': 'query',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e53be3c8cbbf6a533ddbb0b38855fcff8cf5e2f
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
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...Graph[master]: Use renamed TransactionBuilder

2016-12-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328574 )

Change subject: Use renamed TransactionBuilder
..

Use renamed TransactionBuilder

Change-Id: If2ab254f02ffccc6b7d1a5b4234f0fcf384d731d
---
M modules/ve-graph/ve.dm.MWGraphModel.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/74/328574/1

diff --git a/modules/ve-graph/ve.dm.MWGraphModel.js 
b/modules/ve-graph/ve.dm.MWGraphModel.js
index ff0cc0b..a90f3b3 100644
--- a/modules/ve-graph/ve.dm.MWGraphModel.js
+++ b/modules/ve-graph/ve.dm.MWGraphModel.js
@@ -245,7 +245,7 @@
// Send transaction
mwData.body.extsrc = this.getSpecString();
surfaceModel.change(
-   ve.dm.Transaction.newFromAttributeChanges(
+   ve.dm.TransactionBuilder.static.newFromAttributeChanges(
surfaceModel.getDocument(),
node.getOffset(),
{ mw: mwData }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2ab254f02ffccc6b7d1a5b4234f0fcf384d731d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Add 'maxlength' attributes to personal info fields

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324550 )

Change subject: Add 'maxlength' attributes to personal info fields
..


Add 'maxlength' attributes to personal info fields

Matches field widths in Civi

Bug: T152022
Change-Id: I89d266f147a025a209038840f9433a6e35f3b0e6
---
M gateway_forms/mustache/personal_info.html.mustache
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/gateway_forms/mustache/personal_info.html.mustache 
b/gateway_forms/mustache/personal_info.html.mustache
index 1cb532d..a18f8bb 100644
--- a/gateway_forms/mustache/personal_info.html.mustache
+++ b/gateway_forms/mustache/personal_info.html.mustache
@@ -1,7 +1,7 @@
 {{# fname_required }}{{! if we don't need the fname, hide the whole name cell 
}}


-   
+   


 {{{ fieldError "fname" }}}
@@ -11,7 +11,7 @@
 {{# street_required }}


-   
+   


 {{{ fieldError "street" }}}
@@ -19,11 +19,11 @@


 {{# city_required }}
-   
+   
 {{/ city_required }}
 {{> state_dropdown }}{{! only renders if required }}
 {{# zip_required }}
-   
+   
 {{/ zip_required }}


@@ -49,7 +49,7 @@
 {{# email_required }}


-   
+   


 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89d266f147a025a209038840f9433a6e35f3b0e6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
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...WikimediaMessages[master]: Remove links to main page from interlanguage search messages

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328560 )

Change subject: Remove links to main page from interlanguage search messages
..


Remove links to main page from interlanguage search messages

Per T151649, it would be better to use the bare wikilink to link to a wiki
so that we do not have to rely on redirects from [[Main Page]] on that
wiki to the appropriately localised page. e.g. en.wikipedia.org/wiki/fr:
does not rely on a redirect on the wiki that you're linking to, whereas
en.wikipedia.org/wiki/fr:Main_Page does.

Bug: T151649
Change-Id: I00e7bae64270ea09b39a853001ea4173568b7071
---
M i18n/wikimediainterwikisearchresults/en.json
1 file changed, 284 insertions(+), 284 deletions(-)

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



diff --git a/i18n/wikimediainterwikisearchresults/en.json 
b/i18n/wikimediainterwikisearchresults/en.json
index 7ff6083..d928ffa 100644
--- a/i18n/wikimediainterwikisearchresults/en.json
+++ b/i18n/wikimediainterwikisearchresults/en.json
@@ -4,288 +4,288 @@
"Stas Malyshev"
]
},
-   "search-interwiki-results-abwiki": "Showing results from 
[[:ab:Main_Page|Abkhaz Wikipedia]].",
-   "search-interwiki-results-acewiki": "Showing results from 
[[:ace:Main_Page|Acehnese Wikipedia]].",
-   "search-interwiki-results-adywiki": "Showing results from 
[[:ady:Main_Page|Adyghe Wikipedia]].",
-   "search-interwiki-results-afwiki": "Showing results from 
[[:af:Main_Page|Afrikaans Wikipedia]].",
-   "search-interwiki-results-akwiki": "Showing results from 
[[:ak:Main_Page|Akan Wikipedia]].",
-   "search-interwiki-results-alswiki": "Showing results from 
[[:als:Main_Page|Alemannic Wikipedia]].",
-   "search-interwiki-results-amwiki": "Showing results from 
[[:am:Main_Page|Amharic Wikipedia]].",
-   "search-interwiki-results-angwiki": "Showing results from 
[[:ang:Main_Page|Old English Wikipedia]].",
-   "search-interwiki-results-anwiki": "Showing results from 
[[:an:Main_Page|Aragonese Wikipedia]].",
-   "search-interwiki-results-arcwiki": "Showing results from 
[[:arc:Main_Page|Syriac Wikipedia]].",
-   "search-interwiki-results-arwiki": "Showing results from 
[[:ar:Main_Page|Arabic Wikipedia]].",
-   "search-interwiki-results-arzwiki": "Showing results from 
[[:arz:Main_Page|Egyptian Arabic Wikipedia]].",
-   "search-interwiki-results-astwiki": "Showing results from 
[[:ast:Main_Page|Asturian Wikipedia]].",
-   "search-interwiki-results-aswiki": "Showing results from 
[[:as:Main_Page|Assamese Wikipedia]].",
-   "search-interwiki-results-avwiki": "Showing results from 
[[:av:Main_Page|Avar Wikipedia]].",
-   "search-interwiki-results-aywiki": "Showing results from 
[[:ay:Main_Page|Aymara Wikipedia]].",
-   "search-interwiki-results-azwiki": "Showing results from 
[[:az:Main_Page|Azerbaijani Wikipedia]].",
-   "search-interwiki-results-barwiki": "Showing results from 
[[:bar:Main_Page|Bavarian Wikipedia]].",
-   "search-interwiki-results-bat_smgwiki": "Showing results from 
[[:bat-smg:Main_Page|Samogitian Wikipedia]].",
-   "search-interwiki-results-bawiki": "Showing results from 
[[:ba:Main_Page|Bashkir Wikipedia]].",
-   "search-interwiki-results-bclwiki": "Showing results from 
[[:bcl:Main_Page|Central Bikol Wikipedia]].",
-   "search-interwiki-results-be_taraskwiki": "Showing results from 
[[:be-tarask:Main_Page|Belarusian Taraškievica Wikipedia]].",
-   "search-interwiki-results-bewiki": "Showing results from 
[[:be:Main_Page|Belarusian Wikipedia]].",
-   "search-interwiki-results-bgwiki": "Showing results from 
[[:bg:Main_Page|Bulgarian Wikipedia]].",
-   "search-interwiki-results-bhwiki": "Showing results from 
[[:bh:Main_Page|Bhojpuri Wikipedia]].",
-   "search-interwiki-results-biwiki": "Showing results from 
[[:bi:Main_Page|Bislama Wikipedia]].",
-   "search-interwiki-results-bjnwiki": "Showing results from 
[[:bjn:Main_Page|Banjar Wikipedia]].",
-   "search-interwiki-results-bmwiki": "Showing results from 
[[:bm:Main_Page|Bambara Wikipedia]].",
-   "search-interwiki-results-bnwiki": "Showing results from 
[[:bn:Main_Page|Bengali Wikipedia]].",
-   "search-interwiki-results-bowiki": "Showing results from 
[[:bo:Main_Page|Tibetan Wikipedia]].",
-   "search-interwiki-results-bpywiki": "Showing results from 
[[:bpy:Main_Page|Bishnupriya Manipuri Wikipedia]].",
-   "search-interwiki-results-brwiki": "Showing results from 
[[:br:Main_Page|Breton Wikipedia]].",
-   "search-interwiki-results-bswiki": "Showing results from 
[[:bs:Main_Page|Bosnian Wikipedia]].",
-   "search-interwiki-results-bugwiki": "Showing results from 
[[:bug:Main_Page|Buginese Wikipedia]].",
-   "search-interwiki-results-bxrwiki": "Showing results from 
[[:bxr:Main_Page|Buryat 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Create & use location update function in the scenarios where...

2016-12-21 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328120 )

Change subject: Create & use location update function in the scenarios where we 
are updating.
..


Create & use location update function in the scenarios where we are updating.

The update function will create or update (it uses the replace api) and is 
slightly more expensive
as it does a look up. I have only switched to it in the one place where we have 
identified that we
should be updating rather than creating duplicate addresses due to this small 
penalty.

Extend test to ensure double addresses not created.

Rename location_update functions to indicate they are insert.

These functions create a duplicate address if called when they should be 
updating

Bug: T152475
Change-Id: Ia21d771b94228267c54bed4fd0de73ef4fc99dcc
---
M sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
3 files changed, 139 insertions(+), 13 deletions(-)

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



diff --git 
a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php 
b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
index fc28436..288ab7a 100644
--- a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
@@ -318,7 +318,7 @@
$contact = wmf_civicrm_message_contact_update( $msg, 
$recur_record->contact_id );
 
// Insert the location record
-   wmf_civicrm_message_location_insert( $msg, $contact );
+   wmf_civicrm_message_location_update( $msg, $contact );
 
// Tag contact for review
wmf_civicrm_tag_contact_for_review( $contact );
@@ -525,7 +525,7 @@
$contact = wmf_civicrm_message_contact_update( $msg, 
$recur_record->contact_id );
 
// Insert the location record
-   wmf_civicrm_message_location_update( $msg, $contact );
+   wmf_civicrm_message_location_insert( $msg, $contact );
 
// Tag contact for review
wmf_civicrm_tag_contact_for_review( $contact );
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index 86ccc4e..5c23e3e 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -230,6 +230,7 @@
 }
 
 public function testRecurring() {
+civicrm_initialize();
 $subscr_id = mt_rand();
 $values = array( 'subscr_id' => $subscr_id );
 $signup_message = new RecurringSignupMessage( $values );
@@ -243,8 +244,14 @@
 exchange_rate_cache_set( 'USD', $payment_time, 1 );
 exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
 
-$this->recurringConsumer->processMessage( $signup_message->getBody() );
-$this->recurringConsumer->processMessage( $message->getBody() );
+$this->recurringConsumer->processMessage($signup_message->getBody());
+
+$msg = $message->getBody();
+db_insert('contribution_tracking')
+  ->fields(array('id' => $msg['custom']))
+->execute();
+
+$this->recurringConsumer->processMessage($msg);
 $this->recurringConsumer->processMessage( $message2->getBody() );
 
 $recur_record = wmf_civicrm_get_recur_record( $subscr_id );
@@ -259,6 +266,20 @@
 $this->assertEquals( $recur_record->id, 
$contributions2[0]['contribution_recur_id']);
 
 $this->assertEquals( $contributions[0]['contact_id'], 
$contributions2[0]['contact_id'] );
+$addresses = $this->callAPISuccess('Address', 'get', 
array('contact_id' => $contributions2[0]['contact_id']));
+$this->assertEquals(1, $addresses['count']);
+// The address comes from the recurring_payment.json not the 
recurring_signup.json as it
+// has been overwritten. This is perhaps not a valid scenario in 
production but it is
+// the scenario the code works to. In production they would probably 
always be the same.
+$this->assertEquals('1211122 132 st', 
$addresses['values'][$addresses['id']]['street_address']);
+
+$emails = $this->callAPISuccess('Email', 'get', array('contact_id' => 
$contributions2[0]['contact_id']));
+$this->assertEquals(1, $addresses['count']);
+$this->assertEquals('test...@wikimedia.org', 
$emails['values'][$emails['id']]['email']);
+
+db_delete('contribution_tracking')
+->condition('id', $msg['custom'])
+->execute();
 }
 
 /**
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25

2016-12-21 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328572 )

Change subject: labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25
..


labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25

Get rid of python-yaml since what we really want is python3-yaml
which is already installed too anyway. And this require did not
actually make any sense anyway.

Change-Id: I138961825ca95ca59dff9b385a360cd8178426d4
---
M modules/role/manifests/labs/db/maintain_dbusers.pp
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/modules/role/manifests/labs/db/maintain_dbusers.pp 
b/modules/role/manifests/labs/db/maintain_dbusers.pp
index cef99f2..edb7938 100644
--- a/modules/role/manifests/labs/db/maintain_dbusers.pp
+++ b/modules/role/manifests/labs/db/maintain_dbusers.pp
@@ -79,10 +79,6 @@
 owner   => 'root',
 group   => 'root',
 mode=> '0400',
-require => [
-Package['python3-ldap3'],
-Package['python-yaml'],
-],
 }
 
 file { '/usr/local/sbin/maintain-dbusers':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I138961825ca95ca59dff9b385a360cd8178426d4
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Delete a few more useless things

2016-12-21 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328573 )

Change subject: Delete a few more useless things
..

Delete a few more useless things

Change-Id: I703b125545029ce631a61b278920e3d1cadd9a52
---
M src/app/widgetBase.js
M src/components/widgets/fraud-gauge/fraud-gauge.js
M src/components/widgets/x-by-y/x-by-y.html
M src/components/widgets/x-by-y/x-by-y.js
4 files changed, 4 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/73/328573/1

diff --git a/src/app/widgetBase.js b/src/app/widgetBase.js
index b9fc3cb..20ae6f6 100644
--- a/src/app/widgetBase.js
+++ b/src/app/widgetBase.js
@@ -21,16 +21,12 @@
 
self.retrievedResults = ko.observable();
self.queryStringSQL = ko.observable( 'This widget hasn\'t been 
set up yet!' );
-   self.tempConfig = ko.observable();
self.config = params.configuration || {};
self.instanceID = params.widgetInstance;
self.widgetCode = params.widgetCode;
-   self.preDataLoading = ko.observable( true );
self.dataLoading = params.dataLoading;
self.chartSaved = ko.observable( !!params.configuration );
self.optionStateChanged = ko.observable( false );
-   self.chartWidth = ko.observable( '900' );
-   self.chartHeight = ko.observable( '550' );
self.chartLoaded = ko.observable( false );
self.title = ko.observable( params.title );
self.userChoices = ko.observable( self.config.userChoices || {} 
);
diff --git a/src/components/widgets/fraud-gauge/fraud-gauge.js 
b/src/components/widgets/fraud-gauge/fraud-gauge.js
index 19eab87..24a2902 100644
--- a/src/components/widgets/fraud-gauge/fraud-gauge.js
+++ b/src/components/widgets/fraud-gauge/fraud-gauge.js
@@ -242,7 +242,7 @@
};
 
self.metadataRequest.then( function () {
-   self.preDataLoading( false );
+   self.dataLoading( false );
 
if ( wasSaved ) {
// restore choices and show the chart
diff --git a/src/components/widgets/x-by-y/x-by-y.html 
b/src/components/widgets/x-by-y/x-by-y.html
index 70bfc82..f423c35 100644
--- a/src/components/widgets/x-by-y/x-by-y.html
+++ b/src/components/widgets/x-by-y/x-by-y.html
@@ -1,12 +1,3 @@
-
-
-   
-   
-   
-   Loading.
-   
-   
-



@@ -90,7 +81,7 @@



-   
+   



diff --git a/src/components/widgets/x-by-y/x-by-y.js 
b/src/components/widgets/x-by-y/x-by-y.js
index 2fb5771..0dbd60c 100644
--- a/src/components/widgets/x-by-y/x-by-y.js
+++ b/src/components/widgets/x-by-y/x-by-y.js
@@ -21,7 +21,6 @@
self.queryString = '';
self.chosenFilters = ko.observableArray(); // FIXME: remove, 
maybe adapt display to use filterText
self.xByYChart = ko.observable( false );
-   self.chartWidth( 950 );
 
self.title = ko.computed( function () {
if ( self.displayedTimeChoice() === 'Year' ) {
@@ -57,8 +56,7 @@
 
settings = {
size: {
-   height: 450,
-   width: window.width
+   height: 450
},
zoom: { enabled: true },
grid: {
@@ -216,7 +214,7 @@
};
 
self.populateChoices().then( function () {
-   self.preDataLoading( false );
+   self.dataLoading( false );
if ( wasSaved ) {
// restore choices and show the chart
self.bySlice( self.config.bySlice );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I703b125545029ce631a61b278920e3d1cadd9a52
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25

2016-12-21 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328572 )

Change subject: labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25
..

labsdb: Followup to I3156a406f37dd5344273faf5c770c32eddee0e25

Get rid of python-yaml since what we really want is python3-yaml
which is already installed too anyway

Change-Id: I138961825ca95ca59dff9b385a360cd8178426d4
---
M modules/role/manifests/labs/db/maintain_dbusers.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/328572/1

diff --git a/modules/role/manifests/labs/db/maintain_dbusers.pp 
b/modules/role/manifests/labs/db/maintain_dbusers.pp
index cef99f2..34e6a2b 100644
--- a/modules/role/manifests/labs/db/maintain_dbusers.pp
+++ b/modules/role/manifests/labs/db/maintain_dbusers.pp
@@ -81,7 +81,6 @@
 mode=> '0400',
 require => [
 Package['python3-ldap3'],
-Package['python-yaml'],
 ],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I138961825ca95ca59dff9b385a360cd8178426d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Convert from utf8 to utf8mb4

2016-12-21 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328571 )

Change subject: Gerrit: Convert from utf8 to utf8mb4
..

Gerrit: Convert from utf8 to utf8mb4

utf8mb4 was introduced in MySQL 5.5.3+ to support full Unicode.

Also convert the collation to utf8mb4_unicode_ci

Please see task linked to find out why we are doing this.

Bug: T153899
Change-Id: Iadb776ef5dfdea11d5ed7cc6718532f8a13d5b76
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/328571/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadb776ef5dfdea11d5ed7cc6718532f8a13d5b76
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdb: Run maintain-dbusers only on active NFS host

2016-12-21 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328564 )

Change subject: labsdb: Run maintain-dbusers only on active NFS host
..


labsdb: Run maintain-dbusers only on active NFS host

Change-Id: I3156a406f37dd5344273faf5c770c32eddee0e25
---
M modules/role/files/labs/db/maintain-dbusers.py
M modules/role/manifests/labs/db/maintain_dbusers.pp
M modules/role/manifests/labs/nfs/secondary.pp
3 files changed, 33 insertions(+), 5 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/role/files/labs/db/maintain-dbusers.py 
b/modules/role/files/labs/db/maintain-dbusers.py
index bb5cca5..2a7386e 100644
--- a/modules/role/files/labs/db/maintain-dbusers.py
+++ b/modules/role/files/labs/db/maintain-dbusers.py
@@ -63,6 +63,7 @@
 import random
 from hashlib import sha1
 import subprocess
+import netifaces
 
 PROJECT = 'tools'
 PASSWORD_LENGTH = 16
@@ -422,6 +423,24 @@
 """, ('tool', account))
 acct_db.commit()
 
+
+def is_active_nfs(config):
+"""
+Return true if current host is the active NFS host
+
+It looks for an interface attached to the current host that has an IP
+that is the NFS cluster service IP.
+"""
+for iface in netifaces.interfaces():
+ifaddress = netifaces.ifaddresses(iface)
+if netifaces.AF_INET not in ifaddress:
+continue
+if any([
+ip['addr'] == config['nfs-cluster-ip']
+for ip in ifaddress[netifaces.AF_INET]]):
+return True
+return False
+
 if __name__ == '__main__':
 argparser = argparse.ArgumentParser()
 
@@ -483,8 +502,14 @@
 harvest_replica_accts(config)
 elif args.action == 'maintain':
 while True:
-populate_new_tools(config)
-create_accounts(config)
+# Check if we're the primary NFS server.
+# If we aren't, just loop lamely, not exit. This allows this 
script to
+# run continuously on both labstores, making for easier monitoring 
given
+# our puppet situation and also easy failover. When NFS primaries 
are
+# switched, nothing new needs to be done to switch this over.
+if is_active_nfs(config):
+populate_new_tools(config)
+create_accounts(config)
 time.sleep(60)
 elif args.action == 'delete':
 if args.extra_args is None:
diff --git a/modules/role/manifests/labs/db/maintain_dbusers.pp 
b/modules/role/manifests/labs/db/maintain_dbusers.pp
index edf0591..cef99f2 100644
--- a/modules/role/manifests/labs/db/maintain_dbusers.pp
+++ b/modules/role/manifests/labs/db/maintain_dbusers.pp
@@ -22,7 +22,7 @@
 
 package { [
 'python3-ldap3',
-'python-yaml',
+'python3-netifaces',
 ]:
 ensure => present,
 }
@@ -68,7 +68,10 @@
 'host' => 'm5-master.eqiad.wmnet',
 'username' => $::passwords::labsdbaccounts::db_user,
 'password' => $::passwords::labsdbaccounts::db_password,
-}
+},
+# Pick this up from Hiera once it gets put into hiera
+# in role::labs::nfs::secondary
+'nfs-cluster-ip'   => '10.64.37.18',
 }
 
 file { '/etc/dbusers.yaml':
diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index 3d44c72..daf0da4 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -41,7 +41,7 @@
 }
 
 # TODO: hiera this
-
+# TODO: use hiera in maintain_dbusers too when this is hiera'd
 
 # Floating IP assigned to drbd primary(active NFS server). Should come 
from hiera
 $cluster_ip = '10.64.37.18'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3156a406f37dd5344273faf5c770c32eddee0e25
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set sortPrepend for gdwiki

2016-12-21 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328570 )

Change subject: Set sortPrepend for gdwiki
..

Set sortPrepend for gdwiki

Bug: T153900
Change-Id: Id7b03bd70bc4f52ad584ea0bea4e41eabe4fc814
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/70/328570/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6585c9e..3d9320e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16601,6 +16601,9 @@
'fywikibooks' => [
'sort' => 'alphabetic_fy',
],
+   'gdwiki' => [
+   'sortPrepend' => [ 'ga', 'gv', 'sco', 'cy' ], // T153900
+   ]
'hewiki' => [
'sortPrepend' => [ 'en' ],
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7b03bd70bc4f52ad584ea0bea4e41eabe4fc814
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...PureWikiDeletion[master]: Removed deprecated hooks usages

2016-12-21 Thread Georggi199 (Code Review)
Georggi199 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328569 )

Change subject: Removed deprecated hooks usages
..

Removed deprecated hooks usages

Bug: T151973
Change-Id: I306d285338e3de49a46e55f765ee6a0a59138baf
---
M PureWikiDeletion.hooks.php
M PureWikiDeletion.php
2 files changed, 39 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PureWikiDeletion 
refs/changes/69/328569/1

diff --git a/PureWikiDeletion.hooks.php b/PureWikiDeletion.hooks.php
index 1b1d0ff..52326e1 100644
--- a/PureWikiDeletion.hooks.php
+++ b/PureWikiDeletion.hooks.php
@@ -32,30 +32,43 @@
 * After a page is saved, add or remove it from the blank_page table if
 * it has been blanked or unblanked, respectively; if blanked, redirect
 * the user to the "Action complete" page
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param $isMinor
+* @param $isWatch
+* @param $section
+* @param $flags
+* @param Revision $revision
+* @param $status
+* @param $baseRevId
+* @param $redirect
+* @return bool
 */
-   public static function PureWikiDeletionSaveCompleteHook( &$article, 
&$user, $text, $summary,
-   $minoredit, &$watchthis, $sectionanchor, &$flags, $revision, 
&$status, $baseRevId,
-   &$redirect ) {
-   global $wgOut, $wgInterWikiIntegrationInEffect;
+   public static function PureWikiDeletionSaveCompleteHook( $wikiPage, 
$user, $content, $summary,
+   $isMinor, $isWatch, $section, $flags, $revision, $status, 
$baseRevId, &$redirect ) {
+   global $wgOut;
if ( !isset( $revision ) ) {
return true;
}
-   $mTitle = $article->getTitle();
+   $mTitle = $wikiPage->getTitle();
if ( $mTitle->getNamespace() == NS_FILE ) {
return true;
}
$blankRevId = $revision->getId();
-   if ( $text == "" ) {
+   if ( $content == "" ) {
if ( $summary == wfMessage( 'autosumm-blank' 
)->inContentLanguage()->text() ) {
$hasHistory = false;
-   $summary = $article->generateReason( 
$hasHistory );
+   $summary = $content->getContentHandler()
+   ->getAutoDeleteReason( $mTitle, 
$hasHistory );
}
$dbw = wfGetDB( DB_MASTER );
$blank_row = array(
-   'blank_page_id'   => $article->getID(),
+   'blank_page_id'   => $wikiPage->getId(),
'blank_user_id'   => $user->getId(),
'blank_user_name' => $user->getName(),
-   'blank_timestamp' => $revision->getTimeStamp(),
+   'blank_timestamp' => $revision->getTimestamp(),
'blank_summary'   => $summary,
'blank_parent_id' => $revision->getParentId()
);
@@ -70,29 +83,26 @@
 
Article::onArticleDelete( $mTitle );
$mTitle->resetArticleID( 0 );
-   if ( $user->getOption( 'watchblank' ) ) {
-   $watchthis = true;
-   }
Hooks::run ( 'PureWikiDeletionArticleBlankComplete', 
array ( $mTitle ) );
$redirect = false;
-   $wgOut->setPagetitle( wfMessage( 'actioncomplete' ) );
+   $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$loglink = wfMessage( 'blank-log-link' )->text();
$wgOut->addWikiMsg( 'purewikideletion-blankedtext', 
$mTitle->getPrefixedText(), $loglink );
$wgOut->returnToMain( false );
} else {
$dbr = wfGetDB( DB_SLAVE );
-   $blank_page_id = $article->getID();
+   $blank_page_id = $wikiPage->getId();
$result = $dbr->selectRow( 'blanked_page', 
'blank_page_id',
array( "blank_page_id" => $blank_page_id ) );
if ( !$result ) {
return true;
} else {
if ( $summary == '' ) {
-   $summary = $article->getAutosummary( 
'', $text, EDIT_NEW );
+

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Fix: Fatal on change of newsletter main page

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328568 )

Change subject: Fix: Fatal on change of newsletter main page
..


Fix: Fatal on change of newsletter main page

Bug: T153892
Change-Id: I6834e35ba9ec0ebd27e23ff374747552b97335e5
---
M includes/NewsletterStore.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/NewsletterStore.php b/includes/NewsletterStore.php
index 1605601..51b5936 100644
--- a/includes/NewsletterStore.php
+++ b/includes/NewsletterStore.php
@@ -249,7 +249,7 @@
 * @throws MWException
 */
public function newsletterExistsForMainPage( $mainPageId ) {
-   return $this->db->newsletterExistsWithName( $mainPageId );
+   return $this->db->newsletterExistsForMainPage( $mainPageId );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6834e35ba9ec0ebd27e23ff374747552b97335e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
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...Newsletter[master]: Fix: Fatal on change of newsletter main page

2016-12-21 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328568 )

Change subject: Fix: Fatal on change of newsletter main page
..

Fix: Fatal on change of newsletter main page

Bug: T153892
Change-Id: I6834e35ba9ec0ebd27e23ff374747552b97335e5
---
M includes/NewsletterStore.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/68/328568/1

diff --git a/includes/NewsletterStore.php b/includes/NewsletterStore.php
index 1605601..51b5936 100644
--- a/includes/NewsletterStore.php
+++ b/includes/NewsletterStore.php
@@ -249,7 +249,7 @@
 * @throws MWException
 */
public function newsletterExistsForMainPage( $mainPageId ) {
-   return $this->db->newsletterExistsWithName( $mainPageId );
+   return $this->db->newsletterExistsForMainPage( $mainPageId );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6834e35ba9ec0ebd27e23ff374747552b97335e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "height" parameter to "calendar" format

2016-12-21 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328566 )

Change subject: Added "height" parameter to "calendar" format
..


Added "height" parameter to "calendar" format

Based on a patch by Duncan Crane.

Change-Id: Ic075090149dd01d35a1fb7a0a341a616079b24a1
---
M formats/CargoCalendarFormat.php
M libs/ext.cargo.calendar.js
2 files changed, 28 insertions(+), 5 deletions(-)

Approvals:
  Yaron Koren: Looks good to me, approved



diff --git a/formats/CargoCalendarFormat.php b/formats/CargoCalendarFormat.php
index b58e9ca..92bb08e 100644
--- a/formats/CargoCalendarFormat.php
+++ b/formats/CargoCalendarFormat.php
@@ -6,7 +6,7 @@
 
 class CargoCalendarFormat extends CargoDeferredFormat {
function allowedParameters() {
-   return array( 'width', 'start date', 'color' );
+   return array( 'width', 'start date', 'color', 'height' );
}
 
/**
@@ -45,10 +45,23 @@
$width = "100%";
}
 
+   if ( array_key_exists( 'height', $displayParams ) ) {
+   $height = $displayParams['height'];
+   // The height should be either a number or "auto".
+   if ( !is_numeric( $height ) ) {
+   if ( $height != "auto") {
+   $height = null;
+   }
+   }
+   } else {
+   $height = null;
+   }
+
$attrs = array(
'class' => 'cargoCalendar',
'dataurl' => $ce->getFullURL( $queryParams ),
-   'style' => "width: $width"
+   'style' => "width: $width",
+   'height' => $height,
);
if ( array_key_exists( 'view', $displayParams ) ) {
$view = $displayParams['view'];
diff --git a/libs/ext.cargo.calendar.js b/libs/ext.cargo.calendar.js
index aa2820a..b753409 100644
--- a/libs/ext.cargo.calendar.js
+++ b/libs/ext.cargo.calendar.js
@@ -7,8 +7,7 @@
var dataURL = decodeURI( $(this).attr('dataurl') );
var startView = $(this).attr('startview');
var startDate = moment( $(this).attr('startdate') );
-   $(this).fullCalendar({
-   // put your options and callbacks here
+   var calendarSettings = {
events: dataURL,
header: {
left: 'today prev,next',
@@ -28,7 +27,18 @@
$(jsEvent.target).attr('title', 
decodedDescription);
}
}
-   });
+   };
+
+   // Do some validation on the 'height' input.
+   var height = $(this).attr('height');
+   var numHeight = Number(height);
+   if ( numHeight > 0 ) {
+   calendarSettings.height = numHeight;
+   } else if ( height == "auto" ) {
+   calendarSettings.height = height;
+   }
+
+   $(this).fullCalendar( calendarSettings );
});
 
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic075090149dd01d35a1fb7a0a341a616079b24a1
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...DidYouMean[master]: Removed deprecated hooks usage

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328562 )

Change subject: Removed deprecated hooks usage
..


Removed deprecated hooks usage

Bug: T151973
Change-Id: I345a04d58faf76c8c87cb772baf85e0b25de9b11
---
M DidYouMean.hooks.php
M DidYouMean.php
2 files changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/DidYouMean.hooks.php b/DidYouMean.hooks.php
index 091d659..b82d1a6 100644
--- a/DidYouMean.hooks.php
+++ b/DidYouMean.hooks.php
@@ -151,18 +151,30 @@
}
 
# called at end of action=submit
-   public static function articleSaveComplete( $article, $user, $text, 
$summary, $isminor, $dunno1, $dunno2, $flags ) {
-   if ( $article->getTitle()->getNamespace() != 0 ) {
+   /**
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isminor
+* @param $dunno1
+* @param $dunno2
+* @param $flags
+* @return bool
+*/
+   public static function pageContentSaveComplete( $wikiPage, $user,
+   $content, $summary, $isminor, $dunno1, $dunno2, $flags ) {
+   if ( $wikiPage->getTitle()->getNamespace() != 0 ) {
return true;
}
 
-   if ( $article->isRedirect( $text ) ) {
+   if ( $wikiPage->isRedirect() ) {
if ( !self::$articleIsRedirect && !( $flags & EDIT_NEW 
) ) {
-   DidYouMean::doDelete( $article->getID() );
+   DidYouMean::doDelete( $wikiPage->getID() );
}
} else {
if ( self::$articleIsRedirect || $flags & EDIT_NEW ) {
-   DidYouMean::doInsert( $article->getID(), 
$article->getTitle()->getText() );
+   DidYouMean::doInsert( $wikiPage->getID(), 
$wikiPage->getTitle()->getText() );
}
}
 
diff --git a/DidYouMean.php b/DidYouMean.php
index b55ee6b..8858016 100644
--- a/DidYouMean.php
+++ b/DidYouMean.php
@@ -35,7 +35,7 @@
 
 # handle create / edit
 $wgHooks['AlternateEdit'][] = 'DidYouMeanHooks::alternateEdit';
-$wgHooks['ArticleSaveComplete'][] = 'DidYouMeanHooks::articleSaveComplete';
+$wgHooks['PageContentSaveComplete'][] = 
'DidYouMeanHooks::pageContentSaveComplete';
 
 # handle undelete
 $wgHooks['ArticleUndelete'][] = 'DidYouMeanHooks::articleUndelete';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I345a04d58faf76c8c87cb772baf85e0b25de9b11
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DidYouMean
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Reedy 
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...SimpleChanges[master]: Fix $wgMessagesDirs

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328567 )

Change subject: Fix $wgMessagesDirs
..


Fix $wgMessagesDirs

Change-Id: Iceca69dba8f36df782d72dad8649f8a0a641b282
---
M SimpleChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/SimpleChanges.php b/SimpleChanges.php
index c1f9d5f..9ccde1a 100644
--- a/SimpleChanges.php
+++ b/SimpleChanges.php
@@ -29,7 +29,7 @@
 $wgAutoloadClasses['SpecialSimpleChanges'] = __DIR__ . 
'/SpecialSimpleChanges.php';
 $wgSpecialPages['SimpleChanges'] = 'SpecialSimpleChanges';
 $wgExtensionMessagesFiles['SimpleChanges'] = __DIR__ . 
'/SimpleChanges.i18n.php';
-$wgMessageDirs['SimpleChanges'] = __DIR__ . '/i18n';
+$wgMessagesDirs['SimpleChanges'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SimpleChangesAlias'] = __DIR__ . 
'/SimpleChanges.alias.php';
 
 # Restrict list of changes to $wgContentNamespaces?

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iceca69dba8f36df782d72dad8649f8a0a641b282
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SimpleChanges
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Reedy 
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...SimpleChanges[master]: Fix $wgMessagesDirs

2016-12-21 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328567 )

Change subject: Fix $wgMessagesDirs
..

Fix $wgMessagesDirs

Change-Id: Iceca69dba8f36df782d72dad8649f8a0a641b282
---
M SimpleChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SimpleChanges 
refs/changes/67/328567/1

diff --git a/SimpleChanges.php b/SimpleChanges.php
index c1f9d5f..9ccde1a 100644
--- a/SimpleChanges.php
+++ b/SimpleChanges.php
@@ -29,7 +29,7 @@
 $wgAutoloadClasses['SpecialSimpleChanges'] = __DIR__ . 
'/SpecialSimpleChanges.php';
 $wgSpecialPages['SimpleChanges'] = 'SpecialSimpleChanges';
 $wgExtensionMessagesFiles['SimpleChanges'] = __DIR__ . 
'/SimpleChanges.i18n.php';
-$wgMessageDirs['SimpleChanges'] = __DIR__ . '/i18n';
+$wgMessagesDirs['SimpleChanges'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SimpleChangesAlias'] = __DIR__ . 
'/SimpleChanges.alias.php';
 
 # Restrict list of changes to $wgContentNamespaces?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iceca69dba8f36df782d72dad8649f8a0a641b282
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SimpleChanges
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "height" parameter to "calendar" format

2016-12-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328566 )

Change subject: Added "height" parameter to "calendar" format
..

Added "height" parameter to "calendar" format

Based on a patch by Duncan Crane.

Change-Id: Ic075090149dd01d35a1fb7a0a341a616079b24a1
---
M formats/CargoCalendarFormat.php
M libs/ext.cargo.calendar.js
2 files changed, 28 insertions(+), 5 deletions(-)


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

diff --git a/formats/CargoCalendarFormat.php b/formats/CargoCalendarFormat.php
index b58e9ca..92bb08e 100644
--- a/formats/CargoCalendarFormat.php
+++ b/formats/CargoCalendarFormat.php
@@ -6,7 +6,7 @@
 
 class CargoCalendarFormat extends CargoDeferredFormat {
function allowedParameters() {
-   return array( 'width', 'start date', 'color' );
+   return array( 'width', 'start date', 'color', 'height' );
}
 
/**
@@ -45,10 +45,23 @@
$width = "100%";
}
 
+   if ( array_key_exists( 'height', $displayParams ) ) {
+   $height = $displayParams['height'];
+   // The height should be either a number or "auto".
+   if ( !is_numeric( $height ) ) {
+   if ( $height != "auto") {
+   $height = null;
+   }
+   }
+   } else {
+   $height = null;
+   }
+
$attrs = array(
'class' => 'cargoCalendar',
'dataurl' => $ce->getFullURL( $queryParams ),
-   'style' => "width: $width"
+   'style' => "width: $width",
+   'height' => $height,
);
if ( array_key_exists( 'view', $displayParams ) ) {
$view = $displayParams['view'];
diff --git a/libs/ext.cargo.calendar.js b/libs/ext.cargo.calendar.js
index aa2820a..b753409 100644
--- a/libs/ext.cargo.calendar.js
+++ b/libs/ext.cargo.calendar.js
@@ -7,8 +7,7 @@
var dataURL = decodeURI( $(this).attr('dataurl') );
var startView = $(this).attr('startview');
var startDate = moment( $(this).attr('startdate') );
-   $(this).fullCalendar({
-   // put your options and callbacks here
+   var calendarSettings = {
events: dataURL,
header: {
left: 'today prev,next',
@@ -28,7 +27,18 @@
$(jsEvent.target).attr('title', 
decodedDescription);
}
}
-   });
+   };
+
+   // Do some validation on the 'height' input.
+   var height = $(this).attr('height');
+   var numHeight = Number(height);
+   if ( numHeight > 0 ) {
+   calendarSettings.height = numHeight;
+   } else if ( height == "auto" ) {
+   calendarSettings.height = height;
+   }
+
+   $(this).fullCalendar( calendarSettings );
});
 
 });

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Wrong message-key used in NewsletterDiffEngine.php

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328563 )

Change subject: Wrong message-key used in NewsletterDiffEngine.php
..


Wrong message-key used in NewsletterDiffEngine.php

Adds following missing diff i18n messages:
* newsletter-diff-descheader
* newsletter-diff-mainpageheader
* newsletter-diff-publishersheader

Bug: T153530
Change-Id: Iafa1ee7da21fed932d7be3b044313dae67c44663
---
M i18n/en.json
M i18n/qqq.json
M includes/content/NewsletterDiffEngine.php
3 files changed, 15 insertions(+), 7 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
old mode 100755
new mode 100644
index 21a59d1..71ff0f0
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,7 +3,8 @@
"authors": [
"Tina Johnson",
"Thomas Arrow",
-   "Glaisher"
+   "Glaisher",
+   "Divadsn"
]
},
"newsletter-extension-desc": "Enables users to publish and subscribe to 
newsletters",
@@ -145,5 +146,8 @@
"log-action-filter-newsletter-newsletter-added": "Newsletter creation",
"log-action-filter-newsletter-newsletter-removed": "Newsletter 
deletion",
"log-action-filter-newsletter-issue-added": "New issue announcements",
-   "newsletter-restore-failure": "\"$1\" newsletter could not be restored. 
Please try again."
+   "newsletter-restore-failure": "\"$1\" newsletter could not be restored. 
Please try again.",
+   "newsletter-diff-descheader": "Changes in the description:",
+   "newsletter-diff-mainpageheader": "Changes in Main Page:",
+   "newsletter-diff-publishersheader": "Changes in publishers:"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6e2da62..41173b1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,7 +10,8 @@
"Umherirrender",
"Verdy p",
"Amire80",
-   "Base"
+   "Base",
+   "Divadsn"
]
},
"newsletter-extension-desc": "Description of the extension",
@@ -152,5 +153,8 @@
"log-action-filter-newsletter-newsletter-added": 
"{{doc-log-action-filter-action|newsletter|newsletter-added}}",
"log-action-filter-newsletter-newsletter-removed": 
"{{doc-log-action-filter-action|newsletter|newsletter-removed}}",
"log-action-filter-newsletter-issue-added": 
"{{doc-log-action-filter-action|newsletter|issue-added}}",
-   "newsletter-restore-failure": "Error message shown on 
title=Special:Undelete=Newsletter:=submit when the 
newsletter restoration fails.\n\nParameters:\n* $1 - Newsletter name"
+   "newsletter-restore-failure": "Error message shown on 
title=Special:Undelete=Newsletter:=submit when the 
newsletter restoration fails.\n\nParameters:\n* $1 - Newsletter name",
+   "newsletter-diff-descheader": "Header for the diff of the description 
between two revisions",
+   "newsletter-diff-mainpageheader": "Header for the diff of Main Page 
between two revisions",
+   "newsletter-diff-publishersheader": "Header for the diff of publishers 
between two revisions"
 }
diff --git a/includes/content/NewsletterDiffEngine.php 
b/includes/content/NewsletterDiffEngine.php
index 939c81d..ddad524 100644
--- a/includes/content/NewsletterDiffEngine.php
+++ b/includes/content/NewsletterDiffEngine.php
@@ -51,9 +51,9 @@
if ( trim( $publishersDiff ) !== '' ) {
$output .= Html::openElement( 'tr' );
$output .= Html::openElement( 'td',
-   [ 'colspan' => 4, 'id' => 
'mw-massmessage-diffpublishersheader' ] );
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffpublishersheader' ] );
$output .= Html::element( 'h4', [],
-   $this->msg( 'massmessage-diff-publishersheader' 
)->text() );
+   $this->msg( 'newsletter-diff-publishersheader' 
)->text() );
$output .= Html::closeElement( 'td' );
$output .= Html::closeElement( 'tr' );
$output .= $publishersDiff;
@@ -61,4 +61,4 @@
 
return $output;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafa1ee7da21fed932d7be3b044313dae67c44663
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Siebrand 

[MediaWiki-commits] [Gerrit] mediawiki...AnchorHandler[master]: Fix $wgMessagesDirs

2016-12-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328565 )

Change subject: Fix $wgMessagesDirs
..


Fix $wgMessagesDirs

Change-Id: I6c8117d56dce71cd3eb4178d8580c6bd47fef647
---
M AnchorHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/AnchorHandler.php b/AnchorHandler.php
index 33d4155..6941be9 100644
--- a/AnchorHandler.php
+++ b/AnchorHandler.php
@@ -28,7 +28,7 @@
 );
 
 $wgExtensionMessagesFiles['AnchorHandler'] = __DIR__ . 
'/AnchorHandler.i18n.php';
-$wgMessageDirs['AnchorHandler'] = __DIR__ . '/i18n';
+$wgMessagesDirs['AnchorHandler'] = __DIR__ . '/i18n';
 
 $egAnchorNamespaces = array();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c8117d56dce71cd3eb4178d8580c6bd47fef647
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AnchorHandler
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >