[MediaWiki-commits] [Gerrit] mediawiki...BibManager[master]: Replaced Linker::link() usages with LinkRenderer

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

Change subject: Replaced Linker::link() usages with LinkRenderer
..


Replaced Linker::link() usages with LinkRenderer

Bug: T149346
Change-Id: I5ed12a11170474311fdd1d941a4c93adffe171a4
---
M includes/BibManagerHooks.php
M includes/BibManagerPagerList.php
M includes/specials/SpecialBibManagerList.php
3 files changed, 20 insertions(+), 15 deletions(-)

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



diff --git a/includes/BibManagerHooks.php b/includes/BibManagerHooks.php
index 43cdd16..7a83de6 100644
--- a/includes/BibManagerHooks.php
+++ b/includes/BibManagerHooks.php
@@ -1,5 +1,7 @@
 getLinkRenderer()->makeBrokenLink(
$spTitle,
$args['id'],
array( 'class' => 'new' ),
-   array ( 'bm_bibtexCitation' => $args['id'] ),
-   array ( 'broken' => true )
+   array ( 'bm_bibtexCitation' => $args['id'] )
);
$sTooltip = '' . 
wfMessage('bm_error_not-existing')->escaped();
if ($wgUser->isAllowed('bibmanagercreate')){
@@ -102,7 +103,7 @@
$args['id'],
$wgBibManagerCitationArticleNamespace
);
-   $sLink = Linker::link(
+   $sLink = $parser->getLinkRenderer()->makeLink(
$oCitationTitle,
$args['id'],
array ( 'title' => '' )
@@ -366,15 +367,15 @@
if ( $res === false ) {
return '[' . wfMessage( 'bm_no-data-found' )->escaped() 
. ']';
}
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
foreach ( $res as $key => $val ) {
if ( empty( $val ) ){
$spTitle = SpecialPage::getTitleFor( 
'BibManagerCreate' ); // TODO RBV (10.11.11 13:50): Dublicate code --> 
encapsulate
-   $citLink = Linker::link(
+   $citLink = $linkRenderer->makeBrokenLink(
$spTitle,
$key,
array ( 'class' => 'new' ),
-   array ( 'bm_bibtexCitation' => $key ),
-   array ( 'broken' => true )
+   array ( 'bm_bibtexCitation' => $key )
);
$sLinkToEdit = SpecialPage::getTitleFor( 
'BibManagerCreate' )->getLocalURL( array ( 'bm_bibtexCitation' => $key ));
$citFormat = '' . 
wfMessage('bm_error_not-existing')->escaped();
@@ -393,7 +394,7 @@
$val['bm_bibtexCitation'],
$wgBibManagerCitationArticleNamespace
);
-   $citLink = Linker::link( $title, 
$val['bm_bibtexCitation'] );
+   $citLink = $linkRenderer->makeLink( $title, 
$val['bm_bibtexCitation'] );
$citFormat = self::formatEntry( $val );
$citIcons = self::getIcons( $val );
}
diff --git a/includes/BibManagerPagerList.php b/includes/BibManagerPagerList.php
index 676f8ce..5d12bd6 100644
--- a/includes/BibManagerPagerList.php
+++ b/includes/BibManagerPagerList.php
@@ -1,5 +1,7 @@
 bm_bibtexCitation, 
$wgBibManagerCitationArticleNamespace );
 
-   $citationLink = Linker::link( $citationTitle, 
$row->bm_bibtexCitation );
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+
+   $citationLink = $linkRenderer->makeLink( $citationTitle, 
$row->bm_bibtexCitation );
$editLink= '';
$deleteLink   = '';
$exportLink   = Html::input(
@@ -100,9 +104,9 @@
$specialPageQuery = array ( 'bm_bibtexCitation' => 
$row->bm_bibtexCitation );
 
if ($wgUser->isAllowed('bibmanageredit')){
-   $editLink = Linker::link(
+   $editLink = $linkRenderer->makeLink(
SpecialPage::getTitleFor( 'BibManagerEdit' ),
-   $this->msg( 'bm_list_table_edit' )->escaped(),
+   $this->msg( 'bm_list_table_edit' )->text(),
array (
'class' => 'icon edit',
   

[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Replaced Linker::link() usages with LinkRenderer

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

Change subject: Replaced Linker::link() usages with LinkRenderer
..


Replaced Linker::link() usages with LinkRenderer

Bug: T149346
Change-Id: I0c79990e44aaa0c5b1916cacef410bc5ab8fff7b
---
M ArticleFeedbackv5.hooks.php
M ArticleFeedbackv5.log.php
M ArticleFeedbackv5.render.php
M SpecialArticleFeedbackv5.php
M api/ApiViewActivityArticleFeedbackv5.php
5 files changed, 36 insertions(+), 24 deletions(-)

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



diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php
index d4f2097..5b22d6c 100644
--- a/ArticleFeedbackv5.hooks.php
+++ b/ArticleFeedbackv5.hooks.php
@@ -1,4 +1,7 @@
 userDate( $record->aft_timestamp, 
$user );
$dateFormats['time'] = $lang->userTime( $record->aft_timestamp, 
$user );
 
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+
// if feedback should be hidden from users, a special class 
"history-deleted" should be added
$historyDeleted = ( $record->isHidden() || 
$record->isRequested() || $record->isOversighted() );
foreach ( $dateFormats as $format => &$formattedTime ) {
-   $formattedTime = Linker::link(
-   $feedbackTitle,
-   htmlspecialchars( $formattedTime )
-   );
+   $formattedTime = $linkRenderer->makeLink( 
$feedbackTitle, $formattedTime );
if ( $historyDeleted ) {
$formattedTime = '' . $formattedTime . '';
}
diff --git a/ArticleFeedbackv5.log.php b/ArticleFeedbackv5.log.php
index a6374de..ab3982b 100644
--- a/ArticleFeedbackv5.log.php
+++ b/ArticleFeedbackv5.log.php
@@ -1,4 +1,7 @@
 getLinkRenderer()->makeLink(
$this->entry->getTarget(),
-   $this->msg( 'hist' )->escaped(),
+   $this->msg( 'hist' )->text(),
array(),
array(
'action' => 'history',
diff --git a/ArticleFeedbackv5.render.php b/ArticleFeedbackv5.render.php
index c95635e..01c952e 100644
--- a/ArticleFeedbackv5.render.php
+++ b/ArticleFeedbackv5.render.php
@@ -9,6 +9,8 @@
  * @version$Id$
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Handles rendering of a submitted feedback entry in the Special page's list 
view
  *
@@ -383,6 +385,7 @@
 */
private function feedbackHead( $message, $record ) {
$anonMessage = '';
+   $linkRender = 
MediaWikiServices::getInstance()->getLinkRenderer();
 
// User info
if ( $record->aft_user == 0 ) {
@@ -394,7 +397,7 @@
// IPv4 - display the same way regular users 
are displayed
 
// display name = visitor's ip
-   $userName = Linker::link( $title, 
htmlspecialchars( $record->aft_user_text ) );
+   $userName = $linkRender->makeLink( $title, 
$record->aft_user_text );
} else {
// not IPv4 - display IP on next line (since 
IPv6 is rather long, it'd break our display)
 
@@ -402,7 +405,7 @@
$userName = wfMessage( 
'articlefeedbackv5-form-anon-username' )->escaped();
 
// additional line to be printed with the IPv6 
address (with link to contributions)
-   $userLink = Linker::link( $title, 
htmlspecialchars( $record->aft_user_text ) );
+   $userLink = $linkRender->makeLink( $title, 
$record->aft_user_text );
$anonMessage = wfMessage( 
'articlefeedbackv5-form-anon-message' )->rawParams( $userLink )->escaped();
}
} else {
@@ -417,7 +420,7 @@
}
 
// display name = username
-   $userName = Linker::link( $title, htmlspecialchars( 
$record->aft_user_text ) );
+   $userName = $linkRender->makeLink( $title, 
$record->aft_user_text );
}
 
if ( $this->isCentral ) {
@@ -472,9 +475,9 @@
Html::rawElement(
'span',
array( 'class' => 
'articleFeedbackv5-comment-details-link' ),
-   Linker::link(
+   
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(

[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: Replaced Linker::link() usages with LinkRenderer

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

Change subject: Replaced Linker::link() usages with LinkRenderer
..


Replaced Linker::link() usages with LinkRenderer

Bug: T149346
Change-Id: Ife9e40927211b2ce36f5f0402ca2acd55713a562
---
M BlockAndNuke.body.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/BlockAndNuke.body.php b/BlockAndNuke.body.php
index 3c39725..98801e9 100644
--- a/BlockAndNuke.body.php
+++ b/BlockAndNuke.body.php
@@ -105,13 +105,14 @@
 
$pages = BanPests::getBannablePages( $user );
$ips = BanPests::getBannableIP( $user );
+   $linkRenderer = $this->getLinkRenderer();
 
if( count( $pages ) ) {
$wgOut->addHTML( "" . $this->msg( 
"blockandnuke-pages" )->escaped() . "" );
 
$wgOut->addHtml( "" );
foreach( $pages as $title ) {
-   $wgOut->addHtml( "". Linker::link( $title ) 
);
+   $wgOut->addHtml( "". 
$linkRenderer->makeLink( $title ) );
$wgOut->addHtml( Html::hidden( 'pages[]', 
$title ) );
}
$wgOut->addHtml( "\n" );
@@ -144,7 +145,7 @@
$seen[$user_2] = true;
$wgOut->addHtml(
"" .
-   Linker::link( 
Title::newFromText( $user_2, NS_USER ) )
+   
$linkRenderer->makeLink( Title::newFromText( $user_2, NS_USER ) )
);
$wgOut->addHTML(
Html::hidden( 
'names_2[]', $user_2 ).
@@ -166,7 +167,7 @@
$seen[$ip] = true;
$wgOut->addHtml(
"" .
-   Linker::link( 
Title::newFromText( $ip, NS_USER ) )
+   $linkRenderer->makeLink( 
Title::newFromText( $ip, NS_USER ) )
);
$wgOut->addHTML( Html::hidden( 'ip[]', 
$ip ) );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife9e40927211b2ce36f5f0402ca2acd55713a562
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
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...VisualEditor[master]: After saving a specific section, scroll to it

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

Change subject: After saving a specific section, scroll to it
..

After saving a specific section, scroll to it

Bug: T153297
Change-Id: I233e5226abc44d5d0bf8e56957a133d595e7be6f
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 17 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index ac5819a..33da804 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1436,7 +1436,7 @@
html, categoriesHtml, displayTitle, lastModified, contentSub, isRedirect
 ) {
var $content = $( $.parseHTML( html ) ),
-   $veSectionLinks, $categories;
+   $veSectionLinks, $categories, $sections, editedSectionHeader;
 
if ( lastModified ) {
// If we were not viewing the most recent revision before (a 
requirement
@@ -1498,6 +1498,22 @@
$( '.redirectMsg' )
.addClass( 'mw-content-' + $( 'html' ).attr( 'dir' ) )
.addClass( 've-redirect-header' );
+
+   if ( this.section !== null ) {
+   $sections = $( '#mw-content-text' )
+   .find( 'h1, h2, h3, h4, h5, h6' )
+   .not( '#toc h2' );
+   if ( this.section === 'new' ) {
+   editedSectionHeader = $sections.last().get( 0 );
+   } else if ( this.section > 0 ) {
+   editedSectionHeader = $sections.get( this.section - 1 );
+   }
+   if ( editedSectionHeader ) {
+   setTimeout( function () {
+   OO.ui.Element.static.scrollIntoView( 
editedSectionHeader );
+   }, 0 );
+   }
+   }
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I233e5226abc44d5d0bf8e56957a133d595e7be6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: [Code experiment] Try to use api change op callbacks

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

Change subject: [Code experiment] Try to use api change op callbacks
..

[Code experiment] Try to use api change op callbacks

Change-Id: I4744774fe460b7421bb9d7060795d6fd99053673
---
A src/ChangeOp/ChangeOpsApiCallbacks.php
A src/ChangeOp/LexemeChangeOpFactory.php
2 files changed, 142 insertions(+), 0 deletions(-)


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

diff --git a/src/ChangeOp/ChangeOpsApiCallbacks.php 
b/src/ChangeOp/ChangeOpsApiCallbacks.php
new file mode 100644
index 000..8e363cc
--- /dev/null
+++ b/src/ChangeOp/ChangeOpsApiCallbacks.php
@@ -0,0 +1,96 @@
+
+ */
+class LexemeChangeOpsApiCallbacks {
+
+   /**
+* @var StringNormalizer
+*/
+   protected $stringNormalizer;
+
+   /**
+* @var LexemeChangeOpFactory
+*/
+   private $lexemeChangeOpFactory;
+
+   public function __construct() {
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $this->stringNormalizer = $wikibaseRepo->getStringNormalizer();
+
+   $changeOpFactoryProvider = 
$wikibaseRepo->getChangeOpFactoryProvider();
+   $this->termChangeOpFactory = 
$changeOpFactoryProvider->getFingerprintChangeOpFactory();
+   }
+
+   public function run( array $data, ChangeOps $changeOps, EntityDocument 
$entity ) {
+   Assert::parameterType( Lexeme::class, $entity, '$entity' );
+
+   if ( array_key_exists( 'lemmas', $data ) ) {
+   $this->assertArray( $data['lemmas'], 'List of lemmas 
must be an array' );
+   $changeOps->add( $this->getLemmasChangeOps( 
$data['lemmas'] ) );
+   }
+
+   return $changeOps;
+   }
+
+   /**
+* @param array[] $lemmas
+*
+* @return ChangeOp[]
+*/
+   private function getLemmasChangeOps( array $lemmas ) {
+   $lemmasChangeOps = [];
+
+   foreach ( $lemmas as $langCode => $arg ) {
+   // Add validateMultilangArgs
+
+   $language = $arg['language'];
+   $newLemma = ( array_key_exists( 'remove', $arg ) ? '' :
+   $this->stringNormalizer->trimToNFC( 
$arg['value'] ) );
+
+   if ( $newLemma === '' ) {
+   $lemmasChangeOps[] = 
$this->lexemeChangeOpFactory->newRemoveLemmaOp( $language );
+   } else {
+   $lemmasChangeOps[] = 
$this->lexemeChangeOpFactory->newSetLemmaOp(
+   $language,
+   $newLemma
+   );
+   }
+   }
+
+   return $lemmasChangeOps;
+   }
+
+   /**
+* @param mixed $value
+* @param string $message
+*/
+   private function assertArray( $value, $message ) {
+   $this->assertType( 'array', $value, $message );
+   }
+
+   /**
+* @param string $type
+* @param mixed $value
+* @param string $message
+*/
+   private function assertType( $type, $value, $message ) {
+   if ( gettype( $value ) !== $type ) {
+   // TODO: This should return error back to EditEntity 
API not error out here
+   $this->errorReporter->dieError( $message, 
'not-recognized-' . $type );
+   }
+   }
+}
\ No newline at end of file
diff --git a/src/ChangeOp/LexemeChangeOpFactory.php 
b/src/ChangeOp/LexemeChangeOpFactory.php
new file mode 100644
index 000..65232ea
--- /dev/null
+++ b/src/ChangeOp/LexemeChangeOpFactory.php
@@ -0,0 +1,46 @@
+
+ */
+class LexemeChangeOpFactory {
+   /**
+* @var TermValidatorFactory
+*/
+   private $termValidatorFactory;
+
+   /**
+* @param TermValidatorFactory $termValidatorFactory
+*/
+   public function __construct( TermValidatorFactory $termValidatorFactory 
) {
+   $this->termValidatorFactory = $termValidatorFactory;
+   }
+
+   /**
+* @param string $languageCode
+* @param string $lemma
+*
+* @throws InvalidArgumentException
+* @return ChangeOp
+*/
+   public function newSetLemmaOp( $languageCode, $lemma ) {
+   return new ChangeOpLemma( $languageCode, $lemma, 
$this->termValidatorFactory );
+   }
+
+   /**
+* @param string $languageCode
+*
+* @throws InvalidArgumentException
+* @return ChangeOp
+*/
+   public function newRemoveLemmaOp( $languageCode ) {
+   return new ChangeOpLemma( $languageCode, null, 
$this->termValidatorFactory );
+   }
+}
\ No new

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow PHAN location to be read from PATH

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

Change subject: Allow PHAN location to be read from PATH
..


Allow PHAN location to be read from PATH

Change-Id: I4ea64eab12f299a13559178c80fe6797d07a5f85
---
M tests/phan/bin/phan
1 file changed, 11 insertions(+), 4 deletions(-)

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



diff --git a/tests/phan/bin/phan b/tests/phan/bin/phan
index 5d42cf5..6ce1e84 100755
--- a/tests/phan/bin/phan
+++ b/tests/phan/bin/phan
@@ -10,9 +10,16 @@
 # Note that this isn't loaded in via composer because then composer can
 # only be run with php7.0
 if [ ! -f "$PHAN" ]; then
-   echo "The environment variable PHAN must point to the 'phan' file"
-   echo "in a checkout of https://github.com/etsy/phan.git";
-   exit 1
+   # If no PHAN is specified then try to get location from PATH
+   export PHAN="$(which phan)"
+   if [ ! -f "$PHAN" ]; then
+   echo "The environment variable PHAN must point to the 'phan' 
file"
+   echo "in a checkout of https://github.com/etsy/phan.git";
+   echo "Or phan must be included in your PATH"
+   exit 1
+   fi
+else
+   export PHAN="php7.0 $PHAN"
 fi
 
 if [ -z "$MW_INSTALL_PATH" ]; then
@@ -57,7 +64,7 @@
 
 # Run the analysis, emitting output to the
 # issues file.
-php7.0 $PHAN \
+$PHAN \
--project-root-directory "$ROOT" \
--config-file "$CONFIG_FILE" \
--output "php://stdout" \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ea64eab12f299a13559178c80fe6797d07a5f85
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: EBernhardson 
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[master]: Add missing properties to MailAddress class

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

Change subject: Add missing properties to MailAddress class
..


Add missing properties to MailAddress class

Change-Id: I6f199cee22678391938637685a1a81771528eac4
---
M includes/mail/MailAddress.php
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php
index 7a228bd..ce1df0d 100644
--- a/includes/mail/MailAddress.php
+++ b/includes/mail/MailAddress.php
@@ -30,6 +30,22 @@
  * header format when requested.
  */
 class MailAddress {
+
+   /**
+* @var string
+*/
+   public $name;
+
+   /**
+* @var string
+*/
+   public $realName;
+
+   /**
+* @var string
+*/
+   public $address;
+
/**
 * @param string $address String with an email address, or a User object
 * @param string $name Human-readable name if a string address is given

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f199cee22678391938637685a1a81771528eac4
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
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[master]: Fix rendering issues on RecentChanges Special page

2016-12-24 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329117 )

Change subject: Fix rendering issues on RecentChanges Special page
..

Fix rendering issues on RecentChanges Special page

Legend is rendered correctly now, fixed namespace checkboxes
behaviour, fixed styles of the changes list.

Bug: T112693
Change-Id: If2c5701587eee50a6d578459f6b38b6f16cd5fe9
---
M resources/Resources.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/329117/1

diff --git a/resources/Resources.php b/resources/Resources.php
index e8be528..ae95c78 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1849,9 +1849,11 @@
],
'mediawiki.special.changeslist' => [
'styles' => 
'resources/src/mediawiki.special/mediawiki.special.changeslist.css',
+   'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.special.changeslist.legend' => [
'styles' => 
'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.css',
+   'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.special.changeslist.legend.js' => [
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js',
@@ -1859,6 +1861,7 @@
'jquery.makeCollapsible',
'mediawiki.cookie',
],
+   'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.special.changeslist.enhanced' => [
'styles' => 
'resources/src/mediawiki.special/mediawiki.special.changeslist.enhanced.css',
@@ -1929,6 +1932,7 @@
],
'mediawiki.special.recentchanges' => [
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.recentchanges.js',
+   'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.special.search' => [
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.search.js',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiChat[master]: Prevent a flash when you mention yourself

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

Change subject: Prevent a flash when you mention yourself
..


Prevent a flash when you mention yourself

Bug:T145306
Change-Id: I670076cb83286173b3f1b89f72fad765ef607d7b
---
M MediaWikiChat.js
M extension.json
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 3ee281b..19c876c 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -291,7 +291,10 @@
var html = '';
var mention = false;
 
-   if ( message.toLowerCase().indexOf( 
mw.user.getName().toLowerCase() ) != -1 ) {
+   if (
+   mw.config.get( 'wgUserId' ) != userId && // prevents 
flashing when you sent the message yourself
+   message.toLowerCase().indexOf( 
mw.user.getName().toLowerCase() ) != -1
+   ) {
mention = true;
MediaWikiChat.flashMention( mw.message( 
'chat-mentioned-by', user.name, user.gender ).text(), message );
} else {
diff --git a/extension.json b/extension.json
index dbc9de7..9f9ac08 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "MediaWikiChat",
-   "version": "2.17.2",
+   "version": "2.17.3",
"author": [
"Adam Carter/UltrasonicNXT"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I670076cb83286173b3f1b89f72fad765ef607d7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: UltrasonicNXT 
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...MediaWikiChat[master]: Prevent a flash when you mention yourself

2016-12-24 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329097 )

Change subject: Prevent a flash when you mention yourself
..

Prevent a flash when you mention yourself

Bug:T145306
Change-Id: I670076cb83286173b3f1b89f72fad765ef607d7b
---
M MediaWikiChat.js
M extension.json
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat 
refs/changes/97/329097/1

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 3ee281b..19c876c 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -291,7 +291,10 @@
var html = '';
var mention = false;
 
-   if ( message.toLowerCase().indexOf( 
mw.user.getName().toLowerCase() ) != -1 ) {
+   if (
+   mw.config.get( 'wgUserId' ) != userId && // prevents 
flashing when you sent the message yourself
+   message.toLowerCase().indexOf( 
mw.user.getName().toLowerCase() ) != -1
+   ) {
mention = true;
MediaWikiChat.flashMention( mw.message( 
'chat-mentioned-by', user.name, user.gender ).text(), message );
} else {
diff --git a/extension.json b/extension.json
index dbc9de7..9f9ac08 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "MediaWikiChat",
-   "version": "2.17.2",
+   "version": "2.17.3",
"author": [
"Adam Carter/UltrasonicNXT"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I670076cb83286173b3f1b89f72fad765ef607d7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] mediawiki...LifeWeb[master]: Replaced Linker deprecated functions with LinkRenderer

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

Change subject: Replaced Linker deprecated functions with LinkRenderer
..


Replaced Linker deprecated functions with LinkRenderer

All usages of Linker::link() and Linker::linkKnown() has been replaced with 
LinkRenderer

Bug: T149346
Change-Id: I49a772cda2f28c25035ac82215b0352b07235650
---
M SpecialLifeWeb.php
1 file changed, 18 insertions(+), 3 deletions(-)

Approvals:
  Reedy: Verified; Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, approved



diff --git a/SpecialLifeWeb.php b/SpecialLifeWeb.php
index b88e564..5b18adc 100644
--- a/SpecialLifeWeb.php
+++ b/SpecialLifeWeb.php
@@ -64,7 +64,12 @@
 );
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/editor' ), 
'Editor', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/editor' ),
+'Editor',
+array(),
+array( 'debug' => 'true' )
+) .
 ' (debug=true is mandatory!)'
 );
 $output->addWikiText(
@@ -72,7 +77,12 @@
 );
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/filter' ), 
'Filter', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/filter' ),
+'Filter',
+array(),
+array( 'debug' => 'true' )
+) .
 ''
 );
 $output->addWikiText(
@@ -81,7 +91,12 @@
 global $wgScriptPath;
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/importLW' ), 
'Importer', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/importLW' ),
+'Importer',
+array(),
+array( 'debug' => 'true' )
+) .
 'API example: ' .
 'Taxon 
data'
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49a772cda2f28c25035ac82215b0352b07235650
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LifeWeb
Gerrit-Branch: master
Gerrit-Owner: Subins2000 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Subins2000 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: Fix locale for debian based images

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

Change subject: Fix locale for debian based images
..


Fix locale for debian based images

Bug: T154088
Change-Id: I32269f1b753e69acbcc7102835d764aacf67c10c
---
M base/Dockerfile.template
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/base/Dockerfile.template b/base/Dockerfile.template
index 2d556cf..7b5ae23 100644
--- a/base/Dockerfile.template
+++ b/base/Dockerfile.template
@@ -19,7 +19,11 @@
 
 # Setup the en_US.UTF-8 Locale, since otherwise it defaults to the C one 
(which sucks!)
 # Cultural imperialism, etc
-RUN locale-gen en_US.UTF-8
+# If only locale-gen took a parameter instead of requiring we edit this file...
+RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
+dpkg-reconfigure --frontend=noninteractive locales && \
+update-locale LANG=en_US.UTF-8
+
 ENV LC_ALL en_US.UTF-8
 
 # Some packages that pretty much everyone needs.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32269f1b753e69acbcc7102835d764aacf67c10c
Gerrit-PatchSet: 3
Gerrit-Project: operations/docker-images/toollabs-images
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: Fix locale for debian based images

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

Change subject: Fix locale for debian based images
..

Fix locale for debian based images

Change-Id: I32269f1b753e69acbcc7102835d764aacf67c10c
---
M base/Dockerfile.template
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/docker-images/toollabs-images 
refs/changes/62/329062/1

diff --git a/base/Dockerfile.template b/base/Dockerfile.template
index 2d556cf..7b5ae23 100644
--- a/base/Dockerfile.template
+++ b/base/Dockerfile.template
@@ -19,7 +19,11 @@
 
 # Setup the en_US.UTF-8 Locale, since otherwise it defaults to the C one 
(which sucks!)
 # Cultural imperialism, etc
-RUN locale-gen en_US.UTF-8
+# If only locale-gen took a parameter instead of requiring we edit this file...
+RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
+dpkg-reconfigure --frontend=noninteractive locales && \
+update-locale LANG=en_US.UTF-8
+
 ENV LC_ALL en_US.UTF-8
 
 # Some packages that pretty much everyone needs.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32269f1b753e69acbcc7102835d764aacf67c10c
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/toollabs-images
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Added valid composer.json

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

Change subject: Added valid composer.json
..


Added valid composer.json

Bug: T152291
Change-Id: Ie22d2f0e442043947621691207d1aa0c12ce52d7
---
A composer.json
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/composer.json b/composer.json
new file mode 100644
index 000..ea96843
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,15 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
+   ],
+   "fix": [
+   "phpcbf"
+   ]
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie22d2f0e442043947621691207d1aa0c12ce52d7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Filip 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mvolz 
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...VisualEditor[master]: Fix MWInternalLinkAnnotation.getTargetDataFromHref's behavio...

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

Change subject: Fix MWInternalLinkAnnotation.getTargetDataFromHref's behaviour 
with URLs containing query parts
..

Fix MWInternalLinkAnnotation.getTargetDataFromHref's behaviour with URLs 
containing query parts

ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref(

'http://mediawiki.krenair.dev/mediawiki_dev/wiki/Main_Page?veaction=editsource',
ve.init.target.surface.model.documentModel.htmlDocument
)

Wrong, current result:
Object {
title: "Main Page?veaction=editsource",
rawTitle: "Main_Page?veaction=editsource",
hrefPrefix: "",
isInternal: true
}

New result:
Object {
title: "http://mediawiki.krenair.dev/mediawiki dev/wiki/Main 
Page?veaction=editsource",
rawTitle: 
"http://mediawiki.krenair.dev/mediawiki_dev/wiki/Main_Page?veaction=editsource";,
hrefPrefix: "",
isInternal: false
}

Change-Id: I3d6d7fcfeb0d8354623026c831605c7633c3e11a
---
M modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
index c2dfa35..6af0718 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
@@ -112,7 +112,7 @@
// Check if this matches the server's article path
matches = relativeHref.match( relativeBaseRegex );
 
-   if ( matches ) {
+   if ( matches && matches[ 1 ].indexOf( '?' ) === -1 ) {
// Take the relative path
href = matches[ 1 ];
isInternal = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d6d7fcfeb0d8354623026c831605c7633c3e11a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...Refreshed[master]: Making licensing consistent throughout repo

2016-12-24 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329060 )

Change subject: Making licensing consistent throughout repo
..

Making licensing consistent throughout repo

Change-Id: I807a36091097b037c49a3dd555a4a6ee7c04cf1d
---
M LICENSE
M composer.json
2 files changed, 334 insertions(+), 160 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Refreshed 
refs/changes/60/329060/1

diff --git a/LICENSE b/LICENSE
index 65c5ca8..eef7bbd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,165 +1,339 @@
-   GNU LESSER GENERAL PUBLIC LICENSE
-   Version 3, 29 June 2007
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
- Copyright (C) 2007 Free Software Foundation, Inc. 
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Copyright (C) 1989, 1991 Free Software Foundation, Inc., 
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
 
+Preamble
 
-  This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
+The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
 
-  0. Additional Definitions.
+When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
 
-  As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
 
-  "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
 
-  An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
 
-  A "Combined Work" is a work produced by combining or linking an
-Application with the Library.  The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
 
-  The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
+Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free us

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Check for common class when comparing with string

2016-12-24 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329058 )

Change subject: Check for common class when comparing with string
..

Check for common class when comparing with string

Change-Id: I65ff47ae4f20e14b19499d50295054e46264185e
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/58/329058/2

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 586e907..e7aa8e3 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4726,7 +4726,7 @@
 
 The function checks for:
 
-- ItemPage ID equality
+- WikibasePage ID equality
 - WbTime year equality
 - Coordinate equality, regarding precision
 - WbMonolingualText text equality
@@ -4737,7 +4737,7 @@
 false otherwise
 @rtype: bool
 """
-if (isinstance(self.target, pywikibot.ItemPage) and
+if (isinstance(self.target, WikibasePage) and
 isinstance(value, basestring)):
 return self.target.id == value
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65ff47ae4f20e14b19499d50295054e46264185e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
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...ProofreadPage[master]: Fixes ProofreadPage parser tests

2016-12-24 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329059 )

Change subject: Fixes ProofreadPage parser tests
..

Fixes ProofreadPage parser tests

No idea of why the previous code behaved wrongly. I need to learn more about 
PHP objects behaviours.

Bug: T145724
Change-Id: I9f197aa0b8ff4a97258826cce621887f24c21e1d
---
M includes/Context.php
M tests/parser/proofreadpage_pages_pagelist.txt
D tests/parser/proofreadpage_pages_pagelist_ignored.txt
3 files changed, 194 insertions(+), 190 deletions(-)


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

diff --git a/includes/Context.php b/includes/Context.php
index 20bb074..d52141d 100644
--- a/includes/Context.php
+++ b/includes/Context.php
@@ -31,11 +31,6 @@
private $fileProvider;
 
/**
-* @var PaginationFactory
-*/
-   private $paginationFactory;
-
-   /**
 * @param int $pageNamespaceId
 * @param int $indexNamespaceId
 * @param FileProvider $fileProvider
@@ -44,7 +39,6 @@
$this->pageNamespaceId = $pageNamespaceId;
$this->indexNamespaceId = $indexNamespaceId;
$this->fileProvider = $fileProvider;
-   $this->paginationFactory = new PaginationFactory( $this );
}
 
/**
@@ -72,7 +66,7 @@
 * @return PaginationFactory
 */
public function getPaginationFactory() {
-   return $this->paginationFactory;
+   return new PaginationFactory( $this );
}
 
/**
diff --git a/tests/parser/proofreadpage_pages_pagelist.txt 
b/tests/parser/proofreadpage_pages_pagelist.txt
index 0a008fc..6c2cbf3 100644
--- a/tests/parser/proofreadpage_pages_pagelist.txt
+++ b/tests/parser/proofreadpage_pages_pagelist.txt
@@ -4,6 +4,15 @@
 !! endhooks
 
 !!article
+MediaWiki:Proofreadpage index template
+!!text
+Title: {{{Title}}}
+Author: {{{Author}}}
+Pages: {{{Pages}}}
+TOC: {{{TOC}}}
+!!endarticle
+
+!!article
 MediaWiki:Proofreadpage pagenum template
 !!text
 [[{{{page}}}|{{{num}}}]]
@@ -20,7 +29,7 @@
 !!article
 Index:Test
 !!text
-{{
+{{:MediaWiki:Proofreadpage_index_template
 |Title=Title
 |Pages=[[Page:Test 1.jpg|TOC]] [[Page:Test 2.tiff|1]] [[Page:Test 3.png|2]]
 |Author=[[Author:Me]]
@@ -33,7 +42,7 @@
 !!article
 Index:LoremIpsum.djvu
 !!text
-{{
+{{:MediaWiki:Proofreadpage_index_template
 |Title=Lorem Ipsum
 |Pages= 
 |Author=[[Author:Me]]
@@ -238,7 +247,7 @@
 !!article
 Index:TestSection
 !!text
-{{
+{{:MediaWiki:Proofreadpage_index_template
 |Pages=[[Page:TestSection 1|TOC]] [[Page:TestSection 2|1]] [[Page:TestSection 
3|2]]
 }}
 !!endarticle
@@ -486,3 +495,184 @@
 ૧ 
૨
 
 !! end
+
+!! test
+pages: with file: Simple transclusion
+!! options
+djvu
+!! wikitext
+
+!! html
+
+2Page 4 3Page:LoremIpsum.djvu/5 
+
+
+
+!! end
+
+!! test
+pages: with file: Simple transclusion without from
+!! options
+djvu
+!! wikitext
+
+!! html
+
+iPage 1 II
+Page 2 
+
+
+
+!! end
+
+!! test
+pages: with file: Invalid from
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: Invalid to
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: Invalid range
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: Invalid include
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: Simple transclusion without to
+!! options
+djvu
+!! wikitext
+
+!! html
+
+2Page 4 3Page:LoremIpsum.djvu/5 
+
+
+
+!! end
+
+!! test
+pages: with file: step
+!! options
+djvu
+!! wikitext
+
+!! html
+
+1Page 3 3Page:LoremIpsum.djvu/5 
+
+
+
+!! end
+
+!! test
+pages: with file: Invalid step
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Numeric value expected
+
+!! end
+
+!! test
+pages: with file: exclude
+!! options
+djvu
+!! wikitext
+
+!! html
+
+1Page 3 3Page:LoremIpsum.djvu/5 
+
+
+
+!! end
+
+!! test
+pages: with file: include
+!! options
+djvu
+!! wikitext
+
+!! html
+
+iPage 1 II
+Page 2 2Page 4 
+
+
+
+!! end
+
+!! test
+pages: with file: invalid include (1)
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: invalid include (2)
+!! options
+djvu
+!! wikitext
+
+!! html
+Error: Invalid interval
+
+!! end
+
+!! test
+pages: with file: Header
+!! options
+djvu
+title="Test/Chapter 2"
+!! wikitext
+
+!! html
+
+Lorem Ipsum -- Author:Me
+II -- 1
+Test/Chapter 1 -- Chapter 3II
+Page 2 1Page 3 
+
+
+
+!! end
diff --git a/tests/parser/proofreadpage_pages_pagelist_ignored.txt 
b/tests/parser/proofreadpage_pages_pagelist_ignored.txt
deleted file mode 100644
index f9c1b0c..000
--- a/tests/parser/proofreadpage_pages_pagelist_ignored.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-!! test
-pages: with file: Simple transclusion
-!! options

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: rm stray fileRepoPromise property from media dialog

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

Change subject: rm stray fileRepoPromise property from media dialog
..

rm stray fileRepoPromise property from media dialog

seems to have gone upstream to core's mw.widgets.APIResultsQueue

Change-Id: I3c2a6dbdca60ceadc9e7175e5f8ad83b7fc4b7a0
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index d9ad95f..acfc1b8 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -20,7 +20,6 @@
 
// Properties
this.imageModel = null;
-   this.fileRepoPromise = null;
this.pageTitle = '';
this.isSettingUpModel = false;
this.isInsertion = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c2a6dbdca60ceadc9e7175e5f8ad83b7fc4b7a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...Refreshed[master]: Fix my author name and make the author list alphabetical

2016-12-24 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329056 )

Change subject: Fix my author name and make the author list alphabetical
..

Fix my author name and make the author list alphabetical

Change-Id: I5606d9b468645c5203cf3704a3ccb76a39252058
---
M skin.json
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Refreshed 
refs/changes/56/329056/1

diff --git a/skin.json b/skin.json
index 31fddec..3bf1bdb 100644
--- a/skin.json
+++ b/skin.json
@@ -3,15 +3,15 @@
"version": "3.1.3",
"author": [
"Adam Carter",
-   "George Barnick",
"Drew1200",
+   "George Barnick",
"Jack Phoenix",
"Lewis Cawte",
"MtMNC",
+   "Samantha Nguyen",
"Seaside98",
-   "SirComputer",
"ShermanTheMythran",
-   "Samantha Nguyen"
+   "SirComputer"
],
"url": "https://www.mediawiki.org/wiki/Skin:Refreshed";,
"descriptionmsg": "refreshed-desc",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5606d9b468645c5203cf3704a3ccb76a39252058
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Refreshed
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Make `Special:Newsletter/id/subscribers` editable.

2016-12-24 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329055 )

Change subject: Make `Special:Newsletter/id/subscribers` editable.
..

Make `Special:Newsletter/id/subscribers` editable.

Bug: T154080
Change-Id: Ie92818811061568a990facdf9ce43dc274e00a79
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialNewsletter.php
3 files changed, 52 insertions(+), 9 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 0fd5fe1..4920f2e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -92,7 +92,9 @@
"newsletter-subscribing": "Subscribing...",
"newsletter-unsubscribing": "Unsubscribing...",
"newsletter-subscribers" : "Newsletter subscribers",
-   "newsletter-subscribers-nopermission": "You do not have permission to 
view the subscribers of this newsletter",
+   "newsletter-subscribers-nopermission": "You do not have permission to 
edit the subscribers of this newsletter",
+   "newsletter-edit-subscribers-nochanges": "No changes have been made to 
the newsletter's subscribers.",
+   "newsletter-edit-subscribers-success": "The subscribers of the 
newsletter have been updated.",
"newsletter-available-newsletters-field-label": "Available newsletters",
"newsletter-subscribed-newsletters-field-label": "Subscribed 
newsletters",
"newsletter-none-found": "No newsletters exist. You can create a new 
newsletter through [[Special:CreateNewsletter]].",
@@ -112,7 +114,7 @@
"action-newsletter-create": "create newsletters",
"right-newsletter-delete": "Delete newsletters",
"action-newsletter-delete": "delete newsletters",
-   "right-newsletter-manage": "Add or remove publishers from and view the 
subscribers of newsletters",
+   "right-newsletter-manage": "Add or remove publishers and subscribers 
from newsletters",
"action-newsletter-manage": "manage newsletters",
"apihelp-newslettersubscribe-description": "Subscribe to or unsubscribe 
from a newsletter.",
"apihelp-newslettersubscribe-param-id": "ID of the newsletter for which 
the subscription should be changed.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4b39c8d..96ca0e2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -99,6 +99,8 @@
"newsletter-subscribing": "Message shown on Special:Newsletters while 
subscription is in progress when the user presses subscribe button.",
"newsletter-unsubscribing": "Message shown on Special:Newsletters while 
unsubscription is in progress when the user presses the unsubscribe button.",
"newsletter-subscribers": "Header message shown on 
Special:Newsletter/id/subscribers",
+   "newsletter-edit-subscribers-success": "Success message shown on 
Special:Newsletter's manage form when the subscribers list has been modfied.",
+   "newsletter-edit-subscribers-nochanges": "Message shown on 
Special:Newsletter if no changes were made to the existing subscribers' list.",
"newsletter-subscribers-nopermission": "Error message shown on 
Special:Newsletter/id/subscribers if the user is not a publisher and does not 
have the `newsletter-manage` permission.",
"newsletter-available-newsletters-field-label": "Label of HTML form 
field which lists all available newsletters in wiki",
"newsletter-subscribed-newsletters-field-label": "Label of HTML form 
field which lists all newsletters to which user is subscribed to.",
diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 9cf0aec..93e43f2 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -484,7 +484,6 @@
'subscribers' => array(
'type' => 'textarea',
'raw' => true,
-   'disabled' => true,
'rows' => 10,
'default' => implode( "\n", $subscribersNames )
),
@@ -492,14 +491,54 @@
 
$form = $this->getHTMLForm(
$fields,
-   function() {
-   return false;
-   }
-   );
-   $form->suppressDefaultSubmit();
-   $form->show();
+   array( $this, 'submitSubscribersForm' )
+   );
+   if ( $form->show() ){
+   $out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );
+   };
 
}
+   public function submitSubscribersForm(array $data){
+   $subscriberNames = explode( "\n", $data['subscribers'] );
+   // Strip whitespace, th

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Added valid composer.json

2016-12-24 Thread Filip (Code Review)
Filip has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329054 )

Change subject: Added valid composer.json
..

Added valid composer.json

Bug: T152291
Change-Id: Ie22d2f0e442043947621691207d1aa0c12ce52d7
---
A composer.json
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/composer.json b/composer.json
new file mode 100644
index 000..1c63f9e
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie22d2f0e442043947621691207d1aa0c12ce52d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Filip 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageCreationNotif[master]: Removed deprecated hook usage

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

Change subject: Removed deprecated hook usage
..


Removed deprecated hook usage

Bug: T151973
Change-Id: Ie5d7761bc4dda55b2d9698f1beb4def3fb65d671
---
M PageCreationNotif.hooks.php
M PageCreationNotif.php
M includes/PageCreationNotifEmailer.php
3 files changed, 21 insertions(+), 10 deletions(-)

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



diff --git a/PageCreationNotif.hooks.php b/PageCreationNotif.hooks.php
index 20a0e9c..7286ceb 100644
--- a/PageCreationNotif.hooks.php
+++ b/PageCreationNotif.hooks.php
@@ -89,13 +89,24 @@
}
 
/**
-* Called just after a new Article is created.
+* Called just after a new WikiPage is created.
 *
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isMinor
+* @param $isWatch
+* @param $section
+* @param $flags
+* @param Revision $revision
+*
+* @return bool
 * @since 0.1
 */
-   public static function onArticleInsertComplete( &$article, User &$user, 
$text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, Revision 
-   $revision ) {
-   PageCreationNotifEmailer::notifyOnNewArticle( $article, $user );
+   public static function onPageContentInsertComplete( $wikiPage, $user, 
$content, $summary, $isMinor,
+   $isWatch, $section, $flags, $revision ) {
+   PageCreationNotifEmailer::notifyOnNewWikiPage( $wikiPage, $user 
);
 
return true;
}
diff --git a/PageCreationNotif.php b/PageCreationNotif.php
index 256bb5f..9858a65 100644
--- a/PageCreationNotif.php
+++ b/PageCreationNotif.php
@@ -37,7 +37,7 @@
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'PageCreationNotifHooks::onSchemaUpdate';
 $wgHooks['GetPreferences'][] = 'PageCreationNotifHooks::onGetPreferences';
 $wgHooks['UserSaveOptions'][] = 'PageCreationNotifHooks::onUserSaveOptions';
-$wgHooks['ArticleInsertComplete'][] = 
'PageCreationNotifHooks::onArticleInsertComplete';
+$wgHooks['PageContentInsertComplete'][] = 
'PageCreationNotifHooks::onPageContentInsertComplete';
 
 /**
  * Email address to use as the sender
diff --git a/includes/PageCreationNotifEmailer.php 
b/includes/PageCreationNotifEmailer.php
index e72a36b..0f20c7d 100644
--- a/includes/PageCreationNotifEmailer.php
+++ b/includes/PageCreationNotifEmailer.php
@@ -20,7 +20,7 @@
 * @since 0.1
 *
 */
-   public static function notifyOnNewArticle( $article, $creator ) {
+   public static function notifyOnNewWikiPage( $wikiPage, $creator ) {
global $wgPCNSender, $wgPCNSenderName;
 
$users = self::getNotifUsers();
@@ -33,7 +33,7 @@
 
$subject = wfMessage(
'page-creation-email-subject',
-   $article->getTitle()->getFullText(),
+   $wikiPage->getTitle()->getFullText(),
$GLOBALS['wgSitename'],
$creator->getName()
)->parse();
@@ -41,10 +41,10 @@
$emailText = wfMessage(
'page-creation-email-body',
$user->getName(),
-   $article->getTitle()->getFullText(),
+   $wikiPage->getTitle()->getFullText(),
$creator->getName(),
-   $article->getTitle()->getFullURL(),
-   $article->getText()
+   $wikiPage->getTitle()->getFullURL(),
+   ContentHandler::getContentText( 
$wikiPage->getContent() )
)->parse();
 
UserMailer::send(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5d7761bc4dda55b2d9698f1beb4def3fb65d671
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageCreationNotif
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleKey[master]: Removed deprecated hook usage

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

Change subject: Removed deprecated hook usage
..


Removed deprecated hook usage

Bug: T151973
Change-Id: I95b4a3190f1ed0885eb2640a6cae91c002a57505
---
M TitleKey_body.php
M extension.json
2 files changed, 16 insertions(+), 3 deletions(-)

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



diff --git a/TitleKey_body.php b/TitleKey_body.php
index ae12f3f..ed8215e 100644
--- a/TitleKey_body.php
+++ b/TitleKey_body.php
@@ -83,8 +83,21 @@
return true;
}
 
-   static function updateInsert( $article, $user, $text, $summary, 
$isMinor, $isWatch, $section, $flags, $revision ) {
-   self::setKey( $article->getId(), $article->getTitle() );
+   /**
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isMinor
+* @param $isWatch
+* @param $section
+* @param $flags
+* @param Revision $revision
+* @return bool
+*/
+   static function updateInsert( $wikiPage, $user, $content, $summary, 
$isMinor, $isWatch,
+   $section, $flags, $revision ) {
+   self::setKey( $wikiPage->getId(), $wikiPage->getTitle() );
return true;
}
 
diff --git a/extension.json b/extension.json
index c650a27..4efdf64 100644
--- a/extension.json
+++ b/extension.json
@@ -28,7 +28,7 @@
"ArticleDeleteComplete": [
"TitleKey::updateDelete"
],
-   "ArticleInsertComplete": [
+   "PageContentInsertComplete": [
"TitleKey::updateInsert"
],
"ArticleUndelete": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95b4a3190f1ed0885eb2640a6cae91c002a57505
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleKey
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Filip 
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...VisualEditor[master]: Copy translate extension hack to source mode

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

Change subject: Copy translate extension hack to source mode
..

Copy translate extension hack to source mode

Bug: T153445
Change-Id: I5adfae940ee35c5ee6712e620a0ddda967a542ad
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 7c8b6d0..84bf2f3 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -777,7 +777,8 @@
// Only in enabled namespaces
conf.namespaces.indexOf( new mw.Title( mw.config.get( 
'wgRelevantPageName' ) ).getNamespaceId() ) !== -1 &&
 
-   // Not on pages which are outputs of the Page Translation 
feature
+   // Not on pages which are outputs of the Translate extensions
+   // TODO: Allow the Translate extension to do this itself
mw.config.get( 'wgTranslatePageTranslation' ) !== 'translation' 
&&
 
// Only for pages with a supported content model
@@ -793,6 +794,10 @@
// User preference
mw.user.options.get( 'visualeditor-newwikitext' ) &&
 
+   // Not on pages which are outputs of the Translate extensions
+   // TODO: Allow the Translate extension to do this itself
+   mw.config.get( 'wgTranslatePageTranslation' ) !== 'translation' 
&&
+
// Only on wikitext pages
mw.config.get( 'wgPageContentModel' ) === 'wikitext'
);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Replaced Linker deprecated functions with LinkRenderer

2016-12-24 Thread Subins2000 (Code Review)
Subins2000 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329052 )

Change subject: Replaced Linker deprecated functions with LinkRenderer
..

Replaced Linker deprecated functions with LinkRenderer

All usages of Linker::link() and Linker::linkKnown() has been replaced with 
LinkRenderer

Bug: T149346
Change-Id: I45c337f011a13ea8a841498e92c631c700809c6e
---
M includes/MobileFrontend.skin.hooks.php
M includes/skins/SkinMinerva.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileWatchlist.php
4 files changed, 15 insertions(+), 8 deletions(-)


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

diff --git a/includes/MobileFrontend.skin.hooks.php 
b/includes/MobileFrontend.skin.hooks.php
index 0f73c69..03bba12 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -1,5 +1,7 @@
 getLinkRenderer()->makeKnownLink(
+   $title,
+   $rightsText,
+   $attribs
+   );
} elseif ( $rightsUrl ) {
$link = Linker::makeExternalLink( $rightsUrl, 
$rightsText, true, '', $attribs );
} else {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 8530c03..7668a8d 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -3,6 +3,7 @@
  * SkinMinerva.php
  */
 use MobileFrontend\MenuBuilder;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Minerva: Born from the godhead of Jupiter with weapons!
@@ -151,9 +152,9 @@
default: // generic (all other NS)
$msg = 
'mobile-frontend-talk-back-to-page';
}
-   $tpl->set( 'subject-page', Linker::link(
+   $tpl->set( 'subject-page', 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
$title->getSubjectPage(),
-   $this->msg( $msg, $title->getText() 
)->escaped(),
+   $this->msg( $msg, $title->getText() )->text(),
[ 'class' => 'return-link' ]
) );
}
diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index f402555..12ba2f1 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -318,9 +318,9 @@
];
$output->addHtml(
Html::openElement( 'div', $attrs ) .
-   Linker::link(
+   $this->getLinkRenderer()->makeLink(
$user->getUserPage(),
-   htmlspecialchars( $user->getName() ),
+   $user->getName(),
[ 'class' => 'mw-mf-user-link' ]
) .
'' .
@@ -342,7 +342,7 @@
'class' =>  MobileUI::iconClass( 
'anonymous', 'before', 'mw-mf-user icon-16px mw-mf-anon' ),
], $this->msg( 
'mobile-frontend-diffview-anonymous' ) ) .
'' .
-   Linker::link( $userPage, 
htmlspecialchars( $ipAddr ) ) .
+   $this->getLinkRenderer()->makeLink( 
$userPage, $ipAddr ) .
''
);
}
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 1885cb3..32551b0 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -160,14 +160,14 @@
$html =
Html::openElement( 'ul', [ 'class' => 'button-bar 
mw-ui-button-group' ] ) .
Html::openElement( 'li', $attrsList ) .
-   Linker::link( $sp,
+   $this->getLinkRenderer()->makeLink( $sp,
wfMessage( 'mobile-frontend-watchlist-a-z' 
)->text(),
[ 'class' => 'button' ],
[ 'watchlistview' => 'a-z' ]
) .
Html::closeElement( 'li' ) .
Html::openElement( 'li', $attrsFeed ) .
-   Linker::link( $sp,
+   $this->getLinkRenderer()->makeLink( $sp,
wfMessage( 'mobile-frontend-watchlist-feed' 
)->text(),
  

[MediaWiki-commits] [Gerrit] mediawiki...LifeWeb[master]: Replaced Linker deprecated functions with LinkRenderer

2016-12-24 Thread Subins2000 (Code Review)
Subins2000 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329051 )

Change subject: Replaced Linker deprecated functions with LinkRenderer
..

Replaced Linker deprecated functions with LinkRenderer

All usages of Linker::link() and Linker::linkKnown() has been replaced with 
LinkRenderer

Bug: T149346
Change-Id: I49a772cda2f28c25035ac82215b0352b07235650
---
M SpecialLifeWeb.php
1 file changed, 18 insertions(+), 3 deletions(-)


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

diff --git a/SpecialLifeWeb.php b/SpecialLifeWeb.php
index b88e564..5b18adc 100644
--- a/SpecialLifeWeb.php
+++ b/SpecialLifeWeb.php
@@ -64,7 +64,12 @@
 );
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/editor' ), 
'Editor', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/editor' ),
+'Editor',
+array(),
+array( 'debug' => 'true' )
+) .
 ' (debug=true is mandatory!)'
 );
 $output->addWikiText(
@@ -72,7 +77,12 @@
 );
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/filter' ), 
'Filter', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/filter' ),
+'Filter',
+array(),
+array( 'debug' => 'true' )
+) .
 ''
 );
 $output->addWikiText(
@@ -81,7 +91,12 @@
 global $wgScriptPath;
 $output->addHTML(
 '' .
-Linker::link( Title::newFromText( 'Special:LifeWeb/importLW' ), 
'Importer', array(), array( 'debug' => 'true' ), array( 'known' ) ) .
+$this->getLinkRenderer()->makeKnownLink(
+Title::newFromText( 'Special:LifeWeb/importLW' ),
+'Importer',
+array(),
+array( 'debug' => 'true' )
+) .
 'API example: ' .
 'Taxon 
data'
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49a772cda2f28c25035ac82215b0352b07235650
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LifeWeb
Gerrit-Branch: master
Gerrit-Owner: Subins2000 

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleKey[master]: Removed deprecated hook usage

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

Change subject: Removed deprecated hook usage
..

Removed deprecated hook usage

Bug: T151973
Change-Id: I95b4a3190f1ed0885eb2640a6cae91c002a57505
---
M TitleKey_body.php
M extension.json
2 files changed, 16 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleKey 
refs/changes/48/329048/1

diff --git a/TitleKey_body.php b/TitleKey_body.php
index ae12f3f..ed8215e 100644
--- a/TitleKey_body.php
+++ b/TitleKey_body.php
@@ -83,8 +83,21 @@
return true;
}
 
-   static function updateInsert( $article, $user, $text, $summary, 
$isMinor, $isWatch, $section, $flags, $revision ) {
-   self::setKey( $article->getId(), $article->getTitle() );
+   /**
+* @param WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isMinor
+* @param $isWatch
+* @param $section
+* @param $flags
+* @param Revision $revision
+* @return bool
+*/
+   static function updateInsert( $wikiPage, $user, $content, $summary, 
$isMinor, $isWatch,
+   $section, $flags, $revision ) {
+   self::setKey( $wikiPage->getId(), $wikiPage->getTitle() );
return true;
}
 
diff --git a/extension.json b/extension.json
index c650a27..4efdf64 100644
--- a/extension.json
+++ b/extension.json
@@ -28,7 +28,7 @@
"ArticleDeleteComplete": [
"TitleKey::updateDelete"
],
-   "ArticleInsertComplete": [
+   "PageContentInsertComplete": [
"TitleKey::updateInsert"
],
"ArticleUndelete": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95b4a3190f1ed0885eb2640a6cae91c002a57505
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleKey
Gerrit-Branch: master
Gerrit-Owner: Georggi199 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Revert "Add class `mwe-math-element` to math elements"

2016-12-24 Thread Physikerwelt (Code Review)
Hello TameeshB, jenkins-bot, Bmansurov, TheDJ, Jdlrobson,

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

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

to review the following change.


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

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

This reverts commit e674d7e73bf6816f4dcbee5bee35f09cb53b88e9.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/47/329047/1

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

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea5f231e0cea1221dc717b3409b36c0baf11bb24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: TameeshB 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Addressing the display issue of HTML CAPTCHAs.

2016-12-24 Thread Ben.imbushuo (Code Review)
Ben.imbushuo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329046 )

Change subject: Addressing the display issue of HTML CAPTCHAs.
..

Addressing the display issue of HTML CAPTCHAs.

All non-image CAPTCHAs will be treated as plain text CAPTCHAs by default
in MobileFrontend's built-in editor. This affects at least QuestyCaptcha
(it do supports HTML-based question prior to 1.26 but undocumented, the
change that altered its original behavior in 1.27 has been corrected, see
T147606). This commit addresses this issue by presenting CAPTCHAs that
have MIME-typed "text/html" directly as HTML content.

Bug: T154082
Change-Id: Ia2a5fe8ac383452a7e64e723a56faa0d384fafa5
---
M resources/mobile.editor.common/EditorOverlayBase.js
1 file changed, 11 insertions(+), 4 deletions(-)


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

diff --git a/resources/mobile.editor.common/EditorOverlayBase.js 
b/resources/mobile.editor.common/EditorOverlayBase.js
index 47df7db..c9d71f3 100644
--- a/resources/mobile.editor.common/EditorOverlayBase.js
+++ b/resources/mobile.editor.common/EditorOverlayBase.js
@@ -380,11 +380,18 @@
this.$( '.captcha-panel#question' ).detach();
this.$( '.captcha-panel img' ).attr( 'src', 
details.url );
} else {
-   // handle mime types (other than image based 
ones) as plain text by default.
-   // e.g. QuestyCaptcha (question - answer), 
MathCaptcha (solve a math formula) or
-   // SimpleCaptcha (simple math formula)
+   // not image based CAPTCHA.
this.$( '.captcha-panel #image' ).detach();
-   this.$( '.captcha-panel #question' ).text( 
details.question );
+   if ( details.mime.indexOf( 'text/html' ) === 0 
) {
+   // handle mime type of HTML as HTML 
content (display as-is).
+   // QuestyCaptcha now have default MIME 
type "text/html": see T147606
+   this.$( '.captcha-panel #question' 
).html( details.question );
+   } else {
+   // handle mime types (other than image 
based ones and HTML based ones) as plain text by default.
+   // e.g. MathCaptcha (solve a math 
formula) or
+   // SimpleCaptcha (simple math formula)
+   this.$( '.captcha-panel #question' 
).text( details.question );
+   }
}
 
this.showHidden( '.save-header, .captcha-panel' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2a5fe8ac383452a7e64e723a56faa0d384fafa5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ben.imbushuo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Bug: T153243 Change-Id: Ieb37b34e76441c5f68ec565c43421c50ac9...

2016-12-24 Thread Mynk-96 (Code Review)
Mynk-96 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329045 )

Change subject: Bug: T153243 Change-Id: 
Ieb37b34e76441c5f68ec565c43421c50ac9be7e7
..

Bug: T153243
Change-Id: Ieb37b34e76441c5f68ec565c43421c50ac9be7e7
---
M autoload.php
M includes/content/ContentHandler.php
A includes/exception/MWContentSerializationException.php
A includes/exception/MWUnknownContentModelException.php
4 files changed, 39 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/329045/1

diff --git a/autoload.php b/autoload.php
index 38bf7cd..43e4037 100644
--- a/autoload.php
+++ b/autoload.php
@@ -778,7 +778,7 @@
'LongPagesPage' => __DIR__ . '/includes/specials/SpecialLongpages.php',
'MIMEsearchPage' => __DIR__ . 
'/includes/specials/SpecialMIMEsearch.php',
'MWCallableUpdate' => __DIR__ . 
'/includes/deferred/MWCallableUpdate.php',
-   'MWContentSerializationException' => __DIR__ . 
'/includes/content/ContentHandler.php',
+   'MWContentSerializationException' => __DIR__ . 
'/includes/exception/MWContentSerializationException.php',
'MWCryptHKDF' => __DIR__ . '/includes/utils/MWCryptHKDF.php',
'MWCryptHash' => __DIR__ . '/includes/libs/MWCryptHash.php',
'MWCryptRand' => __DIR__ . '/includes/utils/MWCryptRand.php',
@@ -799,7 +799,7 @@
'MWSaltedPassword' => __DIR__ . 
'/includes/password/MWSaltedPassword.php',
'MWTidy' => __DIR__ . '/includes/parser/MWTidy.php',
'MWTimestamp' => __DIR__ . '/includes/MWTimestamp.php',
-   'MWUnknownContentModelException' => __DIR__ . 
'/includes/content/ContentHandler.php',
+   'MWUnknownContentModelException' => __DIR__ . 
'/includes/exception/MWUnknownContentModelException.php',
'MachineReadableRCFeedFormatter' => __DIR__ . 
'/includes/rcfeed/MachineReadableRCFeedFormatter.php',
'MagicWord' => __DIR__ . '/includes/MagicWord.php',
'MagicWordArray' => __DIR__ . '/includes/MagicWordArray.php',
diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index 3389a00..4232805 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -28,38 +28,8 @@
  * @author Daniel Kinzler
  */
 
-/**
- * Exception representing a failure to serialize or unserialize a content 
object.
- *
- * @ingroup Content
- */
-class MWContentSerializationException extends MWException {
-}
 
-/**
- * Exception thrown when an unregistered content model is requested. This error
- * can be triggered by user input, so a separate exception class is provided so
- * callers can substitute a context-specific, internationalised error message.
- *
- * @ingroup Content
- * @since 1.27
- */
-class MWUnknownContentModelException extends MWException {
-   /** @var string The name of the unknown content model */
-   private $modelId;
 
-   /** @param string $modelId */
-   function __construct( $modelId ) {
-   parent::__construct( "The content model '$modelId' is not 
registered on this wiki.\n" .
-   'See https://www.mediawiki.org/wiki/Content_handlers to 
find out which extensions ' .
-   'handle this content model.' );
-   $this->modelId = $modelId;
-   }
-
-   /** @return string */
-   public function getModelId() {
-   return $this->modelId;
-   }
 }
 
 /**
diff --git a/includes/exception/MWContentSerializationException.php 
b/includes/exception/MWContentSerializationException.php
new file mode 100644
index 000..befd07b
--- /dev/null
+++ b/includes/exception/MWContentSerializationException.php
@@ -0,0 +1,9 @@
+
diff --git a/includes/exception/MWUnknownContentModelException.php 
b/includes/exception/MWUnknownContentModelException.php
new file mode 100644
index 000..0b66f3c
--- /dev/null
+++ b/includes/exception/MWUnknownContentModelException.php
@@ -0,0 +1,28 @@
+https://www.mediawiki.org/wiki/Content_handlers to 
find out which extensions ' .
+   'handle this content model.' );
+   $this->modelId = $modelId;
+   }
+
+   /** @return string */
+   public function getModelId() {
+   return $this->modelId;
+   }
+
+
+?>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb37b34e76441c5f68ec565c43421c50ac9be7e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mynk-96 

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


[MediaWiki-commits] [Gerrit] mediawiki...Patroller[master]: Fix descriptionmsg message key in extension.json

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

Change subject: Fix descriptionmsg message key in extension.json
..


Fix descriptionmsg message key in extension.json

Change-Id: I1f7dbe176f361f644254dc4f02cb7548a4814b66
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 4faf63c..26b4471 100644
--- a/extension.json
+++ b/extension.json
@@ -6,7 +6,7 @@
"Kris Blair (Cblair91)"
],
"url": "https://www.mediawiki.org/wiki/Extension:Patroller";,
-   "descriptionmsg": "patroller-desc",
+   "descriptionmsg": "patrol-desc",
"license-name": "GPL-2.0",
"type": "special",
"GroupPermissions": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f7dbe176f361f644254dc4f02cb7548a4814b66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Patroller
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
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...WikiForum[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..


Remove empty message key from i18n file

Change-Id: I25bb3f6e5d42e332b5ba5550cb93654a70839807
---
M i18n/tr.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/i18n/tr.json b/i18n/tr.json
index 08e6072..6b99007 100644
--- a/i18n/tr.json
+++ b/i18n/tr.json
@@ -15,7 +15,6 @@
"wikiforum-write-thread": "Yeni konu",
"wikiforum-replies": "Yanıtlar",
"wikiforum-views": "Görüntüle",
-   "wikiforum-latest-reply": "",
"wikiforum-pages": "Sayfalar:",
"wikiforum-thread-not-found": "Konu bulunamadı",
"wikiforum-error-not-found": "Nesne bulunamadı.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25bb3f6e5d42e332b5ba5550cb93654a70839807
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiForum
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: UltrasonicNXT 
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...Wikidata[master]: New Wikidata Build - 2016-12-24T10:00:01+0000

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

Change subject: New Wikidata Build - 2016-12-24T10:00:01+
..


New Wikidata Build - 2016-12-24T10:00:01+

Change-Id: Id09acca49bb449004bbabfd71ee221b57492bce0
---
M composer.lock
M extensions/ArticlePlaceholder/i18n/pl.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/kk-cyrl.json
M extensions/Wikibase/repo/i18n/ar.json
M extensions/Wikibase/repo/i18n/ce.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/nb.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/qqq.json
A extensions/Wikibase/repo/includes/Specials/HTMLForm/HTMLTrimmedTextField.php
M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewItem.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewProperty.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/HtmlAssertionHelpers.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialMergeItemsTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialRedirectEntityTest.php
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
23 files changed, 736 insertions(+), 579 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index e59cc99..706c1a4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -797,12 +797,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-"reference": "98a2db861a58102cdbc52707ff90e9f68899d02b"
+"reference": "75a2540c6f19488a630a4f871c01912dd26f1c21"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/98a2db861a58102cdbc52707ff90e9f68899d02b";,
-"reference": "98a2db861a58102cdbc52707ff90e9f68899d02b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/75a2540c6f19488a630a4f871c01912dd26f1c21";,
+"reference": "75a2540c6f19488a630a4f871c01912dd26f1c21",
 "shasum": ""
 },
 "require-dev": {
@@ -827,7 +827,7 @@
 ],
 "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
 "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder";,
-"time": "2016-12-21 15:36:21"
+"time": "2016-12-23 21:28:55"
 },
 {
 "name": "propertysuggester/property-suggester",
@@ -1585,12 +1585,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "34c8556f728ae901bd33b9ad31fd669233290e51"
+"reference": "1a771255cc07b3047e11c591091d642ea83f1abd"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/34c8556f728ae901bd33b9ad31fd669233290e51";,
-"reference": "34c8556f728ae901bd33b9ad31fd669233290e51",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/1a771255cc07b3047e11c591091d642ea83f1abd";,
+"reference": "1a771255cc07b3047e11c591091d642ea83f1abd",
 "shasum": ""
 },
 "require": {
@@ -1663,7 +1663,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-12-23 09:08:26"
+"time": "2016-12-23 21:34:43"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ArticlePlaceholder/i18n/pl.json 
b/extensions/ArticlePlaceholder/i18n/pl.json
index 2ad2803..752f6d3 100644
--- a/extensions/ArticlePlaceholder/i18n/pl.json
+++ b/extensions/ArticlePlaceholder/i18n/pl.json
@@ -7,9 +7,11 @@
"createtopicpage": "Utwórz stronę",
"articleplaceholder-abouttopic-create-article-label": "Tytuł artykułu",
"articleplaceholder-abouttopic-create-article-button": "Utwórz artykuł",
+   "articleplaceholder-abouttopic-create-emtpy-article-button": "Utwórz 
nowy artykuł",
"articleplaceholder-abouttopic

[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..


Remove empty message key from i18n file

Change-Id: Ifc62e2aa1afa6d7ea3dd3a0ffb7465853bc212b5
---
M i18n/lexicaldata/km.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/i18n/lexicaldata/km.json b/i18n/lexicaldata/km.json
index 955d70b..514dcce 100644
--- a/i18n/lexicaldata/km.json
+++ b/i18n/lexicaldata/km.json
@@ -64,7 +64,6 @@
"ow_transaction_remove": "ដកចេញ",
"ow_transaction_operation": "ប្រតិបត្តិការ",
"ow_transaction_summary": "សង្ខេប​សេចក្ដី​",
-   "ow_conceptmapping_no_action_specified": "",
"ow_dm_OK": "យល់ព្រម",
"ow_dm_not_present": "មិនបានបញ្ចូល",
"ow_will_insert": "នឹង​ដាក់បញ្ចូល​ដូចតទៅ:",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc62e2aa1afa6d7ea3dd3a0ffb7465853bc212b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...WikiLexicalData[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..

Remove empty message key from i18n file

Change-Id: Ifc62e2aa1afa6d7ea3dd3a0ffb7465853bc212b5
---
M i18n/lexicaldata/km.json
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData 
refs/changes/44/329044/1

diff --git a/i18n/lexicaldata/km.json b/i18n/lexicaldata/km.json
index 955d70b..514dcce 100644
--- a/i18n/lexicaldata/km.json
+++ b/i18n/lexicaldata/km.json
@@ -64,7 +64,6 @@
"ow_transaction_remove": "ដកចេញ",
"ow_transaction_operation": "ប្រតិបត្តិការ",
"ow_transaction_summary": "សង្ខេប​សេចក្ដី​",
-   "ow_conceptmapping_no_action_specified": "",
"ow_dm_OK": "យល់ព្រម",
"ow_dm_not_present": "មិនបានបញ្ចូល",
"ow_will_insert": "នឹង​ដាក់បញ្ចូល​ដូចតទៅ:",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc62e2aa1afa6d7ea3dd3a0ffb7465853bc212b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
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...MonoBook[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..


Remove empty message key from i18n file

Change-Id: Iccd3b40700123ed89d332c6481904be7ecbf320e
---
M i18n/rm.json
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/i18n/rm.json b/i18n/rm.json
index 7eb17f7..549f0e1 100644
--- a/i18n/rm.json
+++ b/i18n/rm.json
@@ -4,6 +4,5 @@
"Gion-andri"
]
},
-   "monobook.css": "/* editescha quest file per adattar il skin momobook 
per l'entira pagina */",
-   "monobook.js": ""
+   "monobook.css": "/* editescha quest file per adattar il skin momobook 
per l'entira pagina */"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccd3b40700123ed89d332c6481904be7ecbf320e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/MonoBook
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiForum[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..

Remove empty message key from i18n file

Change-Id: I25bb3f6e5d42e332b5ba5550cb93654a70839807
---
M i18n/tr.json
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum 
refs/changes/43/329043/1

diff --git a/i18n/tr.json b/i18n/tr.json
index 08e6072..6b99007 100644
--- a/i18n/tr.json
+++ b/i18n/tr.json
@@ -15,7 +15,6 @@
"wikiforum-write-thread": "Yeni konu",
"wikiforum-replies": "Yanıtlar",
"wikiforum-views": "Görüntüle",
-   "wikiforum-latest-reply": "",
"wikiforum-pages": "Sayfalar:",
"wikiforum-thread-not-found": "Konu bulunamadı",
"wikiforum-error-not-found": "Nesne bulunamadı.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25bb3f6e5d42e332b5ba5550cb93654a70839807
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiForum
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...MonoBook[master]: Remove empty message key from i18n file

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

Change subject: Remove empty message key from i18n file
..

Remove empty message key from i18n file

Change-Id: Iccd3b40700123ed89d332c6481904be7ecbf320e
---
M i18n/rm.json
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MonoBook 
refs/changes/42/329042/1

diff --git a/i18n/rm.json b/i18n/rm.json
index 7eb17f7..e667e03 100644
--- a/i18n/rm.json
+++ b/i18n/rm.json
@@ -5,5 +5,4 @@
]
},
"monobook.css": "/* editescha quest file per adattar il skin momobook 
per l'entira pagina */",
-   "monobook.js": ""
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccd3b40700123ed89d332c6481904be7ecbf320e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MonoBook
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...BiblioPlus[master]: final commit after all editing

2016-12-24 Thread Mynk-96 (Code Review)
Mynk-96 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329041 )

Change subject: final commit after all editing
..

final commit after all editing

Change-Id: I0acdd47f18c784a4db7406f9574c5ce5140039d2
---
M BiblioPlus.body.php
1 file changed, 59 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BiblioPlus 
refs/changes/41/329041/1

diff --git a/BiblioPlus.body.php b/BiblioPlus.body.php
index d674ac1..5d47ea4 100644
--- a/BiblioPlus.body.php
+++ b/BiblioPlus.body.php
@@ -800,17 +800,17 @@
* @return array: Formatted references.
*/
function renderBiblio( $input, $pdata, $force ) {
-   $refs = array();
-   $list = $this->expandList( $this->splitBiblio( $input ) );
-   $parseResult = $this->parseBiblio( $list );
-   $entries = $parseResult['entries'];
-   $pmids = $parseResult['pmids'];
-   $isbns = $parseResult['isbns'];
-   $pmentries = array();
-   $pmidsToFetch = array();
+   $refs = array();
+   $list = $this->expandList( $this->splitBiblio( $input ) );
+   $parseResult = $this->parseBiblio( $list );
+   $entries = $parseResult['entries'];
+   $pmids = $parseResult['pmids'];
+   $isbns = $parseResult['isbns'];
+   $pmentries = array();
+   $pmidsToFetch = array();
 
-   // caching features
-   $cache = wfGetMainCache();
+   // caching features
+   $cache = wfGetMainCache();
foreach ( $pmids as $pmid ) {
$cacheKey = wfMemcKey( 'Biblio', $pmid );
$res = $cache->get( $cacheKey );
@@ -845,7 +845,7 @@
$refs = array();
$errors = array();
 
-   // go through all entries and extract data to format reference
+   //go through all entries and extract data to format reference
foreach ( $entries as $ref ) {
$key = $this->get( $ref, 'key' );
$annot = $this->parseAnnot( $pdata, $this->get( $ref, 
'annot' ) );
@@ -872,63 +872,61 @@
$text = $isbnentries["$isbn"];
} elseif ( !is_null( $wikitext ) ) { // plain wikitext
$text = $this->parseFreetext( $pdata, $wikitext 
);
-   } else {
-   $index = $this->citationIndex( $key, $force );
-   if ( $index >= 0 ) {
-   $refs[] = array( 'index' => $index,
+   }
+   $index = $this->citationIndex( $key, $force );
+   if ( $index >= 0 )
+   $refs[] = array( 'index' => $index,
'key' => $key,
'text' => $text,
'pmid' => $pmid,
'isbn' => $isbn,
'annot' => $annot,
'biburl' => $biburl );
-   }
-   sort( $refs );
-   reset( $refs );
-   $sortedPmids = array();
-   foreach ( $refs as $ref ) {
-   $pmid = $this->get( $ref, 'pmid' );
-   if ( !is_null( $pmid ) ) {
-   $sortedPmids[] = $pmid;
-   }
-   }
-   $header = '';
-   $footer = '';
-   if ( count( $errors ) ) {
-   $header = $this->errorbox( implode( 
'', $errors ) );
-   }
-   if ( count( $sortedPmids ) > 1 ) {
-   $footer .= wfMessage( 
'biblioplus-medline-abstracts' )->escaped() . ' ' .
-   $this->htmlInterLink( $this->pubMedUrl( 
$sortedPmids ),
-   $this->smallCaps( 'PubMed' ), 
wfMessage( 'biblioplus-pubmed-abstracts' )->escaped() ) .
-   ' | ' . $this->htmlInterLink( 
$this->hubMedUrl( $sortedPmids ),
-   $this->smallCaps( 'HubMed' ), 
wfMessage( 'biblioplus-hubmed-abstracts' )->escaped() );
-   $footer = $this->noprint( $footer );
-   }
-   $result = array();
-   

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add a `Special:Newsletter/id/subsrcibers` page

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

Change subject: Add a `Special:Newsletter/id/subsrcibers` page
..


Add a `Special:Newsletter/id/subsrcibers` page

This page lists all of the subscribers to a newsletter, and is only
viewable by publishers and people with the `newsletter-manage`
permission.

Bug: T153639
Change-Id: Ia0697f66ca8e94d4a4abec9dc22abe6c7a4e026d
---
M i18n/en.json
M i18n/qqq.json
M includes/content/NewsletterContent.php
M includes/specials/SpecialNewsletter.php
4 files changed, 66 insertions(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 422d9db..0fd5fe1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -31,6 +31,7 @@
"newsletter-subtitlelinks-subscribe": "subscribe",
"newsletter-subtitlelinks-announce": "announce",
"newsletter-subtitlelinks-manage": "manage",
+   "newsletter-subtitlelinks-subscribers": "view subscribers",
"newsletters": "Newsletters",
"newsletter-subscribe-loginrequired": "Please log in to subscribe to 
[[Special:Newsletters|newsletters]].",
"newsletter-notfound": "Newsletter not found",
@@ -44,6 +45,7 @@
"newsletter-manage-button": "Manage",
"newsletter-unsubscribe-button": "Unsubscribe",
"newsletter-subscribe-button": "Subscribe",
+   "newsletter-subscribers-button": "View subscribers",
"newsletter-announce-button": "Announce",
"newsletter-announce-nopermission": "You are not a publisher for this 
newsletter.",
"newsletter-announce": "Announce a new issue of \"$1\"",
@@ -89,6 +91,8 @@
"newsletter-unsubscribe-button-label": "No",
"newsletter-subscribing": "Subscribing...",
"newsletter-unsubscribing": "Unsubscribing...",
+   "newsletter-subscribers" : "Newsletter subscribers",
+   "newsletter-subscribers-nopermission": "You do not have permission to 
view the subscribers of this newsletter",
"newsletter-available-newsletters-field-label": "Available newsletters",
"newsletter-subscribed-newsletters-field-label": "Subscribed 
newsletters",
"newsletter-none-found": "No newsletters exist. You can create a new 
newsletter through [[Special:CreateNewsletter]].",
@@ -108,7 +112,7 @@
"action-newsletter-create": "create newsletters",
"right-newsletter-delete": "Delete newsletters",
"action-newsletter-delete": "delete newsletters",
-   "right-newsletter-manage": "Add or remove publishers from newsletters",
+   "right-newsletter-manage": "Add or remove publishers from and view the 
subscribers of newsletters",
"action-newsletter-manage": "manage newsletters",
"apihelp-newslettersubscribe-description": "Subscribe to or unsubscribe 
from a newsletter.",
"apihelp-newslettersubscribe-param-id": "ID of the newsletter for which 
the subscription should be changed.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 633a18b..4b39c8d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -38,6 +38,7 @@
"newsletter-subtitlelinks-subscribe": "Label for link to 
Special:Newsletter subscribe page. Used as a navigation link on 
Special:Newsletter.\n\nSee also:\n* 
{{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* 
{{msg-mw|newsletter-subtitlelinks-announce}}\n* 
{{msg-mw|newsletter-subtitlelinks-manage}}\n{{Identical|Subscribe}}",
"newsletter-subtitlelinks-announce": "Label for link to 
Special:Newsletter announce page. Used as a navigation link on 
Special:Newsletter.\n\nSee also:\n* 
{{msg-mw|newsletter-subtitlelinks-subscribe}}\n* 
{{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* 
{{msg-mw|newsletter-subtitlelinks-announce}}\n* 
{{msg-mw|newsletter-subtitlelinks-manage}}\n{{Identical|Announce}}",
"newsletter-subtitlelinks-manage": "Label for link to 
Special:Newsletter manage page. Used as a navigation link on 
Special:Newsletter.\n\nSee also:\n* 
{{msg-mw|newsletter-subtitlelinks-subscribe}}\n* 
{{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* 
{{msg-mw|newsletter-subtitlelinks-announce}}\n{{Identical|Manage}}",
+   "newsletter-subtitlelinks-subscribers": "Label for link to 
Special:Newsletter subscribers",
"newsletters": "Name of special page for user to subscribe to or 
unsubscribe from newsletters\n{{Identical|Newsletter}}",
"newsletter-subscribe-loginrequired": "Error message shown on the login 
form for non-logged in users if they try to visit 
Special:Newsletter//subscribe.",
"newsletter-notfound": "Header of Special:Newsletter/ if no 
newsletter by that id exists.\n\nSee also:\n* 
{{msg-mw|newsletter-not-found-id}}",
@@ -51,6 +52,7 @@
"newsletter-manage-button": "Label for \"Manage\" button shown on 
Special:Newsletter/. Links to Special:Newsletter//manage. Only shown if 
the current user ha

[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2016-12-24T10:00:01+0000

2016-12-24 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329040 )

Change subject: New Wikidata Build - 2016-12-24T10:00:01+
..

New Wikidata Build - 2016-12-24T10:00:01+

Change-Id: Id09acca49bb449004bbabfd71ee221b57492bce0
---
M composer.lock
M extensions/ArticlePlaceholder/i18n/pl.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/kk-cyrl.json
M extensions/Wikibase/repo/i18n/ar.json
M extensions/Wikibase/repo/i18n/ce.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/nb.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/qqq.json
A extensions/Wikibase/repo/includes/Specials/HTMLForm/HTMLTrimmedTextField.php
M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewItem.php
M extensions/Wikibase/repo/includes/Specials/SpecialNewProperty.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/HtmlAssertionHelpers.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialMergeItemsTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialRedirectEntityTest.php
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
23 files changed, 736 insertions(+), 579 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/40/329040/1

diff --git a/composer.lock b/composer.lock
index e59cc99..706c1a4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -797,12 +797,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git";,
-"reference": "98a2db861a58102cdbc52707ff90e9f68899d02b"
+"reference": "75a2540c6f19488a630a4f871c01912dd26f1c21"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/98a2db861a58102cdbc52707ff90e9f68899d02b";,
-"reference": "98a2db861a58102cdbc52707ff90e9f68899d02b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/75a2540c6f19488a630a4f871c01912dd26f1c21";,
+"reference": "75a2540c6f19488a630a4f871c01912dd26f1c21",
 "shasum": ""
 },
 "require-dev": {
@@ -827,7 +827,7 @@
 ],
 "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
 "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder";,
-"time": "2016-12-21 15:36:21"
+"time": "2016-12-23 21:28:55"
 },
 {
 "name": "propertysuggester/property-suggester",
@@ -1585,12 +1585,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "34c8556f728ae901bd33b9ad31fd669233290e51"
+"reference": "1a771255cc07b3047e11c591091d642ea83f1abd"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/34c8556f728ae901bd33b9ad31fd669233290e51";,
-"reference": "34c8556f728ae901bd33b9ad31fd669233290e51",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/1a771255cc07b3047e11c591091d642ea83f1abd";,
+"reference": "1a771255cc07b3047e11c591091d642ea83f1abd",
 "shasum": ""
 },
 "require": {
@@ -1663,7 +1663,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-12-23 09:08:26"
+"time": "2016-12-23 21:34:43"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ArticlePlaceholder/i18n/pl.json 
b/extensions/ArticlePlaceholder/i18n/pl.json
index 2ad2803..752f6d3 100644
--- a/extensions/ArticlePlaceholder/i18n/pl.json
+++ b/extensions/ArticlePlaceholder/i18n/pl.json
@@ -7,9 +7,11 @@
"createtopicpage": "Utwórz stronę",
"articleplaceholder-abouttopic-create-article-label": "Tytuł artykułu",
"articleplaceholder-abouttopic-create-article-button": "Utwórz artykuł",
+   "articleplaceholder-abouttopic-create-emtpy-article-button": "Utwórz 
nowy artykuł",
"articlep

[MediaWiki-commits] [Gerrit] integration/config[master]: Run WebPageTest jobs every hour

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

Change subject: Run WebPageTest jobs every hour
..


Run WebPageTest jobs every hour

We decreased the number of runs to be able to run every hour and hopefully
use the metrics as alerts on performance regressions.

Bug: T151197
Change-Id: I96368f42150c5a7d051ddf5e9fb65ff452cddbd6
---
M jjb/misc.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jjb/misc.yaml b/jjb/misc.yaml
index 4605d46..03e3c0d 100644
--- a/jjb/misc.yaml
+++ b/jjb/misc.yaml
@@ -221,7 +221,7 @@
 - master
   wipe-workspace: true
 triggers:
- - timed: 'H */3 * * *'
+ - timed: 'H * * * *'
 wrappers:
   - timeout:
   timeout: 150

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96368f42150c5a7d051ddf5e9fb65ff452cddbd6
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/docroot[master]: build: Set up PHPCS

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

Change subject: build: Set up PHPCS
..


build: Set up PHPCS

Change-Id: I1a65171fb2e2c70cf8a69702c5f0335453f08f40
---
M composer.json
A phpcs.xml
M shared/Page.php
M shared/favicon.php
4 files changed, 40 insertions(+), 18 deletions(-)

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



diff --git a/composer.json b/composer.json
index fbb50e0..7d3cf3e 100644
--- a/composer.json
+++ b/composer.json
@@ -1,12 +1,14 @@
 {
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.8.*",
-"phpunit/phpunit": "4.6.*"
+"jakub-onderka/php-parallel-lint": "0.9",
+"mediawiki/mediawiki-codesniffer": "0.7.2",
+"phpunit/phpunit": "4.8.*"
 },
 "scripts": {
 "test": [
-   "parallel-lint . --exclude vendor",
-   "phpunit"
+"parallel-lint . --exclude vendor",
+"phpunit",
+"phpcs -p -s"
 ]
 }
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..76e2f1b
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,20 @@
+
+
+   
+   .
+   
+   
+   
+   0
+   
+   
+   0
+   
+   
+   0
+   
+   
+   0
+   
+   vendor
+
diff --git a/shared/Page.php b/shared/Page.php
index 829ff92..db08a6d 100644
--- a/shared/Page.php
+++ b/shared/Page.php
@@ -97,7 +97,7 @@
 
// Move down to toPath
$down = array_slice( $to, $i );
-   if ($down) {
+   if ( $down ) {
$relativePath .= implode( '/', $down );
 
// Match target with slash
@@ -225,12 +225,12 @@
$file = $this->dir . DIRECTORY_SEPARATOR . $file;
}
 
-   if( !file_exists( $file ) ) {
+   if ( !file_exists( $file ) ) {
return false;
}
 
$content = file_get_contents( $file );
-   if( $content === false ) {
+   if ( $content === false ) {
# TODO output an error page?
return false;
}
@@ -265,7 +265,7 @@
}
 
public function flush() {
-   $this->embedCSS('
+   $this->embedCSS( '
 /**
  * Logo
  */
@@ -273,7 +273,7 @@
vertical-align: middle;
margin-right: 1em;
 }
-');
+' );
 
if ( $this->hasFooter ) {
$this->embedCSSFile( 'footer.css' );
@@ -404,7 +404,6 @@
$this->flush();
}
 
-
public static function error( $msg, $statusCode = 500 ) {
$statusCode = (int)$statusCode;
http_response_code( $statusCode );
@@ -414,5 +413,6 @@
exit;
}
 
-   private function __construct() {}
+   private function __construct() {
+   }
 }
diff --git a/shared/favicon.php b/shared/favicon.php
index 3bd8af0..ad5e749 100644
--- a/shared/favicon.php
+++ b/shared/favicon.php
@@ -1,5 +1,5 @@
 \n\n" . htmlspecialchars( $text ) . 
"\n\n";
exit;
 }
 
-function streamFavicon( $url ) {
+function wfStreamFavicon( $url ) {
$content = file_get_contents( $url );
if ( !$content ) {
-   faviconErrorText( "Failed to fetch url: $url" );
+   wfFaviconErrorText( "Failed to fetch url: $url" );
}
-   $resp = parseRespHeaders( $http_response_header );
+   $resp = wfParseRespHeaders( $http_response_header );
if ( !isset( $resp['content-type'] ) ) {
-   faviconErrorText( "Missing Content-Type header on url: $url" );
+   wfFaviconErrorText( "Missing Content-Type header on url: $url" 
);
}
header( 'Content-Length: ' . strlen( $content ) );
header( 'Content-Type: ' . $resp['content-type'] );
@@ -34,4 +34,4 @@
exit;
 }
 
-streamFavicon( 'https://www.wikimedia.org/static/favicon/wmf.ico' );
+wfStreamFavicon( 'https://www.wikimedia.org/static/favicon/wmf.ico' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a65171fb2e2c70cf8a69702c5f0335453f08f40
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Proper handling of invalid/unknown time zones

2016-12-24 Thread TTO (Code Review)
TTO has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329039 )

Change subject: Proper handling of invalid/unknown time zones
..

Proper handling of invalid/unknown time zones

Currently, a user who has an invalid time zone stored in the database is
effectively locked out of their account on HHVM sites. This patch addresses
this by (1) preventing users from setting invalid time zones, and (2) not
throwing an unhandled exception if a user's TZ is unknown.

When the user saves their preferences, the code silently rewrites invalid
time zones to UTC. I think this is OK, since to cause this to happen you
have to manually muck around with the Preferences page DOM or submit the
form from a script.

Bug: T137182
Change-Id: I28c5e2ac9f2e681718c6080fb49b3b01e4af46dd
---
M includes/Preferences.php
M languages/Language.php
2 files changed, 37 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/329039/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index cf8e7b8..a4aff99 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -696,18 +696,22 @@
$tzOptions = self::getTimezoneOptions( $context );
 
$tzSetting = $tzOffset;
+   if ( count( $tz ) > 1 && $tz[0] == 'ZoneInfo' &&
+   !in_array( $tzOffset, HTMLFormField::flattenOptions( 
$tzOptions ) )
+   ) {
+   // Timezone offset can vary with DST
+   try {
+   $userTZ = new DateTimeZone( $tz[2] );
+   $minDiff = floor( timezone_offset_get( $userTZ, 
date_create( 'now' ) ) / 60 );
+   $tzSetting = "ZoneInfo|$minDiff|{$tz[2]}";
+   } catch ( Exception $e ) {
+   // User has an invalid time zone set. Fall back 
to just using the offset
+   $tz[0] = 'Offset';
+   }
+   }
if ( count( $tz ) > 1 && $tz[0] == 'Offset' ) {
$minDiff = $tz[1];
$tzSetting = sprintf( '%+03d:%02d', floor( $minDiff / 
60 ), abs( $minDiff ) % 60 );
-   } elseif ( count( $tz ) > 1 && $tz[0] == 'ZoneInfo' &&
-   !in_array( $tzOffset, HTMLFormField::flattenOptions( 
$tzOptions ) )
-   ) {
-   # Timezone offset can vary with DST
-   $userTZ = timezone_open( $tz[2] );
-   if ( $userTZ !== false ) {
-   $minDiff = floor( timezone_offset_get( $userTZ, 
date_create( 'now' ) ) / 60 );
-   $tzSetting = "ZoneInfo|$minDiff|{$tz[2]}";
-   }
}
 
$defaultPreferences['timecorrection'] = [
@@ -1391,6 +1395,25 @@
$data = explode( '|', $tz, 3 );
switch ( $data[0] ) {
case 'ZoneInfo':
+   $data = explode( '|', $tz, 3 );
+   $valid = false;
+
+   if ( count( $data ) === 3 ) {
+   // Make sure this timezone exists
+   try {
+   new DateTimeZone( $data[2] );
+   // If the constructor didn't 
throw, we know it's valid
+   $valid = true;
+   } catch ( Exception $e ) {
+   // Not a valid timezone
+   }
+   }
+
+   if ( !$valid ) {
+   // If the input is invalid, fall back 
to a safe default
+   return 'Offset|0';
+   }
+   return $tz;
case 'System':
return $tz;
default:
diff --git a/languages/Language.php b/languages/Language.php
index ac8d4cb..1afb6a7 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -2100,17 +2100,16 @@
$data = explode( '|', $tz, 3 );
 
if ( $data[0] == 'ZoneInfo' ) {
-   MediaWiki\suppressWarnings();
-   $userTZ = timezone_open( $data[2] );
-   MediaWiki\restoreWarnings();
-   if ( $userTZ !== false ) {
+   try {
+   $userTZ = new DateTimeZone( $data[2] );
$date = date_create( $ts, timezone_open( 'UTC' 
) );
date

[MediaWiki-commits] [Gerrit] integration/config[master]: Update integration/docroot to run composer-test on php55-trusty

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

Change subject: Update integration/docroot to run composer-test on php55-trusty
..


Update integration/docroot to run composer-test on php55-trusty

Change-Id: I63c359e549bc81b37cf7a098b762d33541683dcc
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index fbe182d..da6744d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1744,11 +1744,11 @@
 
   - name: integration/docroot
 test:
- - composer-php53
+ - composer-php55-trusty
  - jshint
  - jsonlint
 gate-and-submit:
- - composer-php53
+ - composer-php55-trusty
  - jshint
  - jsonlint
 postmerge:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63c359e549bc81b37cf7a098b762d33541683dcc
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Update integration/docroot to run composer-test on php55-trusty

2016-12-24 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329038 )

Change subject: Update integration/docroot to run composer-test on php55-trusty
..

Update integration/docroot to run composer-test on php55-trusty

Change-Id: I63c359e549bc81b37cf7a098b762d33541683dcc
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/38/329038/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index fbe182d..da6744d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1744,11 +1744,11 @@
 
   - name: integration/docroot
 test:
- - composer-php53
+ - composer-php55-trusty
  - jshint
  - jsonlint
 gate-and-submit:
- - composer-php53
+ - composer-php55-trusty
  - jshint
  - jsonlint
 postmerge:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63c359e549bc81b37cf7a098b762d33541683dcc
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


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

2016-12-24 Thread Mynk-96 (Code Review)
Mynk-96 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329037 )

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

Merge "Avoid pointless use of isset() in LBFactoryMulti()"

Change-Id: I64f1367a31e004a5673d0f1e3d04377bb763d4a4
---
M autoload.php
M includes/content/ContentHandler.php
A includes/exception/MWContentSerializationException.php
A includes/exception/MWUnknownContentModelException.php
4 files changed, 38 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/329037/1

diff --git a/autoload.php b/autoload.php
index 38bf7cd..43e4037 100644
--- a/autoload.php
+++ b/autoload.php
@@ -778,7 +778,7 @@
'LongPagesPage' => __DIR__ . '/includes/specials/SpecialLongpages.php',
'MIMEsearchPage' => __DIR__ . 
'/includes/specials/SpecialMIMEsearch.php',
'MWCallableUpdate' => __DIR__ . 
'/includes/deferred/MWCallableUpdate.php',
-   'MWContentSerializationException' => __DIR__ . 
'/includes/content/ContentHandler.php',
+   'MWContentSerializationException' => __DIR__ . 
'/includes/exception/MWContentSerializationException.php',
'MWCryptHKDF' => __DIR__ . '/includes/utils/MWCryptHKDF.php',
'MWCryptHash' => __DIR__ . '/includes/libs/MWCryptHash.php',
'MWCryptRand' => __DIR__ . '/includes/utils/MWCryptRand.php',
@@ -799,7 +799,7 @@
'MWSaltedPassword' => __DIR__ . 
'/includes/password/MWSaltedPassword.php',
'MWTidy' => __DIR__ . '/includes/parser/MWTidy.php',
'MWTimestamp' => __DIR__ . '/includes/MWTimestamp.php',
-   'MWUnknownContentModelException' => __DIR__ . 
'/includes/content/ContentHandler.php',
+   'MWUnknownContentModelException' => __DIR__ . 
'/includes/exception/MWUnknownContentModelException.php',
'MachineReadableRCFeedFormatter' => __DIR__ . 
'/includes/rcfeed/MachineReadableRCFeedFormatter.php',
'MagicWord' => __DIR__ . '/includes/MagicWord.php',
'MagicWordArray' => __DIR__ . '/includes/MagicWordArray.php',
diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index 3389a00..e372187 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -28,39 +28,9 @@
  * @author Daniel Kinzler
  */
 
-/**
- * Exception representing a failure to serialize or unserialize a content 
object.
- *
- * @ingroup Content
- */
-class MWContentSerializationException extends MWException {
-}
 
-/**
- * Exception thrown when an unregistered content model is requested. This error
- * can be triggered by user input, so a separate exception class is provided so
- * callers can substitute a context-specific, internationalised error message.
- *
- * @ingroup Content
- * @since 1.27
- */
-class MWUnknownContentModelException extends MWException {
-   /** @var string The name of the unknown content model */
-   private $modelId;
 
-   /** @param string $modelId */
-   function __construct( $modelId ) {
-   parent::__construct( "The content model '$modelId' is not 
registered on this wiki.\n" .
-   'See https://www.mediawiki.org/wiki/Content_handlers to 
find out which extensions ' .
-   'handle this content model.' );
-   $this->modelId = $modelId;
-   }
 
-   /** @return string */
-   public function getModelId() {
-   return $this->modelId;
-   }
-}
 
 /**
  * A content handler knows how do deal with a specific type of content on a 
wiki
diff --git a/includes/exception/MWContentSerializationException.php 
b/includes/exception/MWContentSerializationException.php
new file mode 100644
index 000..befd07b
--- /dev/null
+++ b/includes/exception/MWContentSerializationException.php
@@ -0,0 +1,9 @@
+
diff --git a/includes/exception/MWUnknownContentModelException.php 
b/includes/exception/MWUnknownContentModelException.php
new file mode 100644
index 000..b770c03
--- /dev/null
+++ b/includes/exception/MWUnknownContentModelException.php
@@ -0,0 +1,27 @@
+https://www.mediawiki.org/wiki/Content_handlers to 
find out which extensions ' .
+   'handle this content model.' );
+   $this->modelId = $modelId;
+   }
+
+   /** @return string */
+   public function getModelId() {
+   return $this->modelId;
+   }
+}
+?>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64f1367a31e004a5673d0f1e3d04377bb763d4a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mynk-96 

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


[MediaWiki-commits] [Gerrit] mediawiki...BibManager[master]: Replaced Linker::link() & Linker::linkKnown() with LinkRenderer

2016-12-24 Thread Subins2000 (Code Review)
Subins2000 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329036 )

Change subject: Replaced Linker::link() & Linker::linkKnown() with LinkRenderer
..

Replaced Linker::link() & Linker::linkKnown() with LinkRenderer

All usages of Linker::link() and Linker::linkKnown() has been replaced with 
LinkRenderer

Bug: T149346
Change-Id: I3a5990210130127ad8b66f9adc39d0f90682fb45
---
M includes/BibManagerHooks.php
M includes/BibManagerPagerList.php
M includes/specials/SpecialBibManagerList.php
3 files changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BibManager 
refs/changes/36/329036/1

diff --git a/includes/BibManagerHooks.php b/includes/BibManagerHooks.php
index 43cdd16..9449dc0 100644
--- a/includes/BibManagerHooks.php
+++ b/includes/BibManagerHooks.php
@@ -1,5 +1,7 @@
 getLinkRenderer()->makeBrokenLink(
$spTitle,
$args['id'],
array( 'class' => 'new' ),
-   array ( 'bm_bibtexCitation' => $args['id'] ),
-   array ( 'broken' => true )
+   array ( 'bm_bibtexCitation' => $args['id'] )
);
$sTooltip = '' . 
wfMessage('bm_error_not-existing')->escaped();
if ($wgUser->isAllowed('bibmanagercreate')){
@@ -102,7 +103,7 @@
$args['id'],
$wgBibManagerCitationArticleNamespace
);
-   $sLink = Linker::link(
+   $sLink = 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
$oCitationTitle,
$args['id'],
array ( 'title' => '' )
@@ -369,12 +370,11 @@
foreach ( $res as $key => $val ) {
if ( empty( $val ) ){
$spTitle = SpecialPage::getTitleFor( 
'BibManagerCreate' ); // TODO RBV (10.11.11 13:50): Dublicate code --> 
encapsulate
-   $citLink = Linker::link(
+   $citLink = 
MediaWikiServices::getInstance()->getLinkRenderer()->makeBrokenLink(
$spTitle,
$key,
array ( 'class' => 'new' ),
-   array ( 'bm_bibtexCitation' => $key ),
-   array ( 'broken' => true )
+   array ( 'bm_bibtexCitation' => $key )
);
$sLinkToEdit = SpecialPage::getTitleFor( 
'BibManagerCreate' )->getLocalURL( array ( 'bm_bibtexCitation' => $key ));
$citFormat = '' . 
wfMessage('bm_error_not-existing')->escaped();
@@ -393,7 +393,7 @@
$val['bm_bibtexCitation'],
$wgBibManagerCitationArticleNamespace
);
-   $citLink = Linker::link( $title, 
$val['bm_bibtexCitation'] );
+   $citLink = 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( $title, 
$val['bm_bibtexCitation'] );
$citFormat = self::formatEntry( $val );
$citIcons = self::getIcons( $val );
}
diff --git a/includes/BibManagerPagerList.php b/includes/BibManagerPagerList.php
index 676f8ce..37ac3a8 100644
--- a/includes/BibManagerPagerList.php
+++ b/includes/BibManagerPagerList.php
@@ -1,5 +1,7 @@
 getLinkRenderer()->makeLink;
$citationTitle = Title::newFromText( $row->bm_bibtexCitation, 
$wgBibManagerCitationArticleNamespace );
 
-   $citationLink = Linker::link( $citationTitle, 
$row->bm_bibtexCitation );
+   $citationLink = $linkRenderer->makeLink( $citationTitle, 
$row->bm_bibtexCitation );
$editLink= '';
$deleteLink   = '';
$exportLink   = Html::input(
@@ -100,9 +103,9 @@
$specialPageQuery = array ( 'bm_bibtexCitation' => 
$row->bm_bibtexCitation );
 
if ($wgUser->isAllowed('bibmanageredit')){
-   $editLink = Linker::link(
+   $editLink = $linkRenderer->makeLink(
SpecialPage::getTitleFor( 'BibManagerEdit' ),
-   $this->msg( 'bm_list_table_edit' )->escaped(),
+   $this->msg( 'bm_list_table_edit' )->text(),
array (
'class' => 'icon edit',