[MediaWiki-commits] [Gerrit] mediawiki...FeaturedFeeds[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Iaa38707c38f23746d1f3a7cda4349b282af4
---
M ApiFeaturedFeeds.php
M FeaturedFeeds.body.php
M phpcs.xml
3 files changed, 15 insertions(+), 20 deletions(-)

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



diff --git a/ApiFeaturedFeeds.php b/ApiFeaturedFeeds.php
index be38102..e44715f 100644
--- a/ApiFeaturedFeeds.php
+++ b/ApiFeaturedFeeds.php
@@ -68,6 +68,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
// attempt to find a valid feed name
diff --git a/FeaturedFeeds.body.php b/FeaturedFeeds.body.php
index 8779aad..f572aec 100644
--- a/FeaturedFeeds.body.php
+++ b/FeaturedFeeds.body.php
@@ -6,7 +6,7 @@
/**
 * Returns the list of feeds
 *
-* @param $langCode string|bool Code of language to use or false if 
default
+* @param string|bool $langCode Code of language to use or false if 
default
 * @return array Feeds in format of 'name' => array of FeedItem
 */
public static function getFeeds( $langCode ) {
@@ -75,7 +75,7 @@
 
/**
 * Returns whether all feeds are in content language
-* @return Boolean
+* @return bool
 */
public static function allInContentLanguage() {
if ( is_null( self::$allInContLang ) ) {
@@ -87,7 +87,7 @@
/**
 * Adds feeds to the page header
 *
-* @param OutputPage $out
+* @param OutputPage &$out
 * @return bool
 */
public static function beforePageDisplay( OutputPage &$out ) {
@@ -110,9 +110,9 @@
 
/**
 * SkinTemplateOutputPageBeforeExec hook handler
-* @param Skin $sk
-* @param QuickTemplate $tpl
-* @return Boolean
+* @param Skin &$sk
+* @param QuickTemplate &$tpl
+* @return bool
 */
public static function skinTemplateOutputPageBeforeExec( &$sk, &$tpl ) {
global $wgDisplayFeedsInSidebar, $wgAdvertisedFeedTypes;
@@ -168,7 +168,7 @@
}
 
/**
-* @param $langCode string
+* @param string $langCode
 * @return array
 * @throws Exception
 */
@@ -220,7 +220,7 @@
/**
 * Returns the Unix timestamp of current day's first second
 *
-* @param $timestamp
+* @param string $timestamp
 * @return int Timestamp
 */
public static function startOfDay( $timestamp ) {
@@ -252,7 +252,7 @@
/**
 * Returns the number of seconds a feed should stay in cache
 *
-* @return int: Time in seconds
+* @return int Time in seconds
 */
public static function getMaxAge() {
$ts = new MWTimestamp();
@@ -290,9 +290,9 @@
public $description;
 
/**
-* @param $name string
-* @param $options array
-* @param $lang Language
+* @param string $name
+* @param array $options
+* @param Language $lang
 */
public function __construct( $name, $options, $lang ) {
global $wgContLang;
@@ -320,7 +320,7 @@
}
 
/**
-* @param $key string
+* @param string $key
 * @return Message
 */
private function msg( $key ) {
@@ -444,7 +444,7 @@
/**
 * Returns a URL to the feed
 *
-* @param $format string Feed format, 'rss' or 'atom'
+* @param string $format Feed format, 'rss' or 'atom'
 * @return String
 */
public function getURL( $format ) {
diff --git a/phpcs.xml b/phpcs.xml
index 5a45644..b15894e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,16 +2,10 @@
 


-   
-   
-   
-   



.


-   vendor
-   node_modules
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa38707c38f23746d1f3a7cda4349b282af4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FeaturedFeeds
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...GeoData[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Id5ddbb5b7f9b59264656a3451107702e1b87cd12
---
M includes/Coord.php
M includes/Hooks.php
M includes/Math.php
M includes/Search/CirrusGeoFeature.php
M includes/api/ApiQueryCoordinates.php
M includes/api/ApiQueryGeoSearch.php
M phpcs.xml
7 files changed, 22 insertions(+), 25 deletions(-)

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



diff --git a/includes/Coord.php b/includes/Coord.php
index ca455aa..5c98005 100644
--- a/includes/Coord.php
+++ b/includes/Coord.php
@@ -60,9 +60,9 @@
/**
 * Compares this coordinates with the given coordinates
 *
-* @param Coord $coord: Coordinate to compare with
-* @param int $precision: Comparison precision
-* @return Boolean
+* @param Coord $coord Coordinate to compare with
+* @param int $precision Comparison precision
+* @return bool
 */
public function equalsTo( $coord, $precision = 6 ) {
return isset( $coord )
@@ -74,9 +74,9 @@
/**
 * Compares all the fields of this object with the given coordinates 
object
 *
-* @param Coord $coord: Coordinate to compare with
-* @param int $precision: Comparison precision
-* @return Boolean
+* @param Coord $coord Coordinate to compare with
+* @param int $precision Comparison precision
+* @return bool
 */
public function fullyEqualsTo( $coord, $precision = 6 ) {
return $this->equalsTo( $coord, $precision )
@@ -137,8 +137,8 @@
 
/**
 * Returns this object's representation suitable for insertion into the 
DB via Databse::insert()
-* @param int $pageId: ID of page associated with this coordinate
-* @return array: Associative array in format 'field' => 'value'
+* @param int $pageId ID of page associated with this coordinate
+* @return array Associative array in format 'field' => 'value'
 */
public function getRow( $pageId ) {
global $wgGeoDataIndexGranularity, $wgGeoDataBackend;
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 7b94a0f..bcd0dc8 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -78,7 +78,7 @@
 * ParserFirstCallInit hook handler
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
 *
-* @param Parser $parser
+* @param Parser &$parser
 */
public static function onParserFirstCallInit( &$parser ) {
$parser->setFunctionHook( 'coordinates',
@@ -91,8 +91,8 @@
 * ArticleDeleteComplete hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete
 *
-* @param Article $article
-* @param User $user
+* @param Article &$article
+* @param User &$user
 * @param string $reason
 * @param int $id
 */
@@ -239,7 +239,7 @@
 * OutputPageParserOutput hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageParserOutput
 *
-* @param OutputPage $out
+* @param OutputPage &$out
 * @param ParserOutput $po
 */
public static function onOutputPageParserOutput( OutputPage &$out, 
ParserOutput $po ) {
@@ -266,7 +266,7 @@
 * Search index fields hook handler
 * Adds our stuff to CirrusSearch/Elasticsearch schema
 *
-* @param array $fields
+* @param array &$fields
 * @param SearchEngine $engine
 */
public static function onSearchIndexFields( array &$fields, 
SearchEngine $engine ) {
@@ -288,7 +288,7 @@
/**
 * SearchDataForIndex hook handler
 *
-* @param array[] $fields
+* @param array[] &$fields
 * @param ContentHandler $contentHandler
 * @param WikiPage $page
 * @param ParserOutput $parserOutput
@@ -347,7 +347,7 @@
 * Add to the tables cloned for parser testing
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserTestTables
 *
-* @param array $tables The tables to duplicate structure of
+* @param array &$tables The tables to duplicate structure of
 */
public static function onParserTestTables( &$tables ) {
$tables[] = 'geo_tags';
@@ -373,7 +373,7 @@
/**
 * Add geo-search feature to search syntax
 * @param SearchConfig $config
-* @param array $features
+* @param array &$features
 */
public static function onCirrusSearchAddQueryFeatures( SearchConfig 
$config, array &$features ) {
$features[] = new CirrusGeoFeature();
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Ic6da90005cf4be8fcee92fd2a6d0b0f87c2bf201
---
M AntiSpoof/CentralAuthAntiSpoofHooks.php
M AntiSpoof/batchCAAntiSpoof.php
M includes/CentralAuthGroupMembershipProxy.php
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthPreAuthManagerHooks.php
M includes/CentralAuthUser.php
M includes/GlobalRename/GlobalRenameUser.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/WikiSet.php
M includes/specials/SpecialCentralLogin.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialUsersWhoWillBeRenamed.php
M includes/specials/SpecialWikiSets.php
M phpcs.xml
M tests/phpunit/CentralAuthTestUser.php
21 files changed, 144 insertions(+), 145 deletions(-)

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



diff --git a/AntiSpoof/CentralAuthAntiSpoofHooks.php 
b/AntiSpoof/CentralAuthAntiSpoofHooks.php
index a2ce69a..bb7b01e 100644
--- a/AntiSpoof/CentralAuthAntiSpoofHooks.php
+++ b/AntiSpoof/CentralAuthAntiSpoofHooks.php
@@ -7,8 +7,8 @@
/**
 * Can be used to cancel user account creation
 *
-* @param $user User
-* @param $message string
+* @param User $user
+* @param string &$message
 * @return bool true to continue, false to abort user creation
 */
public static function asAbortNewAccountHook( $user, &$message ) {
@@ -89,7 +89,7 @@
 * On new account creation, record the username's thing-bob.
 * (Called after a user account is created)
 *
-* @param $user User
+* @param User $user
 * @return bool
 */
public static function asAddNewAccountHook( $user ) {
diff --git a/AntiSpoof/batchCAAntiSpoof.php b/AntiSpoof/batchCAAntiSpoof.php
index 3890118..017ccbb 100644
--- a/AntiSpoof/batchCAAntiSpoof.php
+++ b/AntiSpoof/batchCAAntiSpoof.php
@@ -10,7 +10,7 @@
 class BatchCAAntiSpoof extends BatchAntiSpoof {
 
/**
-* @param $items array
+* @param array $items
 */
protected function batchRecord( $items ) {
CentralAuthSpoofUser::batchRecord( $this->getDB(), $items );
@@ -42,7 +42,7 @@
}
 
/**
-* @param $name string
+* @param string $name
 * @return CentralAuthSpoofUser
 */
protected function makeSpoofUser( $name ) {
diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index 8e8ad45..7f1ea72 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -140,8 +140,8 @@
}
 
/**
-* @param $wiki string
-* @return Bool
+* @param string $wiki
+* @return bool
 */
function attachedOn( $wiki ) {
return $this->mGlobalUser->attachedOn( $wiki );
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 3311bd6..cc777e0 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -256,7 +256,7 @@
 * This hook is used in cases where SpecialPageFactory::getPageList() 
is called before
 * $wgExtensionFunctions are run, which happens when E:ShortUrl is 
installed.
 *
-* @param array $list
+* @param array &$list
 * @return bool
 */
public static function onSpecialPage_initList( &$list ) {
@@ -272,8 +272,8 @@
/**
 * Make sure migration information in localuser table is populated
 * on local account creation
-* @param $user User
-* @param $autocreated bool
+* @param User $user
+* @param bool $autocreated
 * @return bool
 */
static function onLocalUserCreated( $user, $autocreated ) {
@@ -301,8 +301,8 @@
/**
 * Add a little pretty to the preferences user info section
 *
-* @param $user User
-* @param $preferences array
+* @param User $user
+* @param array &$preferences
 * @return bool
 */
static function onGetPreferences( $user, &$preferences ) {
@@ -366,9 +366,9 @@
/**
 * Show a nicer error when the user account does not exist on the local 
wiki, but
 * does exist globally
-* @param $users User[]
-* @param $data array
-* @param $abortError String
+* @param User[] &$users
+* @param array $data
+* @param string 

[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I40aeba848e7969b219242631daced88d96939438
---
M CodeReviewHooks.php
M api/ApiQueryCodeRevisions.php
M backend/CodeComment.php
M backend/CodePropChange.php
M backend/CodeRepository.php
M backend/CodeRevision.php
M backend/CodeSignoff.php
M backend/DiffHighlighter.php
M backend/RepoStats.php
M backend/Subversion.php
M maintenance/showEmails.php
M phpcs.xml
M ui/CodeRepoListView.php
M ui/CodeRevisionCommitter.php
M ui/CodeRevisionListView.php
M ui/CodeRevisionView.php
M ui/CodeView.php
M ui/SpecialCode.php
M ui/SpecialRepoAdmin.php
M ui/WordCloud.php
20 files changed, 98 insertions(+), 105 deletions(-)

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



diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index 767acbd..0d7ab0e 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -28,7 +28,7 @@
 *
 * Only MySQL(/MariaDB) and SQLite are supported at the moment.
 *
-* @param $updater DatabaseUpdater
+* @param DatabaseUpdater $updater
 * @return bool
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
@@ -117,8 +117,8 @@
 * current repository when we're on Special:Code, or to be more 
specific,
 * a subpage of a repository on Special:Code.
 *
-* @param $values array
-* @param $out OutputPage
+* @param array &$values
+* @param OutputPage $out
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$values, $out ) {
@@ -136,7 +136,7 @@
/**
 * For integration with the Renameuser extension.
 *
-* @param $renameUserSQL RenameuserSQL
+* @param RenameuserSQL $renameUserSQL
 * @return bool
 */
public static function onRenameUserSQL( $renameUserSQL ) {
@@ -156,7 +156,7 @@
/**
 * For integration with the UserMerge extension.
 *
-* @param array $updateFields
+* @param array &$updateFields
 * @return bool
 */
public static function onUserMergeAccountFields( &$updateFields ) {
diff --git a/api/ApiQueryCodeRevisions.php b/api/ApiQueryCodeRevisions.php
index e9d3703..2b7af03 100644
--- a/api/ApiQueryCodeRevisions.php
+++ b/api/ApiQueryCodeRevisions.php
@@ -107,9 +107,9 @@
}
 
/**
-* @param $row
-* @param $repo CodeRepository
-* @param $result ApiResult
+* @param stdClass $row
+* @param CodeRepository $repo
+* @param ApiResult $result
 * @return array
 */
private function formatRow( $row, $repo, $result ) {
@@ -160,7 +160,7 @@
}
 
/**
-* @param $rev CodeRevision
+* @param CodeRevision $rev
 * @return array
 */
protected function addReferenced( $rev ) {
diff --git a/backend/CodeComment.php b/backend/CodeComment.php
index abf0e10..aa3f442 100644
--- a/backend/CodeComment.php
+++ b/backend/CodeComment.php
@@ -20,7 +20,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $row
+* @param stdClass $row
 * @return CodeComment
 */
static function newFromRow( $rev, $row ) {
diff --git a/backend/CodePropChange.php b/backend/CodePropChange.php
index 3657b6c..ec89da8 100644
--- a/backend/CodePropChange.php
+++ b/backend/CodePropChange.php
@@ -18,7 +18,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $row
+* @param stdClass $row
 * @return CodePropChange
 */
static function newFromRow( $rev, $row ) {
@@ -27,7 +27,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $data
+* @param array $data
 * @return CodePropChange
 */
static function newFromData( $rev, $data ) {
diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php
index 21e6fb4..02525e8 100644
--- a/backend/CodeRepository.php
+++ b/backend/CodeRepository.php
@@ -93,7 +93,7 @@
}
 
/**
-* @param $row
+* @param stdClass $row
 * @return CodeRepository
 */
static function newFromRow( $row ) {
@@ -158,7 +158,7 @@
/**
 * Return a bug URL or false
 *
-* @param $bugId int|string
+* @param int|string $bugId
 * @return string|bool
 */
public function getBugPath( $bugId ) {
@@ -227,7 +227,7 @@
 
/**
 * Get a list of all tags in use in the repository
-* @param $recache Bool whether to get clean data
+* @param bool $recache whether to get clean data
 * @return array
 */
public function getTagList( $recache = false ) {
@@ 

[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I268aaa13d07985b0915774e83c487cd22568b161
---
M GadgetHooks.php
M Gadgets_body.php
M SpecialGadgetUsage.php
M SpecialGadgets.php
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgets.php
M includes/GadgetDefinitionNamespaceRepo.php
M includes/GadgetResourceLoaderModule.php
M includes/MediaWikiGadgetsDefinitionRepo.php
M includes/content/GadgetDefinitionContent.php
M phpcs.xml
11 files changed, 36 insertions(+), 39 deletions(-)

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



diff --git a/GadgetHooks.php b/GadgetHooks.php
index d19ff3f..5dd756a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -26,9 +26,9 @@
/**
 * PageContentSaveComplete hook handler.
 *
-* @param $article Article
-* @param $user User
-* @param $content Content New page content
+* @param Article $article
+* @param User $user
+* @param Content $content New page content
 * @return bool
 */
public static function onPageContentSaveComplete( $article, $user, 
$content ) {
@@ -45,7 +45,7 @@
 
/**
 * UserGetDefaultOptions hook handler
-* @param $defaultOptions Array of default preference keys and values
+* @param array &$defaultOptions Array of default preference keys and 
values
 * @return bool
 */
public static function userGetDefaultOptions( &$defaultOptions ) {
@@ -70,8 +70,8 @@
 
/**
 * GetPreferences hook handler.
-* @param $user User
-* @param $preferences Array: Preference descriptions
+* @param User $user
+* @param array &$preferences Preference descriptions
 * @return bool
 */
public static function getPreferences( $user, &$preferences ) {
@@ -138,7 +138,7 @@
 
/**
 * ResourceLoaderRegisterModules hook handler.
-* @param $resourceLoader ResourceLoader
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function registerModules( &$resourceLoader ) {
@@ -157,7 +157,7 @@
 
/**
 * BeforePageDisplay hook handler.
-* @param $out OutputPage
+* @param OutputPage $out
 * @return bool
 */
public static function beforePageDisplay( $out ) {
@@ -287,7 +287,7 @@
 * in the Gadget namespace based on their file extension
 *
 * @param Title $title
-* @param string $model
+* @param string &$model
 * @return bool
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
@@ -312,7 +312,7 @@
 * knows the language for Gadget: namespace pages.
 *
 * @param Title $title
-* @param string $lang
+* @param string &$lang
 * @return bool
 */
public static function onCodeEditorGetPageLanguage( Title $title, 
&$lang ) {
diff --git a/Gadgets_body.php b/Gadgets_body.php
index dc37a5f..b197ed2 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -116,28 +116,28 @@
}
 
/**
-* @return String: Gadget name
+* @return string Gadget name
 */
public function getName() {
return $this->name;
}
 
/**
-* @return String: Gadget description parsed into HTML
+* @return string Gadget description parsed into HTML
 */
public function getDescription() {
return wfMessage( "gadget-{$this->getName()}" )->parse();
}
 
/**
-* @return String: Wikitext of gadget description
+* @return string Wikitext of gadget description
 */
public function getRawDescription() {
return wfMessage( "gadget-{$this->getName()}" )->plain();
}
 
/**
-* @return String: Name of category (aka section) our gadget belongs 
to. Empty string if none.
+* @return string Name of category (aka section) our gadget belongs to. 
Empty string if none.
 */
public function getCategory() {
return $this->category;
@@ -154,8 +154,8 @@
/**
 * Checks whether this gadget is enabled for given user
 *
-* @param $user User: user to check against
-* @return Boolean
+* @param User $user user to check against
+* @return bool
 */
public function isEnabled( $user ) {
return (bool)$user->getOption( "gadget-{$this->name}", 
$this->onByDefault );
@@ -164,8 +164,8 @@
/**
 * Checks whether given user has permissions to use this gadget
 *
-* @param $user User: user to check against
- 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Ia161db9a25a20dbd42f2fa895cc962bd514eb739
---
M Hooks.php
M includes/Api/ApiFlowBase.php
M includes/Block/Block.php
M includes/Conversion/Utils.php
M includes/Data/Index.php
M includes/Data/Listener/ReferenceRecorder.php
M includes/Data/ObjectLocator.php
M includes/Data/ObjectManager.php
M includes/Data/ObjectStorage.php
M includes/Data/Pager/Pager.php
M includes/Data/Storage/BasicDbStorage.php
M includes/Data/Storage/DbStorage.php
M includes/Data/Storage/PostRevisionTopicHistoryStorage.php
M includes/DbFactory.php
M includes/Dump/Importer.php
M includes/Formatter/AbstractQuery.php
M includes/Formatter/BoardHistoryQuery.php
M includes/Formatter/ContributionsQuery.php
M includes/Formatter/HistoryQuery.php
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/CachedData.php
M includes/Import/LiquidThreadsApi/Iterators.php
M includes/Import/LiquidThreadsApi/Source.php
M includes/Import/Postprocessor/Postprocessor.php
M includes/Import/SourceStore/SourceStoreInterface.php
M includes/Import/Wikitext/ImportSource.php
M includes/Model/AbstractRevision.php
M includes/Model/Anchor.php
M includes/Model/HtmlRenderingInformation.php
M includes/Model/URLReference.php
M includes/Model/UUID.php
M includes/Model/UserTuple.php
M includes/Model/WikiReference.php
M includes/Model/Workflow.php
M includes/Notifications/Controller.php
M includes/Notifications/FlowPresentationModel.php
M includes/Parsoid/ContentFixer.php
M includes/Repository/TreeRepository.php
M includes/Repository/UserNameBatch.php
M includes/SpamFilter/ContentLengthFilter.php
M includes/SpamFilter/Controller.php
M includes/Templating.php
M includes/View.php
M phpcs.xml
44 files changed, 148 insertions(+), 150 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index c1b7529..94cdc2f 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -206,7 +206,7 @@
/**
 * Hook: LoadExtensionSchemaUpdates
 *
-* @param $updater DatabaseUpdater object
+* @param DatabaseUpdater $updater DatabaseUpdater object
 * @return bool true in all cases
 */
public static function getSchemaUpdates( DatabaseUpdater $updater ) {
@@ -352,10 +352,10 @@
/**
 * Updates the given Flow topic line in an enhanced changes list 
(grouped RecentChanges).
 *
-* @param ChangesList $changesList
-* @param string $articlelink
-* @param string $s
-* @param RecentChange $rc
+* @param ChangesList &$changesList
+* @param string &$articlelink
+* @param string &$s
+* @param RecentChange &$rc
 * @param bool $unpatrolled
 * @param bool $isWatchlist
 * @return bool
@@ -381,10 +381,10 @@
/**
 * Updates a Flow line in the old changes list (standard RecentChanges).
 *
-* @param ChangesList $changesList
-* @param string $s
+* @param ChangesList &$changesList
+* @param string &$s
 * @param RecentChange $rc
-* @param array $classes
+* @param array &$classes
 * @return bool
 */
public static function onOldChangesListRecentChangesLine(
@@ -402,10 +402,10 @@
 * line with meta info (old changes), or simply updates the link to
 * the topic (enhanced).
 *
-* @param ChangesList $changesList
-* @param string $s
+* @param ChangesList &$changesList
+* @param string &$s
 * @param RecentChange $rc
-* @param array|null $classes
+* @param array|null &$classes
 * @param bool $topicOnly
 * @return bool
 */
@@ -473,7 +473,7 @@
 * The default diff links are incorrect!
 *
 * @param EnhancedChangesList $changesList
-* @param array $links
+* @param array &$links
 * @param RecentChange[] $block
 * @return bool
 */
@@ -517,10 +517,10 @@
 
/**
 * @param EnhancedChangesList $changesList
-* @param array $data
+* @param array &$data
 * @param RecentChange[] $block
 * @param RecentChange $rc
-* @param array $classes
+* @param array &$classes
 * @return bool
 */
public static function onEnhancedChangesListModifyLineData( 
$changesList, &$data, $block, $rc, &$classes ) {
@@ -529,7 +529,7 @@
 
/**
 * @param EnhancedChangesList $changesList
-* @param array $data
+* @param array &$data
 * @param RecentChange $rc
 * @return bool
 */
@@ -623,8 +623,8 @@
 * Regular talk page "Create source" and "Add topic" links are quite 
useless
 * 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I488d13c37a39d4ed597e17b8fd3c2de131ca97f4
---
M Question.php
M Quiz.class.php
M Quiz.hooks.php
M phpcs.xml
4 files changed, 29 insertions(+), 33 deletions(-)

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



diff --git a/Question.php b/Question.php
index 29fcd2f..93c1e25 100644
--- a/Question.php
+++ b/Question.php
@@ -4,10 +4,10 @@
/**
 * Constructor
 *
-* @param $beingCorrected Boolean.
-* @param $caseSensitive Boolean.
-* @param $questionId Integer: the Identifier of the question used to 
generate input names.
-* @param $parser Parser the wikitext parser.
+* @param bool $beingCorrected
+* @param bool $caseSensitive
+* @param int $questionId the Identifier of the question used to 
generate input names.
+* @param Parser &$parser the wikitext parser.
 */
public function __construct( $beingCorrected, $caseSensitive, 
$questionId, &$parser ) {
global $wgRequest;
@@ -29,7 +29,7 @@
 * Mutator of the question state
 *
 * @protected
-* @param $pState String:
+* @param string $pState
 */
function setState( $pState ) {
if ( $pState == 'error' || ( $pState == 'wrong' && 
$this->mState != 'error' ) ||
@@ -54,6 +54,7 @@
 * Accessor of the question state.
 *
 * @protected
+* @return string
 */
function getState() {
if ( $this->mState == 'na_right' ) {
@@ -68,7 +69,7 @@
/**
 * Convert the question's header into HTML.
 *
-* @param $input String: the quiz header in quiz syntax.
+* @param string $input the quiz header in quiz syntax.
 * @return string
 */
function parseHeader( $input ) {
@@ -95,7 +96,7 @@
/**
 * Determine the question's parameters.
 *
-* @param $matches array: elements matching $parametersPattern
+* @param array $matches elements matching $parametersPattern
 *  $matches[0] are the 
potential question parameters.
 */
function parseParameters( $matches ) {
@@ -126,7 +127,7 @@
/**
 * Transmit a single choice object to the basic type parser.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -137,7 +138,7 @@
/**
 * Transmit a multiple choice object to the basic type parser.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -148,8 +149,8 @@
/**
 * Convert a basic type object from quiz syntax to HTML.
 *
-* @param $input string A question object in quiz syntax
-* @param $inputType string
+* @param string $input A question object in quiz syntax
+* @param string $inputType
 *
 * @return string A question object in HTML.
 */
@@ -293,7 +294,7 @@
 * Determine the object's parameters and convert a list of categories 
from
 * quiz syntax to HTML.
 *
-* @param $input String: pipe-separated list of the various categories.
+* @param string $input pipe-separated list of the various categories.
 * @return string
 */
function parseCategories( $input ) {
@@ -327,7 +328,7 @@
/**
 * Convert a "text field" object to HTML.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -363,7 +364,7 @@
}
 
/**
-* @param $input array
+* @param array $input
 * @return string
 */
function parseTextField( $input ) {
diff --git a/Quiz.class.php b/Quiz.class.php
index d139c24..10e2785 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -10,8 +10,8 @@
/**
 * Constructor
 *
-* @param $argv array
-* @param $parser Parser
+* @param array $argv
+* @param Parser &$parser
 */
public function __construct( $argv, &$parser ) {
global $wgRequest;
@@ -96,7 +96,7 @@
/**
 * Get HTML from template using TemplateParser
 *
-* @param $templateParser TemplateParser
+* @param TemplateParser 

[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: If045c2e48062ea27b101522835e4e6fec7845c5d
---
M MassMessage.hooks.php
M includes/ApiEditMassMessageList.php
M includes/ApiMassMessage.php
M includes/ApiQueryMMSites.php
M includes/MassMessage.php
M includes/MassMessageTargets.php
M includes/SpecialMassMessage.php
M includes/content/MassMessageListContent.php
M includes/content/MassMessageListContentHandler.php
M includes/job/MassMessageJob.php
M includes/job/MassMessageServerSideJob.php
M phpcs.xml
M tests/phpunit/MassMessageTest.php
M tests/phpunit/MassMessageTestCase.php
M tests/phpunit/api/ApiMassMessageTest.php
15 files changed, 38 insertions(+), 42 deletions(-)

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



diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index 07d31aa..db2a4af 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -8,7 +8,7 @@
 
/**
 * Hook to load our parser function
-* @param  Parser $parser
+* @param Parser &$parser
 * @return bool
 */
public static function onParserFirstCallInit( Parser &$parser ) {
@@ -21,8 +21,8 @@
 * Prepares the human facing output
 * Hostname is optional for local delivery
 * @param Parser $parser
-* @param string $site
 * @param string $page
+* @param string $site
 * @return array
 */
public static function outputParserFunction( Parser $parser, $page, 
$site = '' ) {
@@ -71,7 +71,7 @@
 
/**
 * Add our username to the list of reserved ones
-* @param $reservedUsernames array
+* @param array &$reservedUsernames
 * @return bool
 */
public static function onUserGetReservedNames( &$reservedUsernames ) {
@@ -82,9 +82,9 @@
 
/**
 * If someone is trying to rename the bot, don't let them.
-* @param $uid int
-* @param $oldName string
-* @param $newName string
+* @param int $uid
+* @param string $oldName
+* @param string $newName
 * @return bool|string
 */
public static function onRenameUserPreRename( $uid, $oldName, $newName 
) {
@@ -97,7 +97,7 @@
 
/**
 * Add a row with the number of queued messages to Special:Statistics
-* @param  array $extraStats
+* @param array &$extraStats
 * @return bool
 */
public static function onSpecialStatsAddExtra( &$extraStats ) {
@@ -107,7 +107,7 @@
 
/**
 * Add the number of queued messages to =siteinfo=statistics
-* @param $result array
+* @param array &$result
 * @return bool
 */
public static function onAPIQuerySiteInfoStatisticsInfo( &$result ) {
@@ -120,7 +120,7 @@
 * Called only if the context is a MassMessage job (bug 69381)
 * @see bug 58237
 * @param User $user
-* @param array $rights
+* @param array &$rights
 * @return bool
 */
public static function onUserGetRights( User $user, array &$rights ) {
@@ -132,7 +132,7 @@
 
/**
 * Echo!
-* @param $event EchoEvent
+* @param EchoEvent $event
 * @return bool
 */
public static function onBeforeEchoEventInsert( EchoEvent $event ) {
diff --git a/includes/ApiEditMassMessageList.php 
b/includes/ApiEditMassMessageList.php
index d7a2e33..c95943b 100644
--- a/includes/ApiEditMassMessageList.php
+++ b/includes/ApiEditMassMessageList.php
@@ -235,6 +235,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/ApiMassMessage.php b/includes/ApiMassMessage.php
index 7a5fd6a..4f809a3 100644
--- a/includes/ApiMassMessage.php
+++ b/includes/ApiMassMessage.php
@@ -66,6 +66,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/ApiQueryMMSites.php b/includes/ApiQueryMMSites.php
index 0262a29..f280c8d 100644
--- a/includes/ApiQueryMMSites.php
+++ b/includes/ApiQueryMMSites.php
@@ -46,6 +46,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/MassMessage.php b/includes/MassMessage.php
index e232fb6..aafb078 100644
--- a/includes/MassMessage.php
+++ b/includes/MassMessage.php
@@ -13,7 +13,7 @@
/**
 * Function to follow redirects
 *
-* @param $title Title
+* @param Title $title
 * 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: BSFoundation: Added more base classes for MW hooks

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

Change subject: BSFoundation: Added more base classes for MW hooks
..


BSFoundation: Added more base classes for MW hooks

* ArticleDeleteComplete, FileDeleteComplete, UploadComplete

Change-Id: I2ef8f96c75cf09cec856a27904a49c801d071aa7
---
A src/Hook/ArticleDeleteComplete.php
A src/Hook/FileDeleteComplete.php
A src/Hook/UploadComplete.php
3 files changed, 280 insertions(+), 0 deletions(-)

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



diff --git a/src/Hook/ArticleDeleteComplete.php 
b/src/Hook/ArticleDeleteComplete.php
new file mode 100644
index 000..3f0a132
--- /dev/null
+++ b/src/Hook/ArticleDeleteComplete.php
@@ -0,0 +1,115 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class ArticleDeleteComplete extends Hook {
+
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @var integer
+*/
+   protected $id = null;
+
+   /**
+*
+* @var \Content
+*/
+   protected $content = null;
+
+   /**
+*
+* @var \LogEntry
+*/
+   protected $logEntry = false;
+
+   /**
+*
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+* @return boolean
+*/
+   public static function callback( &$wikipage, &$user, $reason, $id, 
$content, $logEntry ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $wikipage,
+   $user,
+   $reason,
+   $id,
+   $content,
+   $logEntry
+   );
+   return $hookHandler->process();
+   }
+
+   /**
+*
+* @param \IContextSource $context
+* @param \Context $config
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+*/
+   public function __construct( $context, $config, &$wikipage, &$user, 
$reason, $id, $content, $logEntry ) {
+   parent::__construct( $context, $config );
+
+   $this->wikipage = &$wikipage;
+   $this->user = &$user;
+   $this->reason = $reason;
+   $this->id = $id;
+   $this->content = $content;
+   $this->logEntry = $logEntry;
+   }
+}
\ No newline at end of file
diff --git a/src/Hook/FileDeleteComplete.php b/src/Hook/FileDeleteComplete.php
new file mode 100644
index 000..a929e18
--- /dev/null
+++ b/src/Hook/FileDeleteComplete.php
@@ -0,0 +1,100 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class FileDeleteComplete extends Hook {
+   /**
+*
+* @var \File
+*/
+   protected $file = null;
+   /**
+* Archive name
+* @var string
+*/
+   protected $oldimage = null;
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @param \File $file
+* @param string $oldimage
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @return boolean
+*/
+   public static function callback( $file, $oldimage, $wikipage, $user, 
$reason ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $file,
+   $oldimage,
+  

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Added more base classes for MW hooks

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

Change subject: BSFoundation: Added more base classes for MW hooks
..


BSFoundation: Added more base classes for MW hooks

* ArticleDeleteComplete, FileDeleteComplete, UploadComplete

Change-Id: I2ef8f96c75cf09cec856a27904a49c801d071aa7
---
A src/Hook/ArticleDeleteComplete.php
A src/Hook/FileDeleteComplete.php
A src/Hook/UploadComplete.php
3 files changed, 280 insertions(+), 0 deletions(-)

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



diff --git a/src/Hook/ArticleDeleteComplete.php 
b/src/Hook/ArticleDeleteComplete.php
new file mode 100644
index 000..3f0a132
--- /dev/null
+++ b/src/Hook/ArticleDeleteComplete.php
@@ -0,0 +1,115 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class ArticleDeleteComplete extends Hook {
+
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @var integer
+*/
+   protected $id = null;
+
+   /**
+*
+* @var \Content
+*/
+   protected $content = null;
+
+   /**
+*
+* @var \LogEntry
+*/
+   protected $logEntry = false;
+
+   /**
+*
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+* @return boolean
+*/
+   public static function callback( &$wikipage, &$user, $reason, $id, 
$content, $logEntry ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $wikipage,
+   $user,
+   $reason,
+   $id,
+   $content,
+   $logEntry
+   );
+   return $hookHandler->process();
+   }
+
+   /**
+*
+* @param \IContextSource $context
+* @param \Context $config
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+*/
+   public function __construct( $context, $config, &$wikipage, &$user, 
$reason, $id, $content, $logEntry ) {
+   parent::__construct( $context, $config );
+
+   $this->wikipage = &$wikipage;
+   $this->user = &$user;
+   $this->reason = $reason;
+   $this->id = $id;
+   $this->content = $content;
+   $this->logEntry = $logEntry;
+   }
+}
\ No newline at end of file
diff --git a/src/Hook/FileDeleteComplete.php b/src/Hook/FileDeleteComplete.php
new file mode 100644
index 000..a929e18
--- /dev/null
+++ b/src/Hook/FileDeleteComplete.php
@@ -0,0 +1,100 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class FileDeleteComplete extends Hook {
+   /**
+*
+* @var \File
+*/
+   protected $file = null;
+   /**
+* Archive name
+* @var string
+*/
+   protected $oldimage = null;
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @param \File $file
+* @param string $oldimage
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @return boolean
+*/
+   public static function callback( $file, $oldimage, $wikipage, $user, 
$reason ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $file,
+   $oldimage,
+  

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Make use of core `.border-box()` mixin

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

Change subject: Make use of core `.border-box()` mixin
..


Make use of core `.border-box()` mixin

Making use of `.border-box()` mixin out of central mediawiki.mixins.less
and also ensure best experience in older browsers.

Change-Id: I3c3a8a1d745a0de98e348299d96d4c4645b84923
---
M modules/dashboard/styles/ext.cx.lists.common.less
M modules/stats/styles/ext.cx.stats.less
M modules/tools/styles/ext.cx.tools.formatter.less
M modules/widgets/common/grid/grid-core.less
4 files changed, 7 insertions(+), 6 deletions(-)

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



diff --git a/modules/dashboard/styles/ext.cx.lists.common.less 
b/modules/dashboard/styles/ext.cx.lists.common.less
index 08a3dbf..97ddc68 100644
--- a/modules/dashboard/styles/ext.cx.lists.common.less
+++ b/modules/dashboard/styles/ext.cx.lists.common.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-tlitem,
@@ -60,7 +61,7 @@
.translation-language-source-container,
.translation-language-target-container {
position: relative;
-   box-sizing: border-box;
+   .box-sizing( border-box );
cursor: pointer;
 
-webkit-box-flex: 1; // iOS 6-, Safari 3.1-6
diff --git a/modules/stats/styles/ext.cx.stats.less 
b/modules/stats/styles/ext.cx.stats.less
index 99cdf3a..0f77fab 100644
--- a/modules/stats/styles/ext.cx.stats.less
+++ b/modules/stats/styles/ext.cx.stats.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-stats-container {
@@ -96,7 +97,7 @@
height: 20px;
padding: 0;
margin: 0;
-   box-sizing: border-box;
+   .box-sizing( border-box );
background-color: #36c;
border-right: 1px solid @gray;
font-size: small;
diff --git a/modules/tools/styles/ext.cx.tools.formatter.less 
b/modules/tools/styles/ext.cx.tools.formatter.less
index 67f0b2b..b66d2fb 100644
--- a/modules/tools/styles/ext.cx.tools.formatter.less
+++ b/modules/tools/styles/ext.cx.tools.formatter.less
@@ -14,7 +14,7 @@
border-right: 1px solid #fbfbfb;
background-color: transparent;
color: @gray-dark;
-   box-sizing: border-box;
+   .box-sizing( border-box );
border-radius: @borderRadius;
float: left;
opacity: 0.8;
diff --git a/modules/widgets/common/grid/grid-core.less 
b/modules/widgets/common/grid/grid-core.less
index d329505..0118569 100644
--- a/modules/widgets/common/grid/grid-core.less
+++ b/modules/widgets/common/grid/grid-core.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import 'grid-settings.less';
 
 // Grid - core
@@ -17,9 +18,7 @@
float: left;
.mw-ui-gutter(@gutter / 2);
width: 100%;
-   -webkit-box-sizing: border-box;
-   -moz-box-sizing: border-box;
-   box-sizing: border-box;
+   .box-sizing( border-box );
&.mw-ui-right {
float: right;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c3a8a1d745a0de98e348299d96d4c4645b84923
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] mediawiki...Interwiki[master]: Load 'ext.interwiki.specialpage' as style module

2017-08-27 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374113 )

Change subject: Load 'ext.interwiki.specialpage' as style module
..

Load 'ext.interwiki.specialpage' as style module

This avoids a FOUC on loading.

For overwriting the wikitable styles a higher specificity is needed to
not depend on the order of loading.

The dependency to module 'jquery.makeCollapsible' is not necessary
because this module is loaded automatically.

Change-Id: Icc1ec927a89df5cf8c847ab5cb77d81f2651be49
---
M Interwiki.css
M Interwiki_body.php
M extension.json
3 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Interwiki 
refs/changes/13/374113/1

diff --git a/Interwiki.css b/Interwiki.css
index e0d4625..eb7a53a 100644
--- a/Interwiki.css
+++ b/Interwiki.css
@@ -43,7 +43,9 @@
 .mw-interwiki-legend .mw-collapsible-toggle {
font-weight: normal;
 }
-table.mw-interwiki-legend {
+
+/* Selector with higher specifity than wikitable */
+table.wikitable.mw-interwiki-legend {
margin-top: 2em;
 }
 
diff --git a/Interwiki_body.php b/Interwiki_body.php
index a8db516..5176987 100644
--- a/Interwiki_body.php
+++ b/Interwiki_body.php
@@ -42,7 +42,7 @@
$out = $this->getOutput();
$request = $this->getRequest();
 
-   $out->addModules( 'ext.interwiki.specialpage' );
+   $out->addModuleStyles( 'ext.interwiki.specialpage' );
 
$action = $par ?: $request->getVal( 'action', $par );
$return = $this->getPageTitle();
diff --git a/extension.json b/extension.json
index afc108e..bb974bd 100644
--- a/extension.json
+++ b/extension.json
@@ -39,10 +39,7 @@
},
"ResourceModules": {
"ext.interwiki.specialpage": {
-   "styles": "Interwiki.css",
-   "dependencies": [
-   "jquery.makeCollapsible"
-   ]
+   "styles": "Interwiki.css"
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc1ec927a89df5cf8c847ab5cb77d81f2651be49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Interwiki
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: BSFoundation: Added more base classes for MW hooks

2017-08-27 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374112 )

Change subject: BSFoundation: Added more base classes for MW hooks
..

BSFoundation: Added more base classes for MW hooks

* ArticleDeleteComplete, FileDeleteComplete, UploadComplete

Change-Id: I2ef8f96c75cf09cec856a27904a49c801d071aa7
---
A src/Hook/ArticleDeleteComplete.php
A src/Hook/FileDeleteComplete.php
A src/Hook/UploadComplete.php
3 files changed, 280 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/12/374112/1

diff --git a/src/Hook/ArticleDeleteComplete.php 
b/src/Hook/ArticleDeleteComplete.php
new file mode 100644
index 000..3f0a132
--- /dev/null
+++ b/src/Hook/ArticleDeleteComplete.php
@@ -0,0 +1,115 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class ArticleDeleteComplete extends Hook {
+
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @var integer
+*/
+   protected $id = null;
+
+   /**
+*
+* @var \Content
+*/
+   protected $content = null;
+
+   /**
+*
+* @var \LogEntry
+*/
+   protected $logEntry = false;
+
+   /**
+*
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+* @return boolean
+*/
+   public static function callback( &$wikipage, &$user, $reason, $id, 
$content, $logEntry ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $wikipage,
+   $user,
+   $reason,
+   $id,
+   $content,
+   $logEntry
+   );
+   return $hookHandler->process();
+   }
+
+   /**
+*
+* @param \IContextSource $context
+* @param \Context $config
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @param integer $id
+* @param \Content $content
+* @param \LogEntry $logEntry
+*/
+   public function __construct( $context, $config, &$wikipage, &$user, 
$reason, $id, $content, $logEntry ) {
+   parent::__construct( $context, $config );
+
+   $this->wikipage = &$wikipage;
+   $this->user = &$user;
+   $this->reason = $reason;
+   $this->id = $id;
+   $this->content = $content;
+   $this->logEntry = $logEntry;
+   }
+}
\ No newline at end of file
diff --git a/src/Hook/FileDeleteComplete.php b/src/Hook/FileDeleteComplete.php
new file mode 100644
index 000..a929e18
--- /dev/null
+++ b/src/Hook/FileDeleteComplete.php
@@ -0,0 +1,100 @@
+http://bluespice.com
+ *
+ * @author Patric Wirth 
+ * @packageBlueSpiceFoundation
+ * @copyright  Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+namespace BlueSpice\Hook;
+use BlueSpice\Hook;
+
+abstract class FileDeleteComplete extends Hook {
+   /**
+*
+* @var \File
+*/
+   protected $file = null;
+   /**
+* Archive name
+* @var string
+*/
+   protected $oldimage = null;
+   /**
+*
+* @var \WikiPage
+*/
+   protected $wikipage = null;
+   /**
+*
+* @var \User
+*/
+   protected $user = null;
+   /**
+*
+* @var string
+*/
+   protected $reason = null;
+
+   /**
+*
+* @param \File $file
+* @param string $oldimage
+* @param \WikiPage $wikipage
+* @param \User $user
+* @param string $reason
+* @return boolean
+*/
+   public static function callback( $file, $oldimage, $wikipage, $user, 
$reason ) {
+   $className = static::class;
+   $hookHandler = new $className(
+   null,
+   null,
+   $file,
+   

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Fix dependencies to core modules

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

Change subject: Fix dependencies to core modules
..


Fix dependencies to core modules

Add dependency on module 'mediawiki.util' for module
'ext.RevisionSlider.DiffPage' because
modules/ext.RevisionSlider.DiffPage.js uses mw.util.wikiScript.

Remove dependency on module 'mediawiki.util' for module
'ext.RevisionSlider.RevisionList' because this module does not use any
functions from mw.util directly.

Remove dependency on module 'mediawiki.user' for module
'ext.RevisionSlider.init' because this module uses only mw.user.options
which is generated in core module 'mediawiki' and not in
'mediawiki.user'.

Change-Id: Ifc6a20de667a410b9890fdc1fcba3319beb061de
---
M extension.json
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7ee0604..c213517 100644
--- a/extension.json
+++ b/extension.json
@@ -74,7 +74,6 @@
"ext.RevisionSlider.Api",
"ext.RevisionSlider.icons",
"mediawiki.api.options",
-   "mediawiki.user",
"mediawiki.util"
],
"messages": [
@@ -170,7 +169,8 @@
"modules/ext.RevisionSlider.DiffPage.js"
],
"dependencies": [
-   "mediawiki.Uri"
+   "mediawiki.Uri",
+   "mediawiki.util"
]
},
"ext.RevisionSlider.RevisionList": {
@@ -179,8 +179,7 @@
],
"dependencies": [
"ext.RevisionSlider.Revision",
-   "ext.RevisionSlider.RevisionListView",
-   "mediawiki.util"
+   "ext.RevisionSlider.RevisionListView"
]
},
"ext.RevisionSlider.RevisionListView": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc6a20de667a410b9890fdc1fcba3319beb061de
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Andrew-WMDE 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WMDE-Fisch 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: expose sample url vars for overriding

2017-08-27 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374111 )

Change subject: expose sample url vars for overriding
..

expose sample url vars for overriding

The hardcoded Wikidata sample URLs need to be
overridable in order to be used on other sites.

This is just a first step - eventually we should
make them globally configurable, but I think we
would greatly benefit from ES6 refactoring first.

Change-Id: I8041dbfb0b9599287edda04ff9a21cf91693c0b0
---
M wikibase/queryService/api/QuerySamples.js
1 file changed, 7 insertions(+), 8 deletions(-)


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

diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index 1485e58..687e5ee 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -5,11 +5,6 @@
 wikibase.queryService.api.QuerySamples = ( function ( $ ) {
'use strict';
 
-   var API_SERVER = 'https://www.wikidata.org/',
-   API_ENDPOINT = API_SERVER + 'api/rest_v1/page/html/',
-   PAGE_TITLE = 'Wikidata:SPARQL_query_service/queries/examples',
-   PAGE_URL = API_SERVER + 'wiki/' + PAGE_TITLE;
-
/**
 * QuerySamples API for the Wikibase query service
 *
@@ -22,6 +17,10 @@
 */
function SELF( language ) {
this._language = language;
+   this.API_SERVER = 'https://www.wikidata.org/';
+   this.API_ENDPOINT = this.API_SERVER + 'api/rest_v1/page/html/';
+   this.PAGE_TITLE = 
'Wikidata:SPARQL_query_service/queries/examples';
+   this.PAGE_URL = this.API_SERVER + 'wiki/' + this.PAGE_TITLE;
}
 
/**
@@ -37,12 +36,12 @@
var self = this;
 
return $.ajax( {
-   url: API_ENDPOINT + encodeURIComponent( PAGE_TITLE + 
'/' + self._language ) + '?redirect=false',
+   url: self.API_ENDPOINT + encodeURIComponent( 
self.PAGE_TITLE + '/' + self._language ) + '?redirect=false',
dataType: 'html'
} ).catch( function() {
// retry without language
return $.ajax( {
-   url: API_ENDPOINT + encodeURIComponent( 
PAGE_TITLE ) + '?redirect=false',
+   url: self.API_ENDPOINT + encodeURIComponent( 
self.PAGE_TITLE ) + '?redirect=false',
dataType: 'html'
} );
} ).then( function ( data ) {
@@ -136,7 +135,7 @@
return {
title:title,
query:query,
-   href: PAGE_URL + '#' + encodeURIComponent( 
title.replace( / /g, '_' ) ).replace( /%/g, '.' ),
+   href: this.PAGE_URL + '#' + 
encodeURIComponent( title.replace( / /g, '_' ) ).replace( /%/g, '.' ),
tags: self._extractTagsFromSPARQL( query ),
category: self._findPrevHeader( titleEl 
).text().trim()
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8041dbfb0b9599287edda04ff9a21cf91693c0b0
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] marvin[master]: WIP: New: add routing

2017-08-27 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374110 )

Change subject: WIP: New: add routing
..

WIP: New: add routing

Bug: T173323
Change-Id: Ieb205a96fba498d4e0127e4f894ab7aa3bea06a3
---
M package-lock.json
M package.json
M src/client/index.tsx
M src/client/tsconfig.json
M src/common/components/app/index.test.ts
M src/common/components/app/index.tsx
A src/common/components/pages/about.tsx
A src/common/components/pages/index.tsx
A src/common/components/pages/not-found.tsx
A src/common/routers/api.tsx
A src/common/routers/route.ts
M src/server/index.ts
A src/types/preact.d.ts
13 files changed, 125 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/10/374110/1

diff --git a/package-lock.json b/package-lock.json
index ea4b546..c95a3f8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -50,6 +50,12 @@
   "integrity": 
"sha512-c3Npme+2JGqxW8+B+aXdN5SPIlCf1C8WxQC6Ea39rO/ASPosnMkWVR16mDJtRE+2dr2xwOQ7DiLxb+wO/TWuPg==",
   "dev": true
 },
+"@types/page": {
+  "version": "1.5.32",
+  "resolved": "https://registry.npmjs.org/@types/page/-/page-1.5.32.tgz;,
+  "integrity": 
"sha512-mgpXPpersWqorz6456UZVREk3MoiKlq1XJUH/b/1J2mMFafuKCTOUc8j+EoNiETkIjE/Fv7E9loBA4gpEvKH9Q==",
+  "dev": true
+},
 "@types/serve-static": {
   "version": "1.7.31",
   "resolved": 
"https://registry.npmjs.org/@types/serve-static/-/serve-static-1.7.31.tgz;,
@@ -4108,6 +4114,32 @@
 "registry-url": "3.1.0"
   }
 },
+"page": {
+  "version": "1.7.1",
+  "resolved": "https://registry.npmjs.org/page/-/page-1.7.1.tgz;,
+  "integrity": "sha1-OIbBR7iVSHeDdZs36AChEhO8OO0=",
+  "dev": true,
+  "requires": {
+"path-to-regexp": "1.2.1"
+  },
+  "dependencies": {
+"isarray": {
+  "version": "0.0.1",
+  "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz;,
+  "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+  "dev": true
+},
+"path-to-regexp": {
+  "version": "1.2.1",
+  "resolved": 
"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.2.1.tgz;,
+  "integrity": "sha1-szcFwUAjTYc8hyHHuf2LVB7Tr/k=",
+  "dev": true,
+  "requires": {
+"isarray": "0.0.1"
+  }
+}
+  }
+},
 "pako": {
   "version": "0.2.9",
   "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz;,
diff --git a/package.json b/package.json
index 126b865..895300e 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
 "--- HOOKS ---": "# Triggered scripts.",
 "precommit": "npm test -s",
 "--- INTERNAL ---": "# Private scripts.",
-"server:watch": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node src/server'",
+"server:watch": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node -P src/server src/server'",
 "server:build": "tsc -p src/server",
 "client:watch": "webpack-dev-server -w",
 "client:build": "webpack"
@@ -53,6 +53,7 @@
 "@types/express": "^4.0.36",
 "@types/mocha": "^2.2.41",
 "@types/node": "^8.0.20",
+"@types/page": "^1.5.32",
 "@types/touch": "^3.1.0",
 "assets-webpack-plugin": "^3.5.1",
 "css-loader": "^0.28.5",
@@ -69,6 +70,7 @@
 "mocha": "^3.5.0",
 "nodemon": "^1.11.0",
 "npm-run-all": "^4.0.2",
+"page": "^1.7.1",
 "prettier": "^1.5.3",
 "sinon": "^3.0.0",
 "style-loader": "^0.18.2",
diff --git a/src/client/index.tsx b/src/client/index.tsx
index 491feac..946899c 100644
--- a/src/client/index.tsx
+++ b/src/client/index.tsx
@@ -1,10 +1,19 @@
 import "./index.css";
-import { h, render } from "preact";
-import App from "../common/components/app";
+import * as page from "page";
+import { api } from "../common/routers/api";
+import { render } from "preact";
 
 const root = document.getElementById("root");
 if (!root) {
   throw new Error('Missing element with "root" ID.');
 }
 
-render(, root, root.lastElementChild || undefined);
+api.forEach(route => {
+  page(route.path, () =>
+route
+  .response()
+  .then((m: any) =>
+render(m.default(), root, root.lastElementChild || undefined)
+  )
+  );
+});
diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json
index 2820b53..e18ffe7 100644
--- a/src/client/tsconfig.json
+++ b/src/client/tsconfig.json
@@ -2,6 +2,7 @@
   "extends": "../../tsconfig.json",
   "compilerOptions": {
 "target": "ES5",
-"module": "ES2015"
+"module": "esnext",
+"lib": [ "dom", "es2015" ]
   }
 }
diff --git a/src/common/components/app/index.test.ts 
b/src/common/components/app/index.test.ts
index 08f68dc..df76ba2 100644
--- a/src/common/components/app/index.test.ts
+++ b/src/common/components/app/index.test.ts
@@ -5,6 +5,6 @@
 describe("app()", () => {

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: gitignore InteliJ IDEA proj files

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

Change subject: gitignore InteliJ IDEA proj files
..


gitignore InteliJ IDEA proj files

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

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



diff --git a/.gitignore b/.gitignore
index 6e0167e..3433e74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 build
 .idea
 package-lock.json
+*.iml

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I452943f7a213426de9de461adeab5230be4b138f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
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[REL1_28]: CryptRand: only use random_bytes on php 7 and HHVM

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

Change subject: CryptRand: only use random_bytes on php 7 and HHVM
..


CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
(cherry picked from commit 9272d7717d8b526e966928e851451a257a26b0a5)
---
M includes/libs/CryptRand.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 83948cf..73ce937 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -249,8 +249,11 @@
// On Linux, getrandom syscall will be used if 
available.
// On Windows CryptGenRandom will always be used
// On other platforms, /dev/urandom will be used.
+   // Avoids polyfills from before php 7.0
// All error situations will throw Exceptions and or 
Errors
-   if ( function_exists( 'random_bytes' ) ) {
+   if ( PHP_VERSION_ID >= 7
+   || ( defined( 'HHVM_VERSION_ID' ) && 
HHVM_VERSION_ID >= 31101 )
+   ) {
$rem = $bytes - strlen( $buffer );
$buffer .= random_bytes( $rem );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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/core[REL1_28]: CryptRand: only use random_bytes on php 7 and HHVM

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374109 )

Change subject: CryptRand: only use random_bytes on php 7 and HHVM
..

CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
(cherry picked from commit 9272d7717d8b526e966928e851451a257a26b0a5)
---
M includes/libs/CryptRand.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/374109/1

diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 83948cf..73ce937 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -249,8 +249,11 @@
// On Linux, getrandom syscall will be used if 
available.
// On Windows CryptGenRandom will always be used
// On other platforms, /dev/urandom will be used.
+   // Avoids polyfills from before php 7.0
// All error situations will throw Exceptions and or 
Errors
-   if ( function_exists( 'random_bytes' ) ) {
+   if ( PHP_VERSION_ID >= 7
+   || ( defined( 'HHVM_VERSION_ID' ) && 
HHVM_VERSION_ID >= 31101 )
+   ) {
$rem = $bytes - strlen( $buffer );
$buffer .= random_bytes( $rem );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Add support for PHP7 random_bytes in favor of mcrypt_create_iv

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

Change subject: Add support for PHP7 random_bytes in favor of mcrypt_create_iv
..


Add support for PHP7 random_bytes in favor of mcrypt_create_iv

Bug: T143788
Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
(cherry picked from commit 453e829ce056f2ae1462bcd7ed6be92d15134d6c)
---
M includes/libs/CryptRand.php
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 6d18c81..83948cf 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -245,6 +245,21 @@
}
 
if ( strlen( $buffer ) < $bytes ) {
+   // If available make use of PHP 7's random_bytes
+   // On Linux, getrandom syscall will be used if 
available.
+   // On Windows CryptGenRandom will always be used
+   // On other platforms, /dev/urandom will be used.
+   // All error situations will throw Exceptions and or 
Errors
+   if ( function_exists( 'random_bytes' ) ) {
+   $rem = $bytes - strlen( $buffer );
+   $buffer .= random_bytes( $rem );
+   }
+   if ( strlen( $buffer ) >= $bytes ) {
+   $this->strong = true;
+   }
+   }
+
+   if ( strlen( $buffer ) < $bytes ) {
// If available make use of mcrypt_create_iv URANDOM 
source to generate randomness
// On unix-like systems this reads from /dev/urandom 
but does it without any buffering
// and bypasses openbasedir restrictions, so it's 
preferable to reading directly

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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/core[REL1_28]: Add support for PHP7 random_bytes in favor of mcrypt_create_iv

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374108 )

Change subject: Add support for PHP7 random_bytes in favor of mcrypt_create_iv
..

Add support for PHP7 random_bytes in favor of mcrypt_create_iv

Bug: T143788
Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
(cherry picked from commit 453e829ce056f2ae1462bcd7ed6be92d15134d6c)
---
M includes/libs/CryptRand.php
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/374108/1

diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 6d18c81..83948cf 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -245,6 +245,21 @@
}
 
if ( strlen( $buffer ) < $bytes ) {
+   // If available make use of PHP 7's random_bytes
+   // On Linux, getrandom syscall will be used if 
available.
+   // On Windows CryptGenRandom will always be used
+   // On other platforms, /dev/urandom will be used.
+   // All error situations will throw Exceptions and or 
Errors
+   if ( function_exists( 'random_bytes' ) ) {
+   $rem = $bytes - strlen( $buffer );
+   $buffer .= random_bytes( $rem );
+   }
+   if ( strlen( $buffer ) >= $bytes ) {
+   $this->strong = true;
+   }
+   }
+
+   if ( strlen( $buffer ) < $bytes ) {
// If available make use of mcrypt_create_iv URANDOM 
source to generate randomness
// On unix-like systems this reads from /dev/urandom 
but does it without any buffering
// and bypasses openbasedir restrictions, so it's 
preferable to reading directly

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: cleanup - regex single char alteration, css, ...

2017-08-27 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374107 )

Change subject: cleanup - regex single char alteration, css, ...
..

cleanup - regex single char alteration, css, ...

* "word-break: word-break" is invalid, switching to "normal"
* Assignments inside if statements are evil :)
* a regex capturing group for one char seems wrong

Change-Id: Iab7431daadcbea18d8171f0b3c7a760a4f4188f7
---
M wikibase/queryService/api/QuerySamples.js
M wikibase/queryService/api/Tracking.js
M wikibase/queryService/ui/QueryExampleDialog.js
3 files changed, 14 insertions(+), 15 deletions(-)


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

diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index 254bc07..12a4c5c 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -98,7 +98,8 @@
};
 
SELF.prototype._extractTagsFromSPARQL = function ( sparql ) {
-   var tags = sparql.replace( /\n/g, '' ).match( /(Q|P)[0-9]+/g );
+   // FIXME: do we need a capturing group here, or enough to 
/[QP][0-9]+/g ?
+   var tags = sparql.replace( /\n/g, '' ).match( /([QP])[0-9]+/g );
 
if ( !tags ) {
return [];
diff --git a/wikibase/queryService/api/Tracking.js 
b/wikibase/queryService/api/Tracking.js
index 25a2111..844c93b 100644
--- a/wikibase/queryService/api/Tracking.js
+++ b/wikibase/queryService/api/Tracking.js
@@ -47,6 +47,7 @@
}
 
if ( location.hostname !== 'query.wikidata.org' ) {
+   // FIXME: expected to return a promise
return;// only track on wikidata.org
}
 
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index 816cc34..0876639 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -14,7 +14,7 @@
 * @license GNU GPL v2+
 *
 * @author Jonas Kress
- * @author Florian Rämisch, 
+* @author Florian Rämisch, 
 * @constructor
 *
 * @param {jQuery} $element
@@ -124,7 +124,7 @@
self._updateExamplesCount( examples.length );
 
$.each( examples, function( key, example ) {
-   if ( example.category !==  category ) {
+   if ( example.category !== category ) {
category = example.category;
self._$element.find( '.searchable' 
).append( $( '' ).addClass( 'active' )
.append( $( '' ).text( category ) ) );
@@ -156,8 +156,10 @@
jQCloudTags = [];
 
this._getCloudTags().done( function ( tags ) {
+   var tagCloud = $( '.tagCloud' );
+
$.each( tags, function ( i, tag ) {
-   var label =  tag.label + ' (' + tag.id + ')';
+   var label = tag.label + ' (' + tag.id + ')';
 
jQCloudTags.push( {
text: label,
@@ -178,11 +180,11 @@
} );
 
if ( redraw ) {
-   $( '.tagCloud' ).jQCloud( 'update', jQCloudTags 
);
+   tagCloud.jQCloud( 'update', jQCloudTags );
return;
}
 
-   $( '.tagCloud' ).jQCloud( jQCloudTags, {
+   tagCloud.jQCloud( jQCloudTags, {
delayedMode: true,
autoResize: true
} );
@@ -283,7 +285,7 @@
trigger: 'hover',
container: 'body',
title: self._i18n( 
'wdqs-dialog-examples-preview-query', 'Preview query' ),
-   content: $( '' ).text( query ),
+   content: $( '' ).text( query ),
html: true
} ),
$preview = $( '' ).addClass( 'glyphicon 
glyphicon-camera' ).clickover(
@@ -293,7 +295,7 @@
 'esc_close': true,
trigger: 'click',
container: 'body',
-   title: self._i18n( 
'wdqs-dialog-examples-preview-result', 'Preview result'  ),
+   

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update families files

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

Change subject: Update families files
..


Update families files

Change-Id: I641523daeb1cb7e1ba3659966ceff3a89fd85d5e
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikinews_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wiktionary_family.py
7 files changed, 53 insertions(+), 52 deletions(-)

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



diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index c6d7673..440d5bc 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -38,12 +38,12 @@
 """Constructor."""
 self.languages_by_size = [
 'en', 'hu', 'de', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he',
-'vi', 'ca', 'th', 'fi', 'id', 'sq', 'fa', 'zh', 'ru', 'az', 'cs',
+'vi', 'th', 'ca', 'fi', 'id', 'sq', 'fa', 'zh', 'ru', 'az', 'cs',
 'sv', 'da', 'hr', 'sr', 'tr', 'ko', 'ar', 'no', 'gl', 'ro', 'ta',
-'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'tt', 'eo', 'sk',
-'el', 'bg', 'bn', 'li', 'hy', 'si', 'ms', 'sl', 'ur', 'la', 'ml',
-'km', 'ia', 'et', 'cv', 'mr', 'oc', 'eu', 'kk', 'be', 'pa', 'ne',
-'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy', 'ba',
+'ba', 'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'tt', 'eo',
+'sk', 'el', 'bg', 'li', 'bn', 'hy', 'si', 'ms', 'sl', 'ur', 'la',
+'ml', 'km', 'ia', 'et', 'cv', 'mr', 'oc', 'eu', 'kk', 'be', 'pa',
+'ne', 'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy',
 ]
 
 super(Family, self).__init__()
diff --git a/pywikibot/families/wikinews_family.py 
b/pywikibot/families/wikinews_family.py
index 133836d..abc1c13 100644
--- a/pywikibot/families/wikinews_family.py
+++ b/pywikibot/families/wikinews_family.py
@@ -27,8 +27,8 @@
 def __init__(self):
 """Constructor."""
 self.languages_by_size = [
-'sr', 'en', 'fr', 'ru', 'de', 'pl', 'pt', 'es', 'it', 'zh', 'cs',
-'ar', 'ca', 'ta', 'el', 'nl', 'sv', 'fa', 'uk', 'ro', 'tr', 'ja',
+'sr', 'en', 'fr', 'ru', 'de', 'pt', 'pl', 'es', 'it', 'zh', 'cs',
+'nl', 'ar', 'ca', 'el', 'ta', 'sv', 'fa', 'uk', 'ro', 'tr', 'ja',
 'sq', 'no', 'eo', 'fi', 'bs', 'he', 'ko', 'bg',
 ]
 
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 1d68d3b..9639860 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -39,32 +39,33 @@
 'en', 'ceb', 'sv', 'de', 'nl', 'fr', 'ru', 'it', 'es', 'war', 'pl',
 'vi', 'ja', 'pt', 'zh', 'uk', 'fa', 'ca', 'ar', 'no', 'sh', 'fi',
 'hu', 'id', 'ko', 'cs', 'ro', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
-'da', 'hy', 'min', 'kk', 'sk', 'zh-min-nan', 'he', 'lt', 'hr',
-'ce', 'et', 'sl', 'be', 'gl', 'nn', 'el', 'uz', 'la', 'simple',
-'ur', 'vo', 'az', 'hi', 'th', 'ka', 'ta', 'cy', 'mk', 'mg', 'oc',
-'lv', 'bs', 'new', 'tt', 'tl', 'ky', 'tg', 'te', 'sq', 'pms', 'br',
-'be-tarask', 'zh-yue', 'ht', 'ml', 'bn', 'jv', 'lb', 'ast', 'mr',
-'af', 'sco', 'pnb', 'is', 'ga', 'cv', 'ba', 'fy', 'su', 'sw', 'my',
-'lmo', 'an', 'yo', 'ne', 'gu', 'io', 'nds', 'pa', 'scn', 'bpy',
-'azb', 'als', 'ku', 'bar', 'kn', 'ia', 'qu', 'ckb', 'mn', 'arz',
-'bat-smg', 'wa', 'nap', 'gd', 'bug', 'yi', 'am', 'si', 'map-bms',
-'cdo', 'or', 'fo', 'mzn', 'hsb', 'li', 'sah', 'mai', 'sa', 'vec',
-'ilo', 'os', 'mrj', 'xmf', 'hif', 'mhr', 'roa-tara', 'bh', 'eml',
-'pam', 'diq', 'ps', 'sd', 'nso', 'hak', 'se', 'mi', 'bcl', 'nah',
-'nds-nl', 'gan', 'zh-classical', 'vls', 'rue', 'wuu', 'szl', 'glk',
-'bo', 'vep', 'sc', 'fiu-vro', 'co', 'lrc', 'crh', 'tk', 'kv',
-'csb', 'km', 'gv', 'frr', 'as', 'so', 'lad', 'zea', 'ace', 'ay',
-'udm', 'myv', 'lez', 'kw', 'stq', 'ie', 'nrm', 'mwl', 'pcd', 'nv',
-'koi', 'rm', 'gom', 'ug', 'lij', 'mt', 'fur', 'gn', 'dsb',
-'cbk-zam', 'dv', 'ang', 'ext', 'ln', 'kab', 'ksh', 'sn', 'gag',
-'lo', 'frp', 'pag', 'pi', 'av', 'olo', 'xal', 'pfl', 'krc', 'haw',
-'bxr', 'kaa', 'rw', 'pdc', 'pap', 'bjn', 'to', 'nov', 'kl', 'arc',
-'jam', 'kbd', 'ha', 'tyv', 'tet', 'tpi', 'ki', 'ig', 'na', 'ab',
-'lbe', 'roa-rup', 'jbo', 'ty', 'kg', 'mdf', 'za', 'wo', 'lg', 'bi',
-'dty', 'srn', 'zu', 'ltg', 'chr', 'tcy', 'sm', 'om', 'xh', 'tn',
-'chy', 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add 1.27.3 to RELEASE-NOTES

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

Change subject: Add 1.27.3 to RELEASE-NOTES
..


Add 1.27.3 to RELEASE-NOTES

Change-Id: I56fddd375352ad42a315bc078e33edde50bdae66
---
M HISTORY
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/HISTORY b/HISTORY
index 9259814..0a2869d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -699,6 +699,17 @@
 
 = MediaWiki 1.27 =
 
+== MediaWiki 1.27.3 ==
+Due to a packaging error, the wrong version of the SyntaxHighlight extension 
was
+included in the tarball version of MediaWiki 1.27.2. The version included had a
+serious security issue in it (T158689). There was also some minor code fixes in
+MediaWiki itself since 1.27.2, but none of them were security relevant.
+
+=== Changes since 1.27.2 ===
+* (T145664) Fix broken wincache merge() implementation
+* (T163434) Add wikimedia/testing-access-wrapper for forwards compatibility
+* (T153505) Fix php warnings on php 7.1 due to use of &$this
+
 == MediaWiki 1.27.2 ==
 This is a security and maintenance release of the MediaWiki 1.27 branch.
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Flesh out 1.27.4 RELEASE-NOTES from merged commits

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

Change subject: Flesh out 1.27.4 RELEASE-NOTES from merged commits
..


Flesh out 1.27.4 RELEASE-NOTES from merged commits

Change-Id: If24bab461480bf630029a20571d6d2809dc83437
---
M RELEASE-NOTES-1.27
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index de888fd..09e8b2c 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -2,6 +2,11 @@
 This not a release yet!
 
 === Changes since 1.27.3 ===
+* (T100085) Better handling of jobs execution in post-connection shutdown.
+* (T141604) Support conditionally registered namespaces.
+* (T167798) Fix highlighting for phrase queries and phrase search.
+* (T151136) Provide credits information to callbacks.
+* (T160462) Allow namespaces defined in extension.json to be overwritten 
locally.
 * (T168856) Allow SVGs created by Dia to be uploaded.
 
 == MediaWiki 1.27.3 ==

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If24bab461480bf630029a20571d6d2809dc83437
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Make use of core `.border-box()` mixin

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

Change subject: Make use of core `.border-box()` mixin
..

Make use of core `.border-box()` mixin

Making use of `.border-box()` mixin out of central mediawiki.mixins.less
and also ensure best experience in older browsers.

Change-Id: I3c3a8a1d745a0de98e348299d96d4c4645b84923
---
M modules/dashboard/styles/ext.cx.lists.common.less
M modules/stats/styles/ext.cx.stats.less
M modules/tools/styles/ext.cx.tools.formatter.less
M modules/widgets/common/grid/grid-core.less
4 files changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/modules/dashboard/styles/ext.cx.lists.common.less 
b/modules/dashboard/styles/ext.cx.lists.common.less
index 08a3dbf..97ddc68 100644
--- a/modules/dashboard/styles/ext.cx.lists.common.less
+++ b/modules/dashboard/styles/ext.cx.lists.common.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-tlitem,
@@ -60,7 +61,7 @@
.translation-language-source-container,
.translation-language-target-container {
position: relative;
-   box-sizing: border-box;
+   .box-sizing( border-box );
cursor: pointer;
 
-webkit-box-flex: 1; // iOS 6-, Safari 3.1-6
diff --git a/modules/stats/styles/ext.cx.stats.less 
b/modules/stats/styles/ext.cx.stats.less
index 99cdf3a..0f77fab 100644
--- a/modules/stats/styles/ext.cx.stats.less
+++ b/modules/stats/styles/ext.cx.stats.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-stats-container {
@@ -96,7 +97,7 @@
height: 20px;
padding: 0;
margin: 0;
-   box-sizing: border-box;
+   .box-sizing( border-box );
background-color: #36c;
border-right: 1px solid @gray;
font-size: small;
diff --git a/modules/tools/styles/ext.cx.tools.formatter.less 
b/modules/tools/styles/ext.cx.tools.formatter.less
index 67f0b2b..b66d2fb 100644
--- a/modules/tools/styles/ext.cx.tools.formatter.less
+++ b/modules/tools/styles/ext.cx.tools.formatter.less
@@ -14,7 +14,7 @@
border-right: 1px solid #fbfbfb;
background-color: transparent;
color: @gray-dark;
-   box-sizing: border-box;
+   .box-sizing( border-box );
border-radius: @borderRadius;
float: left;
opacity: 0.8;
diff --git a/modules/widgets/common/grid/grid-core.less 
b/modules/widgets/common/grid/grid-core.less
index d329505..0118569 100644
--- a/modules/widgets/common/grid/grid-core.less
+++ b/modules/widgets/common/grid/grid-core.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import 'grid-settings.less';
 
 // Grid - core
@@ -17,9 +18,7 @@
float: left;
.mw-ui-gutter(@gutter / 2);
width: 100%;
-   -webkit-box-sizing: border-box;
-   -moz-box-sizing: border-box;
-   box-sizing: border-box;
+   .box-sizing( border-box );
&.mw-ui-right {
float: right;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c3a8a1d745a0de98e348299d96d4c4645b84923
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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]: Add 1.27.3 to RELEASE-NOTES

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374105 )

Change subject: Add 1.27.3 to RELEASE-NOTES
..

Add 1.27.3 to RELEASE-NOTES

Change-Id: I56fddd375352ad42a315bc078e33edde50bdae66
---
M HISTORY
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/374105/1

diff --git a/HISTORY b/HISTORY
index 9259814..0a2869d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -699,6 +699,17 @@
 
 = MediaWiki 1.27 =
 
+== MediaWiki 1.27.3 ==
+Due to a packaging error, the wrong version of the SyntaxHighlight extension 
was
+included in the tarball version of MediaWiki 1.27.2. The version included had a
+serious security issue in it (T158689). There was also some minor code fixes in
+MediaWiki itself since 1.27.2, but none of them were security relevant.
+
+=== Changes since 1.27.2 ===
+* (T145664) Fix broken wincache merge() implementation
+* (T163434) Add wikimedia/testing-access-wrapper for forwards compatibility
+* (T153505) Fix php warnings on php 7.1 due to use of &$this
+
 == MediaWiki 1.27.2 ==
 This is a security and maintenance release of the MediaWiki 1.27 branch.
 

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

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

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Enhance workflow for tool labs membership requests

2017-08-27 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374104 )

Change subject: Enhance workflow for tool labs membership requests
..

Enhance workflow for tool labs membership requests

* Replace admin notes with timestamped comments.
* Add "feedback needed" state for requests.
* Change status from "pending" to "feedback needed" when admin comments
  without resolving.
* Change status from "feedback needed" to "pending" when applicant
  replies.

Bug: T168027
Change-Id: Ifa395b791dd09c7be7ff7e6c50a4b8a7d7cf4507
---
M striker/templates/tools/membership/status.html
M striker/tools/forms.py
A striker/tools/migrations/0010_T168027.py
M striker/tools/models.py
M striker/tools/views/membership.py
5 files changed, 151 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/04/374104/1

diff --git a/striker/templates/tools/membership/status.html 
b/striker/templates/tools/membership/status.html
index 412f6cf..9ac8fd2 100644
--- a/striker/templates/tools/membership/status.html
+++ b/striker/templates/tools/membership/status.html
@@ -33,16 +33,25 @@
 {{ app.get_status_display }}
 {% trans "Reason" %}
   {{ app.reason|linebreaksbr }}
-{% if app.admin_notes %}
-{% trans "Notes" %}
-  {{ app.admin_notes|linebreaksbr }}
-{% endif %}
 {% trans "Created" %}
 {{ app.created_date|date:"Y-m-d H:i" }}
 {% if app.resolved_date %}
 {% trans "Resolved" %}
 {{ app.resolved_date|date:"Y-m-d H:i" }} {{ app.resolved_by }}
 {% endif %}
+{% if app.admin_notes %}
+{% trans "Notes" %}
+{{ app.admin_notes|linebreaksbr }}
+{% endif %}
+{% if app.comments.all %}
+{% trans "Comments" %}
+{% for comment in app.comments.all %}
+{{ comment.comment|linebreaksbr }}
+--{{ comment.user.ldapname }}
+{{ comment.created_date|date:"Y-m-d H:i" }}
+
+{% endfor %}
+{% endif %}
   
 
   
diff --git a/striker/tools/forms.py b/striker/tools/forms.py
index 97c946f..ef359a8 100644
--- a/striker/tools/forms.py
+++ b/striker/tools/forms.py
@@ -69,6 +69,7 @@
 
 
 class AccessRequestForm(forms.ModelForm):
+"""Form for creating a new access request."""
 class Meta:
 model = AccessRequest
 fields = ('reason',)
@@ -85,16 +86,35 @@
 }
 
 
-class AccessRequestAdminForm(forms.ModelForm):
-class Meta:
-model = AccessRequest
-fields = ('admin_notes', 'status', 'suppressed')
-widgets = {
-'admin_notes': forms.Textarea(
-attrs={
-'rows': 5,
-},
-),
+class AccessRequestCommentForm(AccessRequestForm):
+"""Form for commenting on an access request."""
+comment = forms.CharField(
+widget=forms.Textarea(
+attrs={
+'placeholder': _('Add a publicly visible comment'),
+'rows': 2,
+},
+),
+required=True,
+)
+
+class Meta(AccessRequestForm.Meta):
+fields = ('comment',)
+
+
+class AccessRequestAdminForm(AccessRequestCommentForm):
+"""Form for approving/denying an access request."""
+
+def __init__(self, *args, **kwargs):
+super(AccessRequestAdminForm, self).__init__(*args, **kwargs)
+self.fields['comment'].required = False
+self.fields['comment'].widget.is_required = False
+
+class Meta(AccessRequestCommentForm.Meta):
+fields = ('status', 'comment', 'suppressed')
+labels = {
+'suppressed': _(
+'Suppress this request (hide from non-admin users)'),
 }
 
 
diff --git a/striker/tools/migrations/0010_T168027.py 
b/striker/tools/migrations/0010_T168027.py
new file mode 100644
index 000..c99f9f7
--- /dev/null
+++ b/striker/tools/migrations/0010_T168027.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.utils.timezone
+from django.conf import settings
+
+
+class Migration(migrations.Migration):
+
+dependencies = [
+migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+('tools', '0009_toolinfo_authors'),
+]
+
+operations = [
+migrations.CreateModel(
+name='AccessRequestComment',
+fields=[
+('id', models.AutoField(verbose_name='ID', auto_created=True, 
primary_key=True, serialize=False)),
+('created_date', 
models.DateTimeField(default=django.utils.timezone.now, db_index=True, 
editable=False, blank=True)),
+('comment', models.TextField()),
+],
+options={
+'ordering': ('created_date', 'user'),
+},
+),
+migrations.AlterField(
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Flesh out 1.27.4 RELEASE-NOTES from merged commits

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374103 )

Change subject: Flesh out 1.27.4 RELEASE-NOTES from merged commits
..

Flesh out 1.27.4 RELEASE-NOTES from merged commits

Change-Id: If24bab461480bf630029a20571d6d2809dc83437
---
M RELEASE-NOTES-1.27
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index de888fd..efc3a0b 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -2,6 +2,11 @@
 This not a release yet!
 
 === Changes since 1.27.3 ===
+* (T100085) Better handling of jobs execution in post-connection shutdown.
+* (T141604) Support conditionally registered namespaces.
+* (T167798) Fix highlighting for phrase queries and phrase search.
+* (T151136) Provide credits information to callbacks.
+* (T160462) Allow namespaces defined in extension.json to be overwritten 
locally. 
 * (T168856) Allow SVGs created by Dia to be uploaded.
 
 == MediaWiki 1.27.3 ==

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If24bab461480bf630029a20571d6d2809dc83437
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: CryptRand: only use random_bytes on php 7 and HHVM

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

Change subject: CryptRand: only use random_bytes on php 7 and HHVM
..


CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
---
M includes/utils/MWCryptRand.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index d09b01f..4eedd11 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -234,8 +234,11 @@
// On Linux, getrandom syscall will be used if 
available.
// On Windows CryptGenRandom will always be used
// On other platforms, /dev/urandom will be used.
+   // Avoids polyfills from before php 7.0
// All error situations will throw Exceptions and or 
Errors
-   if ( function_exists( 'random_bytes' ) ) {
+   if ( PHP_VERSION_ID >= 7
+   || ( defined( 'HHVM_VERSION_ID' ) && 
HHVM_VERSION_ID >= 31101 )
+   ) {
$rem = $bytes - strlen( $buffer );
$buffer .= random_bytes( $rem );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
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/core[REL1_27]: Add support for PHP7 random_bytes in favor of mcrypt_create_iv

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

Change subject: Add support for PHP7 random_bytes in favor of mcrypt_create_iv
..


Add support for PHP7 random_bytes in favor of mcrypt_create_iv

Bug: T143788
Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
---
M includes/utils/MWCryptRand.php
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index dd3ea1b..d09b01f 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -230,6 +230,21 @@
}
 
if ( strlen( $buffer ) < $bytes ) {
+   // If available make use of PHP 7's random_bytes
+   // On Linux, getrandom syscall will be used if 
available.
+   // On Windows CryptGenRandom will always be used
+   // On other platforms, /dev/urandom will be used.
+   // All error situations will throw Exceptions and or 
Errors
+   if ( function_exists( 'random_bytes' ) ) {
+   $rem = $bytes - strlen( $buffer );
+   $buffer .= random_bytes( $rem );
+   }
+   if ( strlen( $buffer ) >= $bytes ) {
+   $this->strong = true;
+   }
+   }
+
+   if ( strlen( $buffer ) < $bytes ) {
// If available make use of mcrypt_create_iv URANDOM 
source to generate randomness
// On unix-like systems this reads from /dev/urandom 
but does it without any buffering
// and bypasses openbasedir restrictions, so it's 
preferable to reading directly

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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] wikidata...gui[master]: gitignore InteliJ IDEA proj files

2017-08-27 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374102 )

Change subject: gitignore InteliJ IDEA proj files
..

gitignore InteliJ IDEA proj files

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


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

diff --git a/.gitignore b/.gitignore
index 6e0167e..3433e74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 build
 .idea
 package-lock.json
+*.iml

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I452943f7a213426de9de461adeab5230be4b138f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Simplify getExamples/getLabels, rm $.deferred()

2017-08-27 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374101 )

Change subject: Simplify getExamples/getLabels, rm $.deferred()
..

Simplify getExamples/getLabels, rm $.deferred()

Promises are much cleaner without the deferred() method,
easier to follow the code, and ES6 introduces much cleaner
syntax to work with them still.  BTW, we really ought
to switch the code to ES6 (classes, async, ...),
and use Babel for compatibility until ES6 support is mandatory.

Change-Id: I218a734b5986b00c0331a9561ff70f8ab6efd263
---
M wikibase/queryService/api/QuerySamples.js
M wikibase/queryService/ui/QueryExampleDialog.js
2 files changed, 14 insertions(+), 30 deletions(-)


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

diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index 254bc07..d852305 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -34,31 +34,20 @@
 * @return {jQuery.Promise} Object taking list of example queries { 
title:, query: }
 */
SELF.prototype.getExamples = function () {
-   var deferred = $.Deferred(),
-   self = this;
+   var self = this;
 
-   $.ajax( {
+   return $.ajax( {
url: API_ENDPOINT + encodeURIComponent( PAGE_TITLE + 
'/' + self._language ) + '?redirect=false',
dataType: 'html'
-   } ).done(
-   function ( data ) {
-   deferred.resolve( self._parseHTML( data ) );
-   }
-   ).fail(
-   function() {
-   // retry without language
-   $.ajax( {
-   url: API_ENDPOINT + encodeURIComponent( 
PAGE_TITLE ) + '?redirect=false',
-   dataType: 'html'
-   } ).done(
-   function ( data ) {
-   deferred.resolve( 
self._parseHTML( data ) );
-   }
-   );
-   }
-   );
-
-   return deferred;
+   } ).catch( function() {
+   // retry without language
+   return $.ajax( {
+   url: API_ENDPOINT + encodeURIComponent( 
PAGE_TITLE ) + '?redirect=false',
+   dataType: 'html'
+   } )
+   } ).then( function ( data ) {
+   return self._parseHTML( data );
+   } );
};
 
/**
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index 816cc34..9ec16e6 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -244,19 +244,14 @@
return 0;
} ).slice( 0, 50 );
 
-   var deferred = $.Deferred();
-   this._wikibaseApi.getLabels( tagCloud.map( function ( v ) {
+   return this._wikibaseApi.getLabels( tagCloud.map( function ( v 
) {
return v.id;
-   } ) ).done( function ( data ) {
+   } ) ).then( function ( data ) {
tagCloud.forEach( function ( tag ) {
tag.label = _.compact( 
data.entities[tag.id].labels )[0].value;
-
} );
-
-   deferred.resolve( tagCloud );
+   return tagCloud;
} );
-
-   return deferred.promise();
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I218a734b5986b00c0331a9561ff70f8ab6efd263
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: RELEASE-NOTES for PHP 7.1 backports

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374100 )

Change subject: RELEASE-NOTES for PHP 7.1 backports
..

RELEASE-NOTES for PHP 7.1 backports

Bug: T174262
Change-Id: If69e7fd2c29511feb8f10f1c8d1deb5bbef59b60
---
M RELEASE-NOTES-1.27
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/374100/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index de888fd..6c5c753 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -3,6 +3,7 @@
 
 === Changes since 1.27.3 ===
 * (T168856) Allow SVGs created by Dia to be uploaded.
+* (T174262) Various backports for PHP 7.1 support in MW 1.27.
 
 == MediaWiki 1.27.3 ==
 Due to a packaging error, the wrong version of the SyntaxHighlight extension 
was

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If69e7fd2c29511feb8f10f1c8d1deb5bbef59b60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Add support for PHP7 random_bytes in favor of mcrypt_create_iv

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374098 )

Change subject: Add support for PHP7 random_bytes in favor of mcrypt_create_iv
..

Add support for PHP7 random_bytes in favor of mcrypt_create_iv

Bug: T143788
Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
---
M includes/utils/MWCryptRand.php
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/374098/1

diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index dd3ea1b..d09b01f 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -230,6 +230,21 @@
}
 
if ( strlen( $buffer ) < $bytes ) {
+   // If available make use of PHP 7's random_bytes
+   // On Linux, getrandom syscall will be used if 
available.
+   // On Windows CryptGenRandom will always be used
+   // On other platforms, /dev/urandom will be used.
+   // All error situations will throw Exceptions and or 
Errors
+   if ( function_exists( 'random_bytes' ) ) {
+   $rem = $bytes - strlen( $buffer );
+   $buffer .= random_bytes( $rem );
+   }
+   if ( strlen( $buffer ) >= $bytes ) {
+   $this->strong = true;
+   }
+   }
+
+   if ( strlen( $buffer ) < $bytes ) {
// If available make use of mcrypt_create_iv URANDOM 
source to generate randomness
// On unix-like systems this reads from /dev/urandom 
but does it without any buffering
// and bypasses openbasedir restrictions, so it's 
preferable to reading directly

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: CryptRand: only use random_bytes on php 7 and HHVM

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374099 )

Change subject: CryptRand: only use random_bytes on php 7 and HHVM
..

CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
---
M includes/utils/MWCryptRand.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/374099/1

diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index d09b01f..135ce36 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -234,8 +234,11 @@
// On Linux, getrandom syscall will be used if 
available.
// On Windows CryptGenRandom will always be used
// On other platforms, /dev/urandom will be used.
+   // Avoids polyfills from before php 7.0
// All error situations will throw Exceptions and or 
Errors
-   if ( function_exists( 'random_bytes' ) ) {
+   if ( PHP_VERSION_ID >= 7
+   || ( defined( 'HHVM_VERSION_ID' ) && 
HHVM_VERSION_ID >= 31101 )
+   {
$rem = $bytes - strlen( $buffer );
$buffer .= random_bytes( $rem );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace &$this with $this in MediaWiki/core hook system

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

Change subject: Replace &$this with $this in MediaWiki/core hook system
..


Replace &$this with $this in MediaWiki/core hook system

Change-Id: I1cf517830dec73b6abbe5f6056a9ddd42cc8de43
---
M includes/page/Article.php
M includes/page/WikiPage.php
2 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/includes/page/Article.php b/includes/page/Article.php
index 2de9fcd..3b61428 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -340,7 +340,10 @@
 
// @todo Get rid of mContent everywhere!
$this->mContent = ContentHandler::getContentText( $content );
-   ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', [ 
&$this, &$this->mContent ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+   ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', [ 
&$articlePage, &$this->mContent ] );
 
return $this->mContent;
}
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 8076e41..c85a04a 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -2944,8 +2944,10 @@
 
$this->doDeleteUpdates( $id, $content );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $page = $this;
Hooks::run( 'ArticleDeleteComplete',
-   [ &$this, &$user, $reason, $id, $content, $logEntry ] );
+   [ &$page, &$user, $reason, $id, $content, $logEntry ] );
$status->value = $logid;
 
// Show log excerpt on 404 pages rather than just a link

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cf517830dec73b6abbe5f6056a9ddd42cc8de43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
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/core[REL1_27]: upload: Avoid &$this in hooks

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

Change subject: upload: Avoid &$this in hooks
..


upload: Avoid &$this in hooks

&$this triggers warnings in PHP 7.1. Simply renaming the variable before
passing it by reference avoids the warning, without breaking backwards
compatibility.

Bug: T153505
Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
(cherry picked from commit 0d742832f4a305165d2aac992189a3ab774d4a66)
---
M includes/specials/SpecialUpload.php
M includes/upload/UploadBase.php
2 files changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 8ed229b..449af52 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -206,7 +206,9 @@
$this->processUpload();
} else {
# Backwards compatibility hook
-   if ( !Hooks::run( 'UploadForm:initial', [ &$this ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:initial', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:initial' broke 
output of the upload form\n" );
 
return;
@@ -455,8 +457,9 @@
 
return;
}
-
-   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$this ] ) ) 
{
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:BeforeProcessing' broke 
processing the file.\n" );
// This code path is deprecated. If you want to break 
upload processing
// do so by hooking into the appropriate hooks in 
UploadBase::verifyUpload
@@ -542,7 +545,9 @@
 
// Success, redirect to description page
$this->mUploadSuccessful = true;
-   Hooks::run( 'SpecialUploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   Hooks::run( 'SpecialUploadComplete', [ &$upload ] );
$this->getOutput()->redirect( 
$this->mLocalFile->getTitle()->getFullURL() );
}
 
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index ae1457a..3994755 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -737,7 +737,9 @@
User::IGNORE_USER_RIGHTS
);
}
-   Hooks::run( 'UploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $uploadBase = $this;
+   Hooks::run( 'UploadComplete', [ &$uploadBase ] );
 
$this->postProcessUpload();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: upload: Avoid &$this in hooks

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374097 )

Change subject: upload: Avoid &$this in hooks
..

upload: Avoid &$this in hooks

&$this triggers warnings in PHP 7.1. Simply renaming the variable before
passing it by reference avoids the warning, without breaking backwards
compatibility.

Bug: T153505
Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
(cherry picked from commit 0d742832f4a305165d2aac992189a3ab774d4a66)
---
M includes/specials/SpecialUpload.php
M includes/upload/UploadBase.php
2 files changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/374097/1

diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 8ed229b..449af52 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -206,7 +206,9 @@
$this->processUpload();
} else {
# Backwards compatibility hook
-   if ( !Hooks::run( 'UploadForm:initial', [ &$this ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:initial', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:initial' broke 
output of the upload form\n" );
 
return;
@@ -455,8 +457,9 @@
 
return;
}
-
-   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$this ] ) ) 
{
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:BeforeProcessing' broke 
processing the file.\n" );
// This code path is deprecated. If you want to break 
upload processing
// do so by hooking into the appropriate hooks in 
UploadBase::verifyUpload
@@ -542,7 +545,9 @@
 
// Success, redirect to description page
$this->mUploadSuccessful = true;
-   Hooks::run( 'SpecialUploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   Hooks::run( 'SpecialUploadComplete', [ &$upload ] );
$this->getOutput()->redirect( 
$this->mLocalFile->getTitle()->getFullURL() );
}
 
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index ae1457a..3994755 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -737,7 +737,9 @@
User::IGNORE_USER_RIGHTS
);
}
-   Hooks::run( 'UploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $uploadBase = $this;
+   Hooks::run( 'UploadComplete', [ &$uploadBase ] );
 
$this->postProcessUpload();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Filip 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace &$this with $this in MediaWiki/core hook system

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374096 )

Change subject: Replace &$this with $this in MediaWiki/core hook system
..

Replace &$this with $this in MediaWiki/core hook system

Change-Id: I1cf517830dec73b6abbe5f6056a9ddd42cc8de43
---
M includes/page/Article.php
M includes/page/WikiPage.php
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/374096/1

diff --git a/includes/page/Article.php b/includes/page/Article.php
index 2de9fcd..3b61428 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -340,7 +340,10 @@
 
// @todo Get rid of mContent everywhere!
$this->mContent = ContentHandler::getContentText( $content );
-   ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', [ 
&$this, &$this->mContent ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+   ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', [ 
&$articlePage, &$this->mContent ] );
 
return $this->mContent;
}
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 8076e41..c85a04a 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -2944,8 +2944,10 @@
 
$this->doDeleteUpdates( $id, $content );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $page = $this;
Hooks::run( 'ArticleDeleteComplete',
-   [ &$this, &$user, $reason, $id, $content, $logEntry ] );
+   [ &$page, &$user, $reason, $id, $content, $logEntry ] );
$status->value = $logid;
 
// Show log excerpt on 404 pages rather than just a link

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cf517830dec73b6abbe5f6056a9ddd42cc8de43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Remove &$this usage

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

Change subject: Remove &$this usage
..


Remove &$this usage

Replaced &$this to avoid PHP 7.1 warning of passing $this by reference

Bug: T153505
Change-Id: I3e9bc59dc8cefac0108482afeb9cc9a274e2e54b
---
M includes/user/User.php
1 file changed, 33 insertions(+), 12 deletions(-)

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



diff --git a/includes/user/User.php b/includes/user/User.php
index 6c6404b..9b956b4 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -1638,9 +1638,10 @@
$this->mAllowUsertalk = false;
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Extensions
-   Hooks::run( 'GetBlockedStatus', [ &$this ] );
-
+   Hooks::run( 'GetBlockedStatus', [ &$user ] );
}
 
/**
@@ -1774,9 +1775,11 @@
 * @return bool True if a rate limiter was tripped
 */
public function pingLimiter( $action = 'edit', $incrBy = 1 ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Call the 'PingLimiter' hook
$result = false;
-   if ( !Hooks::run( 'PingLimiter', [ &$this, $action, &$result, 
$incrBy ] ) ) {
+   if ( !Hooks::run( 'PingLimiter', [ &$user, $action, &$result, 
$incrBy ] ) ) {
return $result;
}
 
@@ -2007,9 +2010,11 @@
} elseif ( !$ip ) {
$ip = $this->getRequest()->getIP();
}
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
$blocked = false;
$block = null;
-   Hooks::run( 'UserIsBlockedGlobally', [ &$this, $ip, &$blocked, 
&$block ] );
+   Hooks::run( 'UserIsBlockedGlobally', [ &$user, $ip, &$blocked, 
&$block ] );
 
if ( $blocked && $block === null ) {
// back-compat: UserIsBlockedGlobally didn't have 
$block param first
@@ -2030,7 +2035,9 @@
if ( $this->mLocked !== null ) {
return $this->mLocked;
}
-   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$this ], null );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
+   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$user ], null );
$this->mLocked = $authUser && $authUser->isLocked();
Hooks::run( 'UserIsLocked', [ $this, &$this->mLocked ] );
return $this->mLocked;
@@ -2047,7 +2054,9 @@
}
$this->getBlockedStatus();
if ( !$this->mHideName ) {
-   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$this ], null );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
+   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$user ], null );
$this->mHideName = $authUser && $authUser->isHidden();
Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName 
] );
}
@@ -2166,8 +2175,10 @@
 * @return array
 */
public function getNewMessageLinks() {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
$talks = [];
-   if ( !Hooks::run( 'UserRetrieveNewTalks', [ &$this, &$talks ] ) 
) {
+   if ( !Hooks::run( 'UserRetrieveNewTalks', [ &$user, &$talks ] ) 
) {
return $talks;
} elseif ( !$this->getNewtalk() ) {
return [];
@@ -3179,8 +3190,10 @@
$this->getGroups(), // explicit groups
$this->getAutomaticGroups( $recache ) // 
implicit groups
) );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Hook for additional groups
-   Hooks::run( 'UserEffectiveGroups', [ &$this, 
&$this->mEffectiveGroups ] );
+   Hooks::run( 'UserEffectiveGroups', [ &$user, 
&$this->mEffectiveGroups ] );
// Force reindexation of groups when a hook has unset 
one of them
$this->mEffectiveGroups = array_values( array_unique( 
$this->mEffectiveGroups ) );
}
@@ -3531,7 +3544,9 @@
 
// If we're working on user's talk page, we should update 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Avoid passing $this by reference in hooks

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

Change subject: Avoid passing $this by reference in hooks
..


Avoid passing $this by reference in hooks

Renamed $this passed by reference usages in hooks inside includes directory

Bug: T153505
Change-Id: Ib3e6a288a423958e75b5c1bfe53dc29e0f3fee6d
(cherry picked from commit b98aa152b340b2e77a25c92c413d5950af5f4ca8)
---
M includes/Block.php
M includes/OutputPage.php
M includes/Revision.php
3 files changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/includes/Block.php b/includes/Block.php
index 79b31bb..827099a 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -741,8 +741,10 @@
return false;
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $block = $this;
# Allow hooks to cancel the autoblock.
-   if ( !Hooks::run( 'AbortAutoblock', [ $autoblockIP, &$this ] ) 
) {
+   if ( !Hooks::run( 'AbortAutoblock', [ $autoblockIP, &$block ] ) 
) {
wfDebug( "Autoblock aborted by hook.\n" );
return false;
}
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index e5be2c7..c04d3b4 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1311,10 +1311,12 @@
}
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
# Add the remaining categories to the skin
if ( Hooks::run(
'OutputPageMakeCategoryLinks',
-   [ &$this, $categories, &$this->mCategoryLinks ] )
+   [ &$outputPage, $categories, &$this->mCategoryLinks ] )
) {
foreach ( $categories as $category => $type ) {
// array keys will cast numeric category names 
to ints, so cast back to string
@@ -1810,8 +1812,10 @@
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
$linkFlags = [];
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
Hooks::run( 'LanguageLinks', [ $this->getTitle(), 
&$this->mLanguageLinks, &$linkFlags ] );
-   Hooks::run( 'OutputPageParserOutput', [ &$this, $parserOutput ] 
);
+   Hooks::run( 'OutputPageParserOutput', [ &$outputPage, 
$parserOutput ] );
}
 
/**
@@ -1839,7 +1843,9 @@
 */
public function addParserOutputText( $parserOutput ) {
$text = $parserOutput->getText();
-   Hooks::run( 'OutputPageBeforeHTML', [ &$this, &$text ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
+   Hooks::run( 'OutputPageBeforeHTML', [ &$outputPage, &$text ] );
$this->addHTML( $text );
}
 
@@ -2319,9 +2325,11 @@
}
MWDebug::addModules( $this );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
// Hook that allows last minute changes to the output 
page, e.g.
// adding of CSS or Javascript by extensions.
-   Hooks::run( 'BeforePageDisplay', [ &$this, &$sk ] );
+   Hooks::run( 'BeforePageDisplay', [ &$outputPage, &$sk ] 
);
 
try {
$sk->outputPage();
diff --git a/includes/Revision.php b/includes/Revision.php
index 40daf3d..b4ca555 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1457,7 +1457,9 @@
);
}
 
-   Hooks::run( 'RevisionInsertComplete', [ &$this, $data, $flags ] 
);
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $revision = $this;
+   Hooks::run( 'RevisionInsertComplete', [ &$revision, $data, 
$flags ] );
 
return $this->mId;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3e6a288a423958e75b5c1bfe53dc29e0f3fee6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] labs...extreg-wos[master]: Major revamp

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

Change subject: Major revamp
..

Major revamp

* Use flask for rendering frontend
* Get files from Phabricator instead of maintaining local git clones
* Get extension list from ExtensionDistributor

Change-Id: Ic18c7489ac7f618f3dc2cf9dfc071d4784db27b3
---
A app.py
M generate.py
M requirements.txt
R static/wos.css
4 files changed, 101 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/extreg-wos 
refs/changes/95/374095/1

diff --git a/app.py b/app.py
new file mode 100644
index 000..9b50ef3
--- /dev/null
+++ b/app.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python3
+"""
+extreg-wos creates a list of extensions and their status on conversion
+Copyright (C) 2015-2017 Kunal Mehta 
+Copyright (C) 2016 Reedy 
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see .
+"""
+
+from flask import Flask, jsonify
+import json
+import os
+import toolforge
+
+import generate
+
+
+app = Flask(__name__)
+app.before_request(toolforge.redirect_to_https)
+
+DATA_PATH = os.path.join(os.path.dirname(__file__), 'data.json')
+
+
+def get_data():
+with open(DATA_PATH) as f:
+data = json.load(f)
+
+return data
+
+@app.route('/toolinfo.json')
+def toolinfo():
+return jsonify(
+name='extreg-wos',
+title='Extension registration wall of sadness',
+description='Table showing the progress of extension registration 
through MediaWiki extensions.',
+url='https://tools.wmflabs.org/extreg-wos/',
+keywords='MediaWiki',
+author='Legoktm',
+repository='https://github.com/wikimedia/labs-tools-extreg-wos'
+)
+
+
+@app.route('/data.json')
+def data():
+return jsonify(**get_data())
+
+@app.route('/')
+def main():
+data = get_data()
+return generate.build_html(data)
+
+
+if __name__ == '__main__':
+app.run(debug=True)
diff --git a/generate.py b/generate.py
index f977002..04ffd13 100644
--- a/generate.py
+++ b/generate.py
@@ -22,17 +22,16 @@
 import os
 import phabricator
 import requests
-import subprocess
-import sys
-import wmflabs
+import toolforge
 
-wmflabs.set_user_agent('extreg-wos')
+toolforge.set_user_agent('extreg-wos')
 
 with open('config.json') as f:
 conf = json.load(f)
 
 ON_LABS = os.environ.get('INSTANCEPROJECT') == 'tools'
 phab = phabricator.Phabricator(conf['PHAB_HOST'], conf['PHAB_USER'], 
conf['PHAB_CERT'])
+s = requests.Session()
 
 MW_DIR = '/data/project/extreg-wos/src' if ON_LABS else 
'/home/km/projects/gerrit/mediawiki'
 WMF_TRACKING = 87875
@@ -43,17 +42,12 @@
 
 
 def get_all_things(thing):
-ext_dir = os.path.join(MW_DIR, thing)
-return sorted(
-os.path.join(ext_dir, path)
-for path in os.listdir(ext_dir)
-if not path.startswith('.') and os.path.isdir(os.path.join(ext_dir, 
path))
-)
+return get_repos()[thing]
 
 
 def get_archived():
 data = set()
-r = requests.get(
+r = s.get(
 'https://www.mediawiki.org/w/api.php?action=query' +
 
'=categorymembers=Category:Archived%20extensions=max=json'
 )
@@ -64,8 +58,27 @@
 return data
 
 
+def get_repos():
+r = s.get(
+
'https://www.mediawiki.org/w/api.php?action=query=extdistrepos=2=json'
+)
+j = r.json()
+return j['query']['extdistrepos']
+
+
+def get_phab_file(gerrit_name, path):
+url = 
'https://phabricator.wikimedia.org/r/p/{};browse/master/{}?view=raw'.format(gerrit_name,
 path)
+print('Fetching ' + url)
+r = s.get(url)
+try:
+return r.json()
+except:
+return None
+
+
 def get_bugs(task_id, wmf):
 data = {}
+return data
 blocker_info = phab.request('maniphest.info', {'task_id': task_id})
 for phid in blocker_info['dependsOnTaskPHIDs']:
 phid_info = phab.request('phid.query', {'phids': [phid]})[phid]
@@ -108,7 +121,7 @@
 
 
 {title}
-
+
 
 
 {title}{excite}
@@ -132,7 +145,6 @@
 Version
 
 """.format(converted=converted, total=total, percent=percent, title=title, 
excite=excite)
-
 for name in sorted(data):
 converted_class = 'no'
 converted_text = 'No'
@@ -177,33 +189,7 @@
 
 """.format(generated=datetime.datetime.utcnow())
 
-with open(OUTPUT_DIR + 'index.html', 'w') as f:

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace some usages of &$this in hook parameters

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

Change subject: Replace some usages of &$this in hook parameters
..


Replace some usages of &$this in hook parameters

Affected classes:
- ApiBase
- ApiPageSet
- HistoryPager
- RawAction

Bug: T153505
Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
(cherry picked from commit 8935fb4f6642b16481265aa8d7e345d317e85aa8)
---
M includes/actions/HistoryAction.php
M includes/actions/RawAction.php
M includes/api/ApiBase.php
M includes/api/ApiPageSet.php
4 files changed, 22 insertions(+), 6 deletions(-)

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



diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index 5ec10e6..60220ae 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -420,7 +420,10 @@
$queryInfo['options'],
$this->tagFilter
);
-   Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$this, 
&$queryInfo ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $historyPager = $this;
+   Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$historyPager, 
&$queryInfo ] );
 
return $queryInfo;
}
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index 5bf24f6..d8c8bc3 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -108,7 +108,9 @@
$response->statusHeader( 404 );
}
 
-   if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$this, &$text ] 
) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $rawAction = $this;
+   if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$rawAction, 
&$text ] ) ) {
wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook 
broke raw page output.\n" );
}
 
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 7172e4d..1ef70e2 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -2271,7 +2271,10 @@
 */
public function getFinalDescription() {
$desc = $this->getDescription();
-   Hooks::run( 'APIGetDescription', [ &$this, &$desc ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetDescription', [ &$apiModule, &$desc ] );
$desc = self::escapeWikiText( $desc );
if ( is_array( $desc ) ) {
$desc = implode( "\n", $desc );
@@ -2320,7 +2323,9 @@
] + ( isset( $params['token'] ) ? $params['token'] : [] 
);
}
 
-   Hooks::run( 'APIGetAllowedParams', [ &$this, &$params, $flags ] 
);
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetAllowedParams', [ &$apiModule, &$params, 
$flags ] );
 
return $params;
}
@@ -2338,7 +2343,10 @@
$path = $this->getModulePath();
 
$desc = $this->getParamDescription();
-   Hooks::run( 'APIGetParamDescription', [ &$this, &$desc ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetParamDescription', [ &$apiModule, &$desc ] );
 
if ( !$desc ) {
$desc = [];
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index af4e536..7834669 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -173,7 +173,10 @@
// populate this pageset with the generator output
if ( !$isDryRun ) {
$generator->executeGenerator( $this );
-   Hooks::run( 'APIQueryGeneratorAfterExecute', [ 
&$generator, &$this ] );
+
+   // Avoid PHP 7.1 warning of passing $this by 
reference
+   $apiModule = $this;
+   Hooks::run( 'APIQueryGeneratorAfterExecute', [ 
&$generator, &$apiModule ] );
} else {
// Prevent warnings from being reported on 
these parameters
$main = $this->getMain();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Anomie 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Remove &$this usage

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374094 )

Change subject: Remove &$this usage
..

Remove &$this usage

Replaced &$this to avoid PHP 7.1 warning of passing $this by reference

Bug: T153505
Change-Id: I3e9bc59dc8cefac0108482afeb9cc9a274e2e54b
---
M includes/user/User.php
1 file changed, 33 insertions(+), 12 deletions(-)


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

diff --git a/includes/user/User.php b/includes/user/User.php
index 6c6404b..9b956b4 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -1638,9 +1638,10 @@
$this->mAllowUsertalk = false;
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Extensions
-   Hooks::run( 'GetBlockedStatus', [ &$this ] );
-
+   Hooks::run( 'GetBlockedStatus', [ &$user ] );
}
 
/**
@@ -1774,9 +1775,11 @@
 * @return bool True if a rate limiter was tripped
 */
public function pingLimiter( $action = 'edit', $incrBy = 1 ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Call the 'PingLimiter' hook
$result = false;
-   if ( !Hooks::run( 'PingLimiter', [ &$this, $action, &$result, 
$incrBy ] ) ) {
+   if ( !Hooks::run( 'PingLimiter', [ &$user, $action, &$result, 
$incrBy ] ) ) {
return $result;
}
 
@@ -2007,9 +2010,11 @@
} elseif ( !$ip ) {
$ip = $this->getRequest()->getIP();
}
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
$blocked = false;
$block = null;
-   Hooks::run( 'UserIsBlockedGlobally', [ &$this, $ip, &$blocked, 
&$block ] );
+   Hooks::run( 'UserIsBlockedGlobally', [ &$user, $ip, &$blocked, 
&$block ] );
 
if ( $blocked && $block === null ) {
// back-compat: UserIsBlockedGlobally didn't have 
$block param first
@@ -2030,7 +2035,9 @@
if ( $this->mLocked !== null ) {
return $this->mLocked;
}
-   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$this ], null );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
+   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$user ], null );
$this->mLocked = $authUser && $authUser->isLocked();
Hooks::run( 'UserIsLocked', [ $this, &$this->mLocked ] );
return $this->mLocked;
@@ -2047,7 +2054,9 @@
}
$this->getBlockedStatus();
if ( !$this->mHideName ) {
-   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$this ], null );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
+   $authUser = AuthManager::callLegacyAuthPlugin( 
'getUserInstance', [ &$user ], null );
$this->mHideName = $authUser && $authUser->isHidden();
Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName 
] );
}
@@ -2166,8 +2175,10 @@
 * @return array
 */
public function getNewMessageLinks() {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
$talks = [];
-   if ( !Hooks::run( 'UserRetrieveNewTalks', [ &$this, &$talks ] ) 
) {
+   if ( !Hooks::run( 'UserRetrieveNewTalks', [ &$user, &$talks ] ) 
) {
return $talks;
} elseif ( !$this->getNewtalk() ) {
return [];
@@ -3179,8 +3190,10 @@
$this->getGroups(), // explicit groups
$this->getAutomaticGroups( $recache ) // 
implicit groups
) );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $user = $this;
// Hook for additional groups
-   Hooks::run( 'UserEffectiveGroups', [ &$this, 
&$this->mEffectiveGroups ] );
+   Hooks::run( 'UserEffectiveGroups', [ &$user, 
&$this->mEffectiveGroups ] );
// Force reindexation of groups when a hook has unset 
one of them
$this->mEffectiveGroups = array_values( array_unique( 
$this->mEffectiveGroups ) );
}
@@ -3531,7 +3544,9 @@
 
// If we're working on user's talk page, we should update the 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Avoid passing $this by reference in hooks

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374093 )

Change subject: Avoid passing $this by reference in hooks
..

Avoid passing $this by reference in hooks

Renamed $this passed by reference usages in hooks inside includes directory

Bug: T153505
Change-Id: Ib3e6a288a423958e75b5c1bfe53dc29e0f3fee6d
(cherry picked from commit b98aa152b340b2e77a25c92c413d5950af5f4ca8)
---
M includes/Block.php
M includes/OutputPage.php
M includes/Revision.php
3 files changed, 18 insertions(+), 6 deletions(-)


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

diff --git a/includes/Block.php b/includes/Block.php
index 79b31bb..827099a 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -741,8 +741,10 @@
return false;
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $block = $this;
# Allow hooks to cancel the autoblock.
-   if ( !Hooks::run( 'AbortAutoblock', [ $autoblockIP, &$this ] ) 
) {
+   if ( !Hooks::run( 'AbortAutoblock', [ $autoblockIP, &$block ] ) 
) {
wfDebug( "Autoblock aborted by hook.\n" );
return false;
}
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index e5be2c7..c04d3b4 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1311,10 +1311,12 @@
}
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
# Add the remaining categories to the skin
if ( Hooks::run(
'OutputPageMakeCategoryLinks',
-   [ &$this, $categories, &$this->mCategoryLinks ] )
+   [ &$outputPage, $categories, &$this->mCategoryLinks ] )
) {
foreach ( $categories as $category => $type ) {
// array keys will cast numeric category names 
to ints, so cast back to string
@@ -1810,8 +1812,10 @@
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
$linkFlags = [];
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
Hooks::run( 'LanguageLinks', [ $this->getTitle(), 
&$this->mLanguageLinks, &$linkFlags ] );
-   Hooks::run( 'OutputPageParserOutput', [ &$this, $parserOutput ] 
);
+   Hooks::run( 'OutputPageParserOutput', [ &$outputPage, 
$parserOutput ] );
}
 
/**
@@ -1839,7 +1843,9 @@
 */
public function addParserOutputText( $parserOutput ) {
$text = $parserOutput->getText();
-   Hooks::run( 'OutputPageBeforeHTML', [ &$this, &$text ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
+   Hooks::run( 'OutputPageBeforeHTML', [ &$outputPage, &$text ] );
$this->addHTML( $text );
}
 
@@ -2319,9 +2325,11 @@
}
MWDebug::addModules( $this );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $outputPage = $this;
// Hook that allows last minute changes to the output 
page, e.g.
// adding of CSS or Javascript by extensions.
-   Hooks::run( 'BeforePageDisplay', [ &$this, &$sk ] );
+   Hooks::run( 'BeforePageDisplay', [ &$outputPage, &$sk ] 
);
 
try {
$sk->outputPage();
diff --git a/includes/Revision.php b/includes/Revision.php
index 40daf3d..b4ca555 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1457,7 +1457,9 @@
);
}
 
-   Hooks::run( 'RevisionInsertComplete', [ &$this, $data, $flags ] 
);
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $revision = $this;
+   Hooks::run( 'RevisionInsertComplete', [ &$revision, $data, 
$flags ] );
 
return $this->mId;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3e6a288a423958e75b5c1bfe53dc29e0f3fee6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace &$this with $this in MediaWiki/core hook system

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

Change subject: Replace &$this with $this in MediaWiki/core hook system
..


Replace &$this with $this in MediaWiki/core hook system

Bug: T153505
Change-Id: Ie287adf8b1d384aa651c659a9d385877379a0f11
---
M includes/page/Article.php
M includes/page/CategoryPage.php
M includes/page/ImagePage.php
M includes/page/WikiPage.php
4 files changed, 56 insertions(+), 17 deletions(-)

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



diff --git a/includes/page/Article.php b/includes/page/Article.php
index 914230c..2de9fcd 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -417,7 +417,9 @@
$this->mContentObject = $content;
$this->mRevIdFetched = $this->mRevision->getId();
 
-   Hooks::run( 'ArticleAfterFetchContentObject', [ &$this, 
&$this->mContentObject ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+   Hooks::run( 'ArticleAfterFetchContentObject', [ &$articlePage, 
&$this->mContentObject ] );
 
return $this->mContentObject;
}
@@ -582,7 +584,9 @@
while ( !$outputDone && ++$pass ) {
switch ( $pass ) {
case 1:
-   Hooks::run( 'ArticleViewHeader', [ 
&$this, &$outputDone, &$useParserCache ] );
+   // Avoid PHP 7.1 warning of passing 
$this by reference
+   $articlePage = $this;
+   Hooks::run( 'ArticleViewHeader', [ 
&$articlePage, &$outputDone, &$useParserCache ] );
break;
case 2:
# Early abort if the page doesn't exist
@@ -968,9 +972,12 @@
$redirectTargetUrl = $this->getTitle()->getLinkURL( $query );
 
if ( isset( $this->mRedirectedFrom ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+
// This is an internally redirected page view.
// We'll need a backlink to the source page for 
navigation.
-   if ( Hooks::run( 'ArticleViewRedirect', [ &$this ] ) ) {
+   if ( Hooks::run( 'ArticleViewRedirect', [ &$articlePage 
] ) ) {
$redir = Linker::linkKnown(
$this->mRedirectedFrom,
null,
@@ -1405,7 +1412,10 @@
 * @param int $oldid Revision ID of this article revision
 */
public function setOldSubtitle( $oldid = 0 ) {
-   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$this, &$oldid ] ) ) 
{
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+
+   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$articlePage, 
&$oldid ] ) ) {
return;
}
 
@@ -1966,7 +1976,9 @@
&& !$this->mRedirectedFrom && 
!$this->getTitle()->isRedirect();
// Extension may have reason to disable file caching on 
some pages.
if ( $cacheable ) {
-   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$this ] );
+   // Avoid PHP 7.1 warning of passing $this by 
reference
+   $articlePage = $this;
+   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$articlePage ] );
}
}
 
diff --git a/includes/page/CategoryPage.php b/includes/page/CategoryPage.php
index 55fe156..d27d719 100644
--- a/includes/page/CategoryPage.php
+++ b/includes/page/CategoryPage.php
@@ -66,7 +66,10 @@
return;
}
 
-   if ( !Hooks::run( 'CategoryPageView', [ &$this ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $categoryPage = $this;
+
+   if ( !Hooks::run( 'CategoryPageView', [ &$categoryPage ] ) ) {
return;
}
 
diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php
index d43a8ef..01682b0 100644
--- a/includes/page/ImagePage.php
+++ b/includes/page/ImagePage.php
@@ -81,6 +81,7 @@
$this->fileLoaded = true;
 
$this->displayImg = $img = false;
+
Hooks::run( 'ImagePageFindFile', [ $this, &$img, 
&$this->displayImg ] );
if ( !$img ) { // not set by hook?
$img = wfFindFile( $this->getTitle() );
@@ -347,7 +348,7 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace some usages of &$this in hook parameters

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374092 )

Change subject: Replace some usages of &$this in hook parameters
..

Replace some usages of &$this in hook parameters

Affected classes:
- ApiBase
- ApiPageSet
- HistoryPager
- RawAction

Bug: T153505
Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
(cherry picked from commit 8935fb4f6642b16481265aa8d7e345d317e85aa8)
---
M includes/actions/HistoryAction.php
M includes/actions/RawAction.php
M includes/api/ApiBase.php
M includes/api/ApiPageSet.php
4 files changed, 22 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/374092/1

diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index 5ec10e6..60220ae 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -420,7 +420,10 @@
$queryInfo['options'],
$this->tagFilter
);
-   Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$this, 
&$queryInfo ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $historyPager = $this;
+   Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$historyPager, 
&$queryInfo ] );
 
return $queryInfo;
}
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index 5bf24f6..d8c8bc3 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -108,7 +108,9 @@
$response->statusHeader( 404 );
}
 
-   if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$this, &$text ] 
) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $rawAction = $this;
+   if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$rawAction, 
&$text ] ) ) {
wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook 
broke raw page output.\n" );
}
 
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 7172e4d..1ef70e2 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -2271,7 +2271,10 @@
 */
public function getFinalDescription() {
$desc = $this->getDescription();
-   Hooks::run( 'APIGetDescription', [ &$this, &$desc ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetDescription', [ &$apiModule, &$desc ] );
$desc = self::escapeWikiText( $desc );
if ( is_array( $desc ) ) {
$desc = implode( "\n", $desc );
@@ -2320,7 +2323,9 @@
] + ( isset( $params['token'] ) ? $params['token'] : [] 
);
}
 
-   Hooks::run( 'APIGetAllowedParams', [ &$this, &$params, $flags ] 
);
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetAllowedParams', [ &$apiModule, &$params, 
$flags ] );
 
return $params;
}
@@ -2338,7 +2343,10 @@
$path = $this->getModulePath();
 
$desc = $this->getParamDescription();
-   Hooks::run( 'APIGetParamDescription', [ &$this, &$desc ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $apiModule = $this;
+   Hooks::run( 'APIGetParamDescription', [ &$apiModule, &$desc ] );
 
if ( !$desc ) {
$desc = [];
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index af4e536..7834669 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -173,7 +173,10 @@
// populate this pageset with the generator output
if ( !$isDryRun ) {
$generator->executeGenerator( $this );
-   Hooks::run( 'APIQueryGeneratorAfterExecute', [ 
&$generator, &$this ] );
+
+   // Avoid PHP 7.1 warning of passing $this by 
reference
+   $apiModule = $this;
+   Hooks::run( 'APIQueryGeneratorAfterExecute', [ 
&$generator, &$apiModule ] );
} else {
// Prevent warnings from being reported on 
these parameters
$main = $this->getMain();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Reedy 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replace &$this with $this in MediaWiki/core hook system

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374091 )

Change subject: Replace &$this with $this in MediaWiki/core hook system
..

Replace &$this with $this in MediaWiki/core hook system

Bug: T153505
Change-Id: Ie287adf8b1d384aa651c659a9d385877379a0f11
---
M includes/page/Article.php
M includes/page/CategoryPage.php
M includes/page/ImagePage.php
M includes/page/WikiPage.php
4 files changed, 56 insertions(+), 17 deletions(-)


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

diff --git a/includes/page/Article.php b/includes/page/Article.php
index 914230c..2de9fcd 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -417,7 +417,9 @@
$this->mContentObject = $content;
$this->mRevIdFetched = $this->mRevision->getId();
 
-   Hooks::run( 'ArticleAfterFetchContentObject', [ &$this, 
&$this->mContentObject ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+   Hooks::run( 'ArticleAfterFetchContentObject', [ &$articlePage, 
&$this->mContentObject ] );
 
return $this->mContentObject;
}
@@ -582,7 +584,9 @@
while ( !$outputDone && ++$pass ) {
switch ( $pass ) {
case 1:
-   Hooks::run( 'ArticleViewHeader', [ 
&$this, &$outputDone, &$useParserCache ] );
+   // Avoid PHP 7.1 warning of passing 
$this by reference
+   $articlePage = $this;
+   Hooks::run( 'ArticleViewHeader', [ 
&$articlePage, &$outputDone, &$useParserCache ] );
break;
case 2:
# Early abort if the page doesn't exist
@@ -968,9 +972,12 @@
$redirectTargetUrl = $this->getTitle()->getLinkURL( $query );
 
if ( isset( $this->mRedirectedFrom ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+
// This is an internally redirected page view.
// We'll need a backlink to the source page for 
navigation.
-   if ( Hooks::run( 'ArticleViewRedirect', [ &$this ] ) ) {
+   if ( Hooks::run( 'ArticleViewRedirect', [ &$articlePage 
] ) ) {
$redir = Linker::linkKnown(
$this->mRedirectedFrom,
null,
@@ -1405,7 +1412,10 @@
 * @param int $oldid Revision ID of this article revision
 */
public function setOldSubtitle( $oldid = 0 ) {
-   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$this, &$oldid ] ) ) 
{
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $articlePage = $this;
+
+   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$articlePage, 
&$oldid ] ) ) {
return;
}
 
@@ -1966,7 +1976,9 @@
&& !$this->mRedirectedFrom && 
!$this->getTitle()->isRedirect();
// Extension may have reason to disable file caching on 
some pages.
if ( $cacheable ) {
-   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$this ] );
+   // Avoid PHP 7.1 warning of passing $this by 
reference
+   $articlePage = $this;
+   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$articlePage ] );
}
}
 
diff --git a/includes/page/CategoryPage.php b/includes/page/CategoryPage.php
index 55fe156..d27d719 100644
--- a/includes/page/CategoryPage.php
+++ b/includes/page/CategoryPage.php
@@ -66,7 +66,10 @@
return;
}
 
-   if ( !Hooks::run( 'CategoryPageView', [ &$this ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $categoryPage = $this;
+
+   if ( !Hooks::run( 'CategoryPageView', [ &$categoryPage ] ) ) {
return;
}
 
diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php
index d43a8ef..01682b0 100644
--- a/includes/page/ImagePage.php
+++ b/includes/page/ImagePage.php
@@ -81,6 +81,7 @@
$this->fileLoaded = true;
 
$this->displayImg = $img = false;
+
Hooks::run( 'ImagePageFindFile', [ $this, &$img, 
&$this->displayImg ] );
if ( !$img ) { // not set by hook?
$img = wfFindFile( $this->getTitle() );
@@ -347,7 +348,7 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Replaced &$this with $this

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

Change subject: Replaced &$this with $this
..


Replaced &$this with $this

Replaced &$this in includes/Title.php to avoid error in PHP 7.1

Bug: T153505
Change-Id: I76eaae609a817af42687d87bcf0d13da7ba01c05
(cherry picked from commit 529d946e694eb020f137efa31907e28088e2e40d)
---
M includes/Title.php
1 file changed, 25 insertions(+), 11 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index 4228f93..33b7f03 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1676,8 +1676,9 @@
 
# Finally, add the fragment.
$url .= $this->getFragmentForURL();
-
-   Hooks::run( 'GetFullURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetFullURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1750,7 +1751,9 @@
$dbkey = wfUrlencode( $this->getPrefixedDBkey() );
if ( $query == '' ) {
$url = str_replace( '$1', $dbkey, 
$wgArticlePath );
-   Hooks::run( 'GetLocalURL::Article', [ &$this, 
&$url ] );
+   // Avoid PHP 7.1 warning from passing $this by 
reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL::Article', [ 
&$titleRef, &$url ] );
} else {
global $wgVariantArticlePath, $wgActionPaths, 
$wgContLang;
$url = false;
@@ -1794,8 +1797,9 @@
$url = 
"{$wgScript}?title={$dbkey}&{$query}";
}
}
-
-   Hooks::run( 'GetLocalURL::Internal', [ &$this, &$url, 
$query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL::Internal', [ &$titleRef, 
&$url, $query ] );
 
// @todo FIXME: This causes breakage in various places 
when we
// actually expected a local URL and end up with dupe 
prefixes.
@@ -1803,7 +1807,9 @@
$url = $wgServer . $url;
}
}
-   Hooks::run( 'GetLocalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1851,7 +1857,9 @@
$query = self::fixUrlQueryArgs( $query, $query2 );
$server = $wgInternalServer !== false ? $wgInternalServer : 
$wgServer;
$url = wfExpandUrl( $server . $this->getLocalURL( $query ), 
PROTO_HTTP );
-   Hooks::run( 'GetInternalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetInternalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1869,7 +1877,9 @@
public function getCanonicalURL( $query = '', $query2 = false ) {
$query = self::fixUrlQueryArgs( $query, $query2 );
$url = wfExpandUrl( $this->getLocalURL( $query ) . 
$this->getFragmentForURL(), PROTO_CANONICAL );
-   Hooks::run( 'GetCanonicalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetCanonicalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -2073,18 +2083,22 @@
private function checkPermissionHooks( $action, $user, $errors, $rigor, 
$short ) {
// Use getUserPermissionsErrors instead
$result = '';
-   if ( !Hooks::run( 'userCan', [ &$this, &$user, $action, 
&$result ] ) ) {
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   if ( !Hooks::run( 'userCan', [ &$titleRef, &$user, $action, 
&$result ] ) ) {
return $result ? [] : [ [ 'badaccess-group0' ] ];
}
// Check getUserPermissionsErrors hook
-   if ( !Hooks::run( 'getUserPermissionsErrors', [ &$this, &$user, 
$action, &$result ] ) ) {
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   if ( !Hooks::run( 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: EditPage: Avoid use of &$this in hooks

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

Change subject: EditPage: Avoid use of &$this in hooks
..


EditPage: Avoid use of &$this in hooks

* This triggers warnings in PHP 7.1

Bug: T153505
Change-Id: I5324a6bfe9e8ed255975104c5de7e7a7011cb741
(cherry picked from commit 074d6ea86f4419899c768f5a2fa0be312f749902)
---
M includes/EditPage.php
1 file changed, 19 insertions(+), 6 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 8f6cd7e..ad7e043 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2495,7 +2495,9 @@
$previewOutput = $this->getPreviewText();
}
 
-   Hooks::run( 'EditPage::showEditForm:initial', [ &$this, &$wgOut 
] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   Hooks::run( 'EditPage::showEditForm:initial', [ &$editPage, 
&$wgOut ] );
 
$this->setHeaders();
 
@@ -2561,7 +2563,9 @@
. Xml::closeElement( 'div' )
);
 
-   Hooks::run( 'EditPage::showEditForm:fields', [ &$this, &$wgOut 
] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   Hooks::run( 'EditPage::showEditForm:fields', [ &$editPage, 
&$wgOut ] );
 
// Put these up at the top to ensure they aren't lost on early 
form submission
$this->showFormBeforeText();
@@ -3470,7 +3474,9 @@
protected function showConflict() {
global $wgOut;
 
-   if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$this, 
&$wgOut ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$editPage, 
&$wgOut ] ) ) {
$stats = $wgOut->getContext()->getStats();
$stats->increment( 'edit.failures.conflict' );
 
@@ -3974,7 +3980,10 @@
$checkboxes['watch'] = $watchThisHtml;
}
}
-   Hooks::run( 'EditPageBeforeEditChecks', [ &$this, &$checkboxes, 
&$tabindex ] );
+
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   Hooks::run( 'EditPageBeforeEditChecks', [ &$editPage, 
&$checkboxes, &$tabindex ] );
return $checkboxes;
}
 
@@ -4015,7 +4024,9 @@
$buttons['diff'] = Html::submitButton( wfMessage( 'showdiff' 
)->text(),
$attribs );
 
-   Hooks::run( 'EditPageBeforeEditButtons', [ &$this, &$buttons, 
&$tabindex ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   Hooks::run( 'EditPageBeforeEditButtons', [ &$editPage, 
&$buttons, &$tabindex ] );
return $buttons;
}
 
@@ -4029,7 +4040,9 @@
$wgOut->prepareErrorPage( wfMessage( 'nosuchsectiontitle' ) );
 
$res = wfMessage( 'nosuchsectiontext', $this->section 
)->parseAsBlock();
-   Hooks::run( 'EditPageNoSuchSection', [ &$this, &$res ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $editPage = $this;
+   Hooks::run( 'EditPageNoSuchSection', [ &$editPage, &$res ] );
$wgOut->addHTML( $res );
 
$wgOut->returnToMain( false, $this->mTitle );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5324a6bfe9e8ed255975104c5de7e7a7011cb741
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Tpt 
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[REL1_27]: Replaced &$this with $this

2017-08-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374090 )

Change subject: Replaced &$this with $this
..

Replaced &$this with $this

Replaced &$this in includes/Title.php to avoid error in PHP 7.1

Bug: T153505
Change-Id: I76eaae609a817af42687d87bcf0d13da7ba01c05
(cherry picked from commit 529d946e694eb020f137efa31907e28088e2e40d)
---
M includes/Title.php
1 file changed, 25 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/374090/1

diff --git a/includes/Title.php b/includes/Title.php
index 4228f93..33b7f03 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1676,8 +1676,9 @@
 
# Finally, add the fragment.
$url .= $this->getFragmentForURL();
-
-   Hooks::run( 'GetFullURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetFullURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1750,7 +1751,9 @@
$dbkey = wfUrlencode( $this->getPrefixedDBkey() );
if ( $query == '' ) {
$url = str_replace( '$1', $dbkey, 
$wgArticlePath );
-   Hooks::run( 'GetLocalURL::Article', [ &$this, 
&$url ] );
+   // Avoid PHP 7.1 warning from passing $this by 
reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL::Article', [ 
&$titleRef, &$url ] );
} else {
global $wgVariantArticlePath, $wgActionPaths, 
$wgContLang;
$url = false;
@@ -1794,8 +1797,9 @@
$url = 
"{$wgScript}?title={$dbkey}&{$query}";
}
}
-
-   Hooks::run( 'GetLocalURL::Internal', [ &$this, &$url, 
$query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL::Internal', [ &$titleRef, 
&$url, $query ] );
 
// @todo FIXME: This causes breakage in various places 
when we
// actually expected a local URL and end up with dupe 
prefixes.
@@ -1803,7 +1807,9 @@
$url = $wgServer . $url;
}
}
-   Hooks::run( 'GetLocalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetLocalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1851,7 +1857,9 @@
$query = self::fixUrlQueryArgs( $query, $query2 );
$server = $wgInternalServer !== false ? $wgInternalServer : 
$wgServer;
$url = wfExpandUrl( $server . $this->getLocalURL( $query ), 
PROTO_HTTP );
-   Hooks::run( 'GetInternalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetInternalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -1869,7 +1877,9 @@
public function getCanonicalURL( $query = '', $query2 = false ) {
$query = self::fixUrlQueryArgs( $query, $query2 );
$url = wfExpandUrl( $this->getLocalURL( $query ) . 
$this->getFragmentForURL(), PROTO_CANONICAL );
-   Hooks::run( 'GetCanonicalURL', [ &$this, &$url, $query ] );
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   Hooks::run( 'GetCanonicalURL', [ &$titleRef, &$url, $query ] );
return $url;
}
 
@@ -2073,18 +2083,22 @@
private function checkPermissionHooks( $action, $user, $errors, $rigor, 
$short ) {
// Use getUserPermissionsErrors instead
$result = '';
-   if ( !Hooks::run( 'userCan', [ &$this, &$user, $action, 
&$result ] ) ) {
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   if ( !Hooks::run( 'userCan', [ &$titleRef, &$user, $action, 
&$result ] ) ) {
return $result ? [] : [ [ 'badaccess-group0' ] ];
}
// Check getUserPermissionsErrors hook
-   if ( !Hooks::run( 'getUserPermissionsErrors', [ &$this, &$user, 
$action, &$result ] ) ) {
+   // Avoid PHP 7.1 warning from passing $this by reference
+   $titleRef = $this;
+   if ( !Hooks::run( 

[MediaWiki-commits] [Gerrit] mediawiki...Metrolook[master]: Update skin to match changes done to vector

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

Change subject: Update skin to match changes done to vector
..


Update skin to match changes done to vector

Bug: T174292
Change-Id: I9ae5a0c772279193a93c53259f8c39989628af04
---
M Gruntfile.js
M MetrolookTemplate.php
M README.md
A ResourceLoaderLessModule.php
M SkinMetrolook.php
M components/custom/common.less
M components/custom/externalLinks.less
M components/custom/navigation.less
M components/custom/search.less
M components/custom/tabs.less
M components/main/common.less
M components/main/externalLinks.less
M components/main/navigation.less
M components/main/search.less
M components/main/tabs.less
M js/collapsibleTabs.js
M js/vector.js
A print.less
M skin.json
A skinStyles/mediawiki.action.view.redirectPage.less
M skinStyles/mediawiki.notification.less
M skinStyles/mediawiki.special.preferences.styles.less
M variables.less
23 files changed, 619 insertions(+), 338 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 963ac50..0d7a788 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,6 +11,7 @@
'*.js',
'**/*.js',
'!node_modules/**',
+   '!vendor/**',
'!js/overthrow.js'
]
},
@@ -22,7 +23,9 @@
all: [
'*.json',
'**/*.json',
-   '!node_modules/**'
+   '.stylelintrc',
+   '!node_modules/**',
+   '!vendor/**'
]
}
} );
diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php
index a93ee41..a44710d 100644
--- a/MetrolookTemplate.php
+++ b/MetrolookTemplate.php
@@ -117,50 +117,22 @@
 */
public function execute() {
$skin = $this->getSkin();
-   // Build additional attributes for navigation urls
-   $nav = $this->data['content_navigation'];
+   $this->data['namespace_urls'] = 
$this->data['content_navigation']['namespaces'];
+   $this->data['view_urls'] = 
$this->data['content_navigation']['views'];
+   $this->data['action_urls'] = 
$this->data['content_navigation']['actions'];
+   $this->data['variant_urls'] = 
$this->data['content_navigation']['variants'];
 
+   // Move the watch/unwatch star outside of the collapsed 
"actions" menu to the main "views" menu
if ( $this->config->get( 'MetrolookUseIconWatch' ) ) {
$mode = $skin->getUser()->isWatched( 
$skin->getRelevantTitle() )
? 'unwatch'
: 'watch';
 
-   if ( isset( $nav['actions'][$mode] ) ) {
-   $nav['views'][$mode] = $nav['actions'][$mode];
-   $nav['views'][$mode]['class'] = rtrim( 'icon ' 
. $nav['views'][$mode]['class'], ' ' );
-   $nav['views'][$mode]['primary'] = true;
-   unset( $nav['actions'][$mode] );
+   if ( isset( $this->data['action_urls'][$mode] ) ) {
+   $this->data['view_urls'][$mode] = 
$this->data['action_urls'][$mode];
+   unset( $this->data['action_urls'][$mode] );
}
}
-
-   $xmlID = '';
-   foreach ( $nav as $section => $links ) {
-   foreach ( $links as $key => $link ) {
-   if ( $section == 'views' && !( isset( 
$link['primary'] ) && $link['primary'] ) ) {
-   $link['class'] = rtrim( 'collapsible ' 
. $link['class'], ' ' );
-   }
-
-   $xmlID = isset( $link['id'] ) ? $link['id'] : 
'ca-' . $xmlID;
-   $nav[$section][$key]['attributes'] =
-   ' id="' . Sanitizer::escapeId( $xmlID ) 
. '"';
-   if ( $link['class'] ) {
-   $nav[$section][$key]['attributes'] .=
-   ' class="' . htmlspecialchars( 
$link['class'] ) . '"';
-   unset( $nav[$section][$key]['class'] );
-   }
-   if ( isset( $link['tooltiponly'] ) && 
$link['tooltiponly'] ) {
-   $nav[$section][$key]['key'] =
-   Linker::tooltip( 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update families files

2017-08-27 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374089 )

Change subject: Update families files
..

Update families files

Change-Id: I641523daeb1cb7e1ba3659966ceff3a89fd85d5e
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikinews_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wiktionary_family.py
7 files changed, 53 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/89/374089/1

diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index c6d7673..440d5bc 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -38,12 +38,12 @@
 """Constructor."""
 self.languages_by_size = [
 'en', 'hu', 'de', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he',
-'vi', 'ca', 'th', 'fi', 'id', 'sq', 'fa', 'zh', 'ru', 'az', 'cs',
+'vi', 'th', 'ca', 'fi', 'id', 'sq', 'fa', 'zh', 'ru', 'az', 'cs',
 'sv', 'da', 'hr', 'sr', 'tr', 'ko', 'ar', 'no', 'gl', 'ro', 'ta',
-'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'tt', 'eo', 'sk',
-'el', 'bg', 'bn', 'li', 'hy', 'si', 'ms', 'sl', 'ur', 'la', 'ml',
-'km', 'ia', 'et', 'cv', 'mr', 'oc', 'eu', 'kk', 'be', 'pa', 'ne',
-'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy', 'ba',
+'ba', 'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'tt', 'eo',
+'sk', 'el', 'bg', 'li', 'bn', 'hy', 'si', 'ms', 'sl', 'ur', 'la',
+'ml', 'km', 'ia', 'et', 'cv', 'mr', 'oc', 'eu', 'kk', 'be', 'pa',
+'ne', 'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy',
 ]
 
 super(Family, self).__init__()
diff --git a/pywikibot/families/wikinews_family.py 
b/pywikibot/families/wikinews_family.py
index 133836d..abc1c13 100644
--- a/pywikibot/families/wikinews_family.py
+++ b/pywikibot/families/wikinews_family.py
@@ -27,8 +27,8 @@
 def __init__(self):
 """Constructor."""
 self.languages_by_size = [
-'sr', 'en', 'fr', 'ru', 'de', 'pl', 'pt', 'es', 'it', 'zh', 'cs',
-'ar', 'ca', 'ta', 'el', 'nl', 'sv', 'fa', 'uk', 'ro', 'tr', 'ja',
+'sr', 'en', 'fr', 'ru', 'de', 'pt', 'pl', 'es', 'it', 'zh', 'cs',
+'nl', 'ar', 'ca', 'el', 'ta', 'sv', 'fa', 'uk', 'ro', 'tr', 'ja',
 'sq', 'no', 'eo', 'fi', 'bs', 'he', 'ko', 'bg',
 ]
 
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 1d68d3b..9639860 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -39,32 +39,33 @@
 'en', 'ceb', 'sv', 'de', 'nl', 'fr', 'ru', 'it', 'es', 'war', 'pl',
 'vi', 'ja', 'pt', 'zh', 'uk', 'fa', 'ca', 'ar', 'no', 'sh', 'fi',
 'hu', 'id', 'ko', 'cs', 'ro', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
-'da', 'hy', 'min', 'kk', 'sk', 'zh-min-nan', 'he', 'lt', 'hr',
-'ce', 'et', 'sl', 'be', 'gl', 'nn', 'el', 'uz', 'la', 'simple',
-'ur', 'vo', 'az', 'hi', 'th', 'ka', 'ta', 'cy', 'mk', 'mg', 'oc',
-'lv', 'bs', 'new', 'tt', 'tl', 'ky', 'tg', 'te', 'sq', 'pms', 'br',
-'be-tarask', 'zh-yue', 'ht', 'ml', 'bn', 'jv', 'lb', 'ast', 'mr',
-'af', 'sco', 'pnb', 'is', 'ga', 'cv', 'ba', 'fy', 'su', 'sw', 'my',
-'lmo', 'an', 'yo', 'ne', 'gu', 'io', 'nds', 'pa', 'scn', 'bpy',
-'azb', 'als', 'ku', 'bar', 'kn', 'ia', 'qu', 'ckb', 'mn', 'arz',
-'bat-smg', 'wa', 'nap', 'gd', 'bug', 'yi', 'am', 'si', 'map-bms',
-'cdo', 'or', 'fo', 'mzn', 'hsb', 'li', 'sah', 'mai', 'sa', 'vec',
-'ilo', 'os', 'mrj', 'xmf', 'hif', 'mhr', 'roa-tara', 'bh', 'eml',
-'pam', 'diq', 'ps', 'sd', 'nso', 'hak', 'se', 'mi', 'bcl', 'nah',
-'nds-nl', 'gan', 'zh-classical', 'vls', 'rue', 'wuu', 'szl', 'glk',
-'bo', 'vep', 'sc', 'fiu-vro', 'co', 'lrc', 'crh', 'tk', 'kv',
-'csb', 'km', 'gv', 'frr', 'as', 'so', 'lad', 'zea', 'ace', 'ay',
-'udm', 'myv', 'lez', 'kw', 'stq', 'ie', 'nrm', 'mwl', 'pcd', 'nv',
-'koi', 'rm', 'gom', 'ug', 'lij', 'mt', 'fur', 'gn', 'dsb',
-'cbk-zam', 'dv', 'ang', 'ext', 'ln', 'kab', 'ksh', 'sn', 'gag',
-'lo', 'frp', 'pag', 'pi', 'av', 'olo', 'xal', 'pfl', 'krc', 'haw',
-'bxr', 'kaa', 'rw', 'pdc', 'pap', 'bjn', 'to', 'nov', 'kl', 'arc',
-'jam', 'kbd', 'ha', 'tyv', 'tet', 'tpi', 'ki', 'ig', 'na', 'ab',
-'lbe', 'roa-rup', 'jbo', 'ty', 'kg', 'mdf', 'za', 'wo', 'lg', 'bi',
-'dty', 'srn', 'zu', 'ltg', 'chr', 'tcy', 'sm', 'om', 'xh', 'tn',
-

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] upload.py: Allow to use a file for description

2017-08-27 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374088 )

Change subject: [IMPR] upload.py: Allow to use a file for description
..

[IMPR] upload.py: Allow to use a file for description

Bug: T170125
Change-Id: Ia30bba7b19a70168485b554ea1dadfaba81caee4
---
M scripts/upload.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/88/374088/1

diff --git a/scripts/upload.py b/scripts/upload.py
index 9c27b78..5650e79 100755
--- a/scripts/upload.py
+++ b/scripts/upload.py
@@ -30,6 +30,7 @@
   -recursiveWhen the filename is a directory it also uploads the files from
 the subdirectories.
   -summary  Pick a custom edit summary for the bot.
+  -descriptionfile  Specify a filename where the description is stored
 
 It is possible to combine -abortonwarn and -ignorewarn so that if the specific
 warning is given it won't apply the general one but more specific one. So if it
@@ -57,6 +58,7 @@
 import math
 import os
 import re
+import codecs
 
 import pywikibot
 from pywikibot.bot import suggest_help
@@ -85,6 +87,7 @@
 chunk_size_regex = r'^-chunked(?::(\d+(?:\.\d+)?)[ \t]*(k|ki|m|mi)?b?)?$'
 chunk_size_regex = re.compile(chunk_size_regex, re.I)
 recursive = False
+descriptionFile = None
 
 # process all global bot args
 # returns a list of non-global args, i.e. args for upload.py
@@ -138,6 +141,8 @@
 chunk_size = 1 << 20  # default to 1 MiB
 else:
 pywikibot.error('Chunk size parameter is not valid.')
+elif arg.startswith('-descriptionfile:'):
+descriptionFile = arg[len('-descriptionfile:'):]
 elif url == u'':
 url = arg
 else:
@@ -156,6 +161,9 @@
 else:
 pywikibot.output(error)
 url = pywikibot.input(u'URL, file or directory where files are now:')
+if descriptionFile:
+with codecs.open(descriptionFile, encoding='utf-8') as f:
+description = '\n'.join(f.readlines())
 if always and ((aborts is not True and ignorewarn is not True) or
not description or url is None):
 additional = ''

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: write dump output files to temporary location, move in place...

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

Change subject: write dump output files to temporary location, move in place 
when done
..


write dump output files to temporary location, move in place when done

Move is done via a callback as each process completes, so that as soon
as a file has been completely written, it is available, and we need
not wait on other jobs of the same dump step to complete, that may
be running in parallel

We should also adapt runstatusapi to pick up the completed files
when they show up, in a later commit.

Bug: T169849

Change-Id: Iaa6f140f14f3e92d0832132d86ec825885a80a91
---
M xmldumps-backup/dumps/CommandManagement.py
M xmldumps-backup/dumps/apijobs.py
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/flowjob.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/recompressjobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/dumps/tablesjobs.py
M xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
12 files changed, 882 insertions(+), 375 deletions(-)

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



diff --git a/xmldumps-backup/dumps/CommandManagement.py 
b/xmldumps-backup/dumps/CommandManagement.py
index aa7d611..1fbe976 100644
--- a/xmldumps-backup/dumps/CommandManagement.py
+++ b/xmldumps-backup/dumps/CommandManagement.py
@@ -416,7 +416,8 @@
 class ProcessMonitor(threading.Thread):
 def __init__(self, timeout, queue, output_queue, default_callback_interval,
  callback_stderr, callbackStdout, callback_timed,
- callback_stderr_arg, callbackStdoutArg, callback_timed_arg):
+ callback_stderr_arg, callbackStdoutArg, callback_timed_arg,
+ callback_on_completion):
 threading.Thread.__init__(self)
 self.timeout = timeout
 self.queue = queue
@@ -428,6 +429,7 @@
 self._callback_stderr_arg = callback_stderr_arg
 self._callback_stdout_arg = callbackStdoutArg
 self._callback_timed_arg = callback_timed_arg
+self._callback_on_completion = callback_on_completion
 
 # one of these as a thread to monitor each command series.
 def run(self):
@@ -488,6 +490,10 @@
 series.continue_commands()
 
 # completed the whole series. time to go home.
+if self._callback_on_completion is not None:
+# let caller do any bookkeeping or other work on command completion
+self._callback_on_completion(series)
+
 self.queue.task_done()
 
 
@@ -521,7 +527,8 @@
 Callbackinterval is in milliseconds, defaults is 20 seconds"""
 def __init__(self, command_series_list, callback_stderr=None, 
callbackStdout=None,
  callback_timed=None, callback_stderr_arg=None, 
callbackStdoutArg=None,
- callback_timed_arg=None, quiet=False, shell=False, 
callback_interval=2):
+ callback_timed_arg=None, quiet=False, shell=False, 
callback_interval=2,
+ callback_on_completion=None):
 self._command_series_list = command_series_list
 self._command_serieses = []
 for series in self._command_series_list:
@@ -535,6 +542,7 @@
 self._callback_stderr_arg = callback_stderr_arg
 self._callback_stdout_arg = callbackStdoutArg
 self._callback_timed_arg = callback_timed_arg
+self._callback_on_completion = callback_on_completion
 self._command_series_queue = Queue.Queue()
 self._output_queue = Queue.Queue()
 self._normal_thread_count = threading.activeCount()
@@ -557,7 +565,8 @@
   self._output_queue, 
self._default_callback_interval,
   self._callback_stderr, self._callback_stdout,
   self._callback_timed, 
self._callback_stderr_arg,
-  self._callback_stdout_arg, 
self._callback_timed_arg)
+  self._callback_stdout_arg, 
self._callback_timed_arg,
+  self._callback_on_completion)
 # when the main script dies this thread must too.
 thrd.daemon = True
 thrd.start()
diff --git a/xmldumps-backup/dumps/apijobs.py b/xmldumps-backup/dumps/apijobs.py
index 612e17b..ad31c55 100644
--- a/xmldumps-backup/dumps/apijobs.py
+++ b/xmldumps-backup/dumps/apijobs.py
@@ -27,23 +27,26 @@
 raise BackupError("siteinfo dump %s trying to produce more than 
one file" %
   self.dumpname)
 output_dfname = dfnames[0]
-error, broken = self.get_siteinfo(
-runner.dump_dir.filename_public_path(output_dfname), runner)
+commands = self.build_command(runner)
+

[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I15bdfdd2b6a68097db46a091059372f82e205a6c
---
M MediaWikiMessageChecker.php
M MessageChecks.php
M MessageGroups.php
M TranslateHooks.php
M api/ApiTranslationReview.php
M ffs/AppleFFS.php
M phpcs.xml
M specials/SpecialManageGroups.php
M specials/SpecialSearchTranslations.php
M specials/SpecialTranslationStats.php
M tag/PageTranslationHooks.php
M tag/SpecialPageTranslation.php
M tag/SpecialPageTranslationDeletePage.php
M tag/SpecialPageTranslationMovePage.php
M tag/TranslatablePage.php
M utils/MessageGroupCache.php
M utils/MessageGroupStats.php
M utils/MessageIndex.php
M utils/MessageTable.php
M utils/RcFilter.php
M utils/UserToggles.php
21 files changed, 71 insertions(+), 72 deletions(-)

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



diff --git a/MediaWikiMessageChecker.php b/MediaWikiMessageChecker.php
index 58e5ef4..bc73a15 100644
--- a/MediaWikiMessageChecker.php
+++ b/MediaWikiMessageChecker.php
@@ -20,7 +20,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function wikiParameterCheck( $messages, $code, &$warnings ) {
parent::parameterCheck( $messages, $code, $warnings, 
'/\$[1-9]/' );
@@ -34,7 +34,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function wikiLinksCheck( $messages, $code, &$warnings ) {
$tc = Title::legalChars() . '#%{}';
@@ -97,7 +97,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function XhtmlCheck( $messages, $code, &$warnings ) {
foreach ( $messages as $message ) {
@@ -149,7 +149,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function pluralCheck( $messages, $code, &$warnings ) {
foreach ( $messages as $message ) {
@@ -174,7 +174,7 @@
 * Checks if the translation uses too many plural forms
 * @param TMessage[] $messages
 * @param string $code
-* @param array $warnings
+* @param array &$warnings
 * @since 2012-09-19
 */
protected function pluralFormsCheck( $messages, $code, &$warnings ) {
@@ -294,7 +294,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function pagenameMessagesCheck( $messages, $code, &$warnings 
) {
foreach ( $messages as $message ) {
@@ -321,7 +321,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function miscMWChecks( $messages, $code, &$warnings ) {
$timeList = [ 'protect-expiry-options', 'ipboptions' ];
diff --git a/MessageChecks.php b/MessageChecks.php
index 4007c7d..03af9a4 100644
--- a/MessageChecks.php
+++ b/MessageChecks.php
@@ -50,7 +50,7 @@
 
/**
 * Constructs a suitable checker for given message group.
-* @param $group MessageGroup
+* @param MessageGroup $group
 */
public function __construct( MessageGroup $group ) {
global $wgTranslateCheckBlacklist;
@@ -273,7 +273,7 @@
 * translations.
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code
-* @param array $warnings Array where warnings are appended to.
+

[MediaWiki-commits] [Gerrit] mediawiki...Metrolook[master]: Update skin to match changes done to vector

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

Change subject: Update skin to match changes done to vector
..

Update skin to match changes done to vector

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook 
refs/changes/86/374086/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ae5a0c772279193a93c53259f8c39989628af04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Metrolook
Gerrit-Branch: master
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...BlueSpiceFoundation[master]: [WiP]BS3: new MediaWiki based config mechansim

2017-08-27 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374087 )

Change subject: [WiP]BS3: new MediaWiki based config mechansim
..

[WiP]BS3: new MediaWiki based config mechansim

* Introducing new database table for settings (using JSON as serialization 
format)
* Added base config classes
* Added migration path from old config
* Also removed some unnecessary settings

Change-Id: I0deecf4c38a9480a243fdeb008e50fcf466fca37
---
M extension.json
M i18n/core/en.json
M i18n/core/qqq.json
M includes/Core.class.php
M includes/DefaultSettings.php
A maintenance/BSMigrateSettings.php
A maintenance/db/bs_settings3.sql
M src/Config.php
A src/ExtensionConfig.php
A 
src/Hook/LoadExtensionSchemaUpdates/AddBlueSpice3SettingsAndMigrationMaintenanceScript.php
A src/ISetting.php
A tests/phpunit/ConfigTest.php
12 files changed, 283 insertions(+), 46 deletions(-)


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

diff --git a/extension.json b/extension.json
index 0237668..f2a4a10 100644
--- a/extension.json
+++ b/extension.json
@@ -417,7 +417,8 @@
"ExtensionTypes": "BsCoreHooks::onExtensionTypes",
"PageContentSaveComplete": 
"BsCoreHooks::onPageContentSaveComplete",
"UnitTestsList": "BsCoreHooks::onUnitTestsList",
-   "ResourceLoaderGetConfigVars": 
"BsExtensionManager::onResourceLoaderGetConfigVars"
+   "ResourceLoaderGetConfigVars": 
"BsExtensionManager::onResourceLoaderGetConfigVars",
+   "LoadExtensionSchemaUpdates": 
"BlueSpice\\Hook\\LoadExtensionSchemaUpdates\\AddBlueSpice3SettingsAndMigrationMaintenanceScript::callback"
},
"config": {
"_prefix": "bsg",
@@ -582,7 +583,8 @@
"BSApiTasksTestBase": "tests/phpunit/BSApiTasksTestBase.php",
"BSTemplateHelper": "includes/TemplateHelper.php",
"ResourceLoaderBSTemplateModule": 
"includes/resourceloader/ResourceLoaderBSTemplateModule.php",
-   "BSTasksApiSpec": "includes/utility/BSTasksApiSpec.php"
+   "BSTasksApiSpec": "includes/utility/BSTasksApiSpec.php",
+   "BSMigrateSettings": "maintenance/BSMigrateSettings.php"
},
"load_composer_autoloader": true,
"manifest_version": 1,
diff --git a/i18n/core/en.json b/i18n/core/en.json
index 69431fa..b398205 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -37,7 +37,6 @@
"bs-viewtagerrorlist-legend": "$1 - Error",
"bs-readonly": "The database is currently locked to new entries and 
other modifications, probably for routine database maintenance, after which it 
will be back to normal. The administrator who locked it offered this 
explanation: $1",
"bs-imageofotheruser": "You are not allowed to upload an image for 
another user.",
-   "bs-pref-sortalph": "Sort namespaces alphabetically",
"bs-permissionerror": "Permission error!",
"bs-filesystemhelper-no-directory": "$1 is not a valid 
directory.",
"bs-filesystemhelper-has-path-traversal": "Path traversal detected!",
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 8710f12..23b8ec5 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -42,7 +42,6 @@
"bs-viewtagerrorlist-legend": "Used in inline error messages produced 
by tags\n\nParameters:\n* $1 - name of the tag\n{{Identical|Error}}",
"bs-readonly": "Shown in various messages when database is in readonly 
mode and a write operation is requested.\n\nParameters:\n* $1 - explanation as 
given in $wgReadOnly",
"bs-imageofotheruser": "Error message when user tries to upload an 
avatar for another user",
-   "bs-pref-sortalph": "Label for checkbox to sort all namespaces 
alphabetically.",
"bs-permissionerror": "Error message sent in ajax requests when user 
has no permissions to perform that action\n{{Identical|Permission error}}",
"bs-filesystemhelper-no-directory": "Error message given when requested 
directory is not a directory, put $1 in code tags\n\nParameters:\n* $1 - name 
of the requested directory",
"bs-filesystemhelper-has-path-traversal": "Error message given when a 
file path tries to access files outside mediawiki root.\n\nSee [[w:Directory 
traversal attack]].",
diff --git a/includes/Core.class.php b/includes/Core.class.php
index de26310..9656925 100644
--- a/includes/Core.class.php
+++ b/includes/Core.class.php
@@ -106,42 +106,6 @@
 
protected static $bHtmlFormClassLoaded = false;
 
-   /**
-* The constructor is protected because of the singleton pattern.
-*/
-   protected function __construct() {
-   wfProfileIn('Performance: ' . __METHOD__);
-   global $wgScriptPath;
-   $sPath = $wgScriptPath . 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Guard striker.tools.utils.tools_admin for anons

2017-08-27 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374085 )

Change subject: Guard striker.tools.utils.tools_admin for anons
..

Guard striker.tools.utils.tools_admin for anons

The anon user will not have an ldap_dn property, so ensure that we are
not talking to an anon before checking for tools.admin membership.

Change-Id: If6ecdf18ad5349ec325d04fffea3f0ff54c00186
---
M striker/tools/utils.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/85/374085/1

diff --git a/striker/tools/utils.py b/striker/tools/utils.py
index 8f5ef87..f5ec6e8 100644
--- a/striker/tools/utils.py
+++ b/striker/tools/utils.py
@@ -111,6 +111,8 @@
 
 def tools_admin(user):
 """Is the given user an administrator of the tools project?"""
+if user.is_anonymous():
+return False
 return user.ldap_dn in Tool.objects.get(cn='tools.admin').members
 
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: requirements.txt: Require httpbin<0.6.0 for python_version <...

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

Change subject: requirements.txt: Require httpbin<0.6.0 for python_version < 
'2.7'
..


requirements.txt: Require httpbin<0.6.0 for python_version < '2.7'

Also remove `ruamel.yaml` version requirement, added in a9fac2227c0, which
didn't resolve the issue completely. For more details see T174283.

Bug: T174283
Change-Id: I357065dfcb4438cb704afc05b0f4ef8b76b002e2
---
M dev-requirements.txt
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/dev-requirements.txt b/dev-requirements.txt
index 0df5c6f..7265af2 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -7,8 +7,8 @@
 pytest-runner
 pytest-cov
 pytest-attrib
-ruamel.yaml<0.12 ; python_version < '2.7'
 pytest-httpbin
+httpbin<0.6.0 ; python_version < '2.7'
 
 six
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I357065dfcb4438cb704afc05b0f4ef8b76b002e2
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Zoranzoki21 
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...cxserver[master]: registry: Add missing atj language in target

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

Change subject: registry: Add missing atj language in target
..


registry: Add missing atj language in target

Change-Id: I2c74a6bb481aea899a1b9f3d83d5b27406e5b632
---
M registry.wikimedia.yaml
M registry.yaml
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml
index 84122d7..3895bf1 100644
--- a/registry.wikimedia.yaml
+++ b/registry.wikimedia.yaml
@@ -301,6 +301,7 @@
   - arz
   - ast
   - as
+  - atj
   - av
   - ay
   - az
diff --git a/registry.yaml b/registry.yaml
index bedbaeb..35da912 100644
--- a/registry.yaml
+++ b/registry.yaml
@@ -301,6 +301,7 @@
   - arz
   - ast
   - as
+  - atj
   - av
   - ay
   - az

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c74a6bb481aea899a1b9f3d83d5b27406e5b632
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: KartikMistry 
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]: postEdit: Generate close button with CSS instead of HTML

2017-08-27 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374084 )

Change subject: postEdit: Generate close button with CSS instead of HTML
..

postEdit: Generate close button with CSS instead of HTML

Also remove :hover for cursor:pointer because cursor:pointer is always
shown on hovering.

Change-Id: Ib44f927a1764f703a8c31af363ebd5a8fca27375
---
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
2 files changed, 8 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/374084/1

diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js 
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
index 09eef57..6567e2b 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
@@ -48,10 +48,8 @@
$content.append( data.message );
}
 
-   $popup = $( '' ).addClass( 'postedit mw-notification' 
).append(
-   $content,
-   $( '' ).addClass( 'postedit-close' ).text( '×' )
-   ).click( function () {
+   $popup = $( '' ).addClass( 'postedit mw-notification' 
).append( $content )
+   .click( function () {
clearTimeout( timeoutId );
fadeOutConfirmation();
} );
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less 
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
index 633fd20..467928d 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
@@ -8,10 +8,7 @@
left: 50%;
z-index: 1000;
font-size: 13px;
-
-   &:hover {
-   cursor: pointer;
-   }
+   cursor: pointer;
 }
 
 .postedit {
@@ -50,7 +47,8 @@
background-position: left;
 }
 
-.postedit-close {
+.postedit:after {
+   content: '×';
position: absolute;
padding: 0 0.8em;
right: 0;
@@ -60,8 +58,8 @@
line-height: 2.3em;
text-shadow: 0 0.0625em 0 #fff;
opacity: 0.2;
+}
 
-   .postedit:hover & {
-   opacity: 0.4;
-   }
+.postedit:hover:after {
+   opacity: 0.4;
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I15bdfdd2b6a68097db46a091059372f82e205a6c
---
M MediaWikiMessageChecker.php
M MessageChecks.php
M MessageGroups.php
M TranslateHooks.php
M api/ApiTranslationReview.php
M ffs/AppleFFS.php
M phpcs.xml
M specials/SpecialManageGroups.php
M specials/SpecialSearchTranslations.php
M specials/SpecialTranslationStats.php
M tag/PageTranslationHooks.php
M tag/SpecialPageTranslation.php
M tag/SpecialPageTranslationDeletePage.php
M tag/SpecialPageTranslationMovePage.php
M tag/TranslatablePage.php
M utils/MessageGroupCache.php
M utils/MessageGroupStats.php
M utils/MessageIndex.php
M utils/MessageTable.php
M utils/RcFilter.php
M utils/UserToggles.php
21 files changed, 71 insertions(+), 72 deletions(-)


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

diff --git a/MediaWikiMessageChecker.php b/MediaWikiMessageChecker.php
index 58e5ef4..bc73a15 100644
--- a/MediaWikiMessageChecker.php
+++ b/MediaWikiMessageChecker.php
@@ -20,7 +20,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function wikiParameterCheck( $messages, $code, &$warnings ) {
parent::parameterCheck( $messages, $code, $warnings, 
'/\$[1-9]/' );
@@ -34,7 +34,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function wikiLinksCheck( $messages, $code, &$warnings ) {
$tc = Title::legalChars() . '#%{}';
@@ -97,7 +97,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function XhtmlCheck( $messages, $code, &$warnings ) {
foreach ( $messages as $message ) {
@@ -149,7 +149,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function pluralCheck( $messages, $code, &$warnings ) {
foreach ( $messages as $message ) {
@@ -174,7 +174,7 @@
 * Checks if the translation uses too many plural forms
 * @param TMessage[] $messages
 * @param string $code
-* @param array $warnings
+* @param array &$warnings
 * @since 2012-09-19
 */
protected function pluralFormsCheck( $messages, $code, &$warnings ) {
@@ -294,7 +294,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function pagenameMessagesCheck( $messages, $code, &$warnings 
) {
foreach ( $messages as $message ) {
@@ -321,7 +321,7 @@
 *
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code of the translations.
-* @param array $warnings Array where warnings are appended to.
+* @param array &$warnings Array where warnings are appended to.
 */
protected function miscMWChecks( $messages, $code, &$warnings ) {
$timeList = [ 'protect-expiry-options', 'ipboptions' ];
diff --git a/MessageChecks.php b/MessageChecks.php
index 4007c7d..03af9a4 100644
--- a/MessageChecks.php
+++ b/MessageChecks.php
@@ -50,7 +50,7 @@
 
/**
 * Constructs a suitable checker for given message group.
-* @param $group MessageGroup
+* @param MessageGroup $group
 */
public function __construct( MessageGroup $group ) {
global $wgTranslateCheckBlacklist;
@@ -273,7 +273,7 @@
 * translations.
 * @param TMessage[] $messages Iterable list of TMessage objects.
 * @param string $code Language code
-* @param array $warnings Array where warnings are 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Make both LoginNotify email features default for Hewiki

2017-08-27 Thread Samtar (Code Review)
Samtar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374082 )

Change subject: Make both LoginNotify email features default for Hewiki
..

Make both LoginNotify email features default for Hewiki

Modify wmgEchoDefaultUserSubscriptions for hewiki

Bug: T174263
Change-Id: If36b3b865377112bc0037ab79f0aae8fb925adba
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8013276..57f910a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17292,6 +17292,7 @@
 // Format: 'blahwiki' => [ 'web' => [ 'emailuser' => false ], 'email' => [ 
'reverted' => true ] ]
 'wmgEchoDefaultUserSubscriptions' => [
'default' => [],
+   'hewiki' => [ 'email' => [ 'login-success' => true, 'login-fail' => 
true ] ]
 ],
 
 'wmgEchoMentionStatusNotifications' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: postEdit: Simplify close button

2017-08-27 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374081 )

Change subject: postEdit: Simplify close button
..

postEdit: Simplify close button

Use  instead of  for the close button. This makes
resetting the CSS style and the preventDefault() superfluous and
prevents open a new tab on middle click and does not show an
unnecessary status bar on hover.

Change-Id: I8c60aae454d64803686088f1dbe0228b1ecc70be
---
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
M resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
2 files changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/374081/1

diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js 
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
index e25c96a..09eef57 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
@@ -50,9 +50,8 @@
 
$popup = $( '' ).addClass( 'postedit mw-notification' 
).append(
$content,
-   $( '' ).addClass( 'postedit-close' ).attr( 'href', 
'#' ).text( '×' )
-   ).on( 'click', function ( e ) {
-   e.preventDefault();
+   $( '' ).addClass( 'postedit-close' ).text( '×' )
+   ).click( function () {
clearTimeout( timeoutId );
fadeOutConfirmation();
} );
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less 
b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
index 8094559..633fd20 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
+++ b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
@@ -58,14 +58,10 @@
font-size: 1.25em;
font-weight: bold;
line-height: 2.3em;
-   color: #000;
text-shadow: 0 0.0625em 0 #fff;
-   text-decoration: none;
opacity: 0.2;
 
.postedit:hover & {
-   color: #000;
-   text-decoration: none;
opacity: 0.4;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: CheckUser.alias translations for Basque (eu)

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

Change subject: CheckUser.alias translations for Basque (eu)
..


CheckUser.alias translations for Basque (eu)

Translations provided by User:Iñaki_LL from eu.wikipedia.org
See  for authorship.

Change-Id: I7c1d98d1ff0f1bb5ac56978ed4bc26e88f0a7e40
---
M CheckUser.alias.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/CheckUser.alias.php b/CheckUser.alias.php
index cde1880..803a306 100644
--- a/CheckUser.alias.php
+++ b/CheckUser.alias.php
@@ -133,6 +133,12 @@
'CheckUserLog' => [ 'Registro_de_comprobación_de_usuarios', 
'Registro_de_verificación_de_usuarios' ],
 ];
 
+/** Basque (euskara) */
+$specialPageAliases['eu'] = [
+   'CheckUser' => [ 'Lankidea_egiaztatu' ],
+   'CheckUserLog' => [ 'Lankidearen_erregistroa_egiaztatu' ],
+];
+
 /** Persian (فارسی) */
 $specialPageAliases['fa'] = [
'CheckUser' => [ 'بازرسی_کاربر' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c1d98d1ff0f1bb5ac56978ed4bc26e88f0a7e40
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Platonides 
Gerrit-Reviewer: Raimond Spekking 
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...Flow[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Ia161db9a25a20dbd42f2fa895cc962bd514eb739
---
M Hooks.php
M includes/Api/ApiFlowBase.php
M includes/Block/Block.php
M includes/Conversion/Utils.php
M includes/Data/Index.php
M includes/Data/Listener/ReferenceRecorder.php
M includes/Data/ObjectLocator.php
M includes/Data/ObjectManager.php
M includes/Data/ObjectStorage.php
M includes/Data/Pager/Pager.php
M includes/Data/Storage/BasicDbStorage.php
M includes/Data/Storage/DbStorage.php
M includes/Data/Storage/PostRevisionTopicHistoryStorage.php
M includes/DbFactory.php
M includes/Dump/Importer.php
M includes/Formatter/AbstractQuery.php
M includes/Formatter/BoardHistoryQuery.php
M includes/Formatter/ContributionsQuery.php
M includes/Formatter/HistoryQuery.php
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/CachedData.php
M includes/Import/LiquidThreadsApi/Iterators.php
M includes/Import/LiquidThreadsApi/Source.php
M includes/Import/Postprocessor/Postprocessor.php
M includes/Import/SourceStore/SourceStoreInterface.php
M includes/Import/Wikitext/ImportSource.php
M includes/Model/AbstractRevision.php
M includes/Model/Anchor.php
M includes/Model/HtmlRenderingInformation.php
M includes/Model/URLReference.php
M includes/Model/UUID.php
M includes/Model/UserTuple.php
M includes/Model/WikiReference.php
M includes/Model/Workflow.php
M includes/Notifications/Controller.php
M includes/Notifications/FlowPresentationModel.php
M includes/Parsoid/ContentFixer.php
M includes/Repository/TreeRepository.php
M includes/Repository/UserNameBatch.php
M includes/SpamFilter/ContentLengthFilter.php
M includes/SpamFilter/Controller.php
M includes/Templating.php
M includes/View.php
M phpcs.xml
44 files changed, 148 insertions(+), 150 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index c1b7529..94cdc2f 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -206,7 +206,7 @@
/**
 * Hook: LoadExtensionSchemaUpdates
 *
-* @param $updater DatabaseUpdater object
+* @param DatabaseUpdater $updater DatabaseUpdater object
 * @return bool true in all cases
 */
public static function getSchemaUpdates( DatabaseUpdater $updater ) {
@@ -352,10 +352,10 @@
/**
 * Updates the given Flow topic line in an enhanced changes list 
(grouped RecentChanges).
 *
-* @param ChangesList $changesList
-* @param string $articlelink
-* @param string $s
-* @param RecentChange $rc
+* @param ChangesList &$changesList
+* @param string &$articlelink
+* @param string &$s
+* @param RecentChange &$rc
 * @param bool $unpatrolled
 * @param bool $isWatchlist
 * @return bool
@@ -381,10 +381,10 @@
/**
 * Updates a Flow line in the old changes list (standard RecentChanges).
 *
-* @param ChangesList $changesList
-* @param string $s
+* @param ChangesList &$changesList
+* @param string &$s
 * @param RecentChange $rc
-* @param array $classes
+* @param array &$classes
 * @return bool
 */
public static function onOldChangesListRecentChangesLine(
@@ -402,10 +402,10 @@
 * line with meta info (old changes), or simply updates the link to
 * the topic (enhanced).
 *
-* @param ChangesList $changesList
-* @param string $s
+* @param ChangesList &$changesList
+* @param string &$s
 * @param RecentChange $rc
-* @param array|null $classes
+* @param array|null &$classes
 * @param bool $topicOnly
 * @return bool
 */
@@ -473,7 +473,7 @@
 * The default diff links are incorrect!
 *
 * @param EnhancedChangesList $changesList
-* @param array $links
+* @param array &$links
 * @param RecentChange[] $block
 * @return bool
 */
@@ -517,10 +517,10 @@
 
/**
 * @param EnhancedChangesList $changesList
-* @param array $data
+* @param array &$data
 * @param RecentChange[] $block
 * @param RecentChange $rc
-* @param array $classes
+* @param array &$classes
 * @return bool
 */
public static function onEnhancedChangesListModifyLineData( 
$changesList, &$data, $block, $rc, &$classes ) {
@@ -529,7 +529,7 @@
 
/**
 * @param EnhancedChangesList $changesList
-* @param array $data
+* @param array &$data
 * @param RecentChange $rc
 * @return bool
 */
@@ -623,8 +623,8 @@
 * Regular talk page "Create source" and "Add topic" links are quite 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I488d13c37a39d4ed597e17b8fd3c2de131ca97f4
---
M Question.php
M Quiz.class.php
M Quiz.hooks.php
M phpcs.xml
4 files changed, 29 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/79/374079/1

diff --git a/Question.php b/Question.php
index 29fcd2f..93c1e25 100644
--- a/Question.php
+++ b/Question.php
@@ -4,10 +4,10 @@
/**
 * Constructor
 *
-* @param $beingCorrected Boolean.
-* @param $caseSensitive Boolean.
-* @param $questionId Integer: the Identifier of the question used to 
generate input names.
-* @param $parser Parser the wikitext parser.
+* @param bool $beingCorrected
+* @param bool $caseSensitive
+* @param int $questionId the Identifier of the question used to 
generate input names.
+* @param Parser &$parser the wikitext parser.
 */
public function __construct( $beingCorrected, $caseSensitive, 
$questionId, &$parser ) {
global $wgRequest;
@@ -29,7 +29,7 @@
 * Mutator of the question state
 *
 * @protected
-* @param $pState String:
+* @param string $pState
 */
function setState( $pState ) {
if ( $pState == 'error' || ( $pState == 'wrong' && 
$this->mState != 'error' ) ||
@@ -54,6 +54,7 @@
 * Accessor of the question state.
 *
 * @protected
+* @return string
 */
function getState() {
if ( $this->mState == 'na_right' ) {
@@ -68,7 +69,7 @@
/**
 * Convert the question's header into HTML.
 *
-* @param $input String: the quiz header in quiz syntax.
+* @param string $input the quiz header in quiz syntax.
 * @return string
 */
function parseHeader( $input ) {
@@ -95,7 +96,7 @@
/**
 * Determine the question's parameters.
 *
-* @param $matches array: elements matching $parametersPattern
+* @param array $matches elements matching $parametersPattern
 *  $matches[0] are the 
potential question parameters.
 */
function parseParameters( $matches ) {
@@ -126,7 +127,7 @@
/**
 * Transmit a single choice object to the basic type parser.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -137,7 +138,7 @@
/**
 * Transmit a multiple choice object to the basic type parser.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -148,8 +149,8 @@
/**
 * Convert a basic type object from quiz syntax to HTML.
 *
-* @param $input string A question object in quiz syntax
-* @param $inputType string
+* @param string $input A question object in quiz syntax
+* @param string $inputType
 *
 * @return string A question object in HTML.
 */
@@ -293,7 +294,7 @@
 * Determine the object's parameters and convert a list of categories 
from
 * quiz syntax to HTML.
 *
-* @param $input String: pipe-separated list of the various categories.
+* @param string $input pipe-separated list of the various categories.
 * @return string
 */
function parseCategories( $input ) {
@@ -327,7 +328,7 @@
/**
 * Convert a "text field" object to HTML.
 *
-* @param $input string A question object in quiz syntax.
+* @param string $input A question object in quiz syntax.
 *
 * @return string A question object in HTML.
 */
@@ -363,7 +364,7 @@
}
 
/**
-* @param $input array
+* @param array $input
 * @return string
 */
function parseTextField( $input ) {
diff --git a/Quiz.class.php b/Quiz.class.php
index d139c24..10e2785 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -10,8 +10,8 @@
/**
 * Constructor
 *
-* @param $argv array
-* @param $parser Parser
+* @param array $argv
+* @param Parser &$parser
 */
public function __construct( $argv, &$parser ) {
global $wgRequest;
@@ -96,7 +96,7 @@
/**
 * Get HTML from template using TemplateParser
 *
-* @param $templateParser TemplateParser
+* @param 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: requirements.txt: Require httpbin<0.6.0 for python_version <...

2017-08-27 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374078 )

Change subject: requirements.txt: Require httpbin<0.6.0 for python_version < 
'2.7'
..

requirements.txt: Require httpbin<0.6.0 for python_version < '2.7'

Bug: T174283
Change-Id: I357065dfcb4438cb704afc05b0f4ef8b76b002e2
---
M dev-requirements.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/78/374078/1

diff --git a/dev-requirements.txt b/dev-requirements.txt
index 0df5c6f..7265af2 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -7,8 +7,8 @@
 pytest-runner
 pytest-cov
 pytest-attrib
-ruamel.yaml<0.12 ; python_version < '2.7'
 pytest-httpbin
+httpbin<0.6.0 ; python_version < '2.7'
 
 six
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: If045c2e48062ea27b101522835e4e6fec7845c5d
---
M MassMessage.hooks.php
M includes/ApiEditMassMessageList.php
M includes/ApiMassMessage.php
M includes/ApiQueryMMSites.php
M includes/MassMessage.php
M includes/MassMessageTargets.php
M includes/SpecialMassMessage.php
M includes/content/MassMessageListContent.php
M includes/content/MassMessageListContentHandler.php
M includes/job/MassMessageJob.php
M includes/job/MassMessageServerSideJob.php
M phpcs.xml
M tests/phpunit/MassMessageTest.php
M tests/phpunit/MassMessageTestCase.php
M tests/phpunit/api/ApiMassMessageTest.php
15 files changed, 38 insertions(+), 42 deletions(-)


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

diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index 07d31aa..db2a4af 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -8,7 +8,7 @@
 
/**
 * Hook to load our parser function
-* @param  Parser $parser
+* @param Parser &$parser
 * @return bool
 */
public static function onParserFirstCallInit( Parser &$parser ) {
@@ -21,8 +21,8 @@
 * Prepares the human facing output
 * Hostname is optional for local delivery
 * @param Parser $parser
-* @param string $site
 * @param string $page
+* @param string $site
 * @return array
 */
public static function outputParserFunction( Parser $parser, $page, 
$site = '' ) {
@@ -71,7 +71,7 @@
 
/**
 * Add our username to the list of reserved ones
-* @param $reservedUsernames array
+* @param array &$reservedUsernames
 * @return bool
 */
public static function onUserGetReservedNames( &$reservedUsernames ) {
@@ -82,9 +82,9 @@
 
/**
 * If someone is trying to rename the bot, don't let them.
-* @param $uid int
-* @param $oldName string
-* @param $newName string
+* @param int $uid
+* @param string $oldName
+* @param string $newName
 * @return bool|string
 */
public static function onRenameUserPreRename( $uid, $oldName, $newName 
) {
@@ -97,7 +97,7 @@
 
/**
 * Add a row with the number of queued messages to Special:Statistics
-* @param  array $extraStats
+* @param array &$extraStats
 * @return bool
 */
public static function onSpecialStatsAddExtra( &$extraStats ) {
@@ -107,7 +107,7 @@
 
/**
 * Add the number of queued messages to =siteinfo=statistics
-* @param $result array
+* @param array &$result
 * @return bool
 */
public static function onAPIQuerySiteInfoStatisticsInfo( &$result ) {
@@ -120,7 +120,7 @@
 * Called only if the context is a MassMessage job (bug 69381)
 * @see bug 58237
 * @param User $user
-* @param array $rights
+* @param array &$rights
 * @return bool
 */
public static function onUserGetRights( User $user, array &$rights ) {
@@ -132,7 +132,7 @@
 
/**
 * Echo!
-* @param $event EchoEvent
+* @param EchoEvent $event
 * @return bool
 */
public static function onBeforeEchoEventInsert( EchoEvent $event ) {
diff --git a/includes/ApiEditMassMessageList.php 
b/includes/ApiEditMassMessageList.php
index d7a2e33..c95943b 100644
--- a/includes/ApiEditMassMessageList.php
+++ b/includes/ApiEditMassMessageList.php
@@ -235,6 +235,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/ApiMassMessage.php b/includes/ApiMassMessage.php
index 7a5fd6a..4f809a3 100644
--- a/includes/ApiMassMessage.php
+++ b/includes/ApiMassMessage.php
@@ -66,6 +66,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/ApiQueryMMSites.php b/includes/ApiQueryMMSites.php
index 0262a29..f280c8d 100644
--- a/includes/ApiQueryMMSites.php
+++ b/includes/ApiQueryMMSites.php
@@ -46,6 +46,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/includes/MassMessage.php b/includes/MassMessage.php
index e232fb6..aafb078 100644
--- a/includes/MassMessage.php
+++ b/includes/MassMessage.php
@@ -13,7 +13,7 @@
/**
 * Function to follow redirects
 *
-* @param $title Title
+* @param 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Fix dependencies to core modules

2017-08-27 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374075 )

Change subject: Fix dependencies to core modules
..

Fix dependencies to core modules

Add dependency on module 'mediawiki.util' for module
'ext.RevisionSlider.DiffPage' because
modules/ext.RevisionSlider.DiffPage.js uses mw.util.wikiScript.

Remove dependency on module 'mediawiki.util' for module
'ext.RevisionSlider.RevisionList' because this module does not use any
functions from mw.util directly.

Remove dependency on module 'mediawiki.user' for module
'ext.RevisionSlider.init' because this module uses only mw.user.options
which is generated in core module 'mediawiki' and not in
'mediawiki.user'.

Change-Id: Ifc6a20de667a410b9890fdc1fcba3319beb061de
---
M extension.json
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/75/374075/1

diff --git a/extension.json b/extension.json
index 7ee0604..e686ef6 100644
--- a/extension.json
+++ b/extension.json
@@ -73,8 +73,7 @@
"ext.RevisionSlider.HelpDialog",
"ext.RevisionSlider.Api",
"ext.RevisionSlider.icons",
-   "mediawiki.api.options",
-   "mediawiki.user",
+   "mediawiki.api.options"
"mediawiki.util"
],
"messages": [
@@ -170,7 +169,8 @@
"modules/ext.RevisionSlider.DiffPage.js"
],
"dependencies": [
-   "mediawiki.Uri"
+   "mediawiki.Uri",
+   "mediawiki.util"
]
},
"ext.RevisionSlider.RevisionList": {
@@ -179,8 +179,7 @@
],
"dependencies": [
"ext.RevisionSlider.Revision",
-   "ext.RevisionSlider.RevisionListView",
-   "mediawiki.util"
+   "ext.RevisionSlider.RevisionListView"
]
},
"ext.RevisionSlider.RevisionListView": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc6a20de667a410b9890fdc1fcba3319beb061de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: dev-requirements.txt: Require ruamel.yaml<0.12 for python_ve...

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

Change subject: dev-requirements.txt: Require ruamel.yaml<0.12 for 
python_version < '2.7'
..


dev-requirements.txt: Require ruamel.yaml<0.12 for python_version < '2.7'

Bug: T174283
Change-Id: If6e92df93ecbfc3560899263a0701bbc433a8f8c
---
M dev-requirements.txt
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/dev-requirements.txt b/dev-requirements.txt
index 44a3038..0df5c6f 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -7,6 +7,7 @@
 pytest-runner
 pytest-cov
 pytest-attrib
+ruamel.yaml<0.12 ; python_version < '2.7'
 pytest-httpbin
 
 six

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6e92df93ecbfc3560899263a0701bbc433a8f8c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
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...GeoData[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Id5ddbb5b7f9b59264656a3451107702e1b87cd12
---
M includes/Coord.php
M includes/Hooks.php
M includes/Math.php
M includes/Search/CirrusGeoFeature.php
M includes/api/ApiQueryCoordinates.php
M includes/api/ApiQueryGeoSearch.php
M phpcs.xml
7 files changed, 22 insertions(+), 25 deletions(-)


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

diff --git a/includes/Coord.php b/includes/Coord.php
index ca455aa..5c98005 100644
--- a/includes/Coord.php
+++ b/includes/Coord.php
@@ -60,9 +60,9 @@
/**
 * Compares this coordinates with the given coordinates
 *
-* @param Coord $coord: Coordinate to compare with
-* @param int $precision: Comparison precision
-* @return Boolean
+* @param Coord $coord Coordinate to compare with
+* @param int $precision Comparison precision
+* @return bool
 */
public function equalsTo( $coord, $precision = 6 ) {
return isset( $coord )
@@ -74,9 +74,9 @@
/**
 * Compares all the fields of this object with the given coordinates 
object
 *
-* @param Coord $coord: Coordinate to compare with
-* @param int $precision: Comparison precision
-* @return Boolean
+* @param Coord $coord Coordinate to compare with
+* @param int $precision Comparison precision
+* @return bool
 */
public function fullyEqualsTo( $coord, $precision = 6 ) {
return $this->equalsTo( $coord, $precision )
@@ -137,8 +137,8 @@
 
/**
 * Returns this object's representation suitable for insertion into the 
DB via Databse::insert()
-* @param int $pageId: ID of page associated with this coordinate
-* @return array: Associative array in format 'field' => 'value'
+* @param int $pageId ID of page associated with this coordinate
+* @return array Associative array in format 'field' => 'value'
 */
public function getRow( $pageId ) {
global $wgGeoDataIndexGranularity, $wgGeoDataBackend;
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 7b94a0f..bcd0dc8 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -78,7 +78,7 @@
 * ParserFirstCallInit hook handler
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
 *
-* @param Parser $parser
+* @param Parser &$parser
 */
public static function onParserFirstCallInit( &$parser ) {
$parser->setFunctionHook( 'coordinates',
@@ -91,8 +91,8 @@
 * ArticleDeleteComplete hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete
 *
-* @param Article $article
-* @param User $user
+* @param Article &$article
+* @param User &$user
 * @param string $reason
 * @param int $id
 */
@@ -239,7 +239,7 @@
 * OutputPageParserOutput hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageParserOutput
 *
-* @param OutputPage $out
+* @param OutputPage &$out
 * @param ParserOutput $po
 */
public static function onOutputPageParserOutput( OutputPage &$out, 
ParserOutput $po ) {
@@ -266,7 +266,7 @@
 * Search index fields hook handler
 * Adds our stuff to CirrusSearch/Elasticsearch schema
 *
-* @param array $fields
+* @param array &$fields
 * @param SearchEngine $engine
 */
public static function onSearchIndexFields( array &$fields, 
SearchEngine $engine ) {
@@ -288,7 +288,7 @@
/**
 * SearchDataForIndex hook handler
 *
-* @param array[] $fields
+* @param array[] &$fields
 * @param ContentHandler $contentHandler
 * @param WikiPage $page
 * @param ParserOutput $parserOutput
@@ -347,7 +347,7 @@
 * Add to the tables cloned for parser testing
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserTestTables
 *
-* @param array $tables The tables to duplicate structure of
+* @param array &$tables The tables to duplicate structure of
 */
public static function onParserTestTables( &$tables ) {
$tables[] = 'geo_tags';
@@ -373,7 +373,7 @@
/**
 * Add geo-search feature to search syntax
 * @param SearchConfig $config
-* @param array $features
+* @param array &$features
 */
public static function onCirrusSearchAddQueryFeatures( SearchConfig 
$config, array &$features ) {
$features[] = new 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: dev-requirements.txt: Require ruamel.yaml<0.12 for python_ve...

2017-08-27 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374073 )

Change subject: dev-requirements.txt: Require ruamel.yaml<0.12 for 
python_version < '2.7'
..

dev-requirements.txt: Require ruamel.yaml<0.12 for python_version < '2.7'

Bug: T174283
Change-Id: If6e92df93ecbfc3560899263a0701bbc433a8f8c
---
M dev-requirements.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/73/374073/1

diff --git a/dev-requirements.txt b/dev-requirements.txt
index 44a3038..0df5c6f 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -7,6 +7,7 @@
 pytest-runner
 pytest-cov
 pytest-attrib
+ruamel.yaml<0.12 ; python_version < '2.7'
 pytest-httpbin
 
 six

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I268aaa13d07985b0915774e83c487cd22568b161
---
M GadgetHooks.php
M Gadgets_body.php
M SpecialGadgetUsage.php
M SpecialGadgets.php
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgets.php
M includes/GadgetDefinitionNamespaceRepo.php
M includes/GadgetResourceLoaderModule.php
M includes/MediaWikiGadgetsDefinitionRepo.php
M includes/content/GadgetDefinitionContent.php
M phpcs.xml
11 files changed, 36 insertions(+), 39 deletions(-)


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

diff --git a/GadgetHooks.php b/GadgetHooks.php
index d19ff3f..5dd756a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -26,9 +26,9 @@
/**
 * PageContentSaveComplete hook handler.
 *
-* @param $article Article
-* @param $user User
-* @param $content Content New page content
+* @param Article $article
+* @param User $user
+* @param Content $content New page content
 * @return bool
 */
public static function onPageContentSaveComplete( $article, $user, 
$content ) {
@@ -45,7 +45,7 @@
 
/**
 * UserGetDefaultOptions hook handler
-* @param $defaultOptions Array of default preference keys and values
+* @param array &$defaultOptions Array of default preference keys and 
values
 * @return bool
 */
public static function userGetDefaultOptions( &$defaultOptions ) {
@@ -70,8 +70,8 @@
 
/**
 * GetPreferences hook handler.
-* @param $user User
-* @param $preferences Array: Preference descriptions
+* @param User $user
+* @param array &$preferences Preference descriptions
 * @return bool
 */
public static function getPreferences( $user, &$preferences ) {
@@ -138,7 +138,7 @@
 
/**
 * ResourceLoaderRegisterModules hook handler.
-* @param $resourceLoader ResourceLoader
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function registerModules( &$resourceLoader ) {
@@ -157,7 +157,7 @@
 
/**
 * BeforePageDisplay hook handler.
-* @param $out OutputPage
+* @param OutputPage $out
 * @return bool
 */
public static function beforePageDisplay( $out ) {
@@ -287,7 +287,7 @@
 * in the Gadget namespace based on their file extension
 *
 * @param Title $title
-* @param string $model
+* @param string &$model
 * @return bool
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
@@ -312,7 +312,7 @@
 * knows the language for Gadget: namespace pages.
 *
 * @param Title $title
-* @param string $lang
+* @param string &$lang
 * @return bool
 */
public static function onCodeEditorGetPageLanguage( Title $title, 
&$lang ) {
diff --git a/Gadgets_body.php b/Gadgets_body.php
index dc37a5f..b197ed2 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -116,28 +116,28 @@
}
 
/**
-* @return String: Gadget name
+* @return string Gadget name
 */
public function getName() {
return $this->name;
}
 
/**
-* @return String: Gadget description parsed into HTML
+* @return string Gadget description parsed into HTML
 */
public function getDescription() {
return wfMessage( "gadget-{$this->getName()}" )->parse();
}
 
/**
-* @return String: Wikitext of gadget description
+* @return string Wikitext of gadget description
 */
public function getRawDescription() {
return wfMessage( "gadget-{$this->getName()}" )->plain();
}
 
/**
-* @return String: Name of category (aka section) our gadget belongs 
to. Empty string if none.
+* @return string Name of category (aka section) our gadget belongs to. 
Empty string if none.
 */
public function getCategory() {
return $this->category;
@@ -154,8 +154,8 @@
/**
 * Checks whether this gadget is enabled for given user
 *
-* @param $user User: user to check against
-* @return Boolean
+* @param User $user user to check against
+* @return bool
 */
public function isEnabled( $user ) {
return (bool)$user->getOption( "gadget-{$this->name}", 
$this->onByDefault );
@@ -164,8 +164,8 @@
/**
 * Checks whether given user has permissions to use this gadget
 *
-* @param $user User: user to 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add several HD logos

2017-08-27 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374071 )

Change subject: Add several HD logos
..

Add several HD logos

Bug: T150618
Change-Id: I56a69e7846ddfa572b244e3e5ce36460b005749a
---
A static/images/project-logos/cywikiquote-1.5x.png
A static/images/project-logos/cywikiquote-2x.png
A static/images/project-logos/fawikiquote-1.5x.png
A static/images/project-logos/fawikiquote-2x.png
A static/images/project-logos/knwikiquote-1.5x.png
A static/images/project-logos/knwikiquote-2x.png
A static/images/project-logos/tewikiquote-1.5x.png
A static/images/project-logos/tewikiquote-2x.png
M wmf-config/InitialiseSettings.php
9 files changed, 19 insertions(+), 0 deletions(-)


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

diff --git a/static/images/project-logos/cywikiquote-1.5x.png 
b/static/images/project-logos/cywikiquote-1.5x.png
new file mode 100644
index 000..810640e
--- /dev/null
+++ b/static/images/project-logos/cywikiquote-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/cywikiquote-2x.png 
b/static/images/project-logos/cywikiquote-2x.png
new file mode 100644
index 000..03fda46
--- /dev/null
+++ b/static/images/project-logos/cywikiquote-2x.png
Binary files differ
diff --git a/static/images/project-logos/fawikiquote-1.5x.png 
b/static/images/project-logos/fawikiquote-1.5x.png
new file mode 100644
index 000..c822205
--- /dev/null
+++ b/static/images/project-logos/fawikiquote-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/fawikiquote-2x.png 
b/static/images/project-logos/fawikiquote-2x.png
new file mode 100644
index 000..3882e79
--- /dev/null
+++ b/static/images/project-logos/fawikiquote-2x.png
Binary files differ
diff --git a/static/images/project-logos/knwikiquote-1.5x.png 
b/static/images/project-logos/knwikiquote-1.5x.png
new file mode 100644
index 000..c856b78
--- /dev/null
+++ b/static/images/project-logos/knwikiquote-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/knwikiquote-2x.png 
b/static/images/project-logos/knwikiquote-2x.png
new file mode 100644
index 000..3fa66bf
--- /dev/null
+++ b/static/images/project-logos/knwikiquote-2x.png
Binary files differ
diff --git a/static/images/project-logos/tewikiquote-1.5x.png 
b/static/images/project-logos/tewikiquote-1.5x.png
new file mode 100644
index 000..fbf77c4
--- /dev/null
+++ b/static/images/project-logos/tewikiquote-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/tewikiquote-2x.png 
b/static/images/project-logos/tewikiquote-2x.png
new file mode 100644
index 000..a60f80c
--- /dev/null
+++ b/static/images/project-logos/tewikiquote-2x.png
Binary files differ
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8013276..bb8bb8d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1549,22 +1549,41 @@
 
# Wikiquote
'cawikiquote' => [ '1.5x' => 
'/static/images/project-logos/cawikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/cawikiquote-2x.png' ], // T150618
+   'cawikiquote' => [ '1.5x' => 
'/static/images/project-logos/cawikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/cawikiquote-2x.png' ], // T150618
'cswikiquote' => [ '1.5x' => 
'/static/images/project-logos/cswikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/cswikiquote-2x.png' ], // T150618
+   'cswikiquote' => [ '1.5x' => 
'/static/images/project-logos/cswikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/cswikiquote-2x.png' ], // T150618
+   'cywikiquote' => [ '1.5x' => 
'/static/images/project-logos/cywikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/cywikiquote-2x.png' ], // T150618
+   'enwikiquote' => [ '1.5x' => 
'/static/images/project-logos/enwikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/enwikiquote-2x.png' ], // T150618
'enwikiquote' => [ '1.5x' => 
'/static/images/project-logos/enwikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/enwikiquote-2x.png' ], // T150618
'eowikiquote' => [ '1.5x' => 
'/static/images/project-logos/eowikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/eowikiquote-2x.png' ], // T150618
+   'eowikiquote' => [ '1.5x' => 
'/static/images/project-logos/eowikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/eowikiquote-2x.png' ], // T150618
+   'eswikiquote' => [ '1.5x' => 
'/static/images/project-logos/eswikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/eswikiquote-2x.png' ], // T150618
'eswikiquote' => [ '1.5x' => 
'/static/images/project-logos/eswikiquote-1.5x.png', '2x' => 
'/static/images/project-logos/eswikiquote-2x.png' ], // T170604
+   'fawikiquote' => [ '1.5x' => 
'/static/images/project-logos/fawikiquote-1.5x.png', '2x' => 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Make RebaseServer asynchronous

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

Change subject: Make RebaseServer asynchronous
..


Make RebaseServer asynchronous

Change-Id: I6f565ab1893a91eb4e4e241fc8ba7f1a27fd96c2
---
M .jsduck/categories.json
M Gruntfile.js
M build/modules.json
M jsduck.json
M rebaser/server.js
M src/dm/ve.dm.RebaseDocState.js
M src/dm/ve.dm.RebaseServer.js
A src/ve.utils-es6.js
M tests/dm/ve.dm.RebaseServer.test.js
M tests/dm/ve.dm.TestRebaseClient.js
M tests/dm/ve.dm.TestRebaseServer.js
M tests/index.html
12 files changed, 357 insertions(+), 145 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index f5f5ade..44711b7 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -104,7 +104,6 @@
"classes": [
"ve.dm.Change",
"ve.dm.RebaseDocState",
-   "ve.dm.RebaseServer",
"ve.dm.RebaseClient",
"ve.dm.SurfaceSynchronizer"
]
@@ -246,13 +245,6 @@
"classes": [
"ve.ce.TestOffset",
"ve.ce.TestRunner"
-   ]
-   },
-   {
-   "name": "Rebaser",
-   "classes": [
-   "ve.dm.TestRebaseClient",
-   "ve.dm.TestRebaseServer"
]
}
]
diff --git a/Gruntfile.js b/Gruntfile.js
index d2500f9..7d108e8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -358,6 +358,7 @@

'src/init/**/*.js',

'src/ce/**/*.js',

'src/ui/**/*.js',
+   
'src/dm/ve.dm.RebaseDocState.js',

'src/dm/ve.dm.SurfaceSynchronizer.js',

'src/dm/ve.dm.TableSlice.js',

'src/dm/annotations/ve.dm.BidiAnnotation.js',
diff --git a/build/modules.json b/build/modules.json
index da2c0de..7f46462 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -638,6 +638,7 @@
},
"visualEditor.rebase": {
"scripts": [
+   "src/ve.utils-es6.js",
"src/dm/ve.dm.Change.js",
"src/dm/ve.dm.RebaseDocState.js",
"src/dm/ve.dm.RebaseServer.js",
@@ -930,6 +931,7 @@
},
"rebaser.build": {
"scripts": [
+   "src/ve.utils-es6.js",
"src/dm/ve.dm.IndexValueStore.js",
"src/dm/ve.dm.Transaction.js",
"src/dm/ve.dm.Change.js",
diff --git a/jsduck.json b/jsduck.json
index c7a2067..a74cd5f 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -9,6 +9,13 @@
"--processes": "0",
"--warnings-exit-nonzero": true,
"--external": 
"HTMLDocument,Window,Node,Text,Set,Range,Selection,ClientRect,File,Blob,DataTransfer,DataTransferItem,KeyboardEvent,MouseEvent",
+   "--exclude": [
+   "src/dm/ve.dm.RebaseServer.js",
+   "src/ve.utils-es6.js",
+   "tests/dm/ve.dm.RebaseServer.test.js",
+   "tests/dm/ve.dm.TestRebaseClient.js",
+   "tests/dm/ve.dm.TestRebaseServer.js"
+   ],
"--": [
".jsduck/external.js",
"lib/oojs/oojs.jquery.js",
diff --git a/rebaser/server.js b/rebaser/server.js
index c797472..f18a605 100644
--- a/rebaser/server.js
+++ b/rebaser/server.js
@@ -1,6 +1,12 @@
+/*!
+ * VisualEditor rebase server script.
+ *
+ * @copyright 2011-2017 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
 /* eslint-disable no-console */
 
-var rebaseServer, artificialDelay, logStream,
+var rebaseServer, pendingForDoc, artificialDelay, logStream, handlers,
port = 8081,
fs = require( 'fs' ),
express = require( 'express' ),
@@ -30,86 +36,166 @@
logEvent( event );
 }
 
+function wait( timeout ) {
+   return new Promise( function ( resolve ) {
+   setTimeout( resolve, timeout );
+   } );
+}
+
+function logError( err ) {
+   console.log( err.stack );

[MediaWiki-commits] [Gerrit] mediawiki...FeaturedFeeds[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Iaa38707c38f23746d1f3a7cda4349b282af4
---
M ApiFeaturedFeeds.php
M FeaturedFeeds.body.php
M phpcs.xml
3 files changed, 15 insertions(+), 20 deletions(-)


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

diff --git a/ApiFeaturedFeeds.php b/ApiFeaturedFeeds.php
index be38102..e44715f 100644
--- a/ApiFeaturedFeeds.php
+++ b/ApiFeaturedFeeds.php
@@ -68,6 +68,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
// attempt to find a valid feed name
diff --git a/FeaturedFeeds.body.php b/FeaturedFeeds.body.php
index 8779aad..f572aec 100644
--- a/FeaturedFeeds.body.php
+++ b/FeaturedFeeds.body.php
@@ -6,7 +6,7 @@
/**
 * Returns the list of feeds
 *
-* @param $langCode string|bool Code of language to use or false if 
default
+* @param string|bool $langCode Code of language to use or false if 
default
 * @return array Feeds in format of 'name' => array of FeedItem
 */
public static function getFeeds( $langCode ) {
@@ -75,7 +75,7 @@
 
/**
 * Returns whether all feeds are in content language
-* @return Boolean
+* @return bool
 */
public static function allInContentLanguage() {
if ( is_null( self::$allInContLang ) ) {
@@ -87,7 +87,7 @@
/**
 * Adds feeds to the page header
 *
-* @param OutputPage $out
+* @param OutputPage &$out
 * @return bool
 */
public static function beforePageDisplay( OutputPage &$out ) {
@@ -110,9 +110,9 @@
 
/**
 * SkinTemplateOutputPageBeforeExec hook handler
-* @param Skin $sk
-* @param QuickTemplate $tpl
-* @return Boolean
+* @param Skin &$sk
+* @param QuickTemplate &$tpl
+* @return bool
 */
public static function skinTemplateOutputPageBeforeExec( &$sk, &$tpl ) {
global $wgDisplayFeedsInSidebar, $wgAdvertisedFeedTypes;
@@ -168,7 +168,7 @@
}
 
/**
-* @param $langCode string
+* @param string $langCode
 * @return array
 * @throws Exception
 */
@@ -220,7 +220,7 @@
/**
 * Returns the Unix timestamp of current day's first second
 *
-* @param $timestamp
+* @param string $timestamp
 * @return int Timestamp
 */
public static function startOfDay( $timestamp ) {
@@ -252,7 +252,7 @@
/**
 * Returns the number of seconds a feed should stay in cache
 *
-* @return int: Time in seconds
+* @return int Time in seconds
 */
public static function getMaxAge() {
$ts = new MWTimestamp();
@@ -290,9 +290,9 @@
public $description;
 
/**
-* @param $name string
-* @param $options array
-* @param $lang Language
+* @param string $name
+* @param array $options
+* @param Language $lang
 */
public function __construct( $name, $options, $lang ) {
global $wgContLang;
@@ -320,7 +320,7 @@
}
 
/**
-* @param $key string
+* @param string $key
 * @return Message
 */
private function msg( $key ) {
@@ -444,7 +444,7 @@
/**
 * Returns a URL to the feed
 *
-* @param $format string Feed format, 'rss' or 'atom'
+* @param string $format Feed format, 'rss' or 'atom'
 * @return String
 */
public function getURL( $format ) {
diff --git a/phpcs.xml b/phpcs.xml
index 5a45644..b15894e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,16 +2,10 @@
 


-   
-   
-   
-   



.


-   vendor
-   node_modules
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa38707c38f23746d1f3a7cda4349b282af4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FeaturedFeeds
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...Collection[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I0e3246aee6eff3968c81c0628783c8358f04735b
---
M Collection.body.php
M Collection.hooks.php
M Collection.session.php
M Collection.suggest.php
M RenderingAPI.php
M phpcs.xml
6 files changed, 53 insertions(+), 53 deletions(-)


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

diff --git a/Collection.body.php b/Collection.body.php
index 8b705de..2a4a816 100644
--- a/Collection.body.php
+++ b/Collection.body.php
@@ -332,8 +332,8 @@
}
 
/**
-* @param $referer
-* @param $par
+* @param string $referer
+* @param string $par
 * @return mixed
 */
public function renderBookCreatorPage( $referer, $par ) {
@@ -395,7 +395,7 @@
}
 
/**
-* @param $referer
+* @param string $referer
 */
public function renderStopBookCreatorPage( $referer ) {
$out = $this->getOutput();
@@ -744,8 +744,8 @@
}
 
/**
-* @param $index
-* @param $delta
+* @param int $index
+* @param int $delta
 * @return bool
 */
public static function moveItem( $index, $delta ) {
@@ -778,9 +778,9 @@
}
 
/**
-* @param $collection
-* @param $line
-* @param $append
+* @param array &$collection
+* @param string $line
+* @param bool $append
 * @return array|null
 */
public function parseCollectionLine( &$collection, $line, $append ) {
@@ -990,7 +990,7 @@
 * 
https://www.mediawiki.org/wiki/Offline_content_generator/metabook.json
 * https://mwlib.readthedocs.org/en/latest/internals.html#article
 * @param Title $referrer Used only to provide a returnto parameter.
-* @param $writer A writer registered in the appropriate configuration.
+* @param string $writer A writer registered in the appropriate 
configuration.
 */
public function renderCollection( $collection, Title $referrer, $writer 
) {
if ( !$writer ) {
@@ -1198,8 +1198,8 @@
}
 
/**
-* @param $res
-* @param $content
+* @param array $res
+* @param string $content
 * @return int
 */
public function writeToTempFile( $res, $content ) {
@@ -1211,7 +1211,6 @@
 * assemble and feed to renderCollection() a single-item $collection.
 * @param Title $title Full page name aka prefixed title.
 * @param int $oldid
-* @param $writer A writer registered in the appropriate configuration.
 * @return array|null
 */
public function makeCollection( $title, $oldid ) {
@@ -1238,8 +1237,8 @@
/**
 * Apply query string parameters to the given collection.
 * Use defaults specified in $wgCollectionRendererSettings.
-* @param $collection
-* @param $request
+* @param array &$collection
+* @param Request &$request
 */
public function applySettings( &$collection, &$request ) {
global $wgCollectionRendererSettings;
@@ -1265,8 +1264,8 @@
}
 
/**
-* @param $collection
-* @param $partner
+* @param array $collection
+* @param string $partner
 */
public function postZIP( $collection, $partner ) {
$out = $this->getOutput();
@@ -1286,10 +1285,10 @@
}
 
/**
-* @param $colltype
-* @param $title
-* @param $pcollname
-* @param $ccollname
+* @param string $colltype
+* @param string $title
+* @param string $pcollname
+* @param string $ccollname
 */
private function renderSaveOverwritePage( $colltype, $title, 
$pcollname, $ccollname ) {
$this->setHeaders();
@@ -1304,7 +1303,7 @@
}
 
/**
-* @param $title
+* @param string $title
 */
private function renderLoadOverwritePage( $title ) {
$this->setHeaders();
diff --git a/Collection.hooks.php b/Collection.hooks.php
index 0aa7073..b1160b5 100644
--- a/Collection.hooks.php
+++ b/Collection.hooks.php
@@ -34,7 +34,7 @@
 * Callback for hook SkinBuildSidebar
 *
 * @param Skin $skin
-* @param $bar
+* @param array &$bar
 *
 * @return bool
 */
@@ -52,7 +52,7 @@
 
/**
 * @param Skin $skin
-* @param $navUrls
+* @param array &$navUrls
 * @return bool
 */
public static function buildNavUrls( $skin, &$navUrls ) {
@@ -156,7 +156,7 @@
 
/**
 * Callback for hook SiteNoticeAfter

[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I40aeba848e7969b219242631daced88d96939438
---
M CodeReviewHooks.php
M api/ApiQueryCodeRevisions.php
M backend/CodeComment.php
M backend/CodePropChange.php
M backend/CodeRepository.php
M backend/CodeRevision.php
M backend/CodeSignoff.php
M backend/DiffHighlighter.php
M backend/RepoStats.php
M backend/Subversion.php
M maintenance/showEmails.php
M phpcs.xml
M ui/CodeRepoListView.php
M ui/CodeRevisionCommitter.php
M ui/CodeRevisionListView.php
M ui/CodeRevisionView.php
M ui/CodeView.php
M ui/SpecialCode.php
M ui/SpecialRepoAdmin.php
M ui/WordCloud.php
20 files changed, 98 insertions(+), 105 deletions(-)


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

diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index 767acbd..0d7ab0e 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -28,7 +28,7 @@
 *
 * Only MySQL(/MariaDB) and SQLite are supported at the moment.
 *
-* @param $updater DatabaseUpdater
+* @param DatabaseUpdater $updater
 * @return bool
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
@@ -117,8 +117,8 @@
 * current repository when we're on Special:Code, or to be more 
specific,
 * a subpage of a repository on Special:Code.
 *
-* @param $values array
-* @param $out OutputPage
+* @param array &$values
+* @param OutputPage $out
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$values, $out ) {
@@ -136,7 +136,7 @@
/**
 * For integration with the Renameuser extension.
 *
-* @param $renameUserSQL RenameuserSQL
+* @param RenameuserSQL $renameUserSQL
 * @return bool
 */
public static function onRenameUserSQL( $renameUserSQL ) {
@@ -156,7 +156,7 @@
/**
 * For integration with the UserMerge extension.
 *
-* @param array $updateFields
+* @param array &$updateFields
 * @return bool
 */
public static function onUserMergeAccountFields( &$updateFields ) {
diff --git a/api/ApiQueryCodeRevisions.php b/api/ApiQueryCodeRevisions.php
index e9d3703..2b7af03 100644
--- a/api/ApiQueryCodeRevisions.php
+++ b/api/ApiQueryCodeRevisions.php
@@ -107,9 +107,9 @@
}
 
/**
-* @param $row
-* @param $repo CodeRepository
-* @param $result ApiResult
+* @param stdClass $row
+* @param CodeRepository $repo
+* @param ApiResult $result
 * @return array
 */
private function formatRow( $row, $repo, $result ) {
@@ -160,7 +160,7 @@
}
 
/**
-* @param $rev CodeRevision
+* @param CodeRevision $rev
 * @return array
 */
protected function addReferenced( $rev ) {
diff --git a/backend/CodeComment.php b/backend/CodeComment.php
index abf0e10..aa3f442 100644
--- a/backend/CodeComment.php
+++ b/backend/CodeComment.php
@@ -20,7 +20,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $row
+* @param stdClass $row
 * @return CodeComment
 */
static function newFromRow( $rev, $row ) {
diff --git a/backend/CodePropChange.php b/backend/CodePropChange.php
index 3657b6c..ec89da8 100644
--- a/backend/CodePropChange.php
+++ b/backend/CodePropChange.php
@@ -18,7 +18,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $row
+* @param stdClass $row
 * @return CodePropChange
 */
static function newFromRow( $rev, $row ) {
@@ -27,7 +27,7 @@
 
/**
 * @param CodeRevision $rev
-* @param $data
+* @param array $data
 * @return CodePropChange
 */
static function newFromData( $rev, $data ) {
diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php
index 21e6fb4..02525e8 100644
--- a/backend/CodeRepository.php
+++ b/backend/CodeRepository.php
@@ -93,7 +93,7 @@
}
 
/**
-* @param $row
+* @param stdClass $row
 * @return CodeRepository
 */
static function newFromRow( $row ) {
@@ -158,7 +158,7 @@
/**
 * Return a bug URL or false
 *
-* @param $bugId int|string
+* @param int|string $bugId
 * @return string|bool
 */
public function getBugPath( $bugId ) {
@@ -227,7 +227,7 @@
 
/**
 * Get a list of all tags in use in the repository
-* @param $recache Bool whether to get clean data
+* @param bool $recache whether to get clean data
 * @return array
 */
public function getTagList( 

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Replace $( document ).ready(...) by $(...)

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

Change subject: Replace $( document ).ready(...) by $(...)
..


Replace $( document ).ready(...) by $(...)

In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: Ib1cc74f126751cb0672d00a564458c039548d111
---
M resources/jquery/jquery.lazyload.js
M resources/mw.UploadWizardPage.js
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/jquery/jquery.lazyload.js 
b/resources/jquery/jquery.lazyload.js
index b22b1e5..5cd1cf1 100644
--- a/resources/jquery/jquery.lazyload.js
+++ b/resources/jquery/jquery.lazyload.js
@@ -160,7 +160,7 @@
 }
 
 /* Force initial check if images should appear. */
-$(document).ready(function() {
+$(function() {
 update();
 });
 
diff --git a/resources/mw.UploadWizardPage.js b/resources/mw.UploadWizardPage.js
index fabdbab..09ccc5a 100644
--- a/resources/mw.UploadWizardPage.js
+++ b/resources/mw.UploadWizardPage.js
@@ -51,7 +51,7 @@
uploadWizard.createInterface( '#upload-wizard' );
};
 
-   $( document ).ready( function () {
+   $( function () {
// show page.
mw.UploadWizardPage();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1cc74f126751cb0672d00a564458c039548d111
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Improve some parameter docs

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Ic6da90005cf4be8fcee92fd2a6d0b0f87c2bf201
---
M AntiSpoof/CentralAuthAntiSpoofHooks.php
M AntiSpoof/batchCAAntiSpoof.php
M includes/CentralAuthGroupMembershipProxy.php
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthPreAuthManagerHooks.php
M includes/CentralAuthUser.php
M includes/GlobalRename/GlobalRenameUser.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/WikiSet.php
M includes/specials/SpecialCentralLogin.php
M includes/specials/SpecialGlobalGroupMembership.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalUsers.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
M includes/specials/SpecialUsersWhoWillBeRenamed.php
M includes/specials/SpecialWikiSets.php
M phpcs.xml
M tests/phpunit/CentralAuthTestUser.php
21 files changed, 144 insertions(+), 145 deletions(-)


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

diff --git a/AntiSpoof/CentralAuthAntiSpoofHooks.php 
b/AntiSpoof/CentralAuthAntiSpoofHooks.php
index a2ce69a..bb7b01e 100644
--- a/AntiSpoof/CentralAuthAntiSpoofHooks.php
+++ b/AntiSpoof/CentralAuthAntiSpoofHooks.php
@@ -7,8 +7,8 @@
/**
 * Can be used to cancel user account creation
 *
-* @param $user User
-* @param $message string
+* @param User $user
+* @param string &$message
 * @return bool true to continue, false to abort user creation
 */
public static function asAbortNewAccountHook( $user, &$message ) {
@@ -89,7 +89,7 @@
 * On new account creation, record the username's thing-bob.
 * (Called after a user account is created)
 *
-* @param $user User
+* @param User $user
 * @return bool
 */
public static function asAddNewAccountHook( $user ) {
diff --git a/AntiSpoof/batchCAAntiSpoof.php b/AntiSpoof/batchCAAntiSpoof.php
index 3890118..017ccbb 100644
--- a/AntiSpoof/batchCAAntiSpoof.php
+++ b/AntiSpoof/batchCAAntiSpoof.php
@@ -10,7 +10,7 @@
 class BatchCAAntiSpoof extends BatchAntiSpoof {
 
/**
-* @param $items array
+* @param array $items
 */
protected function batchRecord( $items ) {
CentralAuthSpoofUser::batchRecord( $this->getDB(), $items );
@@ -42,7 +42,7 @@
}
 
/**
-* @param $name string
+* @param string $name
 * @return CentralAuthSpoofUser
 */
protected function makeSpoofUser( $name ) {
diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index 8e8ad45..7f1ea72 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -140,8 +140,8 @@
}
 
/**
-* @param $wiki string
-* @return Bool
+* @param string $wiki
+* @return bool
 */
function attachedOn( $wiki ) {
return $this->mGlobalUser->attachedOn( $wiki );
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 3311bd6..cc777e0 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -256,7 +256,7 @@
 * This hook is used in cases where SpecialPageFactory::getPageList() 
is called before
 * $wgExtensionFunctions are run, which happens when E:ShortUrl is 
installed.
 *
-* @param array $list
+* @param array &$list
 * @return bool
 */
public static function onSpecialPage_initList( &$list ) {
@@ -272,8 +272,8 @@
/**
 * Make sure migration information in localuser table is populated
 * on local account creation
-* @param $user User
-* @param $autocreated bool
+* @param User $user
+* @param bool $autocreated
 * @return bool
 */
static function onLocalUserCreated( $user, $autocreated ) {
@@ -301,8 +301,8 @@
/**
 * Add a little pretty to the preferences user info section
 *
-* @param $user User
-* @param $preferences array
+* @param User $user
+* @param array &$preferences
 * @return bool
 */
static function onGetPreferences( $user, &$preferences ) {
@@ -366,9 +366,9 @@
/**
 * Show a nicer error when the user account does not exist on the local 
wiki, but
 * does exist globally
-* @param $users User[]
-* @param $data array
-* @param $abortError String
+* @param User[] &$users
+* @param array $data
+

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow sysops to grant/remove transwiki user group

2017-08-27 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374066 )

Change subject: Allow sysops to grant/remove transwiki user group
..

Allow sysops to grant/remove transwiki user group

Bug: T174226
Change-Id: If8ef844fd390cfa7266c106e5081ed97b7c450e1
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8013276..76cf813 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9837,6 +9837,9 @@
'sysop' => [ 'inactive', 'flood' ],
'bureaucrat' => [ 'import', 'transwiki', 'inactive' ],
],
+   '+dtywiki' => [
+   'sysop' => [ 'transwiki' ], // T174226
+   ],
'+elwiki' => [
'bureaucrat' => [ 'accountcreator' ], // T61997
],
@@ -10579,6 +10582,9 @@
'sysop' => [ 'inactive', 'confirmed', 'flood' ],
'bureaucrat' => [ 'sysop', 'bureaucrat', 'import', 'transwiki', 
'inactive', 'confirmed' ],
],
+   '+dtywiki' => [
+   'sysop' => [ 'transwiki' ], // T174226
+   ],
'+elwiki' => [
'bureaucrat' => [ 'accountcreator' ], // T61997
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: SVG logo for es.wiktionary

2017-08-27 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374065 )

Change subject: SVG logo for es.wiktionary
..

SVG logo for es.wiktionary

Current logo has been optimized from SVG source and optiPNG -o7

Bug: T170604
Change-Id: I098bd24b41b4b63773fc13a053e64a12e4de05d8
---
M static/images/project-logos/eswiktionary.png
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/static/images/project-logos/eswiktionary.png 
b/static/images/project-logos/eswiktionary.png
index 7f65686..28f2c47 100644
--- a/static/images/project-logos/eswiktionary.png
+++ b/static/images/project-logos/eswiktionary.png
Binary files differ

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Clean up test helpers

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

Change subject: Clean up test helpers
..


Clean up test helpers

* Merge MediaWikiTestHelper and TestHelper into one Helper class
* Fix namespacing of MediaWiki/Tests directory
* Add GPL file headers, code has significantly changed and been
  re-written by Erik and myself since it was copied from CakePHP

Change-Id: I148f94e43a8e78e992daf9499128ed7bf0f65eff
---
A MediaWiki/Tests/Helper.php
M MediaWiki/Tests/MediaWikiStandardTest.php
D MediaWiki/Tests/MediaWikiTestHelper.php
D TestHelper.php
M phpunit.bootstrap.php
5 files changed, 120 insertions(+), 143 deletions(-)

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



diff --git a/MediaWiki/Tests/Helper.php b/MediaWiki/Tests/Helper.php
new file mode 100644
index 000..93b6980
--- /dev/null
+++ b/MediaWiki/Tests/Helper.php
@@ -0,0 +1,99 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Sniffs\Tests;
+
+use PHP_CodeSniffer\Config;
+use PHP_CodeSniffer\Files\DummyFile;
+use PHP_CodeSniffer\Reporter;
+use PHP_CodeSniffer\Ruleset;
+
+class Helper {
+
+   protected $rootDir;
+
+   protected $dirName;
+
+   protected $phpcs;
+
+   public function __construct() {
+   $this->rootDir = dirname( __DIR__ );
+   $this->dirName = basename( $this->rootDir );
+   }
+
+   /**
+* Run PHPCS on a file.
+*
+* @param string $file To run.
+* @param string $standard To run against.
+* @return string $result The output from phpcs.
+*/
+   public function runPhpCs( $file, $standard = '' ) {
+   if ( empty( $standard ) ) {
+   $standard = $this->rootDir . '/ruleset.xml';
+   }
+
+   $config = new Config();
+   $config->standards = [ $standard ];
+   $config->files = [ $file ];
+   $config->encoding = 'utf-8';
+   $config->reports = [ 'full' => null ];
+   $config->colors = false;
+   $config->reportWidth = 0;
+   $config->showSources = true;
+
+   $ruleset = new Ruleset( $config );
+   $dummy = new DummyFile( file_get_contents( $file ), $ruleset, 
$config );
+   $reporter = new Reporter( $config );
+   $dummy->process();
+   $reporter->cacheFileReport( $dummy );
+   ob_start();
+   $reporter->printReport( 'full' );
+   $result = ob_get_contents();
+   ob_end_clean();
+   return $result;
+   }
+
+   /**
+* @param string $file The path of file.
+* @param string $standard The standard string.
+* @return string
+*/
+   public function runPhpCbf( $file, $standard = '' ) {
+   if ( empty( $standard ) ) {
+   $standard = $this->rootDir . '/ruleset.xml';
+   }
+   $config = new Config();
+   $config->standards = [ $standard ];
+   $config->files = [ $file ];
+   $config->encoding = 'utf-8';
+
+   $ruleset = new Ruleset( $config );
+   $dummy = new DummyFile( file_get_contents( $file ), $ruleset, 
$config );
+
+   $dummy->process();
+   if ( $dummy->getFixableCount() ) {
+   $dummy->fixer->fixFile();
+   return $dummy->fixer->getContents();
+   } else {
+   return file_get_contents( $file );
+   }
+   }
+}
diff --git a/MediaWiki/Tests/MediaWikiStandardTest.php 
b/MediaWiki/Tests/MediaWikiStandardTest.php
index f4bf5d7..8a28bb3 100644
--- a/MediaWiki/Tests/MediaWikiStandardTest.php
+++ b/MediaWiki/Tests/MediaWikiStandardTest.php
@@ -1,34 +1,29 @@
 http://git.io/vkirb
- * From repository: https://github.com/cakephp/cakephp-codesniffer
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
- * @license MIT
- * CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org)
- * Copyright (c) 2005-2013, Cake Software Foundation, Inc.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Use local OneClassPerFile sniff for only one class/interface...

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

Change subject: Use local OneClassPerFile sniff for only one 
class/interface/trait
..


Use local OneClassPerFile sniff for only one class/interface/trait

The separate three upstream sniffs would still have allowed a class and
an interface to be in a file together, which still violates PSR-4.

Temporarily copy in the upstream sniff with the suggested modification
until there is an upstream sniff that also handles this.

See .

Bug: T173798
Change-Id: Iaae359362aff0b3630f7ca69109b64c64bc50016
---
A MediaWiki/Sniffs/Files/OneClassPerFileSniff.php
M MediaWiki/Tests/files/Commenting/commenting_function.php.expect
M MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
M 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect
M MediaWiki/Tests/files/WhiteSpace/space_before_class_brace.php.expect
M MediaWiki/ruleset.xml
6 files changed, 55 insertions(+), 16 deletions(-)

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



diff --git a/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php 
b/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php
new file mode 100644
index 000..9126f99
--- /dev/null
+++ b/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php
@@ -0,0 +1,42 @@
+
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   
https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ */
+
+namespace MediaWiki\Sniffs\Files;
+
+use PHP_CodeSniffer\Sniffs\Sniff;
+use PHP_CodeSniffer\Files\File;
+
+class OneClassPerFileSniff implements Sniff {
+
+   /**
+* Returns an array of tokens this test wants to listen for.
+*
+* @return array
+*/
+   public function register() {
+   return [ T_CLASS, T_INTERFACE, T_TRAIT ];
+   }
+
+   /**
+* Processes this sniff, when one of its tokens is encountered.
+*
+* @param File $phpcsFile File being scanned
+* @param int $stackPtr Position
+*
+* @return void
+*/
+   public function process( File $phpcsFile, $stackPtr ) {
+   $nextClass = $phpcsFile->findNext( $this->register(), ( 
$stackPtr + 1 ) );
+   if ( $nextClass !== false ) {
+   $error = 'Only one class is allowed in a file';
+   $phpcsFile->addError( $error, $nextClass, 
'MultipleFound' );
+   }
+   }
+
+}
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
index b991e0e..db1809e 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
@@ -73,7 +73,7 @@
   98 | ERROR | [x] Return type should not end with punctuation ":"
  |   | (MediaWiki.Commenting.FunctionComment.NotPunctuationReturn)
  105 | ERROR | [ ] Only one class is allowed in a file
- |   | (Generic.Files.OneClassPerFile.MultipleFound)
+ |   | (MediaWiki.Files.OneClassPerFile.MultipleFound)
  172 | ERROR | [ ] Only one class is allowed in a file
- |   | (Generic.Files.OneClassPerFile.MultipleFound)
+ |   | (MediaWiki.Files.OneClassPerFile.MultipleFound)
 PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect 
b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
index 8c1d88d..d0ca636 100644
--- a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
+++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
@@ -2,14 +2,14 @@
 | | wfMessage() .
 | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage)
  27 | ERROR   | Only one class is allowed in a file
-| | (Generic.Files.OneClassPerFile.MultipleFound)
+| | (MediaWiki.Files.OneClassPerFile.MultipleFound)
  51 | ERROR   | Only one class is allowed in a file
-| | (Generic.Files.OneClassPerFile.MultipleFound)
+| | (MediaWiki.Files.OneClassPerFile.MultipleFound)
  64 | WARNING | Should use function $this->getUser() rather than variable
 | | $wgUser .
 | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage)
  75 | ERROR   | Only one class is allowed in a file
-| | (Generic.Files.OneClassPerFile.MultipleFound)
+| | (MediaWiki.Files.OneClassPerFile.MultipleFound)
  93 | WARNING | Should use function $this->getRequest() rather than
 | | variable $wgRequest .
 | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage)
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect
 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Add sniff to ensure the class name matches the filename

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

Change subject: Add sniff to ensure the class name matches the filename
..


Add sniff to ensure the class name matches the filename

Bug: T174244
Change-Id: I3e89ab66dc06972ac04e7a36d17edfc574ef3ac0
---
A MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
1 file changed, 61 insertions(+), 0 deletions(-)

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



diff --git a/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php 
b/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
new file mode 100644
index 000..c202641
--- /dev/null
+++ b/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
@@ -0,0 +1,61 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Sniffs\Files;
+
+use PHP_CodeSniffer\Files\File;
+use PHP_CodeSniffer\Sniffs\Sniff;
+
+class ClassMatchesFilenameSniff implements Sniff {
+
+   /**
+* Tokens to process
+*
+* @return array
+*/
+   public function register() {
+   return [ T_CLASS, T_INTERFACE, T_TRAIT ];
+   }
+
+   /**
+* Check the class name against the filename
+*
+* @param File $phpcsFile File being checked
+* @param int $stackPtr Position
+*/
+   public function process( File $phpcsFile, $stackPtr ) {
+   $fname = $phpcsFile->getFilename();
+   if ( $fname === 'STDIN' ) {
+   return;
+   }
+   $exp = explode( '/', $fname );
+   $base = end( $exp );
+   $name = $phpcsFile->getDeclarationName( $stackPtr );
+   if ( $base !== "$name.php" ) {
+   $wrongCase = strtolower( $base ) === strtolower( 
"$name.php" );
+   $phpcsFile->addError(
+   "Class name '$name' does not match filename 
'$base'",
+   $stackPtr,
+   $wrongCase ? 'WrongCase' : 'NotMatch'
+   );
+   }
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e89ab66dc06972ac04e7a36d17edfc574ef3ac0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
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