[MediaWiki-commits] [Gerrit] mediawiki/core[master]: postEdit: Use standard close icon

2017-09-08 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376873 )

Change subject: postEdit: Use standard close icon
..

postEdit: Use standard close icon

Making use of standard close icon and also prevent screenreaders
from reading 'x' if they ever come across the message.
Also slightly bumping `font-size` to better harmonize
with close icon and clean-up CSS.

Bug: T50067
Change-Id: I82cdad23462f62d5e8ab2eef8632a2b3ac35e93f
---
A resources/src/mediawiki.action/images/close.png
A resources/src/mediawiki.action/images/close.svg
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
3 files changed, 26 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/376873/1

diff --git a/resources/src/mediawiki.action/images/close.png 
b/resources/src/mediawiki.action/images/close.png
new file mode 100644
index 000..80dde95
--- /dev/null
+++ b/resources/src/mediawiki.action/images/close.png
Binary files differ
diff --git a/resources/src/mediawiki.action/images/close.svg 
b/resources/src/mediawiki.action/images/close.svg
new file mode 100644
index 000..7f75511
--- /dev/null
+++ b/resources/src/mediawiki.action/images/close.svg
@@ -0,0 +1,5 @@
+
+http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 
20">
+   
+   
+
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less 
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
index e1fa925..a2d7722 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
@@ -7,7 +7,7 @@
height: 0;
left: 50%;
z-index: 1000;
-   font-size: 13px;
+   font-size: 14px;
cursor: pointer;
 }
 
@@ -19,6 +19,24 @@
opacity: 1;
.transition( opacity 250ms );
 
+   &:after {
+   content: '';
+   background: no-repeat center center;
+   .background-image-svg( '../images/close.svg', 
'../images/close.png' );
+   background-size: 12px 12px;
+   position: absolute;
+   right: 0.4em;
+   top: 0;
+   bottom: 0;
+   min-width: 32px;
+   min-height: 32px;
+   opacity: 0.87;
+
+   &:hover {
+   opacity: 1;
+   }
+   }
+
&.mw-notification {
padding-right: 3em;
}
@@ -29,32 +47,13 @@
 }
 
 .postedit-icon {
-   padding-left: 41px; /* 25 + 8 + 8 */
+   padding-left: 25px;
/* like min-height, but old IE compatible and keeps text vertically 
aligned, too */
line-height: 25px;
background-repeat: no-repeat;
-   background-position: 8px 50%;
 }
 
 .postedit-icon-checkmark {
/* @embed */
background-image: url( images/green-checkmark.png );
-   background-position: left;
-}
-
-.postedit:after {
-   content: '×';
-   position: absolute;
-   padding: 0 0.8em;
-   right: 0;
-   top: 0;
-   font-size: 1.25em;
-   font-weight: bold;
-   line-height: 2.3em;
-   text-shadow: 0 0.0625em 0 #fff;
-   opacity: 0.2;
-}
-
-.postedit:hover:after {
-   opacity: 0.4;
-}
+}
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove "only newlines in trailer" special case for category/...

2017-09-08 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376872 )

Change subject: Remove "only newlines in trailer" special case for 
category/language links
..

Remove "only newlines in trailer" special case for category/language links

This special case complicates wikitext semantics and ought to be
unnecessary.  Parsoid doesn't include this special case; if this patch
to the PHP parser isn't merged, we should write one for Parsoid to
implement the missing special case logic.

Bug: T175416
Change-Id: I3865c51b21de9d63ac5d06dcc3a3fa9108129d6c
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 7 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/376872/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 0d11d5a..fe8622a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2299,10 +2299,7 @@
/**
 * Strip the whitespace interwiki links 
produce, see T10897
 */
-   $s = rtrim( $s . $prefix );
-   // Special case: strip newlines when 
only thing between
-   // this link and next are newlines
-   $s .= trim( $trail, "\n" ) === '' ? '' 
: $trail;
+   $s = rtrim( $s . $prefix ) . $trail; # 
T175416
continue;
}
 
@@ -2330,10 +2327,7 @@
/**
 * Strip the whitespace Category links 
produce, see T2087
 */
-   $s = rtrim( $s . $prefix ); # T2087, 
T87753
-   // Special case: strip newlines when 
only thing between
-   // this link and next are newlines
-   $s .= trim( $trail, "\n" ) === '' ? '' 
: $trail;
+   $s = rtrim( $s . $prefix ) . $trail; # 
T2087, T87753
 
if ( $wasblank ) {
$sortkey = 
$this->getDefaultSort();
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index ca16738..9a08b47 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -16140,11 +16140,9 @@
 Foo
 !! end
 
-# NOTE that Parsoid does not currently implement this special case
-# (T175416).  The plan is to remove this weird special-case in the PHP
-# parser to make it match the Parsoid output.
+# Note that Parsoid differs slightly from PHP due to T175421
 !! test
-11. Special case where only newlines separate links
+11. Special case where only newlines separate links (T175416)
 !! options
 parsoid=wt2html,html2html
 !! wikitext
@@ -16154,7 +16152,9 @@
 
 [[Foo]]
 !! html/php
-FooFoo
+
+Foo
+Foo
 
 !! html/parsoid
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3865c51b21de9d63ac5d06dcc3a3fa9108129d6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use callable type-hint instead of is_callable

2017-09-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376871 )

Change subject: Use callable type-hint instead of is_callable
..

Use callable type-hint instead of is_callable

Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb
---
M repo/includes/Content/DataUpdateAdapter.php
1 file changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/repo/includes/Content/DataUpdateAdapter.php 
b/repo/includes/Content/DataUpdateAdapter.php
index 16544e2..83663d3 100644
--- a/repo/includes/Content/DataUpdateAdapter.php
+++ b/repo/includes/Content/DataUpdateAdapter.php
@@ -41,11 +41,7 @@
 *
 * @throws InvalidArgumentException
 */
-   public function __construct( $doUpdateFunction /*...*/ ) {
-   if ( !is_callable( $doUpdateFunction ) ) {
-   throw new InvalidArgumentException( '$doUpdateFunction 
must be callable' );
-   }
-
+   public function __construct( callable $doUpdateFunction /*...*/ ) {
$args = func_get_args();
array_shift( $args );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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]: Remove deprecated function wfFixSessionID()

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376865 )

Change subject: Remove deprecated function wfFixSessionID()
..


Remove deprecated function wfFixSessionID()

Deprecated since 1.27, no callers anywhere.

Change-Id: I2d1019fdb21fe4a9d0aa767a71eb18739f841dfb
---
M RELEASE-NOTES-1.30
M includes/GlobalFunctions.php
2 files changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 7265b51..a221f53 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -214,6 +214,7 @@
   user_properties.up_user have all been made unsigned on MySQL.
 * DB_SLAVE is deprecated. DB_REPLICA should be used instead.
 * wfUsePHP() is deprecated.
+* wfFixSessionID() was removed.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bbb9317..3bd73e6 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2920,14 +2920,6 @@
 }
 
 /**
- * @deprecated since 1.27, PHP's session generation isn't used with
- *  MediaWiki\Session\SessionManager
- */
-function wfFixSessionID() {
-   wfDeprecated( __FUNCTION__, '1.27' );
-}
-
-/**
  * Reset the session id
  *
  * @deprecated since 1.27, use MediaWiki\Session\SessionManager instead

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d1019fdb21fe4a9d0aa767a71eb18739f841dfb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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] mediawiki...Wikibase[master]: Don't call deprecated wfRunHooks()

2017-09-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376870 )

Change subject: Don't call deprecated wfRunHooks()
..

Don't call deprecated wfRunHooks()

Deprecated since 1.25.

Change-Id: I0627ab876bb0bb1c918471dfb596ea82382a1623
---
M repo/includes/Content/EntityHandler.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/repo/includes/Content/EntityHandler.php 
b/repo/includes/Content/EntityHandler.php
index cd9311e..21cf934 100644
--- a/repo/includes/Content/EntityHandler.php
+++ b/repo/includes/Content/EntityHandler.php
@@ -635,7 +635,7 @@
// Call the WikibaseEntityDeletionUpdate hook.
// Do this before doing any well-known updates.
$updates[] = new DataUpdateAdapter(
-   'wfRunHooks',
+   'Hooks::run',
'WikibaseEntityDeletionUpdate',
[ $content, $title ]
);
@@ -708,7 +708,7 @@
// Call the WikibaseEntityModificationUpdate hook.
// Do this after doing all well-known updates.
$updates[] = new DataUpdateAdapter(
-   'wfRunHooks',
+   'Hooks::run',
'WikibaseEntityModificationUpdate',
[ $content, $title ]
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0627ab876bb0bb1c918471dfb596ea82382a1623
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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...Translate[master]: Use standard close icon

2017-09-08 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376869 )

Change subject: Use standard close icon
..

Use standard close icon

Using standard close icon and slightly increase size.
Also removing redundant, default CSS values.

Bug: T50067
Change-Id: I532db809215a2896855c73c885c1394952ab426c
---
M resources/css/ext.translate.editor.css
M resources/images/close.png
M resources/images/close.svg
3 files changed, 10 insertions(+), 45 deletions(-)


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

diff --git a/resources/css/ext.translate.editor.css 
b/resources/css/ext.translate.editor.css
index 8d5b261..f9ab4bb 100644
--- a/resources/css/ext.translate.editor.css
+++ b/resources/css/ext.translate.editor.css
@@ -8,31 +8,31 @@
 
 /* Temporary fix for T111685 */
 .grid .tux-message-editor .close {
-   background: url( ../images/close.png ) no-repeat scroll center center 
transparent;
+   background: url( ../images/close.png ) no-repeat center center;
background-image: -webkit-linear-gradient( transparent, transparent ), 
url( ../images/close.svg );
/* @embed */
background-image: linear-gradient( transparent, transparent ), url( 
../images/close.svg );
-   padding: 15px;
+   padding: 16px;
cursor: pointer;
float: right;
 }
 
 /* Temporary fix for T111685 */
 .grid .tux-message-editor .editor-info-toggle {
-   padding: 15px;
+   padding: 16px;
cursor: pointer;
float: right;
 }
 
 .tux-message-editor .editor-contract {
-   background: url( ../images/contract-ltr.png ) no-repeat scroll center 
center transparent;
+   background: url( ../images/contract-ltr.png ) no-repeat center center;
background-image: -webkit-linear-gradient( transparent, transparent ), 
url( ../images/contract-ltr.svg );
/* @embed */
background-image: linear-gradient( transparent, transparent ), url( 
../images/contract-ltr.svg );
 }
 
 .tux-message-editor .editor-expand {
-   background: url( ../images/expand-ltr.png ) no-repeat scroll center 
center transparent;
+   background: url( ../images/expand-ltr.png ) no-repeat center center;
background-image: -webkit-linear-gradient( transparent, transparent ), 
url( ../images/expand-ltr.svg );
/* @embed */
background-image: linear-gradient( transparent, transparent ), url( 
../images/expand-ltr.svg );
@@ -230,7 +230,7 @@
 }
 
 .message-desc-edit {
-   background: transparent url( ../images/action-edit.png ) left center 
no-repeat;
+   background: url( ../images/action-edit.png ) left center no-repeat;
background-image: -webkit-linear-gradient( transparent, transparent ), 
url( ../images/action-edit.svg );
/* @embed */
background-image: linear-gradient( transparent, transparent ), url( 
../images/action-edit.svg );
diff --git a/resources/images/close.png b/resources/images/close.png
index 84631c3..80dde95 100644
--- a/resources/images/close.png
+++ b/resources/images/close.png
Binary files differ
diff --git a/resources/images/close.svg b/resources/images/close.svg
index 375b4f5..7f75511 100644
--- a/resources/images/close.svg
+++ b/resources/images/close.svg
@@ -1,40 +1,5 @@
-
-
-
-http://purl.org/dc/elements/1.1/;
-   xmlns:cc="http://creativecommons.org/ns#;
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
-   xmlns:svg="http://www.w3.org/2000/svg;
-   xmlns="http://www.w3.org/2000/svg;
-   version="1.1"
-   width="12"
-   height="12"
-   id="svg2">
-  
-  
-
-  
-image/svg+xml
-http://purl.org/dc/dcmitype/StillImage; />
-
-  
-
-  
-  
-
-
-  
+
+http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 
20">
+   
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I532db809215a2896855c73c885c1394952ab426c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Simplify OutputPage constructor

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376868 )

Change subject: Simplify OutputPage constructor
..

Simplify OutputPage constructor

Make it impossible to instantiate this class without passing it
context. This appears to be the oldest wfDeprecated() in MediaWiki.
All callers have been updated.

Change-Id: I00b9e283ad22c6274b358063b9f9e60fe93d5ee7
---
M RELEASE-NOTES-1.30
M includes/OutputPage.php
2 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/376868/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index a221f53..8e95953 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -215,6 +215,7 @@
 * DB_SLAVE is deprecated. DB_REPLICA should be used instead.
 * wfUsePHP() is deprecated.
 * wfFixSessionID() was removed.
+* OutputPage now can't be instantiated without passing it context.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index dd21194..b8fb14d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -311,15 +311,10 @@
 * Constructor for OutputPage. This should not be called directly.
 * Instead a new RequestContext should be created and it will 
implicitly create
 * a OutputPage tied to that context.
-* @param IContextSource|null $context
+* @param IContextSource $context
 */
-   function __construct( IContextSource $context = null ) {
-   if ( $context === null ) {
-   # Extensions should use `new RequestContext` instead of 
`new OutputPage` now.
-   wfDeprecated( __METHOD__, '1.18' );
-   } else {
-   $this->setContext( $context );
-   }
+   function __construct( IContextSource $context ) {
+   $this->setContext( $context );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: wfRunHooks --> Hooks::run

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376867 )

Change subject: wfRunHooks --> Hooks::run
..

wfRunHooks --> Hooks::run

Change-Id: I5b9d875b7822016b260009a97aa21f2681ac9515
---
M ArticleInfo/ArticleInfo.class.php
M Authors/views/view.AuthorsUserPageProfileImageSetting.php
M Dashboards/includes/specials/SpecialAdminDashboard.php
M Dashboards/includes/specials/SpecialUserDashboard.php
M ExtendedEditBar/ExtendedEditBar.class.php
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwArticles.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php
M ExtendedSearch/includes/ExtendedSearchBase.class.php
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
M ExtendedSearch/includes/SearchIndex/SearchRequest.class.php
M ExtendedSearch/includes/SearchIndex/SearchResult.class.php
M Flexiskin/Flexiskin.class.php
M Flexiskin/includes/FlexiskinFormatter.class.php
M Flexiskin/includes/resourceloader/ResourceLoaderFlexiskinModule.php
M GroupManager/includes/api/BSApiTasksGroupManager.php
M InsertMagic/includes/api/BSApiInsertMagicDataStore.php
M NamespaceManager/includes/api/BSApiNamespaceStore.php
M PageAccess/PageAccess.class.php
M PermissionManager/PermissionManager.class.php
M PermissionManager/includes/specials/SpecialPermissionManager.class.php
M Preferences/Preferences.class.php
M Preferences/includes/specials/SpecialBlueSpicePreferences.php
M RSSFeeder/RSSFeeder.class.php
M ShoutBox/ShoutBox.class.php
M ShoutBox/includes/api/BSApiTasksShoutBox.php
M SmartList/SmartList.class.php
M StateBar/StateBar.class.php
M StateBar/includes/api/BSApiStateBarTasks.php
M TopMenuBarCustomizer/TopMenuBarCustomizer.class.php
M UEModulePDF/UEModulePDF.class.php
M UEModulePDF/includes/ExportModulePDF.class.php
M UEModulePDF/includes/PDFPageProvider.class.php
M UEModulePDF/includes/PDFServlet.class.php
M UEModulePDF/includes/PDFTemplateProvider.class.php
M UEModulePDF/includes/PDFWebService.class.php
M UniversalExport/UniversalExport.class.php
M UniversalExport/includes/specials/SpecialUniversalExport.class.php
M UserSidebar/UserSidebar.class.php
M UserSidebar/api/ApiSidebar.php
M VisualEditor/VisualEditor.class.php
42 files changed, 79 insertions(+), 79 deletions(-)


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

diff --git a/ArticleInfo/ArticleInfo.class.php 
b/ArticleInfo/ArticleInfo.class.php
index 5f3f671..01f2e52 100644
--- a/ArticleInfo/ArticleInfo.class.php
+++ b/ArticleInfo/ArticleInfo.class.php
@@ -277,7 +277,7 @@
$oLastEditView->setTextLinkTitle( wfMessage( 
'bs-articleinfo-last-edited-tooltip' )->plain() );
$oLastEditView->setDataAttribute( 'timestamp', wfTimestamp( 
TS_UNIX, $sTimestamp ) );
 
-   wfRunHooks( 'BSArticleInfoBeforeAddLastEditView', array( $this, 
&$oLastEditView ) );
+   Hooks::run( 'BSArticleInfoBeforeAddLastEditView', array( $this, 
&$oLastEditView ) );
 
wfProfileOut( 'BS::'.__METHOD__ );
return $oLastEditView;
@@ -308,7 +308,7 @@
$oLastEditorView->setTextLinkTitle( $sLastEditorName );
$oLastEditorView->setTextLink( $sLastEditorUserPageUrl );
 
-   wfRunHooks( 'BSArticleInfoBeforeAddTopElement', array( $this, 
&$oLastEditorView ) );
+   Hooks::run( 'BSArticleInfoBeforeAddTopElement', array( $this, 
&$oLastEditorView ) );
 
wfProfileOut( 'BS::'.__METHOD__ );
return $oLastEditorView;
@@ -327,7 +327,7 @@
$oCategoriesLinks = new 
ViewStateBarTopElementCategoryShortList();
$bIsProcessed = false;
 
-   wfRunHooks( 'BSArticleInfoBeforeAddLastEditorView', array( 
$this, &$aCurrentPagesCategories , &$bIsProcessed ) );
+   Hooks::run( 'BSArticleInfoBeforeAddLastEditorView', array( 
$this, &$aCurrentPagesCategories , &$bIsProcessed ) );
 
if( $bIsProcessed === false ){
ksort( $aCurrentPagesCategories );
@@ -359,7 +359,7 @@
$oCategoriesLinks->setIconAlt( wfMessage( 
'bs-articleinfo-categories' )->plain() );
}
 
-   wfRunHooks('BSArticleInfoBeforeAddCategoryView', array( $this, 
&$oCategoriesLinks ));
+   Hooks::run('BSArticleInfoBeforeAddCategoryView', array( $this, 
&$oCategoriesLinks ));
 
wfProfileOut( 'BS::'.__METHOD__ );
return $oCategoriesLinks;
@@ -377,7 +377,7 @@
wfProfileIn( 'BS::'.__METHOD__ );
$bIsProcessed = false;
 
-   wfRunHooks( 'BSArticleInfoBeforeAddLastEditorView', array( 
$this, &$aCurrentPagesCategories , &$bIsProcessed ) );
+   Hooks::run( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove deprecated function wfFixSessionID()

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376865 )

Change subject: Remove deprecated function wfFixSessionID()
..

Remove deprecated function wfFixSessionID()

Deprecated since 1.27, no callers anywhere.

Change-Id: I2d1019fdb21fe4a9d0aa767a71eb18739f841dfb
---
M RELEASE-NOTES-1.30
M includes/GlobalFunctions.php
2 files changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/376865/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 7265b51..a221f53 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -214,6 +214,7 @@
   user_properties.up_user have all been made unsigned on MySQL.
 * DB_SLAVE is deprecated. DB_REPLICA should be used instead.
 * wfUsePHP() is deprecated.
+* wfFixSessionID() was removed.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bbb9317..3bd73e6 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2920,14 +2920,6 @@
 }
 
 /**
- * @deprecated since 1.27, PHP's session generation isn't used with
- *  MediaWiki\Session\SessionManager
- */
-function wfFixSessionID() {
-   wfDeprecated( __FUNCTION__, '1.27' );
-}
-
-/**
  * Reset the session id
  *
  * @deprecated since 1.27, use MediaWiki\Session\SessionManager instead

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Hard deprecate wfRunHooks()

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376866 )

Change subject: Hard deprecate wfRunHooks()
..

Hard deprecate wfRunHooks()

Deprecated since 1.25, very few callers. Having to grep for 2
ways of calling a hook is harmful not only because it wastes developers'
time, but also because it makes it possible to forget to search for the
old way, resulting in mistakes. Better get rid of this.

Change-Id: Iab28bd5758475b780c2016847881757d64973862
---
M includes/GlobalFunctions.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/376866/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 3bd73e6..a286098 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3476,6 +3476,7 @@
  * @deprecated since 1.25 - use Hooks::run
  */
 function wfRunHooks( $event, array $args = [], $deprecatedVersion = null ) {
+   wfDeprecated( __METHOD__, '1.25' );
return Hooks::run( $event, $args, $deprecatedVersion );
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix editing figcaptions

2017-09-08 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376864 )

Change subject: Fix editing figcaptions
..

Fix editing figcaptions

Bug: T174774
Change-Id: I1cb13b5f04a6e9108d8da25854479bf38f29f82a
---
M src/ce/styles/nodes/ve.ce.ActiveNode.css
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/64/376864/1

diff --git a/src/ce/styles/nodes/ve.ce.ActiveNode.css 
b/src/ce/styles/nodes/ve.ce.ActiveNode.css
index 079785e..6e64a4b 100644
--- a/src/ce/styles/nodes/ve.ce.ActiveNode.css
+++ b/src/ce/styles/nodes/ve.ce.ActiveNode.css
@@ -10,5 +10,5 @@
 
 .ve-ce-focusableNode .ve-ce-activeNode,
 .ve-ce-focusableNode .ve-ce-activeNode * {
-   -moz-user-select: text;
+   -moz-user-select: -moz-text;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cb13b5f04a6e9108d8da25854479bf38f29f82a
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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/core[master]: Deprecate wfUsePHP()

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376860 )

Change subject: Deprecate wfUsePHP()
..


Deprecate wfUsePHP()

No callers anywhere.

Change-Id: I47256448d313983e3cebd713f7c149e3c3a9ab47
---
M RELEASE-NOTES-1.30
M includes/GlobalFunctions.php
2 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index f741a4e..7265b51 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -213,6 +213,7 @@
   page_restrictions.pr_user, tag_summary.ts_log_id, tag_summary.ts_rev_id and
   user_properties.up_user have all been made unsigned on MySQL.
 * DB_SLAVE is deprecated. DB_REPLICA should be used instead.
+* wfUsePHP() is deprecated.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 49159ed..bbb9317 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2781,6 +2781,9 @@
  * @see perldoc -f use
  *
  * @param string|int|float $req_ver The version to check, can be a string, an 
integer, or a float
+ *
+ * @deprecated since 1.30
+ *
  * @throws MWException
  */
 function wfUsePHP( $req_ver ) {
@@ -2809,7 +2812,7 @@
  *
  * @see perldoc -f use
  *
- * @deprecated since 1.26, use the "requires' property of extension.json
+ * @deprecated since 1.26, use the "requires" property of extension.json
  * @param string|int|float $req_ver The version to check, can be a string, an 
integer, or a float
  * @throws MWException
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47256448d313983e3cebd713f7c149e3c3a9ab47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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] mediawiki...WhoIsWatching[REL1_27]: replace parent::execute with something that makes more sense.

2017-09-08 Thread MarkAHershberger (Code Review)
MarkAHershberger has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376863 )

Change subject: replace parent::execute with something that makes more sense.
..


replace parent::execute with something that makes more sense.

Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
(cherry picked from commit c7a60277be51f3d7fbe12a2604a8141a515b4861)
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index a87e585..263998e 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -23,7 +23,9 @@
}
 
function execute( $par ) {
-   parent::execute( $par );
+   $this->setHeaders();
+   $this->checkPermissions();
+   $this->outputHeader();
 
if ( $this->getTargetPage( $par ) ) {
if ( $this->addWatchersForm() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: REL1_27
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: MarkAHershberger 
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...WhoIsWatching[REL1_27]: replace parent::execute with something that makes more sense.

2017-09-08 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376863 )

Change subject: replace parent::execute with something that makes more sense.
..

replace parent::execute with something that makes more sense.

Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
(cherry picked from commit c7a60277be51f3d7fbe12a2604a8141a515b4861)
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/63/376863/1

diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index a87e585..263998e 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -23,7 +23,9 @@
}
 
function execute( $par ) {
-   parent::execute( $par );
+   $this->setHeaders();
+   $this->checkPermissions();
+   $this->outputHeader();
 
if ( $this->getTargetPage( $par ) ) {
if ( $this->addWatchersForm() ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: REL1_27
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.17]: Only show human relevance survey to a browser every 2 days

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376861 )

Change subject: Only show human relevance survey to a browser every 2 days
..


Only show human relevance survey to a browser every 2 days

Some users, especially if they visit a page with a low sampling
rate multiple times, will see the survey more often than expected
and potentially be annoyed.

Setup a timeout such that there will be a 2 day delay between
occurances of a user being shown the survey.

Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
(cherry picked from commit 198c8a968114e45ea01902bf84d7dd69d00f7b76)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5ee8fb2..47d7591 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -24,10 +24,13 @@
return;
}
 
-   // This value is coded into the page output and cached in varnish. That
-   // means any changes to sampling rates or pages chosen will take up to a
-   // week to propogate into the wild.
-   var config = mw.config.get( 'wgWMESearchRelevancePages' );
+   // The config value is coded into the page output and cached in varnish.
+   // That means any changes to sampling rates or pages chosen will take 
up to
+   // a week to propogate into the wild.
+   var timeout,
+   config = mw.config.get( 'wgWMESearchRelevancePages' ),
+   timeoutKey = 'wme-humrel-timeout',
+   now = new Date().getTime();
 
// bad configuration
if ( !config.hasOwnProperty( 'sampleRate' ) || !config.hasOwnProperty( 
'queries' ) ) {
@@ -39,6 +42,14 @@
return;
}
 
+   timeout = mw.storage.get( timeoutKey );
+   if ( timeout && timeout > now ) {
+   // User has seen the survey recently
+   return;
+   }
+   // Don't show the survey to same browser for 2 days, to prevent 
annoying users
+   mw.storage.set( timeoutKey, now + 2 * 86400 );
+
function askQuestion() {
mw.loader.using( [
'oojs-ui-core',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.17
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
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...WhoIsWatching[REL1_28]: replace parent::execute with something that makes more sense.

2017-09-08 Thread MarkAHershberger (Code Review)
MarkAHershberger has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376859 )

Change subject: replace parent::execute with something that makes more sense.
..


replace parent::execute with something that makes more sense.

Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index a87e585..263998e 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -23,7 +23,9 @@
}
 
function execute( $par ) {
-   parent::execute( $par );
+   $this->setHeaders();
+   $this->checkPermissions();
+   $this->outputHeader();
 
if ( $this->getTargetPage( $par ) ) {
if ( $this->addWatchersForm() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: REL1_28
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: MarkAHershberger 
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...Echo[master]: Always place items outside menu if there's less than two of ...

2017-09-08 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376862 )

Change subject: Always place items outside menu if there's less than two of them
..

Always place items outside menu if there's less than two of them

Bug: T174927
Change-Id: I5a30cf4d5cdc3e7ea9ea7b0536e015de8825f785
---
M modules/ui/mw.echo.ui.NotificationItemWidget.js
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/62/376862/1

diff --git a/modules/ui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ui/mw.echo.ui.NotificationItemWidget.js
index 475b695..f553e7e 100644
--- a/modules/ui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationItemWidget.js
@@ -130,7 +130,17 @@
// prioritized explicitly, *except* for items inside a 
bundle
// (where all actions are inside the menu) or there are 
more than
// two prioritized actions (all others go into the menu)
-   isOutsideMenu = !this.bundle && urlObj.prioritized !== 
undefined && outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
+   isOutsideMenu = !this.bundle &&
+   (
+   (
+   // Make sure we don't 
have too many prioritized items
+   urlObj.prioritized &&
+   outsideMenuItemCounter 
< mw.echo.config.maxPrioritizedActions
+   ) ||
+   // If there are only two items 
or less, they all go outside
+   // the menu
+   secondaryUrls.length <= 2;
+   );
 
linkButton = new mw.echo.ui.MenuItemWidget( {
type: urlObj.type,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a30cf4d5cdc3e7ea9ea7b0536e015de8825f785
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.17]: Only show human relevance survey to a browser every 2 days

2017-09-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376861 )

Change subject: Only show human relevance survey to a browser every 2 days
..

Only show human relevance survey to a browser every 2 days

Some users, especially if they visit a page with a low sampling
rate multiple times, will see the survey more often than expected
and potentially be annoyed.

Setup a timeout such that there will be a 2 day delay between
occurances of a user being shown the survey.

Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
(cherry picked from commit 198c8a968114e45ea01902bf84d7dd69d00f7b76)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 15 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/61/376861/1

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5ee8fb2..47d7591 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -24,10 +24,13 @@
return;
}
 
-   // This value is coded into the page output and cached in varnish. That
-   // means any changes to sampling rates or pages chosen will take up to a
-   // week to propogate into the wild.
-   var config = mw.config.get( 'wgWMESearchRelevancePages' );
+   // The config value is coded into the page output and cached in varnish.
+   // That means any changes to sampling rates or pages chosen will take 
up to
+   // a week to propogate into the wild.
+   var timeout,
+   config = mw.config.get( 'wgWMESearchRelevancePages' ),
+   timeoutKey = 'wme-humrel-timeout',
+   now = new Date().getTime();
 
// bad configuration
if ( !config.hasOwnProperty( 'sampleRate' ) || !config.hasOwnProperty( 
'queries' ) ) {
@@ -39,6 +42,14 @@
return;
}
 
+   timeout = mw.storage.get( timeoutKey );
+   if ( timeout && timeout > now ) {
+   // User has seen the survey recently
+   return;
+   }
+   // Don't show the survey to same browser for 2 days, to prevent 
annoying users
+   mw.storage.set( timeoutKey, now + 2 * 86400 );
+
function askQuestion() {
mw.loader.using( [
'oojs-ui-core',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.17
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Deprecate wfUsePHP()

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376860 )

Change subject: Deprecate wfUsePHP()
..

Deprecate wfUsePHP()

No callers anywhere.

Change-Id: I47256448d313983e3cebd713f7c149e3c3a9ab47
---
M RELEASE-NOTES-1.30
M includes/GlobalFunctions.php
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/376860/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index f741a4e..7265b51 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -213,6 +213,7 @@
   page_restrictions.pr_user, tag_summary.ts_log_id, tag_summary.ts_rev_id and
   user_properties.up_user have all been made unsigned on MySQL.
 * DB_SLAVE is deprecated. DB_REPLICA should be used instead.
+* wfUsePHP() is deprecated.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 49159ed..bbb9317 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2781,6 +2781,9 @@
  * @see perldoc -f use
  *
  * @param string|int|float $req_ver The version to check, can be a string, an 
integer, or a float
+ *
+ * @deprecated since 1.30
+ *
  * @throws MWException
  */
 function wfUsePHP( $req_ver ) {
@@ -2809,7 +2812,7 @@
  *
  * @see perldoc -f use
  *
- * @deprecated since 1.26, use the "requires' property of extension.json
+ * @deprecated since 1.26, use the "requires" property of extension.json
  * @param string|int|float $req_ver The version to check, can be a string, an 
integer, or a float
  * @throws MWException
  */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WhoIsWatching[REL1_28]: replace parent::execute with something that makes more sense.

2017-09-08 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376859 )

Change subject: replace parent::execute with something that makes more sense.
..

replace parent::execute with something that makes more sense.

Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/59/376859/1

diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index a87e585..263998e 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -23,7 +23,9 @@
}
 
function execute( $par ) {
-   parent::execute( $par );
+   $this->setHeaders();
+   $this->checkPermissions();
+   $this->outputHeader();
 
if ( $this->getTargetPage( $par ) ) {
if ( $this->addWatchersForm() ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66d62ab412923fdf138a4071ed47b6ab7f4328c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: REL1_28
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.16]: Only show human relevance survey to a browser every 2 days

2017-09-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376858 )

Change subject: Only show human relevance survey to a browser every 2 days
..

Only show human relevance survey to a browser every 2 days

Some users, especially if they visit a page with a low sampling
rate multiple times, will see the survey more often than expected
and potentially be annoyed.

Setup a timeout such that there will be a 2 day delay between
occurances of a user being shown the survey.

Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
(cherry picked from commit 198c8a968114e45ea01902bf84d7dd69d00f7b76)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 15 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/58/376858/1

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5ee8fb2..47d7591 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -24,10 +24,13 @@
return;
}
 
-   // This value is coded into the page output and cached in varnish. That
-   // means any changes to sampling rates or pages chosen will take up to a
-   // week to propogate into the wild.
-   var config = mw.config.get( 'wgWMESearchRelevancePages' );
+   // The config value is coded into the page output and cached in varnish.
+   // That means any changes to sampling rates or pages chosen will take 
up to
+   // a week to propogate into the wild.
+   var timeout,
+   config = mw.config.get( 'wgWMESearchRelevancePages' ),
+   timeoutKey = 'wme-humrel-timeout',
+   now = new Date().getTime();
 
// bad configuration
if ( !config.hasOwnProperty( 'sampleRate' ) || !config.hasOwnProperty( 
'queries' ) ) {
@@ -39,6 +42,14 @@
return;
}
 
+   timeout = mw.storage.get( timeoutKey );
+   if ( timeout && timeout > now ) {
+   // User has seen the survey recently
+   return;
+   }
+   // Don't show the survey to same browser for 2 days, to prevent 
annoying users
+   mw.storage.set( timeoutKey, now + 2 * 86400 );
+
function askQuestion() {
mw.loader.using( [
'oojs-ui-core',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3da1c68b09b7461db10d11e2cbd9bed3bca9143
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Prioritize the secondary link, so it shows (without needing ...

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376646 )

Change subject: Prioritize the secondary link, so it shows (without needing ... 
menu)
..


Prioritize the secondary link, so it shows (without needing ... menu)

Bug: T174927
Change-Id: I8650a336a06440cc233622c6496a1594b9fbe03a
---
M includes/Echo/EchoNewsletterPresentationModel.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/Echo/EchoNewsletterPresentationModel.php 
b/includes/Echo/EchoNewsletterPresentationModel.php
index b5fd6fb..b7ed667 100644
--- a/includes/Echo/EchoNewsletterPresentationModel.php
+++ b/includes/Echo/EchoNewsletterPresentationModel.php
@@ -25,7 +25,8 @@
return [
[
'url' => $this->getNewsletterUrl(),
-   'label' => $this->msg( 
'newsletter-notification-link-text-view-newsletter' )
+   'label' => $this->msg( 
'newsletter-notification-link-text-view-newsletter' ),
+   'prioritized' => true,
],
];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8650a336a06440cc233622c6496a1594b9fbe03a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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]: RCFilters: Add an initialization hook

2017-09-08 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376857 )

Change subject: RCFilters: Add an initialization hook
..

RCFilters: Add an initialization hook

Change-Id: I9adc529bee0d5e25566409cc98f7bbac8178c478
---
A resources/src/mediawiki.rcfilters/hooks.txt
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/376857/1

diff --git a/resources/src/mediawiki.rcfilters/hooks.txt 
b/resources/src/mediawiki.rcfilters/hooks.txt
new file mode 100644
index 000..4e87b31
--- /dev/null
+++ b/resources/src/mediawiki.rcfilters/hooks.txt
@@ -0,0 +1,3 @@
+This documents RCFilters' client-side hooks:
+
+* 'advanced-filters-ui-initialized': Fired when the construction of the 
filtering interface is initialized.
\ No newline at end of file
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
index 67edb4f..f12493d 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
@@ -79,6 +79,8 @@
);
filtersWidget.setTopSection( 
wlTopSection.$element );
} // end Special:WL
+
+   mw.hook( 'advanced-filters-ui-initialized' ).fire();
}
};
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Avoid using deprecated ParserCache::singleton()

2017-09-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376856 )

Change subject: Avoid using deprecated ParserCache::singleton()
..

Avoid using deprecated ParserCache::singleton()

It was deprecated in 1.30.

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


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index f508f10..1fee911 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -480,7 +480,7 @@
if ( $params['paction'] !== 'wikitext' ) {
$wikipage = WikiPage::factory( $title );
$popts = $wikipage->makeParserOptions( 
'canonical' );
-   $cached = 
ParserCache::singleton()->get( $article, $popts, true );
+   $cached = 
MediaWikiServices::getInstance()->getParserCache()->get( $article, $popts, true 
);
$links = [
// Array of linked pages that 
are missing
'missing' => [],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bdb91e4f4fa57369177ffe61d9a8743e1d81346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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 using the deprecated ParserCache::singleton()

2017-09-08 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376855 )

Change subject: Avoid using the deprecated ParserCache::singleton()
..

Avoid using the deprecated ParserCache::singleton()

Change-Id: I0da6d9cbfad26c89bf5dab564071ef97acaf44f9
---
M includes/api/ApiPurge.php
M includes/jobqueue/jobs/RefreshLinksJob.php
M includes/page/Article.php
M includes/page/WikiPage.php
M includes/poolcounter/PoolWorkArticleView.php
M maintenance/compareParserCache.php
6 files changed, 22 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/376855/1

diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php
index 83227a2..35f93e0 100644
--- a/includes/api/ApiPurge.php
+++ b/includes/api/ApiPurge.php
@@ -25,6 +25,7 @@
  * @file
  */
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * API interface for page purging
@@ -98,7 +99,7 @@
$r['linkupdate'] = true;
 
if ( $enableParserCache ) {
-   $pcache = 
ParserCache::singleton();
+   $pcache = 
MediaWikiServices::getInstance()->getParserCache();
$pcache->save( 
$p_result, $page, $popts );
}
}
diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 9f3550f..ec2695c 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -207,7 +207,8 @@
if ( $page->getTouched() >= 
$this->params['rootJobTimestamp'] || $opportunistic ) {
// Cache is suspected to be up-to-date. As long 
as the cache rev ID matches
// and it reflects the job's triggering change, 
then it is usable.
-   $parserOutput = 
ParserCache::singleton()->getDirty( $page, $parserOptions );
+   $parserCache = 
MediaWikiServices::getInstance()->getParserCache();
+   $parserOutput = $parserCache->getDirty( $page, 
$parserOptions );
if ( !$parserOutput
|| $parserOutput->getCacheRevisionId() 
!= $revision->getId()
|| $parserOutput->getCacheTime() < 
$skewedTimestamp
@@ -234,7 +235,8 @@
&& $parserOutput->isCacheable()
) {
$ctime = wfTimestamp( TS_MW, (int)$start ); // 
cache time
-   ParserCache::singleton()->save(
+   $parserCache = 
MediaWikiServices::getInstance()->getParserCache();
+   $parserCache->save(
$parserOutput, $page, $parserOptions, 
$ctime, $revision->getId()
);
}
diff --git a/includes/page/Article.php b/includes/page/Article.php
index f52cd8d..5b03a22 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -466,7 +466,7 @@
# Allow frames by default
$outputPage->allowClickjacking();
 
-   $parserCache = ParserCache::singleton();
+   $parserCache = 
MediaWikiServices::getInstance()->getParserCache();
 
$parserOptions = $this->getParserOptions();
# Render printable version, use printable version cache
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index bf8a597..bb414b1 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -1070,7 +1070,7 @@
}
 
if ( $useParserCache ) {
-   $parserOutput = ParserCache::singleton()->get( $this, 
$parserOptions );
+   $parserOutput = 
MediaWikiServices::getInstance()->getParserCache()->get( $this, $parserOptions 
);
if ( $parserOutput !== false ) {
return $parserOutput;
}
@@ -2162,7 +2162,7 @@
 
// Save it to the parser cache.
// Make sure the cache time matches page_touched to avoid 
double parsing.
-   ParserCache::singleton()->save(
+   MediaWikiServices::getInstance()->getParserCache()->save(
$editInfo->output, $this, $editInfo->popts,
$revision->getTimestamp(), $editInfo->revid
);
diff --git a/includes/poolcounter/PoolWorkArticleView.php 
b/includes/poolcounter/PoolWorkArticleView.php
index 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: registration: Improve error message for invalid "callback" i...

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376338 )

Change subject: registration: Improve error message for invalid "callback" in 
extension.json
..


registration: Improve error message for invalid "callback" in extension.json

Getting the following error for an invalid callback is not helpful:
Warning: Invalid argument: function: class not found in
/includes/registration/ExtensionRegistry.php on line 335

Change-Id: I4dfc011cb0a5cd06f1836d73e58f407d468e4546
---
M includes/registration/ExtensionRegistry.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index eac04a9..bf33c6c 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -332,6 +332,12 @@
}
 
foreach ( $info['callbacks'] as $name => $cb ) {
+   if ( !is_callable( $cb ) ) {
+   if ( is_array( $cb ) ) {
+   $cb = '[ ' . implode( ', ', $cb ) . ' 
]';
+   }
+   throw new UnexpectedValueException( "callback 
'$cb' is not callable" );
+   }
call_user_func( $cb, $info['credits'][$name] );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dfc011cb0a5cd06f1836d73e58f407d468e4546
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
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...GuidedTour[master]: Add documentation for 'autoFocus' and 'width'

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376854 )

Change subject: Add documentation for 'autoFocus' and 'width'
..


Add documentation for 'autoFocus' and 'width'

Change-Id: I7b3b4d0bfb0304a2e57355738fd88385ce40b589
---
M modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js 
b/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
index cb157a4..eab25f1 100644
--- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
+++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
@@ -99,6 +99,8 @@
 *  format as position.  The values within the structure can also be 
selectors or
 *  jQuery-wrapped nodes.
 *
+* @param {Number} [stepSpec.width=400] Width, in pixels.
+*
 * @param {Function} [stepSpec.onShow] Function to execute immediately
 *  before the guider is shown.  Using this for gt.parseDescription or
 *  gt.getPageAsDescription is deprecated.  However, a string value of 
description
@@ -119,6 +121,11 @@
 *
 * To suppress this, set allowAutomaticNext to false for the step.
 *
+* @param {boolean} [stepSpec.autoFocus=true] By default, the browser 
will scroll
+* to make the guider visible.
+*
+* To avoid this, set autoFocus to false for the step.
+*
 * @param {boolean} [stepSpec.closeOnClickOutside=true] Close the
 *  guider when the user clicks elsewhere on screen
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b3b4d0bfb0304a2e57355738fd88385ce40b589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Swalling 
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...GuidedTour[master]: Add documentation for 'autoFocus' and 'width'

2017-09-08 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376854 )

Change subject: Add documentation for 'autoFocus' and 'width'
..

Add documentation for 'autoFocus' and 'width'

Change-Id: I7b3b4d0bfb0304a2e57355738fd88385ce40b589
---
M modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour 
refs/changes/54/376854/1

diff --git a/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js 
b/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
index cb157a4..eab25f1 100644
--- a/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
+++ b/modules/ext.guidedTour.lib/ext.guidedTour.lib.TourBuilder.js
@@ -99,6 +99,8 @@
 *  format as position.  The values within the structure can also be 
selectors or
 *  jQuery-wrapped nodes.
 *
+* @param {Number} [stepSpec.width=400] Width, in pixels.
+*
 * @param {Function} [stepSpec.onShow] Function to execute immediately
 *  before the guider is shown.  Using this for gt.parseDescription or
 *  gt.getPageAsDescription is deprecated.  However, a string value of 
description
@@ -119,6 +121,11 @@
 *
 * To suppress this, set allowAutomaticNext to false for the step.
 *
+* @param {boolean} [stepSpec.autoFocus=true] By default, the browser 
will scroll
+* to make the guider visible.
+*
+* To avoid this, set autoFocus to false for the step.
+*
 * @param {boolean} [stepSpec.closeOnClickOutside=true] Close the
 *  guider when the user clicks elsewhere on screen
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b3b4d0bfb0304a2e57355738fd88385ce40b589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Make sure ACW gets loaded before VE

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376853 )

Change subject: Make sure ACW gets loaded before VE
..

Make sure ACW gets loaded before VE

Change-Id: Ie5045dd89ea2f3fb9d49c5871896f6fc0820617c
---
M puppet/modules/role/manifests/articlecreationworkflow.pp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/53/376853/1

diff --git a/puppet/modules/role/manifests/articlecreationworkflow.pp 
b/puppet/modules/role/manifests/articlecreationworkflow.pp
index b6bf67d..cd31439 100644
--- a/puppet/modules/role/manifests/articlecreationworkflow.pp
+++ b/puppet/modules/role/manifests/articlecreationworkflow.pp
@@ -3,5 +3,7 @@
 #
 # [1] https://www.mediawiki.org/wiki/Extension:ArticleCreationWorkflow
 class role::articlecreationworkflow {
-  mediawiki::extension { 'ArticleCreationWorkflow': }
+  mediawiki::extension { 'ArticleCreationWorkflow':
+  priority => $::LOAD_EARLY, # Must load before VisualEditor
+  }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix human search relvance survey sampling rates

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376852 )

Change subject: Fix human search relvance survey sampling rates
..


Fix human search relvance survey sampling rates

Sampling rates were accidentaly inverted, such that high
page view pages had higher sampling rates than low page
view pages. Fix the sampling rates, which should significantly
reduce the annoyance level by not showing repeatedly on
high volume pages.

Change-Id: I0af2e486703c1108324e8c251b88911777656d3e
---
M wmf-config/CirrusSearch-rel-survey.php
1 file changed, 18,549 insertions(+), 18,549 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0af2e486703c1108324e8c251b88911777656d3e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Urbanecm 
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]: Fix human search relvance survey sampling rates

2017-09-08 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376852 )

Change subject: Fix human search relvance survey sampling rates
..

Fix human search relvance survey sampling rates

Sampling rates were accidentaly inverted, such that high
page view pages had higher sampling rates than low page
view pages. Fix the sampling rates, which should significantly
reduce the annoyance level by not showing repeatedly on
high volume pages.

Change-Id: I0af2e486703c1108324e8c251b88911777656d3e
---
M wmf-config/CirrusSearch-rel-survey.php
1 file changed, 18,549 insertions(+), 18,549 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add Title::isValid method

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358423 )

Change subject: Add Title::isValid method
..


Add Title::isValid method

Make the notion of Title objects representing invalid titles explicit.

Bug: T165149
Change-Id: I89aaabdff9614fe63bd1244784a1d677dbc26f9e
---
M includes/Title.php
M tests/phpunit/includes/TitleTest.php
2 files changed, 78 insertions(+), 4 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index c97a42b..8cfeb88 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -253,6 +253,9 @@
 * Create a new Title from text, such as what one would find in a link. 
De-
 * codes any HTML entities in the text.
 *
+* Title objects returned by this method are guaranteed to be valid, and
+* thus return true from the isValid() method.
+*
 * @param string|int|null $text The link text; spaces, prefixes, and an
 *   initial ':' indicating the main namespace are accepted.
 * @param int $defaultNamespace The namespace to use if none is 
specified
@@ -283,6 +286,9 @@
 * rather than returning null.
 *
 * The exception subclasses encode detailed information about why the 
title is invalid.
+*
+* Title objects returned by this method are guaranteed to be valid, and
+* thus return true from the isValid() method.
 *
 * @see Title::newFromText
 *
@@ -500,10 +506,19 @@
 
/**
 * Create a new Title from a namespace index and a DB key.
-* It's assumed that $ns and $title are *valid*, for instance when
-* they came directly from the database or a special page name.
-* For convenience, spaces are converted to underscores so that
-* eg user_text fields can be used directly.
+*
+* It's assumed that $ns and $title are safe, for instance when
+* they came directly from the database or a special page name,
+* not from user input.
+*
+* No validation is applied. For convenience, spaces are normalized
+* to underscores, so that e.g. user_text fields can be used directly.
+*
+* @note This method may return Title objects that are "invalid"
+* according to the isValid() method. This is usually caused by
+* configuration changes: e.g. a namespace that was once defined is
+* no longer configured, or a character that was once allowed in
+* titles is now forbidden.
 *
 * @param int $ns The namespace of the article
 * @param string $title The unprefixed database key form
@@ -529,6 +544,10 @@
 * The parameters will be checked for validity, which is a bit slower
 * than makeTitle() but safer for user-provided data.
 *
+* Title objects returned by makeTitleSafe() are guaranteed to be valid,
+* that is, they return true from the isValid() method. If no valid 
Title
+* can be constructed from the input, this method returns null.
+*
 * @param int $ns The namespace of the article
 * @param string $title Database key form
 * @param string $fragment The link fragment (after the "#")
@@ -536,6 +555,9 @@
 * @return Title|null The new object, or null on an error
 */
public static function makeTitleSafe( $ns, $title, $fragment = '', 
$interwiki = '' ) {
+   // NOTE: ideally, this would just call makeTitle() and then 
isValid(),
+   // but presently, that means more overhead on a potential 
performance hotspot.
+
if ( !MWNamespace::exists( $ns ) ) {
return null;
}
@@ -778,6 +800,36 @@
}
 
/**
+* Returns true if the title is valid, false if it is invalid.
+*
+* Valid titles can be round-tripped via makeTitleSafe() and 
newFromText().
+* Invalid titles may get returned from makeTitle(), and it may be 
useful to
+* allow them to exist, e.g. in order to process log entries about 
pages in
+* namespaces that belong to extensions that are no longer installed.
+*
+* @note This method is relatively expensive. When constructing Title
+* objects that need to be valid, use an instantiator method that is 
guaranteed
+* to return valid titles, such as makeTitleSafe() or newFromText().
+*
+* @return bool
+*/
+   public function isValid() {
+   $ns = $this->getNamespace();
+
+   if ( !MWNamespace::exists( $ns ) ) {
+   return false;
+   }
+
+   try {
+ 

[MediaWiki-commits] [Gerrit] mediawiki...MwEmbedSupport[master]: Remove dead isAndroid2() code

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375861 )

Change subject: Remove dead isAndroid2() code
..


Remove dead isAndroid2() code

Android 2 is a Grade C browser which is no longer served any
JavaScript code. As such, this method always returns false.

Depends-On: Ia56b52160608f9cbc9aef67bb89d7db04ddf14ad
Change-Id: I15e97cdbbfcaa64a2466d759b4f5fd0af296a5b0
---
M MwEmbedModules/MwEmbedSupport/mediawiki/mediawiki.client.js
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/MwEmbedModules/MwEmbedSupport/mediawiki/mediawiki.client.js 
b/MwEmbedModules/MwEmbedSupport/mediawiki/mediawiki.client.js
index a66e2af..66ec0ca 100644
--- a/MwEmbedModules/MwEmbedSupport/mediawiki/mediawiki.client.js
+++ b/MwEmbedModules/MwEmbedSupport/mediawiki/mediawiki.client.js
@@ -32,9 +32,6 @@
mw.isAndroid40 = function(){
return ( navigator.userAgent.indexOf( 'Android 4.0') != -1 );
};
-   mw.isAndroid2 = function(){
-   return ( navigator.userAgent.indexOf( 'Android 2.') != -1 );
-   };
mw.isAndroid = function(){
return ( navigator.userAgent.indexOf( 'Android ') != -1 );
};
@@ -91,8 +88,7 @@
// Check for a mobile html5 user agent:
if ( mw.isIphone() ||
 mw.isIpod() ||
-mw.isIpad() ||
-mw.isAndroid2()
+mw.isIpad()
){
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15e97cdbbfcaa64a2466d759b4f5fd0af296a5b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MwEmbedSupport
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jdlrobson 
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...TimedMediaHandler[master]: Remove dead isAndroid2() code

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375862 )

Change subject: Remove dead isAndroid2() code
..


Remove dead isAndroid2() code

Android 2 is a Grade C browser which is no longer served any
JavaScript code. As such, this method always returns false.

Actual method to be removed in I15e97cdbbfcaa64a2.

Change-Id: Ia56b52160608f9cbc9aef67bb89d7db04ddf14ad
---
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
2 files changed, 2 insertions(+), 8 deletions(-)

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



diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
index 1e89ca0..14ba1cb 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -1698,8 +1698,7 @@
 * cases where a native player is dipalyed such as iPhone.
 */
isPersistantPlayBtn: function(){
-   return mw.isAndroid2() ||
-   ( mw.isIphone() && mw.config.get( 
'EmbedPlayer.iPhoneShowHTMLPlayScreen' ) );
+   return ( mw.isIphone() && mw.config.get( 
'EmbedPlayer.iPhoneShowHTMLPlayScreen' ) );
},
/**
 * Checks if native controls should be used
@@ -1723,7 +1722,7 @@
 
// Do some device detection devices that don't support 
overlays
// and go into full screen once play is clicked:
-   if( mw.isAndroid2() || mw.isIpod()  || mw.isIphone() ){
+   if( mw.isIpod()  || mw.isIphone() ){
return true;
}
 
diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
index e22fc85..1c2cae5 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
@@ -224,11 +224,6 @@
}
 
}
-   // For now if Android assume we support 
h264Native (FIXME
-   // test on real devices )
-   if ( mw.isAndroid2() ){
-   this.mediaPlayers.addPlayer( 
h264NativePlayer );
-   }
 
// Test for ogg
if ( dummyvid.canPlayType( 'video/ogg; 
codecs="theora, vorbis"' ) || 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia56b52160608f9cbc9aef67bb89d7db04ddf14ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
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] analytics...scripts[master]: Add codemirror-syntax-highlight beta feature

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376849 )

Change subject: Add codemirror-syntax-highlight beta feature
..


Add codemirror-syntax-highlight beta feature

Was deployed on July 5th and un-deployed and re-deployed and re-un-deployed
on later dates.

Change-Id: Ic5c89d836fa55c6dcb5a7b1295961a536b9300b4
---
M src/betafeatures/counts.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/betafeatures/counts.php b/src/betafeatures/counts.php
index d8d64f7..3b60da1 100755
--- a/src/betafeatures/counts.php
+++ b/src/betafeatures/counts.php
@@ -20,6 +20,7 @@
'visualeditor-newwikitext',
'twocolconflict',
'rcenhancedfilters',
+   'codemirror-syntax-highlight',
 );
 
 require_once( __DIR__ . '/../../lib/load.php' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5c89d836fa55c6dcb5a7b1295961a536b9300b4
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/scripts
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Niharika29 
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...CentralNotice[master]: Use consistent close icon

2017-09-08 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376851 )

Change subject: Use consistent close icon
..

Use consistent close icon

Bug: T50067
Change-Id: I0973549d96681441241285b168c3931ad67addea
---
A resources/subscribing/close.png
M resources/subscribing/ext.centralNotice.display.css
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/51/376851/1

diff --git a/resources/subscribing/close.png b/resources/subscribing/close.png
new file mode 100644
index 000..5e7d085
--- /dev/null
+++ b/resources/subscribing/close.png
Binary files differ
diff --git a/resources/subscribing/ext.centralNotice.display.css 
b/resources/subscribing/ext.centralNotice.display.css
index 3c4cb0a..1cb8f34 100644
--- a/resources/subscribing/ext.centralNotice.display.css
+++ b/resources/subscribing/ext.centralNotice.display.css
@@ -8,10 +8,10 @@
display: inline-block;
zoom: 1;
/* @embed */
-   background: url( CloseWindow19x19.png );
-   width: 19px;
-   height: 19px;
-   text-indent: 19px;
+   background: url( close.png ) no-repeat;
+   width: 20px;
+   height: 20px;
+   text-indent: 20px;
white-space: nowrap;
overflow: hidden;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0973549d96681441241285b168c3931ad67addea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP allow alternate configurations with 'variant' option

2017-09-08 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376850 )

Change subject: WIP allow alternate configurations with 'variant' option
..

WIP allow alternate configurations with 'variant' option

TODO: wire up 'variant' option from GatewayPage and API.

Bug: T151769
Change-Id: Id00adb3323c4d0f907920d1ec86dcb75f13100b6
---
M README.txt
M extension.json
A gateway_common/ConfigurationReader.php
M gateway_common/gateway.adapter.php
4 files changed, 90 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/50/376850/1

diff --git a/README.txt b/README.txt
index 2b311f0..b7df06f 100644
--- a/README.txt
+++ b/README.txt
@@ -120,6 +120,17 @@
  */
 $wgDonationInterfaceCancelPage = 'Donate-error'
 
+/**
+ * If this is set to a valid directory path, yaml files under this path can
+ * potentially replace built-in config files. For example, if this is set to
+ * /etc/di_alt/, and query string variable 'variant' has value 'nostate',
+ * then /etc/di_alt/nostate/globalcollect/country_fields.yaml will be used
+ * instead of the built-in globalcollect_gateway/config/country_fields.yaml.
+ * Superseded files will be completely ignored, so copy and modify originals.
+ * Only latin letters, numbers, and underscores are allowed in variant.
+ */
+$wgDonationInterfaceVariantConfigurationDirectory = false
+
  Debug and logging 
 
 $wgDonationInterfaceDisplayDebug = false
diff --git a/extension.json b/extension.json
index e611531..40e057f 100644
--- a/extension.json
+++ b/extension.json
@@ -70,6 +70,7 @@
"ArrayHelper": "gateway_common/ArrayHelper.php",
"FiscalNumber": "gateway_common/FiscalNumber.php",
"ClientSideValidationHelper": 
"gateway_common/ClientSideValidationHelper.php",
+   "ConfigurationReader": "gateway_common/ConfigurationReader.php",
"ContributionTrackingPlusUnique": 
"gateway_common/ContributionTrackingPlusUnique.php",
"CountryValidation": "gateway_common/CountryValidation.php",
"CurrencyRatesModule": "modules/CurrencyRatesModule.php",
@@ -325,6 +326,7 @@
"DonationInterfaceThankYouPage": "Donate-thanks",
"DonationInterfaceFailPage": "Donate-error",
"DonationInterfaceCancelPage": "Donate-cancel",
+   "DonationInterfaceVariantConfigurationDirectory": false,
"DonationInterfaceRetryLoopCount": 3,
"DonationInterfaceOrphanCron": {
"enable": true,
diff --git a/gateway_common/ConfigurationReader.php 
b/gateway_common/ConfigurationReader.php
new file mode 100644
index 000..4718265
--- /dev/null
+++ b/gateway_common/ConfigurationReader.php
@@ -0,0 +1,68 @@
+baseDirectory = $baseDirectory;
+   $this->variantBaseDirectory = $variantBaseDirectory;
+   $this->gatewayIdentifier = $gatewayIdentifier;
+   }
+
+   public function readConfiguration( $variant = null ) {
+   $config = $this->setConfigurationFromDirectory(
+   $this->baseDirectory . DIRECTORY_SEPARATOR . 'config'
+   );
+   if (
+   $variant &&
+   $this->variantBaseDirectory &&
+   preg_match( '/^[a-zA-Z0-9_]$/', $variant )
+   ) {
+   $variantDirectory = implode(
+   DIRECTORY_SEPARATOR,
+   [
+   $this->variantBaseDirectory,
+   $variant,
+   $this->gatewayIdentifier
+   ]
+   );
+   if ( is_dir( $variantDirectory ) ) {
+   $config = $this->setConfigurationFromDirectory(
+   $variantDirectory, $config
+   );
+   }
+   }
+   return $config;
+   }
+
+   protected function setConfigurationFromDirectory( $directory, $config = 
[] ) {
+   $yaml = new Parser();
+   $globPattern = $directory . DIRECTORY_SEPARATOR . '*.yaml';
+   foreach ( glob( $globPattern ) as $path ) {
+   $pieces = explode( DIRECTORY_SEPARATOR, $path );
+   $key = substr( array_pop( $pieces ), 0, -5 );
+   $config[$key] = $yaml->parse( file_get_contents( $path 
) );
+   }
+   return $config;
+   }
+}
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 7365e7a..880f6db 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -24,7 +24,6 @@
 use 

[MediaWiki-commits] [Gerrit] analytics...scripts[master]: Add codemirror-syntax-highlight beta feature

2017-09-08 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376849 )

Change subject: Add codemirror-syntax-highlight beta feature
..

Add codemirror-syntax-highlight beta feature

Was deployed on July 5th and un-deployed and re-deployed and re-un-deployed
on later dates.

Change-Id: Ic5c89d836fa55c6dcb5a7b1295961a536b9300b4
---
M src/betafeatures/counts.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/scripts 
refs/changes/49/376849/1

diff --git a/src/betafeatures/counts.php b/src/betafeatures/counts.php
index d8d64f7..3b60da1 100755
--- a/src/betafeatures/counts.php
+++ b/src/betafeatures/counts.php
@@ -20,6 +20,7 @@
'visualeditor-newwikitext',
'twocolconflict',
'rcenhancedfilters',
+   'codemirror-syntax-highlight',
 );
 
 require_once( __DIR__ . '/../../lib/load.php' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5c89d836fa55c6dcb5a7b1295961a536b9300b4
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/scripts
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleCreationWorkflow[master]: Add empty metadata to en.json

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376753 )

Change subject: Add empty metadata to en.json
..


Add empty metadata to en.json

Needed for banana to pass

Change-Id: Ibcc9b9a62a9b8c33a35b504303c03124e69b6ddc
---
M i18n/en.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 19e030c..656951b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,3 +1,4 @@
 {
+   "@metadata": {},
"acw-desc": "Customizes new page creation experience for new users"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcc9b9a62a9b8c33a35b504303c03124e69b6ddc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleCreationWorkflow
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Siebrand 
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...parsoid[master]: T173061: Caption splitting on pipe entity

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376752 )

Change subject: T173061: Caption splitting on pipe entity
..


T173061: Caption splitting on pipe entity

Change-Id: I03585a3b2688974256bd0f6c84edff70417dbab8
---
M lib/wt2html/tt/LinkHandler.js
M tests/parserTests.txt
2 files changed, 21 insertions(+), 1 deletion(-)

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



diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 50dd701..554f5f4 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -952,6 +952,12 @@
// if this is a nowiki, we must be in a caption
return null;
}
+   // Similar to Util.tokensToString()'s includeEntities
+   if (Util.isEntitySpanToken(currentToken)) {
+   resultStr += currentToken.dataAttribs.src;
+   skipToEndOf = 'span';
+   continue;
+   }
if (currentToken.name === 'a') {
if (optInfo === undefined) {
optInfo = getOptionInfo(prefix + 
resultStr, env);
@@ -1623,7 +1629,7 @@
if (Array.isArray(origOptSrc) && origOptSrc.length === 1) {
origOptSrc = origOptSrc[0];
}
-   oText = Util.tokensToString(oContent.v, true);
+   oText = Util.tokensToString(oContent.v, true, { 
includeEntities: true });
 
if (oText.constructor !== String) {
// Might be that this is a valid option whose value is 
just
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 0e4092e..2c8ee4e 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -14246,6 +14246,20 @@
 !! end
 
 !! test
+Image caption with pipe entity
+!! wikitext
+[[File:Foobar.jpg|thumb|one  two]]
+[[File:Foobar.jpg|thumb|one ''two''  three]]
+!! html/php
+http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
one  two
+http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
one two  
three
+
+!! html/parsoid
+one | 
two
+one two | three
+!! end
+
+!! test
 Allow empty links in image captions (T62753)
 !! options
 thumbsize=220

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03585a3b2688974256bd0f6c84edff70417dbab8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
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]: openstack: designate as module/profile/role

2017-09-08 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376848 )

Change subject: openstack: designate as module/profile/role
..

openstack: designate as module/profile/role

Bug: T171494
Change-Id: Ib66fdb449af65f8c3608a6d225ee80976f4acd7d
---
M hieradata/codfw/profile/openstack/labtestn.yaml
M hieradata/codfw/profile/openstack/labtestn/designate.yaml
A hieradata/codfw/profile/openstack/labtestn/pdns.yaml
A hieradata/common/profile/openstack/base/designate.yaml
A hieradata/common/profile/openstack/base/pdns.yaml
D modules/openstack/manifests/designate/service.pp
R modules/openstack2/files/designate/designate-mdns.logrotate
R modules/openstack2/files/designate/designate-pool-manager.logrotate
R modules/openstack2/files/liberty/designate/dashboard/_70_dns_add_group.py
R modules/openstack2/files/liberty/designate/dashboard/_71_dns_project.py
R modules/openstack2/files/liberty/designate/dashboard/__init__.py
R 
modules/openstack2/files/liberty/designate/nova_fixed_multi.egg-info/entry_points.txt
R modules/openstack2/files/liberty/designate/nova_fixed_multi/__init__.py
R modules/openstack2/files/liberty/designate/nova_fixed_multi/base.py
R modules/openstack2/files/liberty/designate/nova_fixed_multi/novamulti.py
R modules/openstack2/files/liberty/designate/policy.json
R modules/openstack2/files/liberty/designate/rootwrap.conf
R modules/openstack2/files/liberty/designate/wmf_sink.egg-info/entry_points.txt
R modules/openstack2/files/liberty/designate/wmf_sink/__init__.py
R modules/openstack2/files/liberty/designate/wmf_sink/base.py
R modules/openstack2/files/liberty/designate/wmf_sink/wmfsink.py
A modules/openstack2/manifests/designate/monitor.pp
A modules/openstack2/manifests/designate/service.pp
A modules/openstack2/templates/initscripts/designate-mdns.upstart.erb
A modules/openstack2/templates/initscripts/designate-pool-manager.upstart.erb
R modules/openstack2/templates/liberty/designate/api-paste.ini.erb
R modules/openstack2/templates/liberty/designate/designate.conf.erb
A modules/profile/manifests/openstack/base/designate/service.pp
A modules/profile/manifests/openstack/base/designate/service.pp.save
A modules/profile/manifests/openstack/labtestn/designate/service.pp
M modules/role/manifests/wmcs/openstack/labtestn/services.pp
31 files changed, 426 insertions(+), 240 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/376848/1

diff --git a/hieradata/codfw/profile/openstack/labtestn.yaml 
b/hieradata/codfw/profile/openstack/labtestn.yaml
index b60b6d9..c44108b 100644
--- a/hieradata/codfw/profile/openstack/labtestn.yaml
+++ b/hieradata/codfw/profile/openstack/labtestn.yaml
@@ -2,8 +2,9 @@
 profile::openstack::labtestn::nova_controller: 
'labtestcontrol2003.wikimedia.org'
 profile::openstack::labtestn::nova_controller_standby: 
'labtestcontrol2003.wikimedia.org'
 profile::openstack::labtestn::nova_api_host: 'labtestcontrol2003.wikimedia.org'
-profile::openstack::labtestn::designate_host: 
'labtestservices2003.wikimedia.org'
+profile::openstack::labtestn::designate_host: 
'labtestcontrol2003.wikimedia.org'
 profile::openstack::labtestn::designate_host_standby: 
'labtestservices2003.wikimedia.org'
+profile::openstack::labtestn::puppetmaster_hostname: 
'labtestpuppetmaster2001.wikimedia.org'
 profile::openstack::labtestn::labs_hosts_range: '127.0.0.1/32'
 profile::openstack::labtestn::horizon_host: 'labtestweb2001.wikimedia.org'
 profile::openstack::labtestn::spice_hostname: 'labtestnspice.wikimedia.org'
diff --git a/hieradata/codfw/profile/openstack/labtestn/designate.yaml 
b/hieradata/codfw/profile/openstack/labtestn/designate.yaml
index e718654..f55192c 100644
--- a/hieradata/codfw/profile/openstack/labtestn/designate.yaml
+++ b/hieradata/codfw/profile/openstack/labtestn/designate.yaml
@@ -1 +1,4 @@
 profile::openstack::labtestn::designate::wmflabsdotorg_project: 'wmflabsdotorg'
+profile::openstack::labtestn::designate::db_host: 
'labtestcontrol2003.wikimedia.org'
+profile::openstack::labtestn::designate::domain_id_internal_forward: 
'e1ac328c-b932-43f2-b12f-407fb9477925'
+profile::openstack::labtestn::designate::domain_id_internal_reverse: 
'9b60f3ab-d64b-4e30-9d6f-7535811b0fa8'
diff --git a/hieradata/codfw/profile/openstack/labtestn/pdns.yaml 
b/hieradata/codfw/profile/openstack/labtestn/pdns.yaml
new file mode 100644
index 000..43bf683
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtestn/pdns.yaml
@@ -0,0 +1,4 @@
+profile::openstack::labtestn::pdns::host: 'labtest-ns0.wikimedia.org'
+profile::openstack::labtestn::pdns::host_secondary: 'labtest-ns0.wikimedia.org'
+profile::openstack::labtestn::pdns::recursor: 'labtest-recursor0.wikimedia.org'
+profile::openstack::labtestn::pdns::recursor_secondary: 
'labtest-recursor0.wikimedia.org' 
diff --git a/hieradata/common/profile/openstack/base/designate.yaml 
b/hieradata/common/profile/openstack/base/designate.yaml
new 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: logstash: Enable ferm port 5229 and enable tcp input

2017-09-08 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376836 )

Change subject: logstash: Enable ferm port 5229 and enable tcp input 
..

logstash: Enable ferm port 5229 and enable tcp input 

Change-Id: I5562a101508150d594e47d4e7de2e5f4cef568f2
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/376836/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5562a101508150d594e47d4e7de2e5f4cef568f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 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] mediawiki...Wikibase[master]: [WIP] Add a mw.wikibase.getAllStatements Lua function

2017-09-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376838 )

Change subject: [WIP] Add a mw.wikibase.getAllStatements Lua function
..

[WIP] Add a mw.wikibase.getAllStatements Lua function

Currently there is only a getBestStatement. There is no alternative to
get the other statements, except fetching the entire entity. This is
bad because this is usage tracked as "all" usage.

WIP because:
* Missing tests.
* I suggest to swap the parameter order, but this is in conflict with
  the existing function.

Change-Id: Iddfc271df83501eda8a44b0031f3937533b4d878
---
M client/includes/DataAccess/Scribunto/EntityAccessor.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/DataAccess/Scribunto/mw.wikibase.lua
M docs/lua.wiki
4 files changed, 66 insertions(+), 13 deletions(-)


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

diff --git a/client/includes/DataAccess/Scribunto/EntityAccessor.php 
b/client/includes/DataAccess/Scribunto/EntityAccessor.php
index 6a48c09..13b0fef 100644
--- a/client/includes/DataAccess/Scribunto/EntityAccessor.php
+++ b/client/includes/DataAccess/Scribunto/EntityAccessor.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Client\DataAccess\Scribunto;
 
+use InvalidArgumentException;
 use Language;
 use Serializers\Serializer;
 use Wikibase\Client\Serializer\ClientEntitySerializer;
@@ -151,10 +152,11 @@
 *
 * @param string $prefixedEntityId
 * @param string $propertyIdSerialization
+* @param string $rank Either "best" (default) or "all".
 *
 * @return array|null
 */
-   public function getEntityStatement( $prefixedEntityId, 
$propertyIdSerialization ) {
+   public function getEntityStatement( $prefixedEntityId, 
$propertyIdSerialization, $rank ) {
$prefixedEntityId = trim( $prefixedEntityId );
$entityId = $this->entityIdParser->parse( $prefixedEntityId );
 
@@ -173,18 +175,21 @@
return null;
}
 
-   if ( $entityObject === null ) {
+   if ( !( $entityObject instanceof StatementListProvider ) ) {
return null;
}
 
-   $statements = $entityObject->getStatements();
+   $statements = $entityObject->getStatements()->getByPropertyId( 
$propertyId );
 
-   $statementsProp = $statements->getByPropertyId( $propertyId );
-   $statementsRanked = $statementsProp->getBestStatements();
-   $statementArr = 
$this->newClientStatementListSerializer()->serialize( $statementsRanked );
-   $this->renumber( $statementArr );
+   if ( $rank === 'best' ) {
+   $statements = $statements->getBestStatements();
+   } elseif ( $rank !== 'all' ) {
+   throw new InvalidArgumentException( "Invalid rank 
\"$rank\"" );
+   }
 
-   return $statementArr;
+   $serialization = 
$this->newClientStatementListSerializer()->serialize( $statements );
+   $this->renumber( $serialization );
+   return $serialization;
}
 
private function newClientEntitySerializer() {
diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 5b56291..daa765a 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -298,6 +298,7 @@
'getLabel' => [ $this, 'getLabel' ],
'getEntity' => [ $this, 'getEntity' ],
'getEntityStatement' => [ $this, 'getEntityStatement' ],
+   'getAllStatements' => [ $this, 'getAllStatements' ],
'getSetting' => [ $this, 'getSetting' ],
'getEntityUrl' => [ $this, 'getEntityUrl' ],
'renderSnak' => [ $this, 'renderSnak' ],
@@ -350,16 +351,17 @@
 *
 * @param string $prefixedEntityId
 * @param string $propertyId
+* @param string $rank Either "best" (default) or "all".
 *
 * @throws ScribuntoException
 * @return array
 */
-   public function getEntityStatement( $prefixedEntityId, $propertyId ) {
+   public function getEntityStatement( $prefixedEntityId, $propertyId, 
$rank = 'best' ) {
$this->checkType( 'getEntityStatement', 1, $prefixedEntityId, 
'string' );
$this->checkType( 'getEntityStatement', 2, $propertyId, 
'string' );
 
try {
-   $statements = 
$this->getEntityAccessor()->getEntityStatement( $prefixedEntityId, $propertyId 
);
+  

[MediaWiki-commits] [Gerrit] mediawiki...FileImporter[master]: [WIP] Enable edit summary field when changes have been made

2017-09-08 Thread Andrew-WMDE (Code Review)
Andrew-WMDE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376828 )

Change subject: [WIP] Enable edit summary field when changes have been made
..

[WIP] Enable edit summary field when changes have been made

Bug: T160184
Change-Id: I291af512a08ffaa53a87a9d3f654bf017fb8da4b
---
M src/Data/ImportPlan.php
M src/Html/ImportPreviewPage.php
2 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileImporter 
refs/changes/28/376828/1

diff --git a/src/Data/ImportPlan.php b/src/Data/ImportPlan.php
index 3f83a56..82367f9 100644
--- a/src/Data/ImportPlan.php
+++ b/src/Data/ImportPlan.php
@@ -99,6 +99,13 @@
}
 
/**
+* @return boolean
+*/
+   public function wasFileNameChanged() {
+   return $this->details->getSourceLinkTarget()->getText() !== 
$this->getTitle()->getText();
+   }
+
+   /**
 * @return string
 */
public function getFileExtension() {
@@ -118,4 +125,12 @@
return 
$this->getDetails()->getTextRevisions()->getLatest()->getField( '*' );
}
 
+   /**
+* @return boolean
+*/
+   public function wasFileInfoTextChanged() {
+   return $this->getFileInfoText() !== 
$this->getDetails()->getTextRevisions()->getLatest()
+   ->getField( '*' );
+   }
+
 }
diff --git a/src/Html/ImportPreviewPage.php b/src/Html/ImportPreviewPage.php
index 0425e85..e3a3365 100644
--- a/src/Html/ImportPreviewPage.php
+++ b/src/Html/ImportPreviewPage.php
@@ -44,6 +44,8 @@
$details = $this->importPlan->getDetails();
$request = $this->importPlan->getRequest();
$title = $this->importPlan->getTitle();
+   $wasEdited = $this->importPlan->wasFileNameChanged() ||
+$this->importPlan->wasFileInfoTextChanged();
 
$importIdentityFormSnippet = ( new ImportIdentityFormSnippet( [
'clientUrl' => $request->getUrl(),
@@ -176,6 +178,7 @@
[
'classes' => [ 'mw-importfile-import-summary' ],
'placeholder' => ( new Message( 
'fileimporter-editsummary-placeholder' ) )->plain(),
+   'disabled' => !$wasEdited,
]
) .
$importIdentityFormSnippet .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I291af512a08ffaa53a87a9d3f654bf017fb8da4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileImporter
Gerrit-Branch: master
Gerrit-Owner: Andrew-WMDE 

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


[MediaWiki-commits] [Gerrit] mediawiki...News[master]: Check Title::canHaveTalkPage before calling getTalkPage()

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370326 )

Change subject: Check Title::canHaveTalkPage before calling getTalkPage()
..


Check Title::canHaveTalkPage before calling getTalkPage()

Bug: T172146
Change-Id: Iba8616448b8219109277e24d1af10345c49b5ee9
---
M NewsRenderer.php
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/NewsRenderer.php b/NewsRenderer.php
index 50057bc..8db7151 100644
--- a/NewsRenderer.php
+++ b/NewsRenderer.php
@@ -380,6 +380,11 @@
return $html;
}
 
+   /**
+* @param FeedItem $item
+*
+* @return string
+*/
function renderFeedItem( $item ) {
global $wgContLang;
 
@@ -401,9 +406,9 @@
$html .= $item->raw_text;
$html .= '';
$html .= '';
-   if ( $item->getComments() ) {
+   if ( $item->getComments() && $item->comment_object ) {
$html .= '(';
-   $html .= ''.htmlspecialchars($item->title_object->getTalkPage()->getPrefixedText()).'';
+   $html .= ''.htmlspecialchars( 
$item->comment_object->getPrefixedText() ).'';
$html .= ')';
}
$html .= '';
@@ -458,8 +463,7 @@
 
//XXX: ugly hack - things used by preview
$item->raw_text = $text; //needed because FeedItem holds text 
html-encoded internally. wtf
-   $item->raw_comment = $title->getTalkPage()->getFullURL(); 
//needed because FeedItem holds text html-encoded internally. wtf
-   $item->raw_title = $name; //needed because FeedItem holds text 
html-encoded internally. wtf
+   $item->comment_object = $title->canHaveTalkPage() ? 
$title->getTalkPage() : null; //needed because FeedItem holds text html-encoded 
internally. wtf
$item->title_object = $title; //title object
return $item;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba8616448b8219109277e24d1af10345c49b5ee9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/News
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Aaron Schulz 
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]: RCFilters: Remove getValue and use FormOptions

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376793 )

Change subject: RCFilters: Remove getValue and use FormOptions
..


RCFilters: Remove getValue and use FormOptions

Ensure the default is boolean, then FormOptions will
do the rest for us.

Bug: T174725
Change-Id: I92f2f77e1225f536a38f592578012855b948050c
---
M includes/changes/ChangesListBooleanFilter.php
1 file changed, 8 insertions(+), 14 deletions(-)

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



diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index dd62d7f..2a7ba88 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -127,7 +127,7 @@
}
 
if ( isset( $filterDefinition['default'] ) ) {
-   $this->defaultValue = $filterDefinition['default'];
+   $this->setDefault( $filterDefinition['default'] );
} else {
throw new MWException( 'You must set a default' );
}
@@ -156,12 +156,14 @@
}
 
/**
-* Sets default
+* Sets default.  It must be a boolean.
+*
+* It will be coerced to boolean.
 *
 * @param bool $defaultValue
 */
public function setDefault( $defaultValue ) {
-   $this->defaultValue = $defaultValue;
+   $this->defaultValue = (bool)$defaultValue;
}
 
/**
@@ -235,11 +237,11 @@
 * @inheritDoc
 */
public function isSelected( FormOptions $opts ) {
-   return !$this->getValue( $opts ) &&
+   return !$opts[ $this->getName() ] &&
array_filter(
$this->getSiblings(),
function ( ChangesListBooleanFilter $sibling ) 
use ( $opts ) {
-   return $sibling->getValue( $opts );
+   return $opts[ $sibling->getName() ];
}
);
}
@@ -254,14 +256,6 @@
return false;
}
 
-   return $this->getValue( $opts ) === $this->activeValue;
-   }
-
-   /**
-* @param FormOptions $opts
-* @return bool The current value of this filter according to $opts but 
coerced to boolean
-*/
-   public function getValue( FormOptions $opts ) {
-   return (bool)$opts[ $this->getName() ];
+   return $opts[ $this->getName() ] === $this->activeValue;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92f2f77e1225f536a38f592578012855b948050c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
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...source[master]: Placeholder for job to create page ids viewed in each session.

2017-09-08 Thread Shilad Sen (Code Review)
Shilad Sen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376797 )

Change subject: Placeholder for job to create page ids viewed in each session.
..

Placeholder for job to create page ids viewed in each session.

Trying to make sure gerrit is setup, the nav-vectors branch works
properly, and it can be run and built interactively on the server.

Bug: T174796
Change-Id: Ifec6df906e03846aef63fd7f918f194dfcfabc11
---
A 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/vectors/SessionPagesBuilder.scala
1 file changed, 327 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source 
refs/changes/97/376797/1

diff --git 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/vectors/SessionPagesBuilder.scala
 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/vectors/SessionPagesBuilder.scala
new file mode 100644
index 000..7ab9efc
--- /dev/null
+++ 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/vectors/SessionPagesBuilder.scala
@@ -0,0 +1,327 @@
+package org.wikimedia.analytics.refinery.job.vectors
+
+/**
+  * Process to create a page view session log.
+  *
+  * Eventually this will create output files with one line per session.
+  * The first two tokens of each line will be the session start timestamp and 
language edition.
+  * The following tokens are the page ids viewed in the session, in order.
+  *
+  * This is a work in progress started by taking some of joal's work in 
ClickStreamBuilder.
+  *
+  * @author Shilad Sen
+  */
+object SessionPagesBuilder {
+
+
+  import org.apache.spark.sql.hive.HiveContext
+  import org.apache.spark.SparkConf
+  import org.apache.spark.sql.SaveMode
+  import org.apache.spark.SparkContext
+  import scopt.OptionParser
+  import org.apache.spark.rdd.RDD
+  import org.apache.spark.sql.SQLContext
+
+  case class PageInfo(
+   wikiDb: String,
+   pageId: Long,
+   pageTitle: String,
+   pageNamespace: Long,
+   pageIsRedirect: Boolean
+ )
+
+  case class Redirect(
+   wikiDb: String,
+   fromPageId: Long,
+   toPageId: Long
+ )
+
+  /**
+* Steps:
+*  - prepare raw tables:
+*- page
+*  Keep only wiki_db, page_id, page_namespace, page_is_redirect, 
page_title
+*  Insert fake values used later
+*- redirect
+*  Join with page (from and to) to clean and denormalize
+*- pagelinks
+*  Join with page (from and to) to clean and denormalize
+*  Join with redirect to resolve directs
+*  Take distinct instances
+*  - Get data from Webrequest:
+*- (prev[referer/referer_class parsing], curr[page_title], type, count)
+*  - Joint with pages (namespace 0 only)
+*  - Joint with redirect (resolved)
+*  - Annotated (type)
+*- Save (title_prev, title_to, type, count)
+*  - Joint with page for titles (+ no redirects, only namespace 0, and 
no from = to)
+*/
+
+
+
+  def listToSQLInCondition(list: Seq[String]): String = list.map(w => 
s"'$w'").mkString(", ")
+
+  /**
+* Prepare a map linking project hostnames to project dbnames.
+* @return A map[hostname -> dbname]
+*/
+  def prepareProjectToWikiMap(
+   sqlContext: SQLContext,
+   projectNamespaceTable: String,
+   snapshot: String,
+   wikiList: Seq[String]
+ ): Map[String, String] = {
+sqlContext.sql(
+  s"""
+ |SELECT DISTINCT
+ |  hostname,
+ |  dbname
+ |FROM $projectNamespaceTable
+ |WHERE snapshot = '$snapshot'
+ |  AND dbname IN (${listToSQLInCondition(wikiList)})
+""".stripMargin).
+  rdd.
+  collect.
+  map(r => r.getString(0) -> r.getString(1)).toMap
+  }
+
+  /**
+* Prepare the pages dataset to be reused
+* @return A RDD of PageInfo data augmented with fake pages for each wiki
+*/
+  def preparePages(
+sqlContext: SQLContext,
+pageTable: String,
+snapshot: String,
+wikiList: Seq[String]
+  ): RDD[PageInfo] = {
+sqlContext.sql(s"""
+  |SELECT
+  |  wiki_db,
+  |  page_id,
+  |  page_title,
+  |  page_namespace,
+  |  page_is_redirect
+  |FROM $pageTable
+  |WHERE snapshot = '$snapshot'
+  |  AND wiki_db IN (${listToSQLInCondition(wikiList)})
+  |  AND page_id IS NOT NULL
+  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WIP: RCFilters: Keep the default for replaced filters, but a...

2017-09-08 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376794 )

Change subject: WIP: RCFilters: Keep the default for replaced filters, but 
allow override
..

WIP: RCFilters: Keep the default for replaced filters, but allow override

E.g. hidenondamaging (ORES legacy) always defaults to false if you are
using the new UI, regardless of preferences.

However, before 6314a9026f9b404928e96a883c6ace7e491e891b you
could still override this.

Bug: T162158
Change-Id: I27302664ec3baec319814cf0e80d02172b2b1a86
---
M includes/changes/ChangesListBooleanFilter.php
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/376794/1

diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index de5faaa..6d420c9 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -252,10 +252,6 @@
 * @return bool Whether this filter should be considered active
 */
public function isActive( FormOptions $opts, $isStructuredUI ) {
-   if ( $this->isReplacedInStructuredUi && $isStructuredUI ) {
-   return false;
-   }
-
return $opts[ $this->getName() ] === $this->activeValue;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Remove getValue and use FormOptions

2017-09-08 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376793 )

Change subject: RCFilters: Remove getValue and use FormOptions
..

RCFilters: Remove getValue and use FormOptions

Bug: T174725
Change-Id: I92f2f77e1225f536a38f592578012855b948050c
---
M includes/changes/ChangesListBooleanFilter.php
1 file changed, 8 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/376793/1

diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index dd62d7f..de5faaa 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -127,7 +127,7 @@
}
 
if ( isset( $filterDefinition['default'] ) ) {
-   $this->defaultValue = $filterDefinition['default'];
+   $this->setDefault( $filterDefinition['default'] );
} else {
throw new MWException( 'You must set a default' );
}
@@ -156,12 +156,14 @@
}
 
/**
-* Sets default
+* Sets default.  It must be a boolean.
+*
+* It will be coerced to boolean.
 *
 * @param bool $defaultValue
 */
public function setDefault( $defaultValue ) {
-   $this->defaultValue = $defaultValue;
+   $this->defaultValue = (bool) $defaultValue;
}
 
/**
@@ -235,11 +237,11 @@
 * @inheritDoc
 */
public function isSelected( FormOptions $opts ) {
-   return !$this->getValue( $opts ) &&
+   return !$opts[ $this->getName() ] &&
array_filter(
$this->getSiblings(),
function ( ChangesListBooleanFilter $sibling ) 
use ( $opts ) {
-   return $sibling->getValue( $opts );
+   return $opts[ $sibling->getName() ];
}
);
}
@@ -254,14 +256,6 @@
return false;
}
 
-   return $this->getValue( $opts ) === $this->activeValue;
-   }
-
-   /**
-* @param FormOptions $opts
-* @return bool The current value of this filter according to $opts but 
coerced to boolean
-*/
-   public function getValue( FormOptions $opts ) {
-   return (bool)$opts[ $this->getName() ];
+   return $opts[ $this->getName() ] === $this->activeValue;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add logging for email blocks

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376792 )

Change subject: Add logging for email blocks
..

Add logging for email blocks

Bug: T175419
Change-Id: I0631001b3943fa81a1571d0f2ef062249326e84b
---
M wmf-config/CommonSettings.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fe6ff5d..dc2aa00 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2019,7 +2019,12 @@
 # # Hack to block emails from some user who likes 'The Joker' --Andrew 
2009-05-28
 $wgHooks['EmailUser'][] = function ( &$to, &$from, &$subject, &$text ) {
$blockedAddresses = [ 'the4jo...@gmail.com', 
'randomdude5...@gmail.com', 'siyang...@yahoo.com', 'johnnyw...@gmail.com', 
'wikifreedomfigh...@googlemail.com' ];
-   return !in_array( $from->address, $blockedAddresses );
+   $emailIsBlacklisted = in_array( $from->address, $blockedAddresses );
+   if ( $emailIsBlacklisted ) {
+   wfDebugLog( 'AdHocDebug', "Blocking email from 
{$from->address}" ); // T175419
+   }
+
+   return !$emailIsBlacklisted;
 };
 
 // ContributionTracking for handling PayPal redirects

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleCreationWorkflow[master]: Switch from AlternateEdit hook to CustomEditor hook

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376773 )

Change subject: Switch from AlternateEdit hook to CustomEditor hook
..


Switch from AlternateEdit hook to CustomEditor hook

Bug: T173605
Change-Id: I4991a1cb88d64bd4e63fa932fb01d6b15cb3b0ee
---
M extension.json
M includes/Hooks.php
M includes/Workflow.php
M tests/phpunit/WorkflowTest.php
4 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/extension.json b/extension.json
index 8309ffa..77506ea 100644
--- a/extension.json
+++ b/extension.json
@@ -10,7 +10,7 @@
"MediaWiki": ">= 1.30.0-alpha"
},
"Hooks": {
-   "AlternateEdit": 
"ArticleCreationWorkflow\\Hooks::onAlternateEdit",
+   "CustomEditor": 
"ArticleCreationWorkflow\\Hooks::onCustomEditor",
"ShowMissingArticle": 
"ArticleCreationWorkflow\\Hooks::onShowMissingArticle"
},
"AutoloadClasses": {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 08e8b2d..7d0460c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -2,38 +2,38 @@
 
 namespace ArticleCreationWorkflow;
 
-use EditPage;
 use MediaWiki\MediaWikiServices;
 use Article;
+use User;
 
 /**
  * Hook handlers
  */
 class Hooks {
/**
-* AlternateEdit hook handler
+* CustomEditor hook handler
 * Redirects users attempting to create pages to the landing page, 
based on configuration
 *
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/AlternateEdit
+* @see https://www.mediawiki.org/wiki/Manual:Hooks/CustomEditor
 *
-* @param EditPage $editPage
+* @param Article $article The requested page
+* @param User $user The user trying to load the editor
 * @return bool
 */
-   public static function onAlternateEdit( EditPage $editPage ) {
+   public static function onCustomEditor( Article $article, User $user ) {
$config = MediaWikiServices::getInstance()
->getConfigFactory()
->makeConfig( 'ArticleCreationWorkflow' );
$workflow = new Workflow( $config );
 
-   if ( $workflow->shouldInterceptEditPage( $editPage ) ) {
-   $title = $editPage->getTitle();
+   if ( $workflow->shouldInterceptEditPage( $article, $user ) ) {
+   $title = $article->getTitle();
// If the landing page didn't exist, we wouldn't have 
intercepted.
$redirTo = $workflow->getLandingPageTitle();
-   $output = $editPage->getContext()->getOutput();
+   $output = $article->getContext()->getOutput();
$output->redirect( $redirTo->getFullURL(
[ 'page' => $title->getPrefixedText(), 'wprov' 
=> 'acww1' ]
) );
-
return false;
}
 
@@ -54,14 +54,14 @@
->getConfigFactory()
->makeConfig( 'ArticleCreationWorkflow' );
$workflow = new Workflow( $config );
-   $editPage = new EditPage( $article );
-   if ( $workflow->shouldInterceptEditPage( $editPage ) &&
-   !$editPage->getContext()->getUser()->isAnon()
+   $user = $article->getContext()->getUser();
+   if ( $workflow->shouldInterceptEditPage( $article, $user ) &&
+   !$user->isAnon()
) {
-   $title = $editPage->getTitle();
+   $title = $article->getTitle();
// If the landing page didn't exist, we wouldn't have 
intercepted.
$redirTo = $workflow->getLandingPageTitle();
-   $output = $editPage->getContext()->getOutput();
+   $output = $article->getContext()->getOutput();
$output->redirect( $redirTo->getFullURL(
[ 'page' => $title->getPrefixedText(), 'wprov' 
=> 'acww1' ]
) );
diff --git a/includes/Workflow.php b/includes/Workflow.php
index c3b5365..8246486 100644
--- a/includes/Workflow.php
+++ b/includes/Workflow.php
@@ -3,7 +3,8 @@
 namespace ArticleCreationWorkflow;
 
 use Config;
-use EditPage;
+use Article;
+use User;
 use Title;
 
 /**
@@ -34,12 +35,12 @@
/**
 * Checks whether an attempt to edit a page should be intercepted and 
redirected to our workflow
 *
-* @param EditPage $editPage
+* @param Article $article The requested page
+* @param User $user The user trying to load the editor
 * @return bool
 */
-   public function shouldInterceptEditPage( EditPage 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Leave a comment that ACW must be loaded before VE

2017-09-08 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376791 )

Change subject: Leave a comment that ACW must be loaded before VE
..

Leave a comment that ACW must be loaded before VE

Change-Id: I0b539e904335b5e3bfb531da226d18fb4625de4c
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fe6ff5d..8278954 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1989,6 +1989,7 @@
$wgCodeMirrorBetaFeature = true;
 }
 
+// Must be loaded BEFORE VisualEditor, or things will break
 if ( $wmgUseArticleCreationWorkflow ) {
wfLoadExtension( 'ArticleCreationWorkflow' );
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...EtherEditor[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376790 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: Idb8aa2d3ee44f6416904fadb880dfd429eed71b3
---
M .gitignore
M Gruntfile.js
A composer.json
3 files changed, 16 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EtherEditor 
refs/changes/90/376790/1

diff --git a/.gitignore b/.gitignore
index a30a7d4..9b29323 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 /node_modules/
+/vendor/
+/composer.lock
 .svn
 *~
 *.kate-swp
diff --git a/Gruntfile.js b/Gruntfile.js
index 58166e8..dd61a5f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,6 +12,7 @@
all: [
'**/*.js',
'!node_modules/**',
+   '!vendor/**',
'!modules/jquery.etherpad.js'
]
},
@@ -21,7 +22,8 @@
jsonlint: {
all: [
'**/*.json',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**'
]
}
} );
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb8aa2d3ee44f6416904fadb880dfd429eed71b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EtherEditor
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...Flow[wmf/1.30.0-wmf.17]: WorkflowLoaderFactory: Don't crash for negative namespace ti...

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376786 )

Change subject: WorkflowLoaderFactory: Don't crash for negative namespace titles
..


WorkflowLoaderFactory: Don't crash for negative namespace titles

* Throw a proper exception from Flow if this case occurs.
* However, prevent it from reaching that layer using a user-facing
API error.
* Cleanup unnecessary type check (we have a type hint).

Bug: T175085
Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
(cherry picked from commit 161be17991893881713e62f95fbb4b84fe58ce66)
---
M includes/Api/ApiFlow.php
M includes/WorkflowLoaderFactory.php
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/includes/Api/ApiFlow.php b/includes/Api/ApiFlow.php
index b60d16e..4863cc9 100644
--- a/includes/Api/ApiFlow.php
+++ b/includes/Api/ApiFlow.php
@@ -113,6 +113,13 @@
[ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page'
);
}
+
+   if ( $page->getNamespace() < 0 ) {
+   $this->dieWithError(
+   [ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page-negative-namespace'
+   );
+   }
+
/** @var \Flow\TalkpageManager $controller */
$controller = Container::get( 'occupation_controller' );
if ( $page->getContentModel() !== CONTENT_MODEL_FLOW_BOARD ) {
diff --git a/includes/WorkflowLoaderFactory.php 
b/includes/WorkflowLoaderFactory.php
index 47ea19c..59f9f8f 100644
--- a/includes/WorkflowLoaderFactory.php
+++ b/includes/WorkflowLoaderFactory.php
@@ -62,10 +62,14 @@
 * @throws CrossWikiException
 */
public function createWorkflowLoader( Title $pageTitle, $workflowId = 
null ) {
-   if ( $pageTitle && $pageTitle->isExternal() ) {
+   if ( $pageTitle->isExternal() ) {
throw new CrossWikiException( 'Interwiki to ' . 
$pageTitle->getInterwiki() . ' not implemented ', 'default' );
}
 
+   if ( $pageTitle->getNamespace() < 0 ) {
+   throw new InvalidDataException( 'Can not load workflow 
for special (< 0) namespace', 'invalid-title' );
+   }
+
// @todo: ideally, workflowId is always set and this stuff is 
done in the places that call this
if ( $workflowId === null ) {
if ( $pageTitle->getNamespace() === NS_TOPIC ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.30.0-wmf.17
Gerrit-Owner: Chad 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
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] apps...wikipedia[master]: UX : Consolidate Light and Dark modes

2017-09-08 Thread Sharvaniharan (Code Review)
Sharvaniharan has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376788 )

Change subject: UX : Consolidate Light and Dark modes
..

UX : Consolidate Light and Dark modes

-Consolidating expected Light and Dark mode colors will be done in multiple 
commits.
-This is the first of many commits , and removes usage of duplicate color 
variables in colors.xml

T172984

Change-Id: I59049aa64a56a6e41e30b76fa3051dd43d4f1a84
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
M app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
M app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java
M app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/views/ConfigurableTabLayout.java
M app/src/main/java/org/wikipedia/views/FacePostprocessor.java
M app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
M app/src/main/res/drawable/edit_improve_tag_selected_dark.xml
M app/src/main/res/drawable/edit_improve_tag_selected_light.xml
M app/src/main/res/drawable/edit_improve_tag_unselected_dark.xml
M app/src/main/res/drawable/edit_improve_tag_unselected_light.xml
M app/src/main/res/drawable/ic_abusefilter_disallow.xml
M app/src/main/res/drawable/ic_abusefilter_warn.xml
M app/src/main/res/drawable/shape_border_1dp_gray.xml
M app/src/main/res/drawable/splash_bg.xml
M app/src/main/res/drawable/tab_item_shape_dark.xml
M app/src/main/res/drawable/tab_item_shape_light.xml
M app/src/main/res/drawable/toolbar_background.xml
M app/src/main/res/drawable/view_list_card_item_image_background.xml
M app/src/main/res/layout/activity_about.xml
M app/src/main/res/layout/activity_gallery.xml
M app/src/main/res/layout/activity_page.xml
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/layout/fragment_preview_edit.xml
M app/src/main/res/layout/fragment_search.xml
M app/src/main/res/layout/view_card_header.xml
M app/src/main/res/layout/view_card_offline.xml
M app/src/main/res/layout/view_description_edit.xml
M app/src/main/res/layout/view_description_edit_help.xml
M app/src/main/res/layout/view_description_edit_success.xml
M app/src/main/res/layout/view_disk_usage.xml
M app/src/main/res/layout/view_explore_overflow.xml
M app/src/main/res/layout/view_wiki_error.xml
M app/src/main/res/layout/widget_featured_page.xml
M app/src/main/res/layout/widget_search.xml
M app/src/main/res/values/colors.xml
M app/src/main/res/values/styles.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
43 files changed, 82 insertions(+), 134 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/88/376788/1

diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
index 9c7e223..210663a 100644
--- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
@@ -29,7 +29,7 @@
 import static org.mockito.Mockito.mock;
 
 public class CardHeaderViewTest extends ViewTest {
-@ColorRes private static final int BLUE = R.color.foundation_blue;
+@ColorRes private static final int BLUE = R.color.accent50;
 private CardHeaderView subject;
 
 @Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_L, WIDTH_DP_M}) 
int widthDp,
@@ -47,7 +47,7 @@
 }
 
 @Theory public void testTheme(@NonNull Theme theme,
-  @TestedOn(ints = {BLUE, 
R.color.foundation_green}) int circleColor) {
+  @TestedOn(ints = {BLUE, R.color.green50}) 
int circleColor) {
 setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, theme, 
PrimaryTestImg.NONNULL,
 PrimaryTestStr.SHORT, SecondaryTestStr.SHORT, circleColor);
 snap(subject, circleColor == BLUE ? "blue" : "green");
@@ -96,7 +96,7 @@
 @Test public void testSetImage() {
 setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, 
Theme.LIGHT, PrimaryTestImg.NONNULL,
 PrimaryTestStr.SHORT, SecondaryTestStr.SHORT,
-R.color.foundation_blue);
+R.color.accent50);
 ImageView imageView = findById(subject, R.id.view_card_header_image);
 imageView.setImageDrawable(null);
 subject.setImage(SecondaryTestImg.CHECKERBOARD.id());
diff --git a/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java 
b/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
index 4f353ab..6bc546d 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceCategoryManager[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376789 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: Ic7d66b7806679462f357085c6deeae9c34ea48c7
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index c369f1e..8aa2a07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/
 vendor/
+composer.lock
 
 # Editors
 *.kate-swp
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7d66b7806679462f357085c6deeae9c34ea48c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceCategoryManager
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...WhoIsWatching[REL1_28]: Improve WhoIsWatching extension

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376647 )

Change subject: Improve WhoIsWatching extension
..


Improve WhoIsWatching extension

* Use extension.json
* Add rights so that we can use those instead of globals to control
  access:
  * addpagetoanywatchlist: gets to use the special page to add users.
  * seepagewatchers: gets to see the watchers.
* Clean up WhoIsWatching::execute() method:
  * Use fewer globals.  Use GlobalVarConfig where possible.
  * Use protected methods for various parts of the execution path.
  * Add stub (WhoIsWatching::eNotifUser()) to later notify editors when
their watchlists are changed.
  * Add stub (WhoIsWatching::uiNotifyUser()) to later provide better
feedback to users of this extension.
  * Instead of listing out every user to choose from, provide
autocomplete for user selection.
  * Instead of showing a confusing "usage" message, provide an
autocomplete input box so that the user can select a page to
inspect.
  * Provide slightly better error messages.
  * Refactor to make code more readable.
* Adapted to changes in core MediaWiki:
  * Remove .i18n.php stub.
  * Moved $wgPageShowWatchingUsers which was removed from core in 1.25
to $whoiswathing_showwatchingusers
  * Since the message had to be changed anyway, moved the message from
number_of_watching_users_pageview to whoiswatchingpageview
* Remove use of sprintf for i18n construction.

Change-Id: I9474771788bbeecbbfa521cfbe1792524d04d301
(cherry picked from commit dcd0aad156785b00a799ef45b185778da58b95fb)
---
A ChangeLog
A ChangeLog.mediawiki
D WhoIsWatching.i18n.php
M WhoIsWatching.php
M WhoIsWatching_body.php
A extension.json
M i18n/en.json
M i18n/qqq.json
8 files changed, 343 insertions(+), 163 deletions(-)

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



diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 000..8fba8eb
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,28 @@
+Changes since 0.11:
+
+
+Incompatibilites:
+* Requires at least MediaWiki 1.26
+* If you've made changes to the message displayed at the bottom of the page in 
[[MediaWiki:number_of_watching_users_pageview]], you'll need to see if it 
matches what is in [[MediaWiki:whoiswatchingpageview]] on your wiki.
+* Note the use of permissions is preferred to globals to allow access to the 
Special Page
+
+
+Other Changes:
+* Use extension.json
+* Remove .i18n.php stub.
+* Add rights so that we can use those instead of globals to control access:
+** addpagetoanywatchlist: gets to use the special page to add users.
+** seepagewatchers: gets to see the watchers.
+* Clean up WhoIsWatching::execute() method:
+** Use fewer globals.  Use GlobalVarConfig where possible.
+** Use protected methods for various parts of the execution path.
+** Add stub (WhoIsWatching::eNotifUser()) to later notify editors when their 
watchlists are changed.
+** Add stub (WhoIsWatching::uiNotifyUser()) to later provide better feedback 
to users of this extension.
+** Instead of listing out every user to choose from, provide autocomplete for 
user selection.
+** Instead of showing a confusing "usage" message, provide an autocomplete 
input box so that the user can select a page to inspect.
+** Provide slightly better error messages.
+** Refactor to make code more readable.
+* Adapted to changes in core MediaWiki since 1.25:
+** Moved $wgPageShowWatchingUsers which was removed from core in 1.25 to 
$whoiswathing_showwatchingusers
+** Since the message had to be changed anyway, moved the message from 
number_of_watching_users_pageview to whoiswatchingpageview
+* Remove use of sprintf for i18n construction.
diff --git a/ChangeLog.mediawiki b/ChangeLog.mediawiki
new file mode 12
index 000..b0936e8
--- /dev/null
+++ b/ChangeLog.mediawiki
@@ -0,0 +1 @@
+ChangeLog
\ No newline at end of file
diff --git a/WhoIsWatching.i18n.php b/WhoIsWatching.i18n.php
deleted file mode 100644
index 6df9df6..000
--- a/WhoIsWatching.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim6c3b7e8be40a26ae' ) ) {
-   function wfJsonI18nShim6c3b7e8be40a26ae( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtendedFilelist[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376787 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I7923280974fbdd1f2305b54095b49074870de62a
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 7e5da87..8ec4b92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 node_modules/
 vendor/
+composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7923280974fbdd1f2305b54095b49074870de62a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtendedFilelist
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] operations/mediawiki-config[master]: Remove git_repo config for now

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376743 )

Change subject: Remove git_repo config for now
..


Remove git_repo config for now

Change-Id: I32713e3d6123d75c6c34b9584953ea82ed71c306
---
M scap/scap.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scap/scap.cfg b/scap/scap.cfg
index dbe77a0..51ffb88 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -1,2 +1,2 @@
 [global]
-git_repo: operations/mediawiki-config
+# git_repo: operations/mediawiki-config

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32713e3d6123d75c6c34b9584953ea82ed71c306
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Urbanecm 
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...Flow[wmf/1.30.0-wmf.17]: WorkflowLoaderFactory: Don't crash for negative namespace ti...

2017-09-08 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376786 )

Change subject: WorkflowLoaderFactory: Don't crash for negative namespace titles
..

WorkflowLoaderFactory: Don't crash for negative namespace titles

* Throw a proper exception from Flow if this case occurs.
* However, prevent it from reaching that layer using a user-facing
API error.
* Cleanup unnecessary type check (we have a type hint).

Bug: T175085
Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
(cherry picked from commit 161be17991893881713e62f95fbb4b84fe58ce66)
---
M includes/Api/ApiFlow.php
M includes/WorkflowLoaderFactory.php
2 files changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/includes/Api/ApiFlow.php b/includes/Api/ApiFlow.php
index b60d16e..4863cc9 100644
--- a/includes/Api/ApiFlow.php
+++ b/includes/Api/ApiFlow.php
@@ -113,6 +113,13 @@
[ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page'
);
}
+
+   if ( $page->getNamespace() < 0 ) {
+   $this->dieWithError(
+   [ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page-negative-namespace'
+   );
+   }
+
/** @var \Flow\TalkpageManager $controller */
$controller = Container::get( 'occupation_controller' );
if ( $page->getContentModel() !== CONTENT_MODEL_FLOW_BOARD ) {
diff --git a/includes/WorkflowLoaderFactory.php 
b/includes/WorkflowLoaderFactory.php
index 47ea19c..59f9f8f 100644
--- a/includes/WorkflowLoaderFactory.php
+++ b/includes/WorkflowLoaderFactory.php
@@ -62,10 +62,14 @@
 * @throws CrossWikiException
 */
public function createWorkflowLoader( Title $pageTitle, $workflowId = 
null ) {
-   if ( $pageTitle && $pageTitle->isExternal() ) {
+   if ( $pageTitle->isExternal() ) {
throw new CrossWikiException( 'Interwiki to ' . 
$pageTitle->getInterwiki() . ' not implemented ', 'default' );
}
 
+   if ( $pageTitle->getNamespace() < 0 ) {
+   throw new InvalidDataException( 'Can not load workflow 
for special (< 0) namespace', 'invalid-title' );
+   }
+
// @todo: ideally, workflowId is always set and this stuff is 
done in the places that call this
if ( $workflowId === null ) {
if ( $pageTitle->getNamespace() === NS_TOPIC ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.30.0-wmf.17
Gerrit-Owner: Chad 
Gerrit-Reviewer: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...CommentStreams[master]: typo

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376783 )

Change subject: typo
..


typo

Change-Id: I793a0cfd30b9ccb151da0a2d668ad5878b08be78
---
M includes/ApiCSPostComment.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ApiCSPostComment.php b/includes/ApiCSPostComment.php
index e191e57..adc1c79 100644
--- a/includes/ApiCSPostComment.php
+++ b/includes/ApiCSPostComment.php
@@ -123,7 +123,7 @@
}
 
/**
-* @return string indicates that this API module requires a CSRF toekn
+* @return string indicates that this API module requires a CSRF token
 */
public function needstoken() {
return 'csrf';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I793a0cfd30b9ccb151da0a2d668ad5878b08be78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommentStreams
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: Umherirrender 
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...BlueSpiceMultiUpload[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376785 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I3ad1aa5c5cac99d9d23f15a544abd4347d6c9303
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 7e5da87..8ec4b92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 node_modules/
 vendor/
+composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ad1aa5c5cac99d9d23f15a544abd4347d6c9303
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceMultiUpload
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...BlueSpiceSubPageTree[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376784 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: If3d8fd3ffa0f164e1dcee3a47ade8369f52e7b8a
---
A .gitignore
A composer.json
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceSubPageTree 
refs/changes/84/376784/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..db8a779
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/node_modules
+/vendor
+/composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3d8fd3ffa0f164e1dcee3a47ade8369f52e7b8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceSubPageTree
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] operations/dns[master]: remove unused VM 'zosma'

2017-09-08 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376780 )

Change subject: remove unused VM 'zosma'
..


remove unused VM 'zosma'

This is a ganeti VM that isn't used and is decom'ed.

Bug: T138650
Change-Id: I01c71a2168b0d28c5699c3a945f84f0ff75da3d6
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/10.in-addr.arpa
M templates/wmnet
3 files changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 1b763b4..12e793e 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -103,7 +103,6 @@
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
 4.7.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   releases2001.codfw.wmnet.
-3.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   zosma.codfw.wmnet.
 9.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   prometheus2004.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index f0909c3..eaf02ac 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3239,7 +3239,6 @@
 178 1H IN PTR   restbase2007-c.codfw.wmnet.
 179 1H IN PTR   maps2002.codfw.wmnet.
 
-183 1H IN PTR   zosma.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 184 1H IN PTR   nihal.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 185 1H IN PTR   restbase2010.codfw.wmnet.
 186 1H IN PTR   restbase2010-a.codfw.wmnet.
@@ -3251,7 +3250,7 @@
 192 1H IN PTR   elastic2029.codfw.wmnet.
 193 1H IN PTR   elastic2030.codfw.wmnet.
 194 1H IN PTR   mc2026.codfw.wmnet.
-195  1H IN PTR   db2062.codfw.wmnet.
+195 1H IN PTR   db2062.codfw.wmnet.
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 0e8bbd1..6436017 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -3206,8 +3206,6 @@
 wdqs20011H  IN A10.192.32.148
 wdqs20021H  IN A10.192.48.65
 wdqs20031H  IN A10.192.0.29
-zosma   1H  IN A10.192.16.183 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
-zosma   1H  IN  2620:0:860:102:10:192:16:183
 
 ; codfw LVS cross-vlan addresses
 vl2001-eth0.lvs2001 1H  IN A208.80.153.6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01c71a2168b0d28c5699c3a945f84f0ff75da3d6
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
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...CommentStreams[master]: typo

2017-09-08 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376783 )

Change subject: typo
..

typo

Change-Id: I793a0cfd30b9ccb151da0a2d668ad5878b08be78
---
M includes/ApiCSPostComment.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommentStreams 
refs/changes/83/376783/1

diff --git a/includes/ApiCSPostComment.php b/includes/ApiCSPostComment.php
index e191e57..adc1c79 100644
--- a/includes/ApiCSPostComment.php
+++ b/includes/ApiCSPostComment.php
@@ -123,7 +123,7 @@
}
 
/**
-* @return string indicates that this API module requires a CSRF toekn
+* @return string indicates that this API module requires a CSRF token
 */
public function needstoken() {
return 'csrf';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I793a0cfd30b9ccb151da0a2d668ad5878b08be78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommentStreams
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Avoid undefined notices when obtaining collection

2017-09-08 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376782 )

Change subject: Avoid undefined notices when obtaining collection
..

Avoid undefined notices when obtaining collection

Instead of using$_SESSION['wsCollection'] rely on the method
CollectionSession::getCollection() which will return an empty collection
when a session is not present.

This empty collection unlike before is prepopulated with the fields required
to render a section. This avoids notices.

Bug: T175063
Change-Id: Ieda48f5b83ec76ec5cfe62f48f2397ac1710c0e7
---
M Collection.php
M Collection.session.php
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/82/376782/1

diff --git a/Collection.php b/Collection.php
index 9f95178..5ae49b9 100644
--- a/Collection.php
+++ b/Collection.php
@@ -353,7 +353,7 @@
 $wgAjaxExportList[] = 'wfAjaxCollectionGetBookCreatorBoxContent';
 
 function wfAjaxCollectionGetItemList() {
-   $collection = $_SESSION['wsCollection'];
+   $collection = CollectionSession::getCollection();
 
$template = new CollectionListTemplate();
$template->set( 'collection', $collection );
diff --git a/Collection.session.php b/Collection.session.php
index a4d23d8..f536db7 100644
--- a/Collection.session.php
+++ b/Collection.session.php
@@ -22,7 +22,11 @@
  */
 
 class CollectionSession {
-
+   const EMPTY_COLLECTION = [
+   'name' => '',
+   'description' => '',
+   'items' => []
+   ];
/**
 * @return bool
 */
@@ -172,7 +176,7 @@
 * @return array
 */
public static function getCollection() {
-   return self::purge() ? $_SESSION['wsCollection'] : [];
+   return self::purge() ? $_SESSION['wsCollection'] : 
CollectionSession::EMPTY_COLLECTION;
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: [WIP] Diffing and Patching Lexeme forms and nextFormId

2017-09-08 Thread Aleksey Bekh-Ivanov (WMDE) (Code Review)
Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376781 )

Change subject: [WIP] Diffing and Patching Lexeme forms and nextFormId
..

[WIP] Diffing and Patching Lexeme forms and nextFormId

Change-Id: Icfa5d5bfcbe7e48cab9f1d4c99eeba1bd656d39f
---
M src/DataModel/Lexeme.php
A src/DataModel/LexemePatchAccess.php
M src/DataModel/Services/Diff/LexemeDiff.php
M src/DataModel/Services/Diff/LexemeDiffer.php
M src/DataModel/Services/Diff/LexemePatcher.php
M tests/phpunit/composer/DataModel/LexemeTest.php
A tests/phpunit/composer/DataModel/Services/Diff/LexemeDifferPatcherTest.php
7 files changed, 241 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/81/376781/1

diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 81aa582..b81ae22 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -296,6 +296,24 @@
}
 
/**
+* @param int $number
+*/
+   public function increaseNextFormIdTo( $number ) {
+   if ( !is_int( $number ) ) {
+   throw new \InvalidArgumentException( '$nextFormId` must 
be integer' );
+   }
+
+   if ( $number < $this->nextFormId ) {
+   throw new \LogicException(
+   "Cannot increase `nextFormId` because given 
number is less than counter value " .
+   "of this Lexeme. Current=`{$this->nextFormId}`, 
given=`{$number}`"
+   );
+   }
+
+   $this->nextFormId = $number;
+   }
+
+   /**
 * @param TermList $representations
 * @param ItemId[] $grammaticalFeatures
 *
@@ -313,6 +331,17 @@
$this->forms->remove( $formId );
}
 
+   public function patch( callable $patcher ) {
+   try {
+   $lexemePatchAccess = new LexemePatchAccess();
+   $patcher( $lexemePatchAccess );
+
+   } finally {
+   $lexemePatchAccess->close();
+   $this->assertCorrectNextFormIdIsGiven( 
$this->nextFormId, $this->forms );
+   }
+   }
+
/**
 * @param mixed $nextFormId
 * @param Form[] $forms
diff --git a/src/DataModel/LexemePatchAccess.php 
b/src/DataModel/LexemePatchAccess.php
new file mode 100644
index 000..270ab4c
--- /dev/null
+++ b/src/DataModel/LexemePatchAccess.php
@@ -0,0 +1,13 @@
+fixSubstructureDiff( $operations, 'lemmas' );
$this->fixSubstructureDiff( $operations, 'lexicalCategory' );
$this->fixSubstructureDiff( $operations, 'language' );
@@ -56,13 +57,24 @@
}
 
/**
+* @return Diff
+*/
+   public function getFormsDiff() {
+   return isset( $this['forms'] ) ? $this['forms'] : new Diff( [], 
true );
+   }
+
+   /**
 * Returns if there are any changes (equivalent to: any differences 
between the entities).
 *
 * @return bool
 */
public function isEmpty() {
return $this->getLemmasDiff()->isEmpty()
-  && $this->getClaimsDiff()->isEmpty();
+  && $this->getClaimsDiff()->isEmpty();
+   }
+
+   public function getNextFormIdDiff() {
+   return $this['nextFormId'];
}
 
 }
diff --git a/src/DataModel/Services/Diff/LexemeDiffer.php 
b/src/DataModel/Services/Diff/LexemeDiffer.php
index 374c147..fb4fff2 100644
--- a/src/DataModel/Services/Diff/LexemeDiffer.php
+++ b/src/DataModel/Services/Diff/LexemeDiffer.php
@@ -3,11 +3,14 @@
 namespace Wikibase\Lexeme\DataModel\Services\Diff;
 
 use Diff\Differ\MapDiffer;
+use Diff\DiffOp\Diff\Diff;
+use Diff\DiffOp\DiffOpChange;
 use UnexpectedValueException;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Services\Diff\EntityDiff;
 use Wikibase\DataModel\Services\Diff\EntityDifferStrategy;
 use Wikibase\DataModel\Services\Diff\StatementListDiffer;
+use Wikibase\Lexeme\DataModel\Form;
 use Wikibase\Lexeme\DataModel\Lexeme;
 use Wikimedia\Assert\Assert;
 use InvalidArgumentException;
@@ -75,6 +78,13 @@
$to->getStatements()
);
 
+   $diffOps['nextFormId'] = $this->getNextFormIdCounterDiff( 
$from, $to );
+
+   $diffOps['forms'] = $this->getFormsDiff(
+   $from->getForms(),
+   $to->getForms()
+   );
+
return new LexemeDiff( $diffOps );
}
 
@@ -132,4 +142,43 @@
return $this->diffEntities( $entity, new Lexeme() );
}
 
+   /**
+* @param Form[] $from
+* @param Form[] $to
+*
+* @return Diff;
+*/
+   private function getFormsDiff( array 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: remove unused virtual host 'zosma'

2017-09-08 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376779 )

Change subject: site: remove unused virtual host 'zosma'
..


site: remove unused virtual host 'zosma'

This is a Ganeti VM that hasn't really been used and the related
access request has been declined. It was created after last years
Wikimania. Removing it now. If it's ever desired (again), happy
to recreate it. But so far it's just been sitting here.

Bug: T138650
Change-Id: I8ef7db97942858dcfd6eee6cfe734845ccc42882
---
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
3 files changed, 1 insertion(+), 11 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 4e61632..f08df92 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2344,12 +2344,6 @@
 role(parsoid)
 }
 
-# T138650 - tools for the security team
-node 'zosma.codfw.wmnet' {
-role(security::tools)
-interface::add_ip6_mapped { 'main': }
-}
-
 node default {
 if $::realm == 'production' {
 include ::standard
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index b3a5cb8..cb3dc01 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -77,7 +77,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
index b1b0d29..8eca573 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
@@ -379,7 +379,3 @@
 fixed-address tureis.codfw.wmnet;
 }
 
-host zosma {
-hardware ethernet aa:00:00:8c:75:b0;
-fixed-address zosma.codfw.wmnet;
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ef7db97942858dcfd6eee6cfe734845ccc42882
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/dns[master]: remove unused VM 'zosma'

2017-09-08 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376780 )

Change subject: remove unused VM 'zosma'
..

remove unused VM 'zosma'

This is a ganeti VM that isn't used and is decom'ed.

Bug: T138650
Change-Id: I01c71a2168b0d28c5699c3a945f84f0ff75da3d6
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/10.in-addr.arpa
M templates/wmnet
3 files changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/80/376780/1

diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 1b763b4..12e793e 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -103,7 +103,6 @@
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
 4.7.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   releases2001.codfw.wmnet.
-3.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   zosma.codfw.wmnet.
 9.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   prometheus2004.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 1734a04..58a277c 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3157,7 +3157,6 @@
 178 1H IN PTR   restbase2007-c.codfw.wmnet.
 179 1H IN PTR   maps2002.codfw.wmnet.
 
-183 1H IN PTR   zosma.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 184 1H IN PTR   nihal.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 185 1H IN PTR   restbase2010.codfw.wmnet.
 186 1H IN PTR   restbase2010-a.codfw.wmnet.
@@ -3169,7 +3168,7 @@
 192 1H IN PTR   elastic2029.codfw.wmnet.
 193 1H IN PTR   elastic2030.codfw.wmnet.
 194 1H IN PTR   mc2026.codfw.wmnet.
-195  1H IN PTR   db2062.codfw.wmnet.
+195 1H IN PTR   db2062.codfw.wmnet.
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 79ee1b8..61e1d10 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -3131,8 +3131,6 @@
 wdqs20011H  IN A10.192.32.148
 wdqs20021H  IN A10.192.48.65
 wdqs20031H  IN A10.192.0.29
-zosma   1H  IN A10.192.16.183 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
-zosma   1H  IN  2620:0:860:102:10:192:16:183
 
 ; codfw LVS cross-vlan addresses
 vl2001-eth0.lvs2001 1H  IN A208.80.153.6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01c71a2168b0d28c5699c3a945f84f0ff75da3d6
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
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] operations/puppet[production]: site: remove unused virtual host 'zosma'

2017-09-08 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376779 )

Change subject: site: remove unused virtual host 'zosma'
..

site: remove unused virtual host 'zosma'

This is a Ganeti VM that hasn't really been used and the related
access request has been declined. It was created after last years
Wikimania. Removing it now. If it's ever desired (again), happy
to recreate it. But so far it's just been sitting here.

Bug: T138650
Change-Id: I8ef7db97942858dcfd6eee6cfe734845ccc42882
---
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
3 files changed, 1 insertion(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/376779/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4e61632..f08df92 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2344,12 +2344,6 @@
 role(parsoid)
 }
 
-# T138650 - tools for the security team
-node 'zosma.codfw.wmnet' {
-role(security::tools)
-interface::add_ip6_mapped { 'main': }
-}
-
 node default {
 if $::realm == 'production' {
 include ::standard
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index b3a5cb8..cb3dc01 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -77,7 +77,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
index b1b0d29..8eca573 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
@@ -379,7 +379,3 @@
 fixed-address tureis.codfw.wmnet;
 }
 
-host zosma {
-hardware ethernet aa:00:00:8c:75:b0;
-fixed-address zosma.codfw.wmnet;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ef7db97942858dcfd6eee6cfe734845ccc42882
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...FileImporter[master]: Add an import notice to the top of an imported page's wikitext

2017-09-08 Thread Andrew-WMDE (Code Review)
Andrew-WMDE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376778 )

Change subject: Add an import notice to the top of an imported page's wikitext
..

Add an import notice to the top of an imported page's wikitext

Should the message be translatable/changeable in i18n or should it
be hardcoded?

Bug: T160182
Change-Id: Ic32f8025338f81a64ccd060f3bd534ed3231212d
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M src/Data/ImportPlan.php
M src/ServiceWiring.php
M src/Services/Importer.php
D src/Services/NullRevisionCreator.php
7 files changed, 48 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileImporter 
refs/changes/78/376778/1

diff --git a/extension.json b/extension.json
index fc3..448db26 100644
--- a/extension.json
+++ b/extension.json
@@ -55,7 +55,6 @@
"FileImporter\\Services\\Importer": "src/Services/Importer.php",
"FileImporter\\Services\\ImportPlanFactory": 
"src/Services/ImportPlanFactory.php",
"FileImporter\\Services\\ImportPlanValidator": 
"src/Services/ImportPlanValidator.php",
-   "FileImporter\\Services\\NullRevisionCreator": 
"src/Services/NullRevisionCreator.php",
"FileImporter\\Services\\SourceSite": 
"src/Services/SourceSite.php",
"FileImporter\\Services\\SourceSiteLocator": 
"src/Services/SourceSiteLocator.php",
"FileImporter\\Services\\WikiRevisionFactory": 
"src/Services/WikiRevisionFactory.php",
diff --git a/i18n/en.json b/i18n/en.json
index e9857b2..923600f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,15 +19,15 @@
"fileimporter-cantimportmissingfile": "Can't import a missing file.",
"fileimporter-badtoken": "CSRF token does not match",
"fileimporter-badimporthash": "Import hash does not match. Please 
restart the import.",
-   "fileimporter-filenameerror-default" : "There is an unknown issue with 
your filename.",
-   "fileimporter-filenameerror-illegal" : "The file name you are currently 
trying to import to is invalid.",
-   "fileimporter-filenameerror-toolong" : "The file name you are currently 
trying to import to is too long.",
-   "fileimporter-filenameerror-automaticchanges" : "The file name you are 
currently trying to import to will be automatically changed to \"$1\" due to 
the use of invalid characters.",
-   "fileimporter-localtitleexists" : "The title you are currently trying 
to import to already exists on this wiki.",
-   "fileimporter-sourcetitleexists" : "The title you are currently trying 
to import to already exists on the source wiki.",
-   "fileimporter-illegalfilenamechars" : "The title you are currently 
trying to import to contains invalid filename characters.",
-   "fileimporter-duplicatefilesdetected" : "The file you are currently 
trying to import already exists on this wiki.",
-   "fileimporter-duplicatefilesdetected-prefix" : "Duplicates",
+   "fileimporter-filenameerror-default": "There is an unknown issue with 
your filename.",
+   "fileimporter-filenameerror-illegal": "The file name you are currently 
trying to import to is invalid.",
+   "fileimporter-filenameerror-toolong": "The file name you are currently 
trying to import to is too long.",
+   "fileimporter-filenameerror-automaticchanges": "The file name you are 
currently trying to import to will be automatically changed to \"$1\" due to 
the use of invalid characters.",
+   "fileimporter-localtitleexists": "The title you are currently trying to 
import to already exists on this wiki.",
+   "fileimporter-sourcetitleexists": "The title you are currently trying 
to import to already exists on the source wiki.",
+   "fileimporter-illegalfilenamechars": "The title you are currently 
trying to import to contains invalid filename characters.",
+   "fileimporter-duplicatefilesdetected": "The file you are currently 
trying to import already exists on this wiki.",
+   "fileimporter-duplicatefilesdetected-prefix": "Duplicates",
"fileimporter-exampleprefix": "Example",
"fileimporter-textrevisions": "$1 {{PLURAL:$1|revision|revisions}} of 
the file will be imported.",
"fileimporter-submit": "Submit",
@@ -47,5 +47,7 @@
"fileimporter-heading-filehistory": "File history",
"fileimporter-revision-removed-text": "Suppressed text removed by 
FileImporter.",
"fileimporter-revision-removed-comment": "Suppressed comment removed by 
FileImporter.",
-   "fileimporter-in-beta": "File import is in beta mode: We tested it 
carefully but it still might have some problems. If you encounter problems, 
please [//www.mediawiki.org/w/index.php?title=Extension_talk:FileImporter 
report them on our help page] - ideally with a step by step way to reproduce 
the problem, so we can understand and fix it."
+   

[MediaWiki-commits] [Gerrit] mediawiki...CustomPage[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376777 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I987c9003d14b0928ebe08a3d7f6c87ab55cec299
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index c369f1e..8aa2a07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/
 vendor/
+composer.lock
 
 # Editors
 *.kate-swp
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I987c9003d14b0928ebe08a3d7f6c87ab55cec299
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CustomPage
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...MinervaNeue[master]: Hygiene: Refactor SkinMinerva so it doesn't use MobilePage

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376281 )

Change subject: Hygiene: Refactor SkinMinerva so it doesn't use MobilePage
..


Hygiene: Refactor SkinMinerva so it doesn't use MobilePage

MobilePage is provided by MobileFrontend and replicates functionality
in core. Let's invest more in those core interfaces. It's a bit of a
maze, so I think there's probably a cleaner way of doing this...

Change-Id: Iea0a3121841c4774eb117168b1cfc8c2e1e24a0c
---
M includes/skins/SkinMinerva.php
1 file changed, 30 insertions(+), 8 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ee57b5b..2028150 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -729,8 +729,6 @@
$isMainPage = $title->isMainPage();
// Get rev_timestamp of current revision (preloaded by 
MediaWiki core)
$timestamp = $this->getOutput()->getRevisionTimestamp();
-   $mp = new MobilePage( $this->getTitle(), false );
-   $mp->setLatestTimestamp( $timestamp );
// Main pages tend to include transclusions (see bug 51924)
if ( $isMainPage ) {
$lastModified = $this->msg( 'mobile-frontend-history' 
)->plain();
@@ -748,17 +746,41 @@
$historyUrl = $title->getLocalURL( [ 'action' => 
'history' ] );
}
 
-   $edit = $mp->getLatestEdit();
-   $link = [
+   $editor = $this->getRevisionEditor( Revision::newFromTitle( 
$title ) );
+   return [
// Use $edit['timestamp'] (Unix format) instead of 
$timestamp (MW format)
-   'data-timestamp' => $isMainPage ? '' : 
$edit['timestamp'],
+   'data-timestamp' => $isMainPage ? '' : wfTimestamp( 
TS_UNIX, $timestamp ),
'href' => $historyUrl,
'text' => $lastModified,
-   'data-user-name' => $edit['name'],
-   'data-user-gender' => $edit['gender'],
+   'data-user-name' => $editor ? $editor['name'] : '',
+   'data-user-gender' => $editor ? $editor['gender'] : ''
];
-   return $link;
}
+
+   /**
+* Returns the editor of a current revision.
+* There appears to be no shorthand method for this in core.
+* @return array|false representing user with name and gender fields. 
False if the editor no longer
+*   exists in the database or is hidden from public view
+*/
+   private function getRevisionEditor( Revision $rev ) {
+   $editorName = '';
+   $editorGender = '';
+   $revUserId = $rev->getUser();
+   // Note the user will only be returned if that information is 
public
+   if ( $revUserId ) {
+   $revUser = User::newFromId( $revUserId );
+   $editorName = $revUser->getName();
+   $editorGender = $revUser->getOption( 'gender' );
+   } else {
+   return false;
+   }
+   return [
+   'name' => $editorName,
+   'gender' => $editorGender,
+   ];
+   }
+
/**
 * Returns the HTML representing the tagline
 * @return string HTML for tagline

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea0a3121841c4774eb117168b1cfc8c2e1e24a0c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
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...Flow[master]: WorkflowLoaderFactory: Don't crash for negative namespace ti...

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376447 )

Change subject: WorkflowLoaderFactory: Don't crash for negative namespace titles
..


WorkflowLoaderFactory: Don't crash for negative namespace titles

* Throw a proper exception from Flow if this case occurs.
* However, prevent it from reaching that layer using a user-facing
API error.
* Cleanup unnecessary type check (we have a type hint).

Bug: T175085
Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
---
M includes/Api/ApiFlow.php
M includes/WorkflowLoaderFactory.php
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/includes/Api/ApiFlow.php b/includes/Api/ApiFlow.php
index b60d16e..4863cc9 100644
--- a/includes/Api/ApiFlow.php
+++ b/includes/Api/ApiFlow.php
@@ -113,6 +113,13 @@
[ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page'
);
}
+
+   if ( $page->getNamespace() < 0 ) {
+   $this->dieWithError(
+   [ 'apierror-invalidtitle', wfEscapeWikiText( 
$params['page'] ) ], 'invalid-page-negative-namespace'
+   );
+   }
+
/** @var \Flow\TalkpageManager $controller */
$controller = Container::get( 'occupation_controller' );
if ( $page->getContentModel() !== CONTENT_MODEL_FLOW_BOARD ) {
diff --git a/includes/WorkflowLoaderFactory.php 
b/includes/WorkflowLoaderFactory.php
index 47ea19c..59f9f8f 100644
--- a/includes/WorkflowLoaderFactory.php
+++ b/includes/WorkflowLoaderFactory.php
@@ -62,10 +62,14 @@
 * @throws CrossWikiException
 */
public function createWorkflowLoader( Title $pageTitle, $workflowId = 
null ) {
-   if ( $pageTitle && $pageTitle->isExternal() ) {
+   if ( $pageTitle->isExternal() ) {
throw new CrossWikiException( 'Interwiki to ' . 
$pageTitle->getInterwiki() . ' not implemented ', 'default' );
}
 
+   if ( $pageTitle->getNamespace() < 0 ) {
+   throw new InvalidDataException( 'Can not load workflow 
for special (< 0) namespace', 'invalid-title' );
+   }
+
// @todo: ideally, workflowId is always set and this stuff is 
done in the places that call this
if ( $workflowId === null ) {
if ( $pageTitle->getNamespace() === NS_TOPIC ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Sbisson 
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...Lingo[master]: build: Always exclude vendor and node_modules

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376776 )

Change subject: build: Always exclude vendor and node_modules
..

build: Always exclude vendor and node_modules

Change-Id: Ie09783c2ee7d8f23a82f19f2dd32dfc268fbe8f2
---
M Gruntfile.js
M composer.json
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 78f3169..13a456b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,6 +12,7 @@
all: [
'**/*.js',
'!node_modules/**',
+   '!vendor/**',
'!libs/jquery.qtip.js'
]
},
@@ -21,7 +22,8 @@
jsonlint: {
all: [
'**/*.json',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**'
]
}
} );
diff --git a/composer.json b/composer.json
index 612e0a9..4808a3e 100644
--- a/composer.json
+++ b/composer.json
@@ -37,7 +37,7 @@
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor"
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
]
},
"suggest": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie09783c2ee7d8f23a82f19f2dd32dfc268fbe8f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
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] wikimedia...SmashPig[master]: Finally set a version number - 0.5

2017-09-08 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376775 )

Change subject: Finally set a version number - 0.5
..

Finally set a version number - 0.5

Or do we want to get a bunch more stuff in first?

Bug: T133556
Change-Id: I0e66088a8b1e6bb5d818445d890ae6e3bf882295
---
M composer.json
M composer.lock
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/75/376775/1

diff --git a/composer.json b/composer.json
index 7dd4984..3438b79 100644
--- a/composer.json
+++ b/composer.json
@@ -4,6 +4,7 @@
 "keywords": ["payments", "donations"],
 "homepage": "http://smashpig.org;,
 "license": "GPL-2.0",
+"version": "0.5.0",
 "authors": [
 {
 "name": "Katie Horn",
diff --git a/composer.lock b/composer.lock
index 9f08244..09d2033 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "49f648da1f342cce1119e51af1b5898c",
+"content-hash": "b8dcf1b77ee5212502380d42ff772749",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e66088a8b1e6bb5d818445d890ae6e3bf882295
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
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] mediawiki...CharRangeSpan[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376774 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I7b1d634c9eb52d351d39f57522b2d2e8198f9b73
---
M .gitignore
M Gruntfile.js
A composer.json
3 files changed, 15 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index 1689d7a..8ea3b90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 *.kate-swp
 .*.swp
 node_modules/**
+vendor/**
+composer.lock
diff --git a/Gruntfile.js b/Gruntfile.js
index 7756e75..a45071e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,7 +10,8 @@
jsonlint: {
all: [
'**/*.json',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**'
]
}
} );
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b1d634c9eb52d351d39f57522b2d2e8198f9b73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CharRangeSpan
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...ArticleCreationWorkflow[master]: Switch from AlternateEdit hook to CustomEditor hook

2017-09-08 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376773 )

Change subject: Switch from AlternateEdit hook to CustomEditor hook
..

Switch from AlternateEdit hook to CustomEditor hook

Bug: T173605
Change-Id: I4991a1cb88d64bd4e63fa932fb01d6b15cb3b0ee
---
M extension.json
M includes/Hooks.php
M includes/Workflow.php
M tests/phpunit/WorkflowTest.php
4 files changed, 16 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleCreationWorkflow 
refs/changes/73/376773/1

diff --git a/extension.json b/extension.json
index 8309ffa..77506ea 100644
--- a/extension.json
+++ b/extension.json
@@ -10,7 +10,7 @@
"MediaWiki": ">= 1.30.0-alpha"
},
"Hooks": {
-   "AlternateEdit": 
"ArticleCreationWorkflow\\Hooks::onAlternateEdit",
+   "CustomEditor": 
"ArticleCreationWorkflow\\Hooks::onCustomEditor",
"ShowMissingArticle": 
"ArticleCreationWorkflow\\Hooks::onShowMissingArticle"
},
"AutoloadClasses": {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 08e8b2d..60cc649 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -11,25 +11,26 @@
  */
 class Hooks {
/**
-* AlternateEdit hook handler
+* CustomEditor hook handler
 * Redirects users attempting to create pages to the landing page, 
based on configuration
 *
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/AlternateEdit
+* @see https://www.mediawiki.org/wiki/Manual:Hooks/CustomEditor
 *
-* @param EditPage $editPage
+* @param WikiPage|Article|Page $article The requested page
+* @param User $user The user trying to load the editor
 * @return bool
 */
-   public static function onAlternateEdit( EditPage $editPage ) {
+   public static function onCustomEditor( $article, $user ) {
$config = MediaWikiServices::getInstance()
->getConfigFactory()
->makeConfig( 'ArticleCreationWorkflow' );
$workflow = new Workflow( $config );
 
-   if ( $workflow->shouldInterceptEditPage( $editPage ) ) {
-   $title = $editPage->getTitle();
+   if ( $workflow->shouldInterceptEditPage( $article, $user ) ) {
+   $title = $article->getTitle();
// If the landing page didn't exist, we wouldn't have 
intercepted.
$redirTo = $workflow->getLandingPageTitle();
-   $output = $editPage->getContext()->getOutput();
+   $output = $article->getContext()->getOutput();
$output->redirect( $redirTo->getFullURL(
[ 'page' => $title->getPrefixedText(), 'wprov' 
=> 'acww1' ]
) );
diff --git a/includes/Workflow.php b/includes/Workflow.php
index c3b5365..9d2a3fc 100644
--- a/includes/Workflow.php
+++ b/includes/Workflow.php
@@ -34,12 +34,12 @@
/**
 * Checks whether an attempt to edit a page should be intercepted and 
redirected to our workflow
 *
-* @param EditPage $editPage
+* @param WikiPage|Article|Page $article The requested page
+* @param User $user The user trying to load the editor
 * @return bool
 */
-   public function shouldInterceptEditPage( EditPage $editPage ) {
-   $title = $editPage->getTitle();
-   $user = $editPage->getContext()->getUser();
+   public function shouldInterceptEditPage( $article, $user ) {
+   $title = $article->getTitle();
 
$conditions = $this->config->get( 'ArticleCreationWorkflows' );
 
diff --git a/tests/phpunit/WorkflowTest.php b/tests/phpunit/WorkflowTest.php
index 6534373..e1c48ac 100644
--- a/tests/phpunit/WorkflowTest.php
+++ b/tests/phpunit/WorkflowTest.php
@@ -34,7 +34,6 @@
 
$article = new Article( $title );
$article->setContext( $context );
-   $editPage = new EditPage( $article );
$config = new HashConfig( [ 'ArticleCreationWorkflows' => 
$settings ] );
 
$landingPage = $this->getMock( Title::class, [ 'exists' ] );
@@ -42,7 +41,7 @@
$workflow = $this->getMock( Workflow::class, [ 
'getLandingPageTitle' ], [ $config ] );
$workflow->method( 'getLandingPageTitle' )->willReturn( 
$landingPage );
 
-   self::assertEquals( $expected, 
$workflow->shouldInterceptEditPage( $editPage ) );
+   self::assertEquals( $expected, 
$workflow->shouldInterceptEditPage( $article, $user ) );
}
 
public function provideShouldInterceptEditPage() {
@@ -84,7 +83,7 @@
 
public function testLandingPageExistence() {
$article = new Article( 

[MediaWiki-commits] [Gerrit] mediawiki...ListSignup[master]: Set $wgAvailableRights

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376772 )

Change subject: Set $wgAvailableRights
..

Set $wgAvailableRights

1) AvailableRightsTest::testAvailableRights
Additional user rights need to be added to $wgAvailableRights or via the
"UserGetAllRights" hook. See the instructions at:
https://www.mediawiki.org/wiki/Manual:User_rights#Adding_new_rights
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
+0 => 'purgelistsignupdisplay'
 )

Change-Id: I53dde21424bb0ce35b0ca7b7508a62cfbc72910e
---
M ListSignup.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ListSignup 
refs/changes/72/376772/1

diff --git a/ListSignup.php b/ListSignup.php
index 2707dd5..edcd51d 100644
--- a/ListSignup.php
+++ b/ListSignup.php
@@ -50,3 +50,5 @@
 $wgGroupPermissions['autoconfirmed']['purgelistsignupdisplay'] = false;
 $wgGroupPermissions['bot'  ]['purgelistsignupdisplay'] = false; // 
registered bots
 $wgGroupPermissions['sysop']['purgelistsignupdisplay'] = true;
+
+$wgAvailableRights[] = 'purgelistsignupdisplay';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53dde21424bb0ce35b0ca7b7508a62cfbc72910e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ListSignup
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] analytics...source[master]: Move GraphiteClient from core to job

2017-09-08 Thread Nuria (Code Review)
Nuria has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376333 )

Change subject: Move GraphiteClient from core to job
..


Move GraphiteClient from core to job

The GraphiteClient was only used in the refinery-job module, and was
the only piece of scala code in the refinery-core one. Moving it
allows us to remove scala dependencies in refinery-core, and makes
us create a 'connector' package in refinery-job, paving the way for
new classes to come.

Bug: T175163
Change-Id: Iee07232b773ee8fdc819c46dacf84f89c75b51ad
---
M refinery-core/pom.xml
M 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/RESTBaseMetrics.scala
M 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataArticlePlaceholderMetrics.scala
M 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataSpecialEntityDataMetrics.scala
R 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/connectors/GraphiteClient.scala
5 files changed, 9 insertions(+), 57 deletions(-)

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



diff --git a/refinery-core/pom.xml b/refinery-core/pom.xml
index ce8b957..209e71e 100644
--- a/refinery-core/pom.xml
+++ b/refinery-core/pom.xml
@@ -68,28 +68,13 @@
 jackson-databind
 
 
-
-org.scala-lang
-scala-library
-provided
-
-
-
-org.scalatest
-scalatest_2.10
-test
-
-
-
-com.github.nscala-time
-nscala-time_2.10
-
 
 
-com.google.guava
-guava
-12.0
-
+com.google.guava
+guava
+12.0
+
+
 
 org.reflections
 reflections
@@ -99,39 +84,6 @@
 
 
 
-
-org.scala-tools
-maven-scala-plugin
-2.15.2
-
-
-
-compile
-testCompile
-
-
-
-
-
-
-org.scalatest
-scalatest-maven-plugin
-1.0
-
-
${project.build.directory}/surefire-reports
-.
-WDF TestSuite.txt
-
-
-
-test
-
-test
-
-
-
-
-
 
 org.apache.maven.plugins
 maven-surefire-plugin
diff --git 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/RESTBaseMetrics.scala
 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/RESTBaseMetrics.scala
index 0bba736..9cd743a 100644
--- 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/RESTBaseMetrics.scala
+++ 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/RESTBaseMetrics.scala
@@ -3,7 +3,7 @@
 import org.apache.spark.sql.{DataFrame, SQLContext}
 import org.apache.spark.{SparkConf, SparkContext}
 import org.joda.time.DateTime
-import org.wikimedia.analytics.refinery.core.GraphiteClient
+import org.wikimedia.analytics.refinery.job.connectors.GraphiteClient
 import scopt.OptionParser
 
 /**
diff --git 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataArticlePlaceholderMetrics.scala
 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataArticlePlaceholderMetrics.scala
index c839d7a..e680683 100644
--- 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataArticlePlaceholderMetrics.scala
+++ 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataArticlePlaceholderMetrics.scala
@@ -3,7 +3,7 @@
 import org.apache.spark.sql.SQLContext
 import org.apache.spark.{SparkConf, SparkContext}
 import org.joda.time.DateTime
-import org.wikimedia.analytics.refinery.core.GraphiteClient
+import org.wikimedia.analytics.refinery.job.connectors.GraphiteClient
 import scopt.OptionParser
 import scala.collection.mutable.Map;
 
diff --git 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataSpecialEntityDataMetrics.scala
 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataSpecialEntityDataMetrics.scala
index c0c72f4..97be350 100644
--- 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataSpecialEntityDataMetrics.scala
+++ 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/WikidataSpecialEntityDataMetrics.scala
@@ -3,7 +3,7 @@
 import 

[MediaWiki-commits] [Gerrit] mediawiki...ListSignup[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376771 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: Ic1be6855f630f5222cd865e82d59e2c0d3d99863
---
M .gitignore
A composer.json
2 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ListSignup 
refs/changes/71/376771/1

diff --git a/.gitignore b/.gitignore
index 2ccbe46..47e36d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 /node_modules/
+/vendor/
+/composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1be6855f630f5222cd865e82d59e2c0d3d99863
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ListSignup
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] operations/puppet[production]: admins: add Kai Nissen (knissen) to LDAP (nda) users

2017-09-08 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376769 )

Change subject: admins: add Kai Nissen (knissen) to LDAP (nda) users
..


admins: add Kai Nissen (knissen) to LDAP (nda) users

Kai Nissen now has an NDA on file with legal, confirmed
on Google doc. He will be added to the LDAP group "nda" for
access to pivot.

Bug: T168046
Change-Id: Ice27ea96603f33051ec795933aaa98a605523fb1
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index d33adcb..c73fff0 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -2629,6 +2629,10 @@
 ensure: present
 realname: Jessica Robell
 email: jrob...@wikimedia.org
+  knissen:
+ensure: present
+realname: Kai Nissen
+email: kai.nis...@wikimedia.de
   kemayo:
 ensure: present
 realname: David Lynch

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice27ea96603f33051ec795933aaa98a605523fb1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: RobH 
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...VisualChat[master]: Rename entry point to match extension name

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376770 )

Change subject: Rename entry point to match extension name
..

Rename entry point to match extension name

The jenkins unit test job needs a entry point
which is same named as the git repository

Change-Id: Id8cfd9b8c53b4233d2d01e09af9e5074caf6e7cb
---
R VisualChat.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualChat 
refs/changes/70/376770/1

diff --git a/visualchat.php b/VisualChat.php
similarity index 95%
rename from visualchat.php
rename to VisualChat.php
index c6c4ab8..c68afcf 100644
--- a/visualchat.php
+++ b/VisualChat.php
@@ -14,7 +14,7 @@
 if ( !defined( 'MEDIAWIKI' ) ) {
 echo <

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix pedantic spacing in phpcs

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376767 )

Change subject: Fix pedantic spacing in phpcs
..


Fix pedantic spacing in phpcs

Change-Id: Ic4956f8f099da3c62cf4e01a0869b8d887b1011c
---
M wmf-config/FeaturedFeedsWMF.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/FeaturedFeedsWMF.php b/wmf-config/FeaturedFeedsWMF.php
index 7a3e7a9..f1b01af 100644
--- a/wmf-config/FeaturedFeedsWMF.php
+++ b/wmf-config/FeaturedFeedsWMF.php
@@ -4,7 +4,7 @@
  * Feed settings for WMF projects
  */
 
-$wgHooks['FeaturedFeeds::getFeeds'][] = function( &$feeds ) {
+$wgHooks['FeaturedFeeds::getFeeds'][] = function ( &$feeds ) {
global $wgConf, $wmgFeaturedFeedsOverrides;
list( $site, $lang ) = $wgConf->siteFromDB( wfGetDB( DB_SLAVE 
)->getDBname() );
$media = [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4956f8f099da3c62cf4e01a0869b8d887b1011c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
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]: admins: add Kai Nissen (knissen) to LDAP (nda) users

2017-09-08 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376769 )

Change subject: admins: add Kai Nissen (knissen) to LDAP (nda) users
..

admins: add Kai Nissen (knissen) to LDAP (nda) users

Kai Nissen now has an NDA on file with legal, confirmed
on Google doc. He will be added to the LDAP group "nda" for
access to pivot.

Bug: T168046
Change-Id: Ice27ea96603f33051ec795933aaa98a605523fb1
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/376769/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index d33adcb..c73fff0 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -2629,6 +2629,10 @@
 ensure: present
 realname: Jessica Robell
 email: jrob...@wikimedia.org
+  knissen:
+ensure: present
+realname: Kai Nissen
+email: kai.nis...@wikimedia.de
   kemayo:
 ensure: present
 realname: David Lynch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice27ea96603f33051ec795933aaa98a605523fb1
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...UpdateMediaWiki[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376768 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I3029a275085d1ec0dc6807011ec6efc3b67510ad
---
A .gitignore
A composer.json
2 files changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..db8a779
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/node_modules
+/vendor
+/composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3029a275085d1ec0dc6807011ec6efc3b67510ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UpdateMediaWiki
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/core[wmf/1.30.0-wmf.17]: WLFilters: Respect default values

2017-09-08 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376766 )

Change subject: WLFilters: Respect default values
..

WLFilters: Respect default values

Followup to I3e48a9f2d9b70f0b9f6d7c6329db9c8e8001ee49
Reported in T174725#3590145

Comparing current value and active value with
different representation ("1" !== true) leads to
not applying filters that are ON by default.

Bug: T174725
Change-Id: If083610c0294756589adfc32a59388cc7422ad5d
(cherry picked from commit 5e12ab58bec3844100e7407137d75a43add9b22d)
---
M includes/changes/ChangesListBooleanFilter.php
1 file changed, 16 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/376766/1

diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index 913bd38..dd62d7f 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -235,10 +235,13 @@
 * @inheritDoc
 */
public function isSelected( FormOptions $opts ) {
-   return !$opts[ $this->getName() ] &&
-   array_filter( $this->getSiblings(), function ( $sibling 
) use ( $opts ) {
-   return $opts[ $sibling->getName() ];
-   } );
+   return !$this->getValue( $opts ) &&
+   array_filter(
+   $this->getSiblings(),
+   function ( ChangesListBooleanFilter $sibling ) 
use ( $opts ) {
+   return $sibling->getValue( $opts );
+   }
+   );
}
 
/**
@@ -251,6 +254,14 @@
return false;
}
 
-   return $opts[ $this->getName() ] === $this->activeValue;
+   return $this->getValue( $opts ) === $this->activeValue;
+   }
+
+   /**
+* @param FormOptions $opts
+* @return bool The current value of this filter according to $opts but 
coerced to boolean
+*/
+   public function getValue( FormOptions $opts ) {
+   return (bool)$opts[ $this->getName() ];
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If083610c0294756589adfc32a59388cc7422ad5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.17
Gerrit-Owner: Sbisson 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix pedantic spacing in phpcs

2017-09-08 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376767 )

Change subject: Fix pedantic spacing in phpcs
..

Fix pedantic spacing in phpcs

Change-Id: Ic4956f8f099da3c62cf4e01a0869b8d887b1011c
---
M wmf-config/FeaturedFeedsWMF.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/FeaturedFeedsWMF.php b/wmf-config/FeaturedFeedsWMF.php
index 7a3e7a9..f1b01af 100644
--- a/wmf-config/FeaturedFeedsWMF.php
+++ b/wmf-config/FeaturedFeedsWMF.php
@@ -4,7 +4,7 @@
  * Feed settings for WMF projects
  */
 
-$wgHooks['FeaturedFeeds::getFeeds'][] = function( &$feeds ) {
+$wgHooks['FeaturedFeeds::getFeeds'][] = function ( &$feeds ) {
global $wgConf, $wmgFeaturedFeedsOverrides;
list( $site, $lang ) = $wgConf->siteFromDB( wfGetDB( DB_SLAVE 
)->getDBname() );
$media = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4956f8f099da3c62cf4e01a0869b8d887b1011c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

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


[MediaWiki-commits] [Gerrit] analytics...web[master]: output: Fallback to write_string when some error occur in wr...

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376561 )

Change subject: output: Fallback to write_string when some error occur in write 
for xlsx
..


output: Fallback to write_string when some error occur in write for xlsx

Type specific errors, eg. urls longer than 255 characters, return a
value usually < -1 on write(). We fallback to basic string, without
type conversion, with write_string(), if the given cell is a string.

Bug: T175285
Change-Id: Ie4ed21e646a8df7d14edd8161a82c89aae4c3b65
---
M quarry/web/output.py
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/quarry/web/output.py b/quarry/web/output.py
index 10ce6e4..234b991 100644
--- a/quarry/web/output.py
+++ b/quarry/web/output.py
@@ -116,8 +116,16 @@
 # somehow not UTF-8, we replace them to not get an UnicodeError
 # from within xlsxwriter.
 cell = cell.decode('utf-8', 'replace')
-# TODO: write_row?
-worksheet.write(row_num, col_num, cell)
+# T175285: xlsx can't do urls longer than 255 chars.
+# We first try writing it with write(), if it fails due to
+# type-specific errors (return code < -1; 0 is success and -1 is
+# generic row/col dimension error), we use write_string to force
+# writing as string type, which has a max of 32767 chars.
+# This only works when cell is a string, however; so only string
+# will use fallback.
+if (worksheet.write(row_num, col_num, cell) < -1 and
+isinstance(cell, basestring)):
+worksheet.write_string(row_num, col_num, cell)
 
 workbook.close()
 output.seek(0)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4ed21e646a8df7d14edd8161a82c89aae4c3b65
Gerrit-PatchSet: 2
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 
Gerrit-Reviewer: Zhuyifei1999 
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...SemanticDrilldown[master]: Use auto-commit for temporary table operations

2017-09-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375785 )

Change subject: Use auto-commit for temporary table operations
..


Use auto-commit for temporary table operations

When running MySQL 5.7 with the --enforce-gtid-consistency option, operations 
on temporary tables are only permitted in auto-commit mode, outside of any 
transaction.
As such, we must make sure that Semantic Drilldown performs all temporary table 
operations by properly committing any open transactions and setting the
DBO_TRX flag for the query.

See also: 
https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-restrictions.html

Bug: T174908
Change-Id: I51268b3eeaddb7cc0d49a19bc501117d5c248479
---
M SemanticDrilldown.php
M includes/SD_Filter.php
M includes/SD_Utils.php
A includes/TemporaryTableManager.php
M specials/SD_BrowseData.php
A tests/phpunit/TemporaryTableManagerTest.php
6 files changed, 177 insertions(+), 6 deletions(-)

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



diff --git a/SemanticDrilldown.php b/SemanticDrilldown.php
index 18f77d3..1fff8de 100644
--- a/SemanticDrilldown.php
+++ b/SemanticDrilldown.php
@@ -61,6 +61,7 @@
 $wgAutoloadClasses['SDAppliedFilter'] = $sdgIP . 
'/includes/SD_AppliedFilter.php';
 $wgAutoloadClasses['SDPageSchemas'] = $sdgIP . '/includes/SD_PageSchemas.php';
 $wgAutoloadClasses['SDParserFunctions'] = $sdgIP . 
'/includes/SD_ParserFunctions.php';
+$wgAutoloadClasses['TemporaryTableManager'] = 
"$sdgIP/includes/TemporaryTableManager.php";
 
 // register all special pages and other classes
 $wgSpecialPages['BrowseData'] = 'SDBrowseData';
@@ -72,6 +73,7 @@
 $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
 $wgHooks['PageSchemasRegisterHandlers'][] = 'SDPageSchemas::registerClass';
 $wgHooks['ParserFirstCallInit'][] = 'SDParserFunctions::registerFunctions';
+$wgHooks['UnitTestsList'][] = 'SDUtils::onUnitTestsList';
 
 # ##
 # This is the path to your installation of Semantic Drilldown as
diff --git a/includes/SD_Filter.php b/includes/SD_Filter.php
index d238a97..1cf7c6b 100644
--- a/includes/SD_Filter.php
+++ b/includes/SD_Filter.php
@@ -417,10 +417,12 @@
 */
function createTempTable() {
$dbr = wfGetDB( DB_SLAVE );
+
$smw_ids = $dbr->tableName( SDUtils::getIDsTableName() );
+
$valuesTable = $dbr->tableName( $this->getTableName() );
$value_field = $this->getValueField();
-   $property_field = 'p_id';
+
$query_property = $this->escaped_property;
 
$sql = <queryWithAutoCommit( $sql, __METHOD__ );
}
 
/**
@@ -445,6 +449,8 @@
// DROP TEMPORARY TABLE would be marginally safer, but it's
// not supported on all RDBMS's.
$sql = "DROP TABLE semantic_drilldown_filter_values";
-   $dbr->query( $sql );
+
+   $temporaryTableManager = new TemporaryTableManager( $dbr );
+   $temporaryTableManager->queryWithAutoCommit( $sql, __METHOD__ );
}
 }
diff --git a/includes/SD_Utils.php b/includes/SD_Utils.php
index 8816695..79e7fc1 100644
--- a/includes/SD_Utils.php
+++ b/includes/SD_Utils.php
@@ -488,4 +488,15 @@
 
return true;
}
+
+   /**
+* Register extension unit tests with old versions of MediaWiki
+*
+* @param string[] $paths
+* @return bool
+*/
+   public static function onUnitTestsList( &$paths ) {
+   $paths[] = dirname( __FILE__ ) . '/../tests/phpunit';
+   return true;
+   }
 }
diff --git a/includes/TemporaryTableManager.php 
b/includes/TemporaryTableManager.php
new file mode 100644
index 000..848208b
--- /dev/null
+++ b/includes/TemporaryTableManager.php
@@ -0,0 +1,40 @@
+databaseConnection = $databaseConnection;
+   }
+
+   /**
+* Execute the given SQL query against the database in auto-commit mode.
+* If a transaction was already open (via DBO_TRX flag), it is commited.
+*
+* @param string $sqlQuery SQL query to execute
+* @param string $method method name to log for query, defaults to this 
method
+*/
+   public function queryWithAutoCommit( $sqlQuery, $method = __METHOD__ ) {
+   $wasAutoTrx = $this->databaseConnection->getFlag( DBO_TRX );
+   $this->databaseConnection->clearFlag( DBO_TRX );
+
+   // If a transaction was automatically started on first query, 
make sure we commit it
+   if ( $wasAutoTrx && $this->databaseConnection->trxLevel() ) {
+   $this->databaseConnection->commit( __METHOD__ );
+   }
+
+   

[MediaWiki-commits] [Gerrit] mediawiki...SendGrid[master]: build: Always exclude vendor and node_modules

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376765 )

Change subject: build: Always exclude vendor and node_modules
..

build: Always exclude vendor and node_modules

Also use tabs in json

Change-Id: I5e70f06af43dba4d87d195c1ce66c43c549c4055
---
M Gruntfile.js
M composer.json
M package.json
3 files changed, 32 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SendGrid 
refs/changes/65/376765/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 7756e75..a45071e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,7 +10,8 @@
jsonlint: {
all: [
'**/*.json',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**'
]
}
} );
diff --git a/composer.json b/composer.json
index a926f66..c27b1e7 100644
--- a/composer.json
+++ b/composer.json
@@ -1,23 +1,23 @@
 {
-"name": "mediawiki/sendgrid",
-"require": {
-"php": ">=5.6",
-"sendgrid/sendgrid": "~6.0",
-"sendgrid/php-http-client": "~3.7"
-},
-"require-dev": {
-"phpunit/phpunit": "4.*",
-"squizlabs/php_codesniffer": "2.*",
-"jakub-onderka/php-parallel-lint": "0.9.2",
-"jakub-onderka/php-console-highlighter": "0.3.2"
-},
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor"
-]
-},
-"config": {
-"optimize-autoloader": true,
-"prepend-autoloader": false
-}
+   "name": "mediawiki/sendgrid",
+   "require": {
+   "php": ">=5.6",
+   "sendgrid/sendgrid": "~6.0",
+   "sendgrid/php-http-client": "~3.7"
+   },
+   "require-dev": {
+   "phpunit/phpunit": "4.*",
+   "squizlabs/php_codesniffer": "2.*",
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   },
+   "config": {
+   "optimize-autoloader": true,
+   "prepend-autoloader": false
+   }
 }
diff --git a/package.json b/package.json
index 3b4b5f0..6ff591b 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
 {
-  "private": true,
-  "scripts": {
-"test": "grunt test"
-  },
-  "devDependencies": {
-"grunt": "1.0.1",
-"grunt-banana-checker": "0.4.0",
-"grunt-jsonlint": "1.0.7"
-  }
+   "private": true,
+   "scripts": {
+   "test": "grunt test"
+   },
+   "devDependencies": {
+   "grunt": "1.0.1",
+   "grunt-banana-checker": "0.4.0",
+   "grunt-jsonlint": "1.0.7"
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e70f06af43dba4d87d195c1ce66c43c549c4055
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SendGrid
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...MultiLanguageManager[master]: Add php-parallel-lint

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376764 )

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: Idffa9f5fb286df266ed41658fbd62e560bc3e0e6
---
M .gitignore
M composer.json
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiLanguageManager 
refs/changes/64/376764/1

diff --git a/.gitignore b/.gitignore
index 7e5da87..8ec4b92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 node_modules/
 vendor/
+composer.lock
diff --git a/composer.json b/composer.json
index 575a549..bb27d9a 100644
--- a/composer.json
+++ b/composer.json
@@ -4,5 +4,14 @@
"MultiLanguageManager\\Tests\\" : "tests/phpunit",
"MultiLanguageManager\\" : "src"
}
+   },
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idffa9f5fb286df266ed41658fbd62e560bc3e0e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiLanguageManager
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] translatewiki[master]: Tweak SMW settings

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376763 )

Change subject: Tweak SMW settings
..


Tweak SMW settings

Change-Id: Ib86f6caf751ccef87298a3badb63439d5f6e5400
---
M TranslatewikiSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php
index de86571..8370172 100644
--- a/TranslatewikiSettings.php
+++ b/TranslatewikiSettings.php
@@ -271,6 +271,8 @@
 $smwgNamespacesWithSemanticLinks[90/*NS_LQT_THREAD*/] = true;
 $smwgNamespacesWithSemanticLinks[92/*NS_LQT_SUMMARY*/] = true;
 $smwgEnabledEditPageHelp = false;
+$smwgQMaxInlineLimit = 2000;
+$smwgQUpperbound = 2000;
 
 wfLoadExtension( 'PageForms' );
 $sfgRedLinksCheckOnlyLocalProps = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib86f6caf751ccef87298a3badb63439d5f6e5400
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] translatewiki[master]: Tweak SMW settings

2017-09-08 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376763 )

Change subject: Tweak SMW settings
..

Tweak SMW settings

Change-Id: Ib86f6caf751ccef87298a3badb63439d5f6e5400
---
M TranslatewikiSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/63/376763/1

diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php
index de86571..8370172 100644
--- a/TranslatewikiSettings.php
+++ b/TranslatewikiSettings.php
@@ -271,6 +271,8 @@
 $smwgNamespacesWithSemanticLinks[90/*NS_LQT_THREAD*/] = true;
 $smwgNamespacesWithSemanticLinks[92/*NS_LQT_SUMMARY*/] = true;
 $smwgEnabledEditPageHelp = false;
+$smwgQMaxInlineLimit = 2000;
+$smwgQUpperbound = 2000;
 
 wfLoadExtension( 'PageForms' );
 $sfgRedLinksCheckOnlyLocalProps = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib86f6caf751ccef87298a3badb63439d5f6e5400
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/mediawiki-config[master]: Drop PrivateSettings symlink, just include directly

2017-09-08 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Drop PrivateSettings symlink, just include directly
..

Drop PrivateSettings symlink, just include directly

Change-Id: Iac134e534f1dc9477bdad076a8aab04b163aa293
---
M wmf-config/CommonSettings.php
D wmf-config/PrivateSettings.php
2 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fe6ff5d..3693689 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -228,7 +228,7 @@
 
 # Private settings such as passwords, that shouldn't be published
 # Needs to be before db.php
-require "$wmfConfigDir/PrivateSettings.php";
+require "$wmfConfigDir/../private/PrivateSettings.php";
 
 $wgMemCachedServers = [];
 
diff --git a/wmf-config/PrivateSettings.php b/wmf-config/PrivateSettings.php
deleted file mode 12
index bfd5916..000
--- a/wmf-config/PrivateSettings.php
+++ /dev/null
@@ -1 +0,0 @@
-../private/PrivateSettings.php
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac134e534f1dc9477bdad076a8aab04b163aa293
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add missing unit test and npm jobs

2017-09-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376761 )

Change subject: Add missing unit test and npm jobs
..

Add missing unit test and npm jobs

ArticleCreationWorkflow: npm already exists
EditcountAdditions: I067a94504bf61a5f337c5e8c8cb71d221ddbdee5
MultiLanguageManager: Id53ee46bd864f435c6cea0e3dec08ed08c7cf889
BrickipediaExtra: Ib59a3c5c5619a1748268de667d6af1eff14b1093
ArticleToCategory2: New extension, unit test only
ExtJSBase: New extension, unit test only
Wikisource: New extension, unit test only

Change-Id: Ia3bd4f511feee3d49d822239ab0d1c64247c9c0f
---
M zuul/layout.yaml
1 file changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/61/376761/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 81e2b4b..27f18e1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3128,6 +3128,11 @@
   - name: extension-unittests-generic
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/EditcountAdditions
+template:
+  - name: extension-unittests-non-voting
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/EditNotify
 template:
   - name: extension-unittests-generic
@@ -3207,6 +3212,10 @@
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+
+  - name: mediawiki/extensions/ExtJSBase
+template:
+  - name: extension-unittests-non-voting
 
   - name: mediawiki/extensions/ExpandTemplates
 template:
@@ -3694,6 +3703,11 @@
   - name: extension-unittests-generic
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/MultiLanguageManager
+template:
+  - name: extension-unittests-non-voting
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/MultiMaps
 template:
   - name: extension-unittests-generic
@@ -3999,11 +4013,16 @@
 template:
   - name: extension-unittests-generic
   - name: extension-phan-generic
+  - name: mwgate-npm
 
   - name: mediawiki/extensions/ArticleIndex
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+
+  - name: mediawiki/extensions/ArticleToCategory2
+template:
+  - name: extension-unittests-non-voting
 
   - name: mediawiki/extensions/AssertEdit
 template:
@@ -4161,6 +4180,11 @@
   - name: mediawiki/extensions/BreadCrumbs2
 template:
   - name: extension-unittests-generic
+  - name: mwgate-npm
+
+  - name: mediawiki/extensions/BrickipediaExtra
+template:
+  - name: extension-unittests-non-voting
   - name: mwgate-npm
 
   - name: mediawiki/extensions/Carp
@@ -5925,6 +5949,10 @@
   - name: extension-unittests-generic
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/Wikisource
+template:
+  - name: extension-unittests-non-voting
+
   - name: mediawiki/extensions/WikiTextLoggedInOut
 template:
   - name: extension-unittests-generic

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3bd4f511feee3d49d822239ab0d1c64247c9c0f
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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...MobileFrontend[master]: QUnit: Drop assertions for expected number of tests

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374908 )

Change subject: QUnit: Drop assertions for expected number of tests
..


QUnit: Drop assertions for expected number of tests

Drop assertions for expected number of tests
These are no longer necessary nor supported inside
Special:JavaScript/qunit (unless you use assert.expect())

assert.expect() is not used as asserting number of tests is
mostly redundant these days and it doesn't seem to provide much value.

In addition to this, drop usage of .async and return promises from all
existing async tests instead. Note, although .async is not deprecated,
I'd argue it helps with readability to have one single return point in
a test.

Bug: T174598
Change-Id: I50ac2b9595416e9142d8b973caf1deb360714891
---
M tests/qunit/mobile.editor.api/test_EditorGateway.js
M tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
M tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
M tests/qunit/mobile.languages.structured/test_LanguageOverlay.js
M tests/qunit/mobile.languages.structured/test_util.js
M tests/qunit/mobile.mediaViewer/test_ImageGateway.js
M tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
M tests/qunit/mobile.nearby/test_Nearby.js
M tests/qunit/mobile.nearby/test_NearbyGateway.js
M tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
M tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
M tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
M tests/qunit/mobile.search.api/test_SearchGateway.js
M tests/qunit/mobile.search.util/test_extendSearchParams.js
M tests/qunit/mobile.search/test_MobileWebSearchLogger.js
M tests/qunit/mobile.startup/test_Overlay.js
M tests/qunit/mobile.startup/test_OverlayManager.js
M tests/qunit/mobile.startup/test_Page.js
M tests/qunit/mobile.startup/test_PageGateway.js
M tests/qunit/mobile.startup/test_Skin.js
M tests/qunit/mobile.startup/test_View.js
M tests/qunit/mobile.startup/test_browser.js
M tests/qunit/mobile.startup/test_modules.js
M tests/qunit/mobile.startup/test_time.js
M tests/qunit/mobile.startup/test_user.js
M tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
M tests/qunit/mobile.toggle/test_toggle.js
M tests/qunit/mobile.watchlist/test_WatchList.js
M tests/qunit/mobile.watchlist/test_WatchListGateway.js
M tests/qunit/mobile.watchstar/test_Watchstar.js
M tests/qunit/mobile.watchstar/test_WatchstarGateway.js
33 files changed, 305 insertions(+), 267 deletions(-)

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



diff --git a/tests/qunit/mobile.editor.api/test_EditorGateway.js 
b/tests/qunit/mobile.editor.api/test_EditorGateway.js
index a16d23a..f743ad9 100644
--- a/tests/qunit/mobile.editor.api/test_EditorGateway.js
+++ b/tests/qunit/mobile.editor.api/test_EditorGateway.js
@@ -24,7 +24,7 @@
}
} );
 
-   QUnit.test( '#getContent (no section)', 1, function ( assert ) {
+   QUnit.test( '#getContent (no section)', function ( assert ) {
var gateway = new EditorGateway( {
api: new mw.Api(),
title: 'MediaWiki:Test.css'
@@ -42,34 +42,41 @@
} ), 'rvsection not passed to api request' );
} );
 
-   QUnit.test( '#getContent', 2, function ( assert ) {
-   var gateway = new EditorGateway( {
+   QUnit.test( '#getContent', function ( assert ) {
+   var gateway,
+   spy = this.spy;
+
+   gateway = new EditorGateway( {
api: new mw.Api(),
title: 'test',
sectionId: 1
} );
 
-   gateway.getContent().done( function ( resp ) {
+   return gateway.getContent().done( function ( resp ) {
assert.strictEqual( resp, 'section', 'return section 
content' );
+   return gateway.getContent();
+   } ).then( function () {
+   assert.ok( spy.calledOnce, 'cache content' );
} );
-   gateway.getContent();
-   assert.ok( this.spy.calledOnce, 'cache content' );
} );
 
-   QUnit.test( '#getContent, new page', 2, function ( assert ) {
-   var gateway = new EditorGateway( {
+   QUnit.test( '#getContent, new page', function ( assert ) {
+   var gateway,
+   spy = this.spy;
+
+   gateway = new EditorGateway( {
api: new mw.Api(),
title: 'test',
isNewPage: true
} );
 
-   gateway.getContent().done( function ( resp ) {
+   return gateway.getContent().done( function 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Log a stack trace for all dedupe queries

2017-09-08 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376760 )

Change subject: Log a stack trace for all dedupe queries
..

Log a stack trace for all dedupe queries

Bug: T175382
Change-Id: Iefa7f224acfaf8ec6160678eb35ccd49b3bb78e0
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/60/376760/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 138d177..7435ee5 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -3693,6 +3693,18 @@
   }
 }
 
+function wmf_civicrm_civicrm_dupeQuery($ruleGroup, $queryType, &$queries) {
+  $message = "Dedupe queries generated.  Query type $queryType.  ";
+  if ( $ruleGroup instanceof CRM_Dedupe_DAO_RuleGroup ) {
+$message .= "Rule group: {$ruleGroup->name}.  ";
+  }
+  $message .= 'Queries : ' . print_r( $queries, true ) . '.  ';
+  $message .= 'Stack trace: ' . print_r( debug_backtrace(), true );
+
+  watchdog( 'wmf_civicrm', $message, WATCHDOG_INFO );
+  return TRUE;
+}
+
 /**
  * Block users from accessing the dedupe page without a limit.
  *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefa7f224acfaf8ec6160678eb35ccd49b3bb78e0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
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] apps...wikipedia[master]: Show message when user attempts to download an article pack ...

2017-09-08 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376759 )

Change subject: Show message when user attempts to download an article pack 
while offline
..

Show message when user attempts to download an article pack while offline

Bug: T172881
Change-Id: I3fd34c9fe8b286a72ef6d9f4e4405889c794aa36
---
M app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
3 files changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/59/376759/1

diff --git 
a/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java 
b/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
index 945d57c..1cede7d 100644
--- a/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
+++ b/app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
@@ -21,6 +21,7 @@
 import org.wikipedia.page.PageActivity;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.staticdata.MainPageNameData;
+import org.wikipedia.util.DeviceUtil;
 import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.GradientUtil;
 import org.wikipedia.util.log.L;
@@ -108,10 +109,14 @@
 }
 
 @OnClick(R.id.button_compilation_detail_download) void onDownloadClick() {
-if (!getDownloadObserver().isDownloading(compilation)) {
-MediaDownloadReceiver.download(getContext(), compilation);
-downloadPending = true;
-updateDownloadState(true, null);
+if (DeviceUtil.isOnline()) {
+if (!getDownloadObserver().isDownloading(compilation)) {
+MediaDownloadReceiver.download(getContext(), compilation);
+downloadPending = true;
+updateDownloadState(true, null);
+}
+} else {
+FeedbackUtil.showMessage(getActivity(), 
R.string.offline_compilation_download_device_offline);
 }
 }
 
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index 4831e75..e7a7de0 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -423,6 +423,7 @@
   Reason for an edit being 
reverted, because it did not follow the guidelines for descriptions. (Please 
preserve the anchor tag in its exact form)
   Reason for an edit being 
reverted, because it looks like vandalism.
   Message that allows the user 
to go to the edit history associated with the article. (Please preserve the 
anchor tag in its exact form)
+  Message shown 
when the user attempts to download an article pack but the device is 
offline.
   Message explaining why we 
need permission to access the device storage when reading articles in offline 
mode.
   Error shown when the app could 
not read from the internal or external storage of the device due to permission 
not being granted.
   Message shown in the Feed card that informs 
the user that they are now browsing Wikipedia in offline mode.
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index cb04d40..406207b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -476,6 +476,7 @@
 
 
 
+No internet 
connection. Make sure you\'re back online, then try again.
 Permission to access 
storage on your device is required for offline browsing.
 Permission not granted to 
read from device storage.
 You are now browsing Wikipedia offline 
with articles in your Offline Library.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fd34c9fe8b286a72ef6d9f4e4405889c794aa36
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WLFilters: Respect default values

2017-09-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376719 )

Change subject: WLFilters: Respect default values
..


WLFilters: Respect default values

Followup to I3e48a9f2d9b70f0b9f6d7c6329db9c8e8001ee49
Reported in T174725#3590145

Comparing current value and active value with
different representation ("1" !== true) leads to
not applying filters that are ON by default.

Bug: T174725
Change-Id: If083610c0294756589adfc32a59388cc7422ad5d
---
M includes/changes/ChangesListBooleanFilter.php
1 file changed, 16 insertions(+), 5 deletions(-)

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



diff --git a/includes/changes/ChangesListBooleanFilter.php 
b/includes/changes/ChangesListBooleanFilter.php
index 913bd38..dd62d7f 100644
--- a/includes/changes/ChangesListBooleanFilter.php
+++ b/includes/changes/ChangesListBooleanFilter.php
@@ -235,10 +235,13 @@
 * @inheritDoc
 */
public function isSelected( FormOptions $opts ) {
-   return !$opts[ $this->getName() ] &&
-   array_filter( $this->getSiblings(), function ( $sibling 
) use ( $opts ) {
-   return $opts[ $sibling->getName() ];
-   } );
+   return !$this->getValue( $opts ) &&
+   array_filter(
+   $this->getSiblings(),
+   function ( ChangesListBooleanFilter $sibling ) 
use ( $opts ) {
+   return $sibling->getValue( $opts );
+   }
+   );
}
 
/**
@@ -251,6 +254,14 @@
return false;
}
 
-   return $opts[ $this->getName() ] === $this->activeValue;
+   return $this->getValue( $opts ) === $this->activeValue;
+   }
+
+   /**
+* @param FormOptions $opts
+* @return bool The current value of this filter according to $opts but 
coerced to boolean
+*/
+   public function getValue( FormOptions $opts ) {
+   return (bool)$opts[ $this->getName() ];
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If083610c0294756589adfc32a59388cc7422ad5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >