[MediaWiki-commits] [Gerrit] Migrate TestWikiRC::onRcQuery to ChangesListSpecialPageQuery... - change (mediawiki...WikimediaIncubator)

2016-05-02 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Migrate TestWikiRC::onRcQuery to ChangesListSpecialPageQuery 
hook
..

Migrate TestWikiRC::onRcQuery to ChangesListSpecialPageQuery hook

Also added doc and simplified code a little.

Change-Id: I65d0aa2c63756587808e968025d52ff8e70fc9dd
---
M TestWikiRC.php
M WikimediaIncubator.php
2 files changed, 25 insertions(+), 8 deletions(-)


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

diff --git a/TestWikiRC.php b/TestWikiRC.php
index c7a9cea..874a4b6 100644
--- a/TestWikiRC.php
+++ b/TestWikiRC.php
@@ -18,18 +18,35 @@
return [ $projectvalue, $codevalue ];
}
 
-   static function onRcQuery( &$conds, &$tables, &$join_conds, $opts ) {
+   /*
+* ChangesListSpecialPageQuery hook
+*
+* @param string $pageName
+* @param array $tables
+* @param array $fields
+* @param array $conds
+* @param array $query_options
+* @param array $join_conds
+* @param FormOptions $opts
+* @return bool true
+*/
+   static function onRcQuery( $pageName, &$tables, &$fields, &$conds, 
&$query_options,
+   &$join_conds, FormOptions $opts
+   ) {
global $wmincProjectSite, $wmincTestWikiNamespaces;
+
+   if ( $pageName !== 'Recentchanges' ) {
+   return true;
+   }
+
list( $projectvalue, $codevalue ) = self::getValues();
$prefix = WikimediaIncubator::displayPrefix( $projectvalue, 
$codevalue );
$opts->add( 'rc-testwiki-project', false );
$opts->setValue( 'rc-testwiki-project', $projectvalue );
$opts->add( 'rc-testwiki-code', false );
$opts->setValue( 'rc-testwiki-code', $codevalue );
-   if ( $projectvalue == 'none' || $projectvalue == '' ) {
-   // If "none" is selected, display normal recent changes
-   return true;
-   } elseif ( $projectvalue == $wmincProjectSite['short'] ) {
+
+   if ( $projectvalue == $wmincProjectSite['short'] ) {
// If project site is selected, display all changes 
except test wiki changes
$dbr = wfGetDB( DB_SLAVE );
$conds[] = 'rc_title NOT ' . $dbr->buildLike( 'W', 
$dbr->anyChar(), '/', $dbr->anyString() );
@@ -39,9 +56,9 @@
$conds['rc_namespace'] = $wmincTestWikiNamespaces;
$conds[] = 'rc_title ' . $dbr->buildLike( $prefix . 
'/', $dbr->anyString() ) .
' OR rc_title = ' . $dbr->addQuotes( $prefix );
-   } else {
-   return true;
}
+   // If "none" is selected, display normal recent changes
+
return true;
}
 
diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
index 00ee019..5a44294 100644
--- a/WikimediaIncubator.php
+++ b/WikimediaIncubator.php
@@ -106,7 +106,7 @@
 
 /* Recent Changes */
 $wgAutoloadClasses['TestWikiRC'] = __DIR__ . '/TestWikiRC.php';
-$wgHooks['SpecialRecentChangesQuery'][] = 'TestWikiRC::onRcQuery';
+$wgHooks['ChangesListSpecialPageQuery'][] = 'TestWikiRC::onRcQuery';
 $wgHooks['SpecialRecentChangesPanel'][] = 'TestWikiRC::onRcForm';
 
 /* Automatic pref on account creation */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d0aa2c63756587808e968025d52ff8e70fc9dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] Tweak RefreshLinksJob cache logic - change (mediawiki/core)

2016-05-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Tweak RefreshLinksJob cache logic
..

Tweak RefreshLinksJob cache logic

* Make this actually use the cache beyond edge cases
  by making the page_touched check less strict. The
  final check on the cache timestamp is good enough.
* Log metrics to statsd to give visibility.

Change-Id: I14c14846a7b68d079e1a29c6d50e354a3c1926d6
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 14 insertions(+), 7 deletions(-)


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

diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index c297715..b7653be 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -20,6 +20,7 @@
  * @file
  * @ingroup JobQueue
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Job to update link tables for pages
@@ -149,14 +150,16 @@
$revision = Revision::newFromTitle( $title, false, 
Revision::READ_LATEST );
}
 
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
+
if ( !$revision ) {
+   $stats->increment( 'refreshlinks.rev_not_found' );
$this->setLastError( "Revision not found for 
{$title->getPrefixedDBkey()}" );
return false; // just deleted?
-   }
-
-   if ( !$revision->isCurrent() ) {
+   } elseif ( !$revision->isCurrent() ) {
// If the revision isn't current, there's no point in 
doing a bunch
// of work just to fail at the lockAndGetLatest() check 
later.
+   $stats->increment( 'refreshlinks.rev_not_current' );
$this->setLastError( "Revision {$revision->getId()} is 
not current" );
return false;
}
@@ -188,12 +191,12 @@
 
if ( $page->getLinksTimestamp() > $skewedTimestamp ) {
// Something already updated the backlinks 
since this job was made
+   $stats->increment( 
'refreshlinks.update_skipped' );
return true;
}
 
-   if ( $page->getTouched() >= $skewedTimestamp || 
$opportunistic ) {
-   // Something bumped page_touched since this job 
was made or the cache is
-   // otherwise suspected to be up-to-date. As 
long as the cache rev ID matches
+   if ( $page->getTouched() >= 
$this->params['rootJobTimestamp'] || $opportunistic ) {
+   // Cache is suspected to be up-to-date. As long 
as the cache rev ID matches
// and it reflects the job's triggering change, 
then it is usable.
$parserOutput = 
ParserCache::singleton()->getDirty( $page, $parserOptions );
if ( !$parserOutput
@@ -206,7 +209,9 @@
}
 
// Fetch the current revision and parse it if necessary...
-   if ( !$parserOutput ) {
+   if ( $parserOutput ) {
+   $stats->increment( 'refreshlinks.parser_cached' );
+   } else {
$start = microtime( true );
// Revision ID must be passed to the parser output to 
get revision variables correct
$parserOutput = $content->getParserOutput(
@@ -224,6 +229,7 @@
$parserOutput, $page, $parserOptions, 
$ctime, $revision->getId()
);
}
+   $stats->increment( 'refreshlinks.parser_uncached' );
}
 
$updates = $content->getSecondaryDataUpdates(
@@ -257,6 +263,7 @@
// serialized, it would be OK to update links based on 
older revisions since it
// would eventually get to the latest. Since that is 
not the case (by design),
// only update the link tables to a state matching the 
current revision's output.
+   $stats->increment( 'refreshlinks.rev_cas_failure' );
$this->setLastError( "page_latest changed from 
{$revision->getId()} to $latestNow" );
return false;
}

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

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

[MediaWiki-commits] [Gerrit] Introduce a preference to disable compact language links - change (mediawiki...UniversalLanguageSelector)

2016-05-02 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Introduce a preference to disable compact language links
..

Introduce a preference to disable compact language links

Bug: T133030
Change-Id: If9ec0b8c75c59c62991f0d4bfa99f6d4c9324c30
---
M UniversalLanguageSelector.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
4 files changed, 18 insertions(+), 4 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 7ce5885..ecc8ade 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -74,7 +74,8 @@
 
if ( $wgULSCompactLanguageLinksBetaFeature === false ) {
// Compact language links is a default feature in this 
wiki.
-   return true;
+   // Check user preference
+   return $user->getBoolOption( 'compact-language-links' );
}
 
return false;
@@ -339,6 +340,8 @@
}
 
public static function onGetPreferences( $user, &$preferences ) {
+   global $wgULSCompactLanguageLinksBetaFeature;
+
$preferences['uls-preferences'] = array(
'type' => 'api',
);
@@ -353,6 +356,14 @@
// showing the link when javascript is disabled.
);
 
+   if ( $wgULSCompactLanguageLinksBetaFeature === false ) {
+   $preferences['compact-language-links'] = array(
+   'type' => 'check',
+   'section' => 'rendering/i18n',
+   'label-message' => 
'ext-uls-compact-language-links-preference'
+   );
+   }
+
return true;
}
 
diff --git a/extension.json b/extension.json
index 3655e26..aa79340 100644
--- a/extension.json
+++ b/extension.json
@@ -47,7 +47,8 @@
"LanguageNameSearch": "data/LanguageNameSearch.php"
},
"DefaultUserOptions": {
-   "uls-preferences": ""
+   "uls-preferences": "",
+   "compact-language-links": true
},
"config": {
"@ULSGeoService": "ULS can use geolocation services to suggest 
languages based on the country the user is vising from. Setting this to false 
will prevent builtin geolocation from being used. You can provide your own 
geolocation by setting window.Geo to object which has key \"country_code\" or 
\"country\". If set to true, it will query Wikimedia's geoip service. The 
service should return jsonp that uses the supplied callback parameter.",
diff --git a/i18n/en.json b/i18n/en.json
index e54324a..537c8bf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -70,5 +70,6 @@
"apihelp-ulslocalization-description": "Get the localization of ULS in 
the given language.",
"apihelp-ulslocalization-param-language": "Language code.",
"apihelp-ulslocalization-example-1": "Get Tamil localization",
-   "apihelp-ulslocalization-example-2": "Get Hindi localization"
+   "apihelp-ulslocalization-example-2": "Get Hindi localization",
+   "ext-uls-compact-language-links-preference":  "Show a shorter version 
of the language list, with just the languages that are more relevant to you."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d4c32ea..f5d12ec 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -72,5 +72,6 @@
"apihelp-ulslocalization-description": 
"{{doc-apihelp-description|ulslocalization}}",
"apihelp-ulslocalization-param-language": 
"{{doc-apihelp-param|ulslocalization|language}}\n{{Identical|Language code}}",
"apihelp-ulslocalization-example-1": 
"{{doc-apihelp-example|ulslocalization}}",
-   "apihelp-ulslocalization-example-2": 
"{{doc-apihelp-example|ulslocalization}}"
+   "apihelp-ulslocalization-example-2": 
"{{doc-apihelp-example|ulslocalization}}",
+   "ext-uls-compact-language-links-preference": "Label for compact 
language links user preference"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9ec0b8c75c59c62991f0d4bfa99f6d4c9324c30
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Update jquery.uls from upstream to 19e67015 - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update jquery.uls from upstream to 19e67015
..


Update jquery.uls from upstream to 19e67015

Changes:
* Add kbp

Change-Id: Iacc845c1b186f5a5f93cb5b071c0d628c3212ce3
---
M lib/jquery.uls/src/jquery.uls.data.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/jquery.uls/src/jquery.uls.data.js 
b/lib/jquery.uls/src/jquery.uls.data.js
index 3fb5bdf..8b81025 100644
--- a/lib/jquery.uls/src/jquery.uls.data.js
+++ b/lib/jquery.uls/src/jquery.uls.data.js
@@ -3,5 +3,5 @@
'use strict';
$.uls = $.uls || {};
//noinspection JSHint
-   $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár 
af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa 
Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo
 
innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American
 sign 
language"],"ast":["Latn",["EU"],"asturianu"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar
 
aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak
 Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak 
Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol 
Central"],"be-tarask":["Cyrl",["EU"],"беларуская 
(тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa
 
Betawi"],"bfa":["Latn",["AF"],"Bari"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ
 کپتین 
بلوچی"],"bh":["Deva",["AS"],"भोजपुरी"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa
 
Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া
 
মণিপুরী"],"bqi":["Arab",["AS","ME"],"بختیاری"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Bráhuí"],"brx":["Deva",["AS"],"बड़ो"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga
 Bicolano"],"bug":["Bugi",["AS"],"ᨅᨔ 
ᨕᨘᨁᨗ"],"bxr":["Cyrl",["AS"],"буряад"],"ca":["Latn",["EU"],"català"],"cbk-zam":["Latn",["AS"],"Chavacano
 de 
Zamboanga"],"cdo":["Latn",["AS"],"Mìng-dĕ̤ng-ngṳ̄"],"ce":["Cyrl",["EU"],"нохчийн"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"ᏣᎳᎩ"],"chy":["Latn",["AM"],"Tsetsêhestâhese"],"ciw":["Latn",["AM"],"Ojibwemowin"],"cjy":["cjy-hant"],"cjy-hans":["Hans",["AS"],"晋语(简化字)"],"cjy-hant":["Hant",["AS"],"晉語"],"ckb":["Arab",["ME"],"کوردیی
 ناوەندی"],"cnh":["Latn",["AS"],"Lai 
holh"],"co":["Latn",["EU"],"corsu"],"cps":["Latn",["AS"],"Capiceño"],"cr":["Cans",["AM"],"ᓀᐦᐃᔭᐍᐏᐣ"],"cr-cans":["cr"],"cr-latn":["Latn",["AM"],"Nēhiyawēwin"],"crh":["Latn",["EU"],"qırımtatarca"],"crh-cyrl":["Cyrl",["EU"],"къырымтатарджа"],"crh-latn":["crh"],"cs":["Latn",["EU"],"čeština"],"csb":["Latn",["EU"],"kaszëbsczi"],"cu":["Cyrl",["EU"],"словѣньскъ
 \/ 
ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ"],"cv":["Cyrl",["EU"],"Чӑвашла"],"cy":["Latn",["EU"],"Cymraeg"],"da":["Latn",["EU"],"dansk"],"de-at":["Latn",["EU"],"Österreichisches
 Deutsch"],"de-ch":["Latn",["EU"],"Schweizer 
Hochdeutsch"],"de-formal":["Latn",["EU"],"Deutsch 
(Sie-Form)"],"de":["Latn",["EU"],"Deutsch"],"din":["Latn",["AF"],"Thuɔŋjäŋ"],"diq":["Latn",["EU","AS"],"Zazaki"],"dsb":["Latn",["EU"],"dolnoserbski"],"dtp":["Latn",["AS"],"Dusun
 
Bundu-liwan"],"dty":["Deva",["AS"],"डोटेली"],"dv":["Thaa",["AS"],"ދިވެހިބަސް"],"dz":["Tibt",["AS"],"ཇོང་ཁ"],"ee":["Latn",["AF"],"eʋegbe"],"egl":["Latn",["EU"],"Emiliàn"],"el":["Grek",["EU"],"Ελληνικά"],"eml":["Latn",["EU"],"emiliàn
 e rumagnòl"],"en-ca":["Latn",["AM"],"Canadian 
English"],"en-gb":["Latn",["EU","AS","PA"],"British 
English"],"en":["Latn",["EU","AM","AF","ME","AS","PA","WW"],"English"],"eo":["Latn",["WW"],"Esperanto"],"es-419":["Latn",["AM"],"español
 

[MediaWiki-commits] [Gerrit] Add jam to language list - change (analytics/limn-language-data)

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

Change subject: Add jam to language list
..


Add jam to language list

Change-Id: I56e201b3a440df4afbead29a63fd1bee7fc37669
---
M bash/language_list.txt
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bash/language_list.txt b/bash/language_list.txt
index 34df14c..273a270 100644
--- a/bash/language_list.txt
+++ b/bash/language_list.txt
@@ -1 +1 @@
-aa ab ady ace af ak als am ang an arc ar arz ast as av ay az azb bar bat_smg 
ba bcl be_x_old be bg bh bi bjn bm bn bo bpy br bs bug bxr ca cbk_zam cdo ceb 
ce cho chr ch chy ckb co crh cr csb cs cu cv cy da de diq dsb dv dz ee el eml 
en eo es et eu ext fa ff fiu_vro fi fj fo frp frr fr fur fy gag gan ga gd glk 
gl gn gom got gu gv hak ha haw he hif hi ho hr hsb ht hu hy hz ia id ie ig ii 
ik ilo io is it iu ja jbo jv kaa kab ka kbd kg ki kj kk kl km kn koi ko krc kr 
ksh ks ku kv kw ky lad la lbe lb lez lg lij li lmo ln lo lrc ltg lt lv mai 
map_bms mdf mg mhr mh min mi mk ml mn mo mrj mr ms mt mus mwl myv my mzn nah 
nap na nds_nl nds ne new ng nl nn nov no nrm nso nv ny oc om or os pag pam pap 
pa pcd pdc pfl pih pi pl pms pnb pnt ps pt qu rm rmy rn roa_rup roa_tara ro rue 
ru rw sah sa scn sco sc sd se sg sh simple si sk sl sm sn so sq srn sr ss stq 
st su sv sw szl ta tet te tg th ti tk tl tn to tpi tr ts tt tum tw tyv ty udm 
ug uk ur uz vec vep ve vi vls vo war wa wo wuu xal xh xmf yi yo za zea 
zh_classical zh_min_nan zh_yue zh zu
+aa ab ady ace af ak als am ang an arc ar arz ast as av ay az azb bar bat_smg 
ba bcl be_x_old be bg bh bi bjn bm bn bo bpy br bs bug bxr ca cbk_zam cdo ceb 
ce cho chr ch chy ckb co crh cr csb cs cu cv cy da de diq dsb dv dz ee el eml 
en eo es et eu ext fa ff fiu_vro fi fj fo frp frr fr fur fy gag gan ga gd glk 
gl gn gom got gu gv hak ha haw he hif hi ho hr hsb ht hu hy hz ia id ie ig ii 
ik ilo io is it iu ja jam jbo jv kaa kab ka kbd kg ki kj kk kl km kn koi ko krc 
kr ksh ks ku kv kw ky lad la lbe lb lez lg lij li lmo ln lo lrc ltg lt lv mai 
map_bms mdf mg mhr mh min mi mk ml mn mo mrj mr ms mt mus mwl myv my mzn nah 
nap na nds_nl nds ne new ng nl nn nov no nrm nso nv ny oc om or os pag pam pap 
pa pcd pdc pfl pih pi pl pms pnb pnt ps pt qu rm rmy rn roa_rup roa_tara ro rue 
ru rw sah sa scn sco sc sd se sg sh simple si sk sl sm sn so sq srn sr ss stq 
st su sv sw szl ta tet te tg th ti tk tl tn to tpi tr ts tt tum tw tyv ty udm 
ug uk ur uz vec vep ve vi vls vo war wa wo wuu xal xh xmf yi yo za zea 
zh_classical zh_min_nan zh_yue zh zu

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56e201b3a440df4afbead29a63fd1bee7fc37669
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-language-data
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add jam to language list - change (analytics/limn-language-data)

2016-05-02 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Add jam to language list
..

Add jam to language list

Change-Id: I56e201b3a440df4afbead29a63fd1bee7fc37669
---
M bash/language_list.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-language-data 
refs/changes/82/286582/1

diff --git a/bash/language_list.txt b/bash/language_list.txt
index 34df14c..273a270 100644
--- a/bash/language_list.txt
+++ b/bash/language_list.txt
@@ -1 +1 @@
-aa ab ady ace af ak als am ang an arc ar arz ast as av ay az azb bar bat_smg 
ba bcl be_x_old be bg bh bi bjn bm bn bo bpy br bs bug bxr ca cbk_zam cdo ceb 
ce cho chr ch chy ckb co crh cr csb cs cu cv cy da de diq dsb dv dz ee el eml 
en eo es et eu ext fa ff fiu_vro fi fj fo frp frr fr fur fy gag gan ga gd glk 
gl gn gom got gu gv hak ha haw he hif hi ho hr hsb ht hu hy hz ia id ie ig ii 
ik ilo io is it iu ja jbo jv kaa kab ka kbd kg ki kj kk kl km kn koi ko krc kr 
ksh ks ku kv kw ky lad la lbe lb lez lg lij li lmo ln lo lrc ltg lt lv mai 
map_bms mdf mg mhr mh min mi mk ml mn mo mrj mr ms mt mus mwl myv my mzn nah 
nap na nds_nl nds ne new ng nl nn nov no nrm nso nv ny oc om or os pag pam pap 
pa pcd pdc pfl pih pi pl pms pnb pnt ps pt qu rm rmy rn roa_rup roa_tara ro rue 
ru rw sah sa scn sco sc sd se sg sh simple si sk sl sm sn so sq srn sr ss stq 
st su sv sw szl ta tet te tg th ti tk tl tn to tpi tr ts tt tum tw tyv ty udm 
ug uk ur uz vec vep ve vi vls vo war wa wo wuu xal xh xmf yi yo za zea 
zh_classical zh_min_nan zh_yue zh zu
+aa ab ady ace af ak als am ang an arc ar arz ast as av ay az azb bar bat_smg 
ba bcl be_x_old be bg bh bi bjn bm bn bo bpy br bs bug bxr ca cbk_zam cdo ceb 
ce cho chr ch chy ckb co crh cr csb cs cu cv cy da de diq dsb dv dz ee el eml 
en eo es et eu ext fa ff fiu_vro fi fj fo frp frr fr fur fy gag gan ga gd glk 
gl gn gom got gu gv hak ha haw he hif hi ho hr hsb ht hu hy hz ia id ie ig ii 
ik ilo io is it iu ja jam jbo jv kaa kab ka kbd kg ki kj kk kl km kn koi ko krc 
kr ksh ks ku kv kw ky lad la lbe lb lez lg lij li lmo ln lo lrc ltg lt lv mai 
map_bms mdf mg mhr mh min mi mk ml mn mo mrj mr ms mt mus mwl myv my mzn nah 
nap na nds_nl nds ne new ng nl nn nov no nrm nso nv ny oc om or os pag pam pap 
pa pcd pdc pfl pih pi pl pms pnb pnt ps pt qu rm rmy rn roa_rup roa_tara ro rue 
ru rw sah sa scn sco sc sd se sg sh simple si sk sl sm sn so sq srn sr ss stq 
st su sv sw szl ta tet te tg th ti tk tl tn to tpi tr ts tt tum tw tyv ty udm 
ug uk ur uz vec vep ve vi vls vo war wa wo wuu xal xh xmf yi yo za zea 
zh_classical zh_min_nan zh_yue zh zu

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56e201b3a440df4afbead29a63fd1bee7fc37669
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-language-data
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] registry: Add Patois Wiki - change (mediawiki...cxserver)

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

Change subject: registry: Add Patois Wiki
..


registry: Add Patois Wiki

https://jam.wikipedia.org is activated recently.

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

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



diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml
index a064c2a..c0cf11b 100644
--- a/registry.wikimedia.yaml
+++ b/registry.wikimedia.yaml
@@ -109,6 +109,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
@@ -391,6 +392,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
diff --git a/registry.yaml b/registry.yaml
index 39733d9..63d98d5 100644
--- a/registry.yaml
+++ b/registry.yaml
@@ -109,6 +109,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
@@ -391,6 +392,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic199dd4939c03cb067b8ce247ea98a93d3842fcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update Vikidia versions - change (pywikibot/core)

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

Change subject: Update Vikidia versions
..


Update Vikidia versions

This includes closed and technical wikis for maintenance purpose.

Change-Id: I0f31bcf886aadbe4ed69cb7fd9d2c9060d6caef7
---
M pywikibot/families/vikidia_family.py
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/families/vikidia_family.py 
b/pywikibot/families/vikidia_family.py
index 0a88744..4206350 100644
--- a/pywikibot/families/vikidia_family.py
+++ b/pywikibot/families/vikidia_family.py
@@ -14,7 +14,10 @@
 name = 'vikidia'
 domain = 'vikidia.org'
 
-codes = ['ca', 'en', 'es', 'eu', 'fr', 'it', 'ru', 'scn']
+codes = ['ca', 'de', 'en', 'es', 'eu', 'fr', 'it', 'ru', 'scn']
+
+# Sites we want to edit but not count as real languages
+test_codes = ['central', 'test']
 
 def protocol(self, code):
 """Return https as the protocol for this family."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f31bcf886aadbe4ed69cb7fd9d2c9060d6caef7
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Linedwell 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] registry: Add Patois Wiki - change (mediawiki...cxserver)

2016-05-02 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: registry: Add Patois Wiki
..

registry: Add Patois Wiki

https://jam.wikipedia.org is activated recently.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/81/286581/1

diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml
index a064c2a..c0cf11b 100644
--- a/registry.wikimedia.yaml
+++ b/registry.wikimedia.yaml
@@ -109,6 +109,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
@@ -391,6 +392,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
diff --git a/registry.yaml b/registry.yaml
index 39733d9..63d98d5 100644
--- a/registry.yaml
+++ b/registry.yaml
@@ -109,6 +109,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa
@@ -391,6 +392,7 @@
   - it
   - iu
   - ja
+  - jam
   - jbo
   - jv
   - kaa

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic199dd4939c03cb067b8ce247ea98a93d3842fcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] Further normalise keys to find titles with special characters - change (mediawiki...TitleKey)

2016-05-02 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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

Change subject: Further normalise keys to find titles with special characters
..

Further normalise keys to find titles with special characters

Using iconv, all special characters are translitered to ASCII.
Then, all non-alphanumerical, non-whitespace characters are removed.
This allows for many new kinds of relevant matches in languages
such as Spanish where diacritics are common.

For example, searching "avion" now matches "Avión".

Bug: T22097
Change-Id: I80e8cf68b213a1593197cbfe6b9ab7de0184de0b
---
M TitleKey_body.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/TitleKey_body.php b/TitleKey_body.php
index 63cf769..319b7f4 100644
--- a/TitleKey_body.php
+++ b/TitleKey_body.php
@@ -37,10 +37,13 @@
static function setBatchKeys( $titles ) {
$rows = array();
foreach( $titles as $id => $title ) {
+   $key = $title->getText();
+   $key = iconv( 'UTF-8', 'ASCII//TRANSLIT', $key );
+   $key = preg_replace( '#[^-\w\s]+#', '', $key ); // 
Remove unwanted chars
$rows[] = array(
'tk_page' => $id,
'tk_namespace' => $title->getNamespace(),
-   'tk_key' => self::normalize( $title->getText() 
),
+   'tk_key' => self::normalize( $key ),
);
}
$db = wfGetDB( DB_MASTER );
@@ -53,6 +56,8 @@
// Normalization...
static function normalize( $text ) {
global $wgContLang;
+   $text = iconv( 'UTF-8', 'ASCII//TRANSLIT', $text );
+   $text = preg_replace( '#[^-\w\s]+#', '', $text ); // Remove 
unwanted chars
return $wgContLang->caseFold( $text );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80e8cf68b213a1593197cbfe6b9ab7de0184de0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleKey
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone 

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


[MediaWiki-commits] [Gerrit] Support hash fragments in wfAppendQuery() - change (mediawiki/core)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Support hash fragments in wfAppendQuery()
..

Support hash fragments in wfAppendQuery()

Change-Id: Icb99d5479836fea25a47451b5a758dd71f642f71
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
2 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/286579/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 5c42bc2..b5de66f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -501,12 +501,26 @@
$query = wfArrayToCgi( $query );
}
if ( $query != '' ) {
+   // Remove the fragment, if there is one
+   $fragment = false;
+   $hashPos = strpos( $url, '#' );
+   if ( $hashPos !== false ) {
+   $fragment = substr( $url, $hashPos );
+   $url = substr( $url, 0, $hashPos );
+   }
+
+   // Add parameter
if ( false === strpos( $url, '?' ) ) {
$url .= '?';
} else {
$url .= '&';
}
$url .= $query;
+
+   // Put the fragment back
+   if ( $fragment !== false ) {
+   $url .= $fragment;
+   }
}
return $url;
 }
diff --git a/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php 
b/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
index eb9adea..bb71610 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
@@ -61,6 +61,18 @@
'baz=quux=baz',

'http://www.example.org/index.php?foo=bar=quux=baz',
'Modify query string'
+   ],
+   [
+   'http://www.example.org/index.php#baz',
+   'foo=bar',
+   'http://www.example.org/index.php?foo=bar#baz',
+   'URL with fragment'
+   ],
+   [
+   'http://www.example.org/index.php?foo=bar#baz',
+   'quux=blah',
+   
'http://www.example.org/index.php?foo=bar=blah#baz',
+   'URL with query string and fragment'
]
];
}

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

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

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki... - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged.

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

CiviCRM submodule commit

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c1227e4226e5c2c379245b85e1a6f202da2577a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove obsolete 'https -> http' rewrite for IRC notifications - change (operations/mediawiki-config)

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

Change subject: Remove obsolete 'https -> http' rewrite for IRC notifications
..


Remove obsolete 'https -> http' rewrite for IRC notifications

This was added when HTTPS was not the default to avoid the urls in
IRC notifications from varying on the protocol of the incoming request
(e.g. when users could opt-in to HTTPS).

Since HTTPS is the default everywhere, this regex no longer matches.
Even if it did work, we shouldn't emit HTTP urls anywhere as they just
get redirected to HTTPS with a 301.

Bug: T122933
Change-Id: I152aa757678f6934b91ea5caf4f1a218f275d471
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2ffd094..d6351b7 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1169,12 +1169,6 @@
 
 $wgBrowserBlackList[] = '/^Lynx/';
 
-if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 
$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
-   // New HTTPS service on regular URLs
-   $wgInternalServer = $wgServer; // Keep this as HTTP for IRC 
notifications (T31925)
-   $wgServer = preg_replace( '/^http:/', 'https:', $wgServer );
-}
-
 $wgHiddenPrefs[] = 'prefershttps'; // T91352, T102245
 
 if ( isset( $_REQUEST['captchabypass'] ) && $_REQUEST['captchabypass'] == 
$wmgCaptchaPassword ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I152aa757678f6934b91ea5caf4f1a218f275d471
Gerrit-PatchSet: 12
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Greg Grossmeier 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ParserCache: Don't try to save to nothing if disabled - change (mediawiki/core)

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

Change subject: ParserCache: Don't try to save to nothing if disabled
..


ParserCache: Don't try to save to nothing if disabled

If the ParserCache is disabled via $wgParserCacheType = CACHE_NONE,
don't bother trying to save anything because it won't do anything.

This also removes the misleading "Saved in parser cache" HTML comment
from the rendered output since it isn't being saved at all.

Change-Id: I5603d2b2866f0079cdcd837b1f1a4efc00bc8ed9
---
M includes/parser/ParserCache.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php
index 916cfc2..f77a30f 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -257,7 +257,7 @@
 */
public function save( $parserOutput, $page, $popts, $cacheTime = null, 
$revId = null ) {
$expire = $parserOutput->getCacheExpiry();
-   if ( $expire > 0 ) {
+   if ( $expire > 0 && !$this->mMemc instanceof EmptyBagOStuff ) {
$cacheTime = $cacheTime ?: wfTimestampNow();
if ( !$revId ) {
$revision = $page->getRevision();
@@ -297,7 +297,7 @@
'ParserCacheSaveComplete',
[ $this, $parserOutput, $page->getTitle(), 
$popts, $revId ]
);
-   } else {
+   } elseif ( $expire <= 0 ) {
wfDebug( "Parser output was marked as uncacheable and 
has not been saved.\n" );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5603d2b2866f0079cdcd837b1f1a4efc00bc8ed9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace mark-as-read-on-click with ?markasread= URL parameter - change (mediawiki...Echo)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Replace mark-as-read-on-click with ?markasread= URL parameter
..

Replace mark-as-read-on-click with ?markasread= URL parameter

Notifications were being marked as read in response to a click event
in JavaScript, but that causes a jarring effect in the UI, and it's
not reliable (the browser could abort the AJAX request).

Instead, add ?markasread=XYZ to the end of every primary link URL,
where XYZ is the event ID.

Bug: T133975
Change-Id: I8047d121584b43e6172463a50ad0e0de5f7fa73c
---
M Hooks.php
M includes/formatters/EchoFlyoutFormatter.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/SpecialNotificationsFormatter.php
M includes/mapper/NotificationMapper.php
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
6 files changed, 73 insertions(+), 15 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index e687fc6..7c8c2eb 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -762,11 +762,11 @@
// @todo should this really be here?
$subtractAlerts = 0;
$subtractMessages = 0;
+   $eventIds = array();
if ( $title->getArticleID() ) {
-   $mapper = new EchoTargetPageMapper();
-   $fetchedTargetPages = $mapper->fetchByUserPageId( 
$user, $title->getArticleID() );
+   $targetPageMapper = new EchoTargetPageMapper();
+   $fetchedTargetPages = 
$targetPageMapper->fetchByUserPageId( $user, $title->getArticleID() );
if ( $fetchedTargetPages ) {
-   $eventIds = array();
$attribManager = 
EchoAttributeManager::newFromGlobalVars();
/* @var EchoTargetPage[] $targetPages */
foreach ( $fetchedTargetPages as $id => 
$targetPages ) {
@@ -776,19 +776,35 @@
$targetPages[0]->getEventType()
);
if ( $section === 
EchoAttributeManager::MESSAGE ) {
-   $subtractMessages += 1;
+   $subtractMessages++;
} else {
// ALERT
-   $subtractAlerts += 1;
+   $subtractAlerts++;
}
$eventIds[] = $id;
}
-   DeferredUpdates::addCallableUpdate( function () 
use ( $user, $eventIds ) {
-   $notifUser = 
MWEchoNotifUser::newFromUser( $user );
-   $notifUser->markRead( $eventIds );
-   } );
}
}
+   // Attempt to mark as read the event ID in the ?markasread= 
parameter, if present
+   $markAsReadId = $sk->getOutput()->getRequest()->getInt( 
'markasread' );
+   if ( $markAsReadId !== 0 && !in_array( $markAsReadId, $eventIds 
) ) {
+   $notifMapper = new EchoNotificationMapper();
+   $notif = $notifMapper->fetchByUserEvent( $user, 
$markAsReadId );
+   if ( $notif && !$notif->getReadTimestamp() ) {
+   if ( $notif->getEvent()->getSection() === 
EchoAttributeManager::MESSAGE ) {
+   $subtractMessages++;
+   } else {
+   $subtractAlerts++;
+   }
+   $eventIds[] = $markAsReadId;
+   }
+   }
+   if ( $eventIds ) {
+   DeferredUpdates::addCallableUpdate( function () use ( 
$user, $eventIds ) {
+   $notifUser = MWEchoNotifUser::newFromUser( 
$user );
+   $notifUser->markRead( $eventIds );
+   } );
+   }
 
// Add a "My notifications" item to personal URLs
$notifUser = MWEchoNotifUser::newFromUser( $user );
diff --git a/includes/formatters/EchoFlyoutFormatter.php 
b/includes/formatters/EchoFlyoutFormatter.php
index d94fc27..63fe16b 100644
--- a/includes/formatters/EchoFlyoutFormatter.php
+++ b/includes/formatters/EchoFlyoutFormatter.php
@@ -50,7 +50,7 @@
) . "\n";
 
// Add the primary link afterwards, if it has one
-   $primaryLink = 

[MediaWiki-commits] [Gerrit] Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki... - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

CiviCRM submodule commit

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/78/286578/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c1227e4226e5c2c379245b85e1a6f202da2577a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CiviCRM submodule update - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged.

Change subject: CiviCRM submodule update
..


CiviCRM submodule update

5786fd6 Fix PHP version check to stop 7.0 breakage
55b37f0 CRM-18193 default log_conn values for interacting with mysql outside of 
CiviCRM.
9f835d7 Updated MySql trigger code

Change-Id: I22b4732abd62dd6e9f8ac4664641c486ccdd05fb
---
M civicrm
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/civicrm b/civicrm
index cc49c17..5786fd6 16
--- a/civicrm
+++ b/civicrm
-Subproject commit cc49c172ff4edb355a89fb3dfe094793f65cc5fd
+Subproject commit 5786fd6c80923bd9b2d153d8f08c62ac1e06badd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22b4732abd62dd6e9f8ac4664641c486ccdd05fb
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove obsolete ocwiki hack - change (operations/mediawiki-config)

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

Change subject: Remove obsolete ocwiki hack
..


Remove obsolete ocwiki hack

We use Preprocessor_Hash everywhere now, so it's not necessary to
configure it specially for ocwiki.

Change-Id: Ie4554a8f703728067d250f143d263dfd291d4d53
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7227407..ecf6d44 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11373,8 +11373,6 @@
'default' => defined( 'HHVM_VERSION' )
? [ 'class' => 'Parser', 'preprocessorClass' => 
'Preprocessor_Hash' ]
: [ 'class' => 'Parser', 'preprocessorClass' => 
'Preprocessor_DOM' ],
-   // Workaround for the issue discussed at 
https://oc.wikipedia.org/wiki/Discussion_Utilizaire:Midom -- TS
-   'ocwiki' => [ 'class' => 'Parser', 'preprocessorClass' => 
'Preprocessor_Hash' ],
 ],
 
 # wgFavicon @{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4554a8f703728067d250f143d263dfd291d4d53
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] switch irc.wm.org from argon to kraz - change (operations/dns)

2016-05-02 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: switch irc.wm.org from argon to kraz
..


switch irc.wm.org from argon to kraz

IRCd is running and ircecho bot is now working
on jessie after I5a7809fd3320a9c6 and I60a4d2455e8e728b38.

The old server will be untouched for a grace period
and is still reachable as argon.wikimedia.org.

MW appservers are sending RC data to both servers, thanks to Krenair.

Bug: T123729
Bug: T105422
Change-Id: Ib08e042f8d3f311e979654bcb0c92caeb8a2b23d
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 6e5e165..e2c1cb1 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -489,7 +489,7 @@
 icinga  1H  IN CNAMEneon
 
 integration 600 IN DYNA geoip!misc-addrs
-irc 1H  IN CNAMEargon
+irc 1H  IN CNAMEkraz
 
 ldap-eqiad  1H  IN CNAMEseaborgium
 ldap-codfw  1H  IN CNAMEserpens

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib08e042f8d3f311e979654bcb0c92caeb8a2b23d
Gerrit-PatchSet: 4
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CiviCRM submodule update - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CiviCRM submodule update
..

CiviCRM submodule update

5786fd6 Fix PHP version check to stop 7.0 breakage
55b37f0 CRM-18193 default log_conn values for interacting with mysql outside of 
CiviCRM.
9f835d7 Updated MySql trigger code

Change-Id: I22b4732abd62dd6e9f8ac4664641c486ccdd05fb
---
M civicrm
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/76/286576/1

diff --git a/civicrm b/civicrm
index cc49c17..5786fd6 16
--- a/civicrm
+++ b/civicrm
-Subproject commit cc49c172ff4edb355a89fb3dfe094793f65cc5fd
+Subproject commit 5786fd6c80923bd9b2d153d8f08c62ac1e06badd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22b4732abd62dd6e9f8ac4664641c486ccdd05fb
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17983 Fix error in data type as found by Dave - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17983 Fix error in data type as found by Dave
..

CRM-17983 Fix error in data type as found by Dave

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I2e1b0e2e879c009db5f8d89a761ae32836cda342
---
M CRM/Contact/Page/AJAX.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/70/286570/1

diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php
index a9224a9..022bf2d 100644
--- a/CRM/Contact/Page/AJAX.php
+++ b/CRM/Contact/Page/AJAX.php
@@ -838,7 +838,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'mysqlOrderByDirection') : 
'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'MysqlOrderByDirection') : 
'asc';
 
 $params = array();
 if ($sort && $sortOrder) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e1b0e2e879c009db5f8d89a761ae32836cda342
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Bare minimum patch for 4.6 - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Bare minimum patch for 4.6
..

Bare minimum patch for 4.6

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I8e532a6f2399510a124b361157ba181272fea989
---
M CRM/Activity/Page/AJAX.php
M CRM/Batch/Page/AJAX.php
M CRM/Financial/Page/AJAX.php
M CRM/Group/Page/AJAX.php
M CRM/Mailing/Page/AJAX.php
5 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/71/286571/1

diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php
index 63f59b2..725f8e2 100644
--- a/CRM/Activity/Page/AJAX.php
+++ b/CRM/Activity/Page/AJAX.php
@@ -55,7 +55,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'MysqlOrderByDirection') : 
'asc';
 
 $params = $_POST;
 if ($sort && $sortOrder) {
@@ -96,7 +96,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'MysqlOrderByDirection') : 
'asc';
 
 $params = $_POST;
 //CRM-14466 initialize variable to avoid php notice
@@ -136,7 +136,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : 'relation';
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'MysqlOrderByDirection') : 
'asc';
 
 $params = $_POST;
 if ($sort && $sortOrder) {
@@ -202,7 +202,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : 'relation';
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'MysqlOrderByDirection') : 
'asc';
 
 $params = $_POST;
 if ($sort && $sortOrder) {
@@ -472,7 +472,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 

[MediaWiki-commits] [Gerrit] CRM-17983, CRM-18401 - Swap loose/strict escaping - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17983, CRM-18401 - Swap loose/strict escaping
..

CRM-17983, CRM-18401 - Swap loose/strict escaping

The old names suggested that loose checking (`MysqlColumnName`) should be
the norm, and strict checking (`MysqlColumnNameStrict`) the exception.
Rather, strict should be the norm.

This also has a functional affect switching the new
`defaultSortAndPagerParams()` to use strict behavior.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I24fd504d6bd6391158467705ab1634a9f71fffd8
---
M CRM/Utils/Rule.php
M CRM/Utils/Type.php
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/66/286566/1

diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php
index 465273a..bc06ec4 100644
--- a/CRM/Utils/Rule.php
+++ b/CRM/Utils/Rule.php
@@ -94,7 +94,7 @@
*
* @return bool
*/
-  public static function mysqlColumnName($str) {
+  public static function mysqlColumnNameLoose($str) {
 //  check the length.
 // This check can be incorrect for the . format, which can 
be
 // a problem.
@@ -112,7 +112,7 @@
*
* @return bool
*/
-  public static function mysqlColumnNameStrict($str) {
+  public static function mysqlColumnName($str) {
 // Check the length.
 if (empty($str) || strlen($str) > 64) {
   return FALSE;
diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php
index 37e9a68..20e91e3 100644
--- a/CRM/Utils/Type.php
+++ b/CRM/Utils/Type.php
@@ -246,20 +246,20 @@
 }
 break;
 
-  case 'MysqlColumnName':
-if (CRM_Utils_Rule::MysqlColumnName($data)) {
+  case 'MysqlColumnNameLoose':
+if (CRM_Utils_Rule::mysqlColumnNameLoose($data)) {
   return str_replace('`', '', $data);
 }
 break;
 
-  case 'MysqlColumnNameStrict':
-if (CRM_Utils_Rule::MysqlColumnNameStrict($data)) {
+  case 'MysqlColumnName':
+if (CRM_Utils_Rule::mysqlColumnName($data)) {
   return $data;
 }
 break;
 
   case 'MysqlOrderByDirection':
-if (CRM_Utils_Rule::MysqlOrderByDirection($data)) {
+if (CRM_Utils_Rule::mysqlOrderByDirection($data)) {
   return $data;
 }
 break;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24fd504d6bd6391158467705ab1634a9f71fffd8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Totten 

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


[MediaWiki-commits] [Gerrit] CRM-18469, CRM-17984 - getTree regression on multiple intege... - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18469, CRM-17984 - getTree regression on multiple integers 
separated by the cnrtl char
..

CRM-18469, CRM-17984 - getTree regression on multiple integers separated by the 
cnrtl char

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: Iad6caf3f7cbc19f57293584901b7ff821cf15694
---
M CRM/Core/BAO/CustomGroup.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/69/286569/1

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index 5daddbc..268d901 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -350,7 +350,12 @@
 $subTypes = array();
   }
   else {
-$subTypes = explode(',', $subTypes);
+if (stristr(',', $subTypes)) {
+  $subTypes = explode(',', $subTypes);
+}
+else {
+  $subTypes = explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($subTypes, 
CRM_Core_DAO::VALUE_SEPARATOR));
+}
   }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad6caf3f7cbc19f57293584901b7ff821cf15694
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Minimal check to validate relationship params. - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Minimal check to validate relationship params.
..

Minimal check to validate relationship params.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Conflicts:
CRM/Contact/Page/AJAX.php

Change-Id: Iabbfc2046f7f8d1b8484cd3db1bd7bf10ff948c1
---
M CRM/Core/Page/AJAX.php
M CRM/Utils/Rule.php
M CRM/Utils/Type.php
3 files changed, 93 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/64/286564/1

diff --git a/CRM/Core/Page/AJAX.php b/CRM/Core/Page/AJAX.php
index 7d6604e..69c98b5 100644
--- a/CRM/Core/Page/AJAX.php
+++ b/CRM/Core/Page/AJAX.php
@@ -214,4 +214,28 @@
 header("Cache-Control: max-age=$ttl, public");
   }
 
+  public static function defaultSortAndPagerParams($defaultOffset = 0, 
$defaultRowCount = 25, $defaultSort = NULL, $defaultsortOrder = 'asc') {
+$params = array();
+
+$sortMapper = array();
+foreach ($_GET['columns'] as $key => $value) {
+  $sortMapper[$key] = CRM_Utils_Type::escape($value['data'], 
'MysqlColumnName');
+};
+
+$offset = isset($_GET['start']) ? CRM_Utils_Type::escape($_GET['start'], 
'Integer') : $defaultOffset;
+$rowCount = isset($_GET['length']) ? 
CRM_Utils_Type::escape($_GET['length'], 'Integer') : $defaultRowCount;
+// Why is the number of order by columns limited to 1?
+$sort = isset($_GET['order'][0]['column']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_GET['order'][0]['column'], 
'Integer'), $sortMapper) : $defaultSort;
+$sortOrder = isset($_GET['order'][0]['dir']) ? 
CRM_Utils_Type::escape($_GET['order'][0]['dir'], 'MysqlOrderByDirection') : 
$defaultsortOrder;
+
+if ($sort) {
+  $params['sortBy'] = "`{$sort}` {$sortOrder}";
+}
+
+$params['page'] = ($offset / $rowCount) + 1;
+$params['rp'] = $rowCount;
+
+return $params;
+  }
+
 }
diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php
index 9529007..4eb1512 100644
--- a/CRM/Utils/Rule.php
+++ b/CRM/Utils/Rule.php
@@ -94,6 +94,57 @@
*
* @return bool
*/
+  public static function MysqlColumnName($str) {
+//  check the length.
+// This check can be incorrect for the . format, which can 
be
+// a problem.
+if (empty($str) || strlen($str) > 64) {
+  return FALSE;
+}
+
+return TRUE;
+  }
+
+  /**
+   * @param $str
+   *
+   * @return bool
+   */
+  public static function MysqlColumnNameStrict($str) {
+//  check the length.
+if (empty($str) || strlen($str) > 64) {
+  return FALSE;
+}
+
+// make sure it only contains valid characters (alphanumeric and 
underscores)
+// This check doesn't support the . format, which can be
+// a problem.
+// @todo : check with the standards 
(http://dev.mysql.com/doc/refman/5.5/en/identifiers.html)
+if (!preg_match('/^[\w_]+$/i', $str)) {
+  return FALSE;
+}
+
+return TRUE;
+  }
+
+  /**
+   * @param $str
+   *
+   * @return bool
+   */
+  public static function MysqlOrderByDirection($str) {
+if (!preg_match('/^(asc|desc)$/i', $str)) {
+  return FALSE;
+}
+
+return TRUE;
+  }
+
+  /**
+   * @param $str
+   *
+   * @return bool
+   */
   public static function qfVariable($str) {
 // check length etc
 //if ( empty( $str ) || strlen( $str ) > 31 ) {
diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php
index 81efac8..37e9a68 100644
--- a/CRM/Utils/Type.php
+++ b/CRM/Utils/Type.php
@@ -246,6 +246,24 @@
 }
 break;
 
+  case 'MysqlColumnName':
+if (CRM_Utils_Rule::MysqlColumnName($data)) {
+  return str_replace('`', '', $data);
+}
+break;
+
+  case 'MysqlColumnNameStrict':
+if (CRM_Utils_Rule::MysqlColumnNameStrict($data)) {
+  return $data;
+}
+break;
+
+  case 'MysqlOrderByDirection':
+if (CRM_Utils_Rule::MysqlOrderByDirection($data)) {
+  return $data;
+}
+break;
+
   default:
 CRM_Core_Error::fatal(
   $type . " is not a recognised (camel cased) data type."

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

[MediaWiki-commits] [Gerrit] CRM-17983, CRM-18401. Input validation. - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17983, CRM-18401. Input validation.
..

CRM-17983, CRM-18401. Input validation.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: Ie25ff222a66fd360a9077ec824fbc933365c6cc4
---
M CRM/Utils/Rule.php
1 file changed, 15 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/65/286565/1

diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php
index 4eb1512..465273a 100644
--- a/CRM/Utils/Rule.php
+++ b/CRM/Utils/Rule.php
@@ -94,7 +94,7 @@
*
* @return bool
*/
-  public static function MysqlColumnName($str) {
+  public static function mysqlColumnName($str) {
 //  check the length.
 // This check can be incorrect for the . format, which can 
be
 // a problem.
@@ -106,21 +106,23 @@
   }
 
   /**
+   * Validate an acceptable column name for sorting results.
+   *
* @param $str
*
* @return bool
*/
-  public static function MysqlColumnNameStrict($str) {
-//  check the length.
+  public static function mysqlColumnNameStrict($str) {
+// Check the length.
 if (empty($str) || strlen($str) > 64) {
   return FALSE;
 }
 
-// make sure it only contains valid characters (alphanumeric and 
underscores)
-// This check doesn't support the . format, which can be
-// a problem.
-// @todo : check with the standards 
(http://dev.mysql.com/doc/refman/5.5/en/identifiers.html)
-if (!preg_match('/^[\w_]+$/i', $str)) {
+// Make sure it only contains valid characters (alphanumeric and 
underscores).
+//
+// MySQL permits column names that don't match this (eg containing spaces),
+// but CiviCRM won't create those ...
+if (!preg_match('/^[\w_]+(\.[\w_]+)?$/i', $str)) {
   return FALSE;
 }
 
@@ -128,11 +130,14 @@
   }
 
   /**
-   * @param $str
+   * Validate that a string is ASC or DESC.
*
+   * Empty string should be treated as invalid and ignored => default = ASC.
+   *
+   * @param $str
* @return bool
*/
-  public static function MysqlOrderByDirection($str) {
+  public static function mysqlOrderByDirection($str) {
 if (!preg_match('/^(asc|desc)$/i', $str)) {
   return FALSE;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie25ff222a66fd360a9077ec824fbc933365c6cc4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Cleanup to have same behaviour as 4.7. - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Cleanup to have same behaviour as 4.7.
..

Cleanup to have same behaviour as 4.7.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I2ba9d74ef3b9066ad8f021bd90a7e161777f9771
---
M CRM/Core/Page/AJAX.php
M CRM/Utils/Rule.php
M CRM/Utils/Type.php
3 files changed, 13 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/73/286573/1

diff --git a/CRM/Core/Page/AJAX.php b/CRM/Core/Page/AJAX.php
index 69c98b5..3116e26 100644
--- a/CRM/Core/Page/AJAX.php
+++ b/CRM/Core/Page/AJAX.php
@@ -219,17 +219,17 @@
 
 $sortMapper = array();
 foreach ($_GET['columns'] as $key => $value) {
-  $sortMapper[$key] = CRM_Utils_Type::escape($value['data'], 
'MysqlColumnName');
+  $sortMapper[$key] = CRM_Utils_Type::validate($value['data'], 
'MysqlColumnName');
 };
 
-$offset = isset($_GET['start']) ? CRM_Utils_Type::escape($_GET['start'], 
'Integer') : $defaultOffset;
-$rowCount = isset($_GET['length']) ? 
CRM_Utils_Type::escape($_GET['length'], 'Integer') : $defaultRowCount;
+$offset = isset($_GET['start']) ? CRM_Utils_Type::validate($_GET['start'], 
'Integer') : $defaultOffset;
+$rowCount = isset($_GET['length']) ? 
CRM_Utils_Type::validate($_GET['length'], 'Integer') : $defaultRowCount;
 // Why is the number of order by columns limited to 1?
-$sort = isset($_GET['order'][0]['column']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_GET['order'][0]['column'], 
'Integer'), $sortMapper) : $defaultSort;
-$sortOrder = isset($_GET['order'][0]['dir']) ? 
CRM_Utils_Type::escape($_GET['order'][0]['dir'], 'MysqlOrderByDirection') : 
$defaultsortOrder;
+$sort = isset($_GET['order'][0]['column']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::validate($_GET['order'][0]['column'], 
'Integer'), $sortMapper) : $defaultSort;
+$sortOrder = isset($_GET['order'][0]['dir']) ? 
CRM_Utils_Type::validate($_GET['order'][0]['dir'], 'MysqlOrderByDirection') : 
$defaultsortOrder;
 
 if ($sort) {
-  $params['sortBy'] = "`{$sort}` {$sortOrder}";
+  $params['sortBy'] = "{$sort} {$sortOrder}";
 }
 
 $params['page'] = ($offset / $rowCount) + 1;
diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php
index bc06ec4..aeafa37 100644
--- a/CRM/Utils/Rule.php
+++ b/CRM/Utils/Rule.php
@@ -90,22 +90,6 @@
   }
 
   /**
-   * @param $str
-   *
-   * @return bool
-   */
-  public static function mysqlColumnNameLoose($str) {
-//  check the length.
-// This check can be incorrect for the . format, which can 
be
-// a problem.
-if (empty($str) || strlen($str) > 64) {
-  return FALSE;
-}
-
-return TRUE;
-  }
-
-  /**
* Validate an acceptable column name for sorting results.
*
* @param $str
@@ -113,16 +97,13 @@
* @return bool
*/
   public static function mysqlColumnName($str) {
-// Check the length.
-if (empty($str) || strlen($str) > 64) {
+// Check not empty.
+if (empty($str)) {
   return FALSE;
 }
 
-// Make sure it only contains valid characters (alphanumeric and 
underscores).
-//
-// MySQL permits column names that don't match this (eg containing spaces),
-// but CiviCRM won't create those ...
-if (!preg_match('/^[\w_]+(\.[\w_]+)?$/i', $str)) {
+// Ensure it only contains valid characters (alphanumeric and underscores).
+if (!preg_match('/^\w{1,64}(\.\w{1,64})?$/i', $str)) {
   return FALSE;
 }
 
diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php
index 20e91e3..901e2f8 100644
--- a/CRM/Utils/Type.php
+++ b/CRM/Utils/Type.php
@@ -246,14 +246,11 @@
 }
 break;
 
-  case 'MysqlColumnNameLoose':
-if (CRM_Utils_Rule::mysqlColumnNameLoose($data)) {
-  return str_replace('`', '', $data);
-}
-break;
-
   case 'MysqlColumnName':
 if (CRM_Utils_Rule::mysqlColumnName($data)) {
+  $parts = explode('.', $data);
+  $data = '`' . implode('`.`', $parts) . '`';
+
   return $data;
 }
 break;

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

[MediaWiki-commits] [Gerrit] Typo fix. - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Typo fix.
..

Typo fix.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I4462c07a64b5562eecf48511c8fa052cd2efe01a
---
M CRM/Case/Page/AJAX.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/74/286574/1

diff --git a/CRM/Case/Page/AJAX.php b/CRM/Case/Page/AJAX.php
index 04d0118..d24640b 100644
--- a/CRM/Case/Page/AJAX.php
+++ b/CRM/Case/Page/AJAX.php
@@ -49,7 +49,7 @@
 $excludeCaseIds = array();
 if (!empty($_GET['excludeCaseIds'])) {
   $excludeCaseIds = explode(',', 
CRM_Utils_Type::escape($_GET['excludeCaseIds'], 'String'));
-  CRM_Utils_Type::escapeAll($excludeCaseIds, 'Integer'));
+  CRM_Utils_Type::escapeAll($excludeCaseIds, 'Integer');
 }
 $unclosedCases = CRM_Case_BAO_Case::getUnclosedCases($params, 
$excludeCaseIds, TRUE, TRUE);
 $results = array();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4462c07a64b5562eecf48511c8fa052cd2efe01a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Further pass-by-ref fixes following on from customGroup sign... - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Further pass-by-ref fixes following on from customGroup 
signature change
..

Further pass-by-ref fixes following on from customGroup signature change

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I4398472485f27165b197f00bf36d518509681242
---
M CRM/Custom/Form/CustomData.php
M CRM/Utils/DeprecatedUtils.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/68/286568/1

diff --git a/CRM/Custom/Form/CustomData.php b/CRM/Custom/Form/CustomData.php
index f3176ce..0921059 100644
--- a/CRM/Custom/Form/CustomData.php
+++ b/CRM/Custom/Form/CustomData.php
@@ -120,7 +120,7 @@
   $subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', 
trim($subType, CRM_Core_DAO::VALUE_SEPARATOR));
 }
 
-$groupTree = _Core_BAO_CustomGroup::getTree($form->_type,
+$groupTree = CRM_Core_BAO_CustomGroup::getTree($form->_type,
   $form,
   $form->_entityId,
   $gid,
diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php
index 297965a..18a32f4 100644
--- a/CRM/Utils/DeprecatedUtils.php
+++ b/CRM/Utils/DeprecatedUtils.php
@@ -949,7 +949,7 @@
   /* Check for custom field values */
 
   if (empty($fields['custom'])) {
-$fields['custom'] = 
_Core_BAO_CustomField::getFields(CRM_Utils_Array::value('contact_type', 
$values),
+$fields['custom'] = 
CRM_Core_BAO_CustomField::getFields(CRM_Utils_Array::value('contact_type', 
$values),
   FALSE, FALSE, NULL, NULL, FALSE, FALSE, FALSE
 );
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4398472485f27165b197f00bf36d518509681242
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Further custom tree regression fix, where the label does not... - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Further custom tree regression fix, where the label does not 
match the name the name is the key to use
..

Further custom tree regression fix, where the label does not match the name the 
name is the key to use

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I57336c0323522020fb1b38a41512c6770abd6809
---
M CRM/Core/BAO/CustomGroup.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/75/286575/1

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index 268d901..9a4937e 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -642,7 +642,7 @@
   throw new CRM_Core_Exception('Invalid Entity Filter');
 }
 $subTypes = civicrm_api3('Contact', 'getoptions', array('field' => 
'contact_sub_type'));
-if (!in_array($subType, $subTypes['values'])) {
+if (!isset($subTypes['values'][$subType])) {
   // Same comments about fail hard as above.
   throw new CRM_Core_Exception('Invalid Filter');
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57336c0323522020fb1b38a41512c6770abd6809
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Fixed 2 other issues. - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Fixed 2 other issues.
..

Fixed 2 other issues.

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: If3c70d41968fac3cba6b5846d9f59cdce9ac3bab
---
M CRM/Case/Page/AJAX.php
M CRM/Contact/Page/AJAX.php
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/72/286572/1

diff --git a/CRM/Case/Page/AJAX.php b/CRM/Case/Page/AJAX.php
index 64164e1..04d0118 100644
--- a/CRM/Case/Page/AJAX.php
+++ b/CRM/Case/Page/AJAX.php
@@ -49,6 +49,7 @@
 $excludeCaseIds = array();
 if (!empty($_GET['excludeCaseIds'])) {
   $excludeCaseIds = explode(',', 
CRM_Utils_Type::escape($_GET['excludeCaseIds'], 'String'));
+  CRM_Utils_Type::escapeAll($excludeCaseIds, 'Integer'));
 }
 $unclosedCases = CRM_Case_BAO_Case::getUnclosedCases($params, 
$excludeCaseIds, TRUE, TRUE);
 $results = array();
diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php
index 022bf2d..75c61db 100644
--- a/CRM/Contact/Page/AJAX.php
+++ b/CRM/Contact/Page/AJAX.php
@@ -760,6 +760,7 @@
 $elements = explode('-', $name);
 foreach ($elements as $key => $element) {
   $elements[$key] = self::_convertToId($element);
+  CRM_Utils_Type::escapeAll($elements, 'Integer');
 }
 CRM_Core_BAO_PrevNextCache::markSelection($cacheKey, $actionToPerform, 
$elements);
   }
@@ -769,6 +770,7 @@
 }
 elseif ($variableType == 'single') {
   $cId = self::_convertToId($name);
+  CRM_Utils_Type::escape($cId, 'Integer');
   $action = ($state == 'checked') ? 'select' : 'unselect';
   CRM_Core_BAO_PrevNextCache::markSelection($cacheKey, $action, $cId);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3c70d41968fac3cba6b5846d9f59cdce9ac3bab
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-18469, CRM-17984 - getTree - No more pass by reference - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18469, CRM-17984 - getTree - No more pass by reference
..

CRM-18469, CRM-17984 - getTree - No more pass by reference

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: Ia2eb6d2bf64055dc546d2b73ec3ce310846a40f5
---
M CRM/Activity/Form/Activity.php
M CRM/Case/Form/CaseView.php
M CRM/Case/Form/CustomData.php
M CRM/Contact/Form/CustomData.php
M CRM/Contact/Form/Search/Custom/ActivitySearch.php
M CRM/Contact/Page/Inline/CustomData.php
M CRM/Event/Form/ParticipantView.php
M CRM/Grant/Form/GrantView.php
8 files changed, 12 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/67/286567/1

diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php
index 0bb9b91..96631e1 100644
--- a/CRM/Activity/Form/Activity.php
+++ b/CRM/Activity/Form/Activity.php
@@ -381,8 +381,8 @@
 $this->assign('action', $this->_action);
 
 if ($this->_action & CRM_Core_Action::VIEW) {
-  // get the tree of custom fields
-  $this->_groupTree = _Core_BAO_CustomGroup::getTree('Activity', $this,
+  // Get the tree of custom fields.
+  $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
 $this->_activityId, 0, $this->_activityTypeId
   );
 }
diff --git a/CRM/Case/Form/CaseView.php b/CRM/Case/Form/CaseView.php
index aa7c553..7e7889d 100644
--- a/CRM/Case/Form/CaseView.php
+++ b/CRM/Case/Form/CaseView.php
@@ -182,7 +182,7 @@
 
 $entitySubType = !empty($values['case_type_id']) ? $values['case_type_id'] 
: NULL;
 $this->assign('caseTypeID', $entitySubType);
-$groupTree = _Core_BAO_CustomGroup::getTree('Case',
+$groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
   $this,
   $this->_caseID,
   NULL,
diff --git a/CRM/Case/Form/CustomData.php b/CRM/Case/Form/CustomData.php
index c8087c2..bb50d7d 100644
--- a/CRM/Case/Form/CustomData.php
+++ b/CRM/Case/Form/CustomData.php
@@ -79,7 +79,7 @@
 $this->_subTypeID = CRM_Utils_Request::retrieve('subType', 'Positive', 
$this, TRUE);
 $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this, 
TRUE);
 
-$groupTree = _Core_BAO_CustomGroup::getTree('Case',
+$groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
   $this,
   $this->_entityID,
   $this->_groupID,
diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php
index 94e790b..b9c0657 100644
--- a/CRM/Contact/Form/CustomData.php
+++ b/CRM/Contact/Form/CustomData.php
@@ -239,7 +239,7 @@
 if ($this->_cdType || $this->_multiRecordDisplay == 'single') {
   if ($this->_copyValueId) {
 // cached tree is fetched
-$groupTree = _Core_BAO_CustomGroup::getTree($this->_type,
+$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_type,
   $this,
   $this->_entityId,
   $this->_groupID
@@ -262,7 +262,7 @@
   return $customDefaultValue;
 }
 
-$groupTree = _Core_BAO_CustomGroup::getTree($this->_contactType,
+$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType,
   $this,
   $this->_tableID,
   $this->_groupID,
@@ -271,7 +271,7 @@
 
 if (empty($_POST['hidden_custom_group_count'])) {
   // custom data building in edit mode (required to handle multi-value)
-  $groupTree = _Core_BAO_CustomGroup::getTree($this->_contactType, 
$this, $this->_tableID,
+  $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType, 
$this, $this->_tableID,
 $this->_groupID, $this->_contactSubType
   );
   $customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, 
$groupTree, TRUE, $this->_groupID);
diff --git a/CRM/Contact/Form/Search/Custom/ActivitySearch.php 
b/CRM/Contact/Form/Search/Custom/ActivitySearch.php
index b78fa15..ee006ee 100644
--- a/CRM/Contact/Form/Search/Custom/ActivitySearch.php
+++ b/CRM/Contact/Form/Search/Custom/ActivitySearch.php
@@ -73,7 +73,7 @@
 );
 
 //Add custom fields to columns array for inclusion in export
-$groupTree = _Core_BAO_CustomGroup::getTree('Activity', $form, NULL,
+$groupTree = 

[MediaWiki-commits] [Gerrit] CRM-17983, CRM-18401. Input validation - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject:  CRM-17983, CRM-18401. Input validation
..

CRM-17983, CRM-18401. Input validation

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I6bd1a0f6767909624fc326f8131d2f84d677ee6f
---
M CRM/Contact/Page/AJAX.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/62/286562/1

diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php
index fc081a4..b025416 100644
--- a/CRM/Contact/Page/AJAX.php
+++ b/CRM/Contact/Page/AJAX.php
@@ -838,7 +838,7 @@
 $offset = isset($_REQUEST['iDisplayStart']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
 $rowCount = isset($_REQUEST['iDisplayLength']) ? 
CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
-$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+$sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'mysqlOrderByDirection') : 
'asc';
 
 $params = $_POST;
 if ($sort && $sortOrder) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bd1a0f6767909624fc326f8131d2f84d677ee6f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17983 fix for contactRelationships query - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17983 fix for contactRelationships query
..

CRM-17983 fix for contactRelationships query

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: Id743fb0081d3dbb3aceed1c904be3fc3be81cd7c
---
M CRM/Contact/Page/AJAX.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/63/286563/1

diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php
index b025416..a9224a9 100644
--- a/CRM/Contact/Page/AJAX.php
+++ b/CRM/Contact/Page/AJAX.php
@@ -840,7 +840,7 @@
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
 $sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'mysqlOrderByDirection') : 
'asc';
 
-$params = $_POST;
+$params = array();
 if ($sort && $sortOrder) {
   $params['sortBy'] = $sort . ' ' . $sortOrder;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id743fb0081d3dbb3aceed1c904be3fc3be81cd7c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Fix the RC regrsision - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Fix the RC regrsision
..

Fix the RC regrsision

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I658a6d5c3cc82c01cfdbde8096c67847ab9086bf
---
M CRM/Core/BAO/CustomGroup.php
M api/v3/utils.php
2 files changed, 48 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/59/286559/1

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index e5a5f33..83370ed 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -317,7 +317,7 @@
*   Not used.
* @param int $entityID
* @param int $groupID
-   * @param string $subType
+   * @param array $subTypes
* @param string $subName
* @param bool $fromCache
* @param bool $onlySubType
@@ -337,7 +337,7 @@
 $deprecated = NULL,
 $entityID = NULL,
 $groupID = NULL,
-$subType = NULL,
+$subTypes = array(),
 $subName = NULL,
 $fromCache = TRUE,
 $onlySubType = NULL
@@ -345,10 +345,17 @@
 if ($entityID) {
   $entityID = CRM_Utils_Type::escape($entityID, 'Integer');
 }
+if (!is_array($subTypes)) {
+  if (empty($subTypes)) {
+$subTypes = array();
+  }
+  else {
+$subTypes = explode(',', $subTypes);
+  }
+}
 
 // create a new tree
-$strSelect = $strFrom = $strWhere = $orderBy = '';
-$tableData = array();
+$strWhere = $orderBy = '';
 
 // using tableData to build the queryString
 $tableData = array(
@@ -419,53 +426,13 @@
   $in = "'$entityType'";
 }
 
-if ($subType) {
-  $subTypeClause = '';
-  if (is_array($subType)) {
-$subType = implode(',', $subType);
+if (!empty($subTypes)) {
+  foreach ($subTypes as $key => $subType) {
+$subTypeClauses[] = "civicrm_custom_group.extends_entity_column_value 
LIKE '%" . self::validateSubTypeByEntity($entityType, $subType) . "%'";
   }
-  if (strpos($subType, ',')) {
-$subTypeParts = explode(',', $subType);
-$subTypeClauses = array();
-foreach ($subTypeParts as $subTypePart) {
-  // CRM-17984: Only filter by this input if valid.
-  $subTypePart = CRM_Utils_Type::escape(trim($subTypePart, 
CRM_Core_DAO::VALUE_SEPARATOR), 'Integer', FALSE);
-  if ($subTypePart) {
-$subTypePart = CRM_Core_DAO::VALUE_SEPARATOR .
-  $subTypePart .
-  CRM_Core_DAO::VALUE_SEPARATOR;
-$subTypeClauses[] = 
"civicrm_custom_group.extends_entity_column_value LIKE '%$subTypePart%'";
-  }
-}
-
-if ($onlySubType) {
-  $subTypeClause = '(' . implode(' OR ', $subTypeClauses) . ')';
-}
-else {
-  $subTypeClause = '(' . implode(' OR ', $subTypeClauses) .
-" OR civicrm_custom_group.extends_entity_column_value IS NULL )";
-}
-  }
-  else {
-// CRM-17984: Only filter by this input if valid.
-$subType = CRM_Utils_Type::escape(trim($subType, 
CRM_Core_DAO::VALUE_SEPARATOR), 'Integer', FALSE);
-if ($subType) {
-  $subType = CRM_Core_DAO::VALUE_SEPARATOR .
-$subType .
-CRM_Core_DAO::VALUE_SEPARATOR;
-
-  if ($onlySubType) {
-$subTypeClause = "( 
civicrm_custom_group.extends_entity_column_value LIKE '%$subType%' )";
-  }
-  else {
-$subTypeClause = "( 
civicrm_custom_group.extends_entity_column_value LIKE '%$subType%'
-  ORcivicrm_custom_group.extends_entity_column_value IS NULL )";
-  }
-}
-  }
-
-  if (empty($subTypeClause)) {
-$subTypeClause = '1=1';
+  $subTypeClause = '(' .  implode(' OR ', $subTypeClauses) . ')';
+  if (!$onlySubType) {
+$subTypeClause = '(' . $subTypeClause . '  OR 
civicrm_custom_group.extends_entity_column_value IS NULL )';
   }
 
   $strWhere = "
@@ -644,6 +611,35 @@
 
 }
 return $groupTree;
+  }
+
+  /**
+   * Clean and validate the filter before it is used in a db query.
+   *
+   * @param string $entityType
+   * @param string $subType
+   *
+   * @return string
+   * @throws 

[MediaWiki-commits] [Gerrit] CRM-5507 CRM-17984 fix regression when subType var is not le... - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-5507 CRM-17984 fix regression when subType var is not 
leaking
..

CRM-5507 CRM-17984 fix regression when subType var is not leaking

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: Ia7b5be54b375867e9043e6bf4f3f5f32ce4b2540
---
M CRM/Core/BAO/CustomGroup.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index 83370ed..5daddbc 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -526,8 +526,10 @@
   continue;
 }
 // CRM-5507
-if ($fieldName == 'extends_entity_column_value' && $subType) {
-  $groupTree[$groupID]['subtype'] = trim($subType, 
CRM_Core_DAO::VALUE_SEPARATOR);
+// This is an old bit of code - per the CRM number & probably does 
not work reliably if
+// that one contact sub-type exists.
+if ($fieldName == 'extends_entity_column_value' && 
!empty($subTypes[0])) {
+  $groupTree[$groupID]['subtype'] = 
self::validateSubTypeByEntity($entityType, $subType);
 }
 $groupTree[$groupID][$fieldName] = $crmDAO->$fullFieldName;
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7b5be54b375867e9043e6bf4f3f5f32ce4b2540
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Fix Strict warning discovered in testing - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Fix Strict warning discovered in testing
..

Fix Strict warning discovered in testing

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Change-Id: I13e07422b0d6f89c7d983f7ebe23f21b4d5f441e
---
M CRM/Contact/Page/View/Summary.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/61/286561/1

diff --git a/CRM/Contact/Page/View/Summary.php 
b/CRM/Contact/Page/View/Summary.php
index 65fa6b5..9e511e8 100644
--- a/CRM/Contact/Page/View/Summary.php
+++ b/CRM/Contact/Page/View/Summary.php
@@ -60,7 +60,7 @@
 trim($entitySubType, CRM_Core_DAO::VALUE_SEPARATOR)
   );
 }
-$groupTree = _Core_BAO_CustomGroup::getTree($entityType,
+$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType,
   $this,
   $this->_contactId,
   NULL,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13e07422b0d6f89c7d983f7ebe23f21b4d5f441e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17984. Ensure input for subtype is valid; if not then do... - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17984. Ensure input for subtype is valid; if not then do 
not use it to filter custom fields.
..

CRM-17984. Ensure input for subtype is valid; if not then do not use it to 
filter custom fields.

https://github.com/civicrm/civicrm-core/pull/8183/files

Change-Id: I17fcf9f1ee4dfd4efcca5d60b9f6214393e0e37f
---
M CRM/Core/BAO/CustomGroup.php
1 file changed, 25 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/57/286557/1

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index 57e7357..de550b0 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -428,10 +428,14 @@
 $subTypeParts = explode(',', $subType);
 $subTypeClauses = array();
 foreach ($subTypeParts as $subTypePart) {
-  $subTypePart = CRM_Core_DAO::VALUE_SEPARATOR .
-trim($subTypePart, CRM_Core_DAO::VALUE_SEPARATOR) .
-CRM_Core_DAO::VALUE_SEPARATOR;
-  $subTypeClauses[] = 
"civicrm_custom_group.extends_entity_column_value LIKE '%$subTypePart%'";
+  // CRM-17984: Only filter by this input if valid.
+  $subTypePart = CRM_Utils_Type::escape(trim($subTypePart, 
CRM_Core_DAO::VALUE_SEPARATOR), 'Integer', FALSE);
+  if ($subTypePart) {
+$subTypePart = CRM_Core_DAO::VALUE_SEPARATOR .
+  $subTypePart .
+  CRM_Core_DAO::VALUE_SEPARATOR;
+$subTypeClauses[] = 
"civicrm_custom_group.extends_entity_column_value LIKE '%$subTypePart%'";
+  }
 }
 
 if ($onlySubType) {
@@ -443,17 +447,25 @@
 }
   }
   else {
-$subType = CRM_Core_DAO::VALUE_SEPARATOR .
-  trim($subType, CRM_Core_DAO::VALUE_SEPARATOR) .
-  CRM_Core_DAO::VALUE_SEPARATOR;
+// CRM-17984: Only filter by this input if valid.
+$subType = CRM_Utils_Type::escape(trim($subType, 
CRM_Core_DAO::VALUE_SEPARATOR), 'Integer', FALSE);
+if ($subType) {
+  $subType = CRM_Core_DAO::VALUE_SEPARATOR .
+$subType .
+CRM_Core_DAO::VALUE_SEPARATOR;
 
-if ($onlySubType) {
-  $subTypeClause = "( civicrm_custom_group.extends_entity_column_value 
LIKE '%$subType%' )";
+  if ($onlySubType) {
+$subTypeClause = "( 
civicrm_custom_group.extends_entity_column_value LIKE '%$subType%' )";
+  }
+  else {
+$subTypeClause = "( 
civicrm_custom_group.extends_entity_column_value LIKE '%$subType%'
+  ORcivicrm_custom_group.extends_entity_column_value IS NULL )";
+  }
 }
-else {
-  $subTypeClause = "( civicrm_custom_group.extends_entity_column_value 
LIKE '%$subType%'
-ORcivicrm_custom_group.extends_entity_column_value IS NULL )";
-}
+  }
+
+  if (empty($subTypeClause)) {
+$subTypeClause = '1=1';
   }
 
   $strWhere = "

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17fcf9f1ee4dfd4efcca5d60b9f6214393e0e37f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17984 test to demonstrate breakage - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17984 test to demonstrate breakage
..

CRM-17984 test to demonstrate breakage

This is part of a series of commits upstream in these PRs

4.6
https://github.com/civicrm/civicrm-core/pull/8183
https://github.com/civicrm/civicrm-core/pull/8221
https://github.com/civicrm/civicrm-core/pull/8248
https://github.com/civicrm/civicrm-core/pull/8252
https://github.com/civicrm/civicrm-core/pull/8263
https://github.com/civicrm/civicrm-core/pull/8275

master
https://github.com/civicrm/civicrm-core/pull/8106
https://github.com/civicrm/civicrm-core/pull/8204
https://github.com/civicrm/civicrm-core/pull/8205
https://github.com/civicrm/civicrm-core/pull/8214
https://github.com/civicrm/civicrm-core/pull/8216
https://github.com/civicrm/civicrm-core/pull/8243
https://github.com/civicrm/civicrm-core/pull/8254

Conflicts:
CRM/Core/BAO/CustomGroup.php

Change-Id: Ibed2f6d56b8a3e321f06e7c0141b9eeb9f09aa04
---
M CRM/Core/BAO/CustomGroup.php
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/58/286558/1

diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php
index de550b0..e5a5f33 100644
--- a/CRM/Core/BAO/CustomGroup.php
+++ b/CRM/Core/BAO/CustomGroup.php
@@ -312,8 +312,9 @@
*
* @param string $entityType
*   Of the contact whose contact type is needed.
-   * @param CRM_Core_Form $form
-   *   Not used but required.
+
+   * @param CRM_Core_Form $deprecated
+   *   Not used.
* @param int $entityID
* @param int $groupID
* @param string $subType
@@ -330,11 +331,10 @@
* @todo - review this  - It also returns an array called 'info' with 
tables, select, from, where keys
*   The reason for the info array in unclear and it could be determined 
from parsing the group tree after creation
*   With caching the performance impact would be small & the function would 
be cleaner
-   *
*/
-  public static function (
+  public static function getTree(
 $entityType,
-&$form,
+$deprecated = NULL,
 $entityID = NULL,
 $groupID = NULL,
 $subType = NULL,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibed2f6d56b8a3e321f06e7c0141b9eeb9f09aa04
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] udpmxircecho: fix utf-8 encoding issue - change (operations/puppet)

2016-05-02 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: udpmxircecho: fix utf-8 encoding issue
..


udpmxircecho: fix utf-8 encoding issue

When starting this on the new IRC server, it spammed a whole lot

'ascii' codec can't decode byte 0xd0 in position 209: ordinal not in range(128)

and for example the ru.wikipedia channel stayed empty.

This fixes that issue, and makes it output things again.

Bug:T123729
Change-Id: I60a4d2455e8e728b38c7b6a145e28ed24b836d7f
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index bda431b..df2ff38 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -2,6 +2,9 @@
 #
 # usage: udpmxircecho.py nickname server
 import sys
+reload(sys)
+sys.setdefaultencoding('utf8')
+
 <% if scope.function_os_version(['debian >= jessie']) %>
 from irc.bot import SingleServerIRCBot
 <% else %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60a4d2455e8e728b38c7b6a145e28ed24b836d7f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] udpmxircecho: remove newlines from RC data - change (operations/puppet)

2016-05-02 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: udpmxircecho: remove newlines from RC data
..


udpmxircecho: remove newlines from RC data

After a lot of debugging we found out why the IRC bot
works on the old IRC server but not on the new one.

< mutante> May  2 22:20:38 kraz udpmxircecho.py[30092]: Carriage returns not 
allowed in privmsg(text)

< Krenair> Well, it is a different version of SingleServerIRCBot

< Krenair> confirmed, old server accepts messages with linebreaks, old one does 
not

Tested on kraz, it made it work. We see output now.

Bug:T123729
Change-Id: I5a7809fd3320a9c6dfde36abc880e78f2920e607
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index 5ffb0b4..bda431b 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -28,7 +28,7 @@
 if len(sp) == 2:
 channel = sp[0]
 text = sp[1]
-text = text.lstrip()
+text = 
text.lstrip().replace('\r','').replace('\n','')
 
 if channel not in self.bot.chans:
 self.bot.chans.append(channel)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a7809fd3320a9c6dfde36abc880e78f2920e607
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add jamwiki messages - change (mediawiki...WikimediaMessages)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Add jamwiki messages
..

Add jamwiki messages

Bug: T134017
Change-Id: Ia074dd98391fa2f6a85223cbde479af60a10d8df
---
M i18n/wikimediainterwikisearchresults/en.json
M i18n/wikimediainterwikisearchresults/qqq.json
M i18n/wikimediaprojectnames/en.json
M i18n/wikimediaprojectnames/qqq.json
4 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/i18n/wikimediainterwikisearchresults/en.json 
b/i18n/wikimediainterwikisearchresults/en.json
index 0d33d3b..43a29be 100644
--- a/i18n/wikimediainterwikisearchresults/en.json
+++ b/i18n/wikimediainterwikisearchresults/en.json
@@ -114,6 +114,7 @@
"search-interwiki-results-iswiki": "Showing results from 
[[:is:Main_Page|Icelandic Wikipedia]].",
"search-interwiki-results-itwiki": "Showing results from 
[[:it:Main_Page|Italian Wikipedia]].",
"search-interwiki-results-iuwiki": "Showing results from 
[[:iu:Main_Page|Inuktitut Wikipedia]].",
+   "search-interwiki-results-jamwiki": "Showing results from 
[[:jam:Main_Page|Patois Wikipedia]].",
"search-interwiki-results-jawiki": "Showing results from 
[[:ja:Main_Page|Japanese Wikipedia]].",
"search-interwiki-results-jbowiki": "Showing results from 
[[:jbo:Main_Page|Lojban Wikipedia]].",
"search-interwiki-results-jvwiki": "Showing results from 
[[:jv:Main_Page|Javanese Wikipedia]].",
diff --git a/i18n/wikimediainterwikisearchresults/qqq.json 
b/i18n/wikimediainterwikisearchresults/qqq.json
index da37f39..f842307 100644
--- a/i18n/wikimediainterwikisearchresults/qqq.json
+++ b/i18n/wikimediainterwikisearchresults/qqq.json
@@ -116,6 +116,7 @@
"search-interwiki-results-iswiki": "Search results description for 
Icelandic Wikipedia.",
"search-interwiki-results-itwiki": "Search results description for 
Italian Wikipedia.",
"search-interwiki-results-iuwiki": "Search results description for 
Inuktitut Wikipedia.",
+   "search-interwiki-results-jamwiki": "Search results description for 
Patois Wikipedia.",
"search-interwiki-results-jawiki": "Search results description for 
Japanese Wikipedia.",
"search-interwiki-results-jbowiki": "Search results description for 
Lojban Wikipedia.",
"search-interwiki-results-jvwiki": "Search results description for 
Javanese Wikipedia.",
diff --git a/i18n/wikimediaprojectnames/en.json 
b/i18n/wikimediaprojectnames/en.json
index 063c4e6..adce3dd 100644
--- a/i18n/wikimediaprojectnames/en.json
+++ b/i18n/wikimediaprojectnames/en.json
@@ -339,6 +339,7 @@
"project-localized-name-itwikivoyage": "Italian Wikivoyage",
"project-localized-name-iuwiki": "Inuktitut Wikipedia",
"project-localized-name-iuwiktionary": "Inuktitut Wiktionary",
+   "project-localized-name-jamwiki": "Patois Wikipedia",
"project-localized-name-jawiki": "Japanese Wikipedia",
"project-localized-name-jawiktionary": "Japanese Wiktionary",
"project-localized-name-jawikibooks": "Japanese Wikibooks",
diff --git a/i18n/wikimediaprojectnames/qqq.json 
b/i18n/wikimediaprojectnames/qqq.json
index 72a3a62..7918de2 100644
--- a/i18n/wikimediaprojectnames/qqq.json
+++ b/i18n/wikimediaprojectnames/qqq.json
@@ -346,6 +346,7 @@
"project-localized-name-itwikivoyage": 
"{{ProjectNameDocumentation|url=https://it.wikivoyage.org|name=Italian 
Wikivoyage|language=it}}",
"project-localized-name-iuwiki": 
"{{ProjectNameDocumentation|url=https://iu.wikipedia.org|name=Inuktitut 
Wikipedia|language=iu}}",
"project-localized-name-iuwiktionary": 
"{{ProjectNameDocumentation|url=https://iu.wiktionary.org|name=Inuktitut 
Wiktionary|language=iu}}",
+   "project-localized-name-jamwiki": 
"{{ProjectNameDocumentation|url=https://jam.wikipedia.org|name=Patois 
Wikipedia|language=jam}}",
"project-localized-name-jawiki": 
"{{ProjectNameDocumentation|url=https://ja.wikipedia.org|name=Japanese 
Wikipedia|language=ja}}",
"project-localized-name-jawiktionary": 
"{{ProjectNameDocumentation|url=https://ja.wiktionary.org|name=Japanese 
Wiktionary|language=ja}}",
"project-localized-name-jawikibooks": 
"{{ProjectNameDocumentation|url=https://ja.wikibooks.org|name=Japanese 
Wikibooks|language=ja}}",

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

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

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

[MediaWiki-commits] [Gerrit] Get rid of undeployed extension OAI's schema creation - change (mediawiki...WikimediaMaintenance)

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

Change subject: Get rid of undeployed extension OAI's schema creation
..


Get rid of undeployed extension OAI's schema creation

Bug: T70867
Bug: T134017
Change-Id: Ie347b45b5a741dddfb30b457ef3a33f9b7f773f8
---
M addWiki.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/addWiki.php b/addWiki.php
index 5dc29d7..63d2250 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -87,7 +87,6 @@
__METHOD__,
array( $this, 'noExecuteCommands' )
);
-   $dbw->sourceFile( "$IP/extensions/OAI/sql/update_table.sql" );
$dbw->sourceFile( 
"$IP/extensions/AntiSpoof/sql/patch-antispoof.mysql.sql" );
$dbw->sourceFile( "$IP/extensions/CheckUser/cu_changes.sql" );
$dbw->sourceFile( "$IP/extensions/CheckUser/cu_log.sql" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie347b45b5a741dddfb30b457ef3a33f9b7f773f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
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] Update cached SiteMatrix, mainly for jamwiki - change (mediawiki...parsoid)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Update cached SiteMatrix, mainly for jamwiki
..

Update cached SiteMatrix, mainly for jamwiki

Bug: T134017
Change-Id: I43d5b622b29a54527f9923b01bae6da9378398ef
---
M lib/config/sitematrix.json
1 file changed, 192 insertions(+), 179 deletions(-)


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

diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index 0f29898..bd9a37d 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -2256,7 +2256,7 @@
"url": "https://gu.wiktionary.org;,
"dbname": "guwiktionary",
"code": "wiktionary",
-   "sitename": "વિક્શનરી"
+   "sitename": "વિકિકોશ"
},
{
"url": "https://gu.wikibooks.org;,
@@ -2269,7 +2269,7 @@
"url": "https://gu.wikiquote.org;,
"dbname": "guwikiquote",
"code": "wikiquote",
-   "sitename": "Wikiquote"
+   "sitename": "વિકિસૂક્તિ"
},
{
"url": "https://gu.wikisource.org;,
@@ -2333,7 +2333,7 @@
},
"94": {
"code": "haw",
-   "name": "Hawai`i",
+   "name": "Hawaiʻi",
"site": [
{
"url": "https://haw.wikipedia.org;,
@@ -2950,6 +2950,19 @@
"localname": "Japanese"
},
"117": {
+   "code": "jam",
+   "name": "Patois",
+   "site": [
+   {
+   "url": "https://jam.wikipedia.org;,
+   "dbname": "jamwiki",
+   "code": "wiki",
+   "sitename": "Wikipidia"
+   }
+   ],
+   "localname": "Jamaican Creole English"
+   },
+   "118": {
"code": "jbo",
"name": "la .lojban.",
"site": [
@@ -2968,7 +2981,7 @@
],
"localname": "Lojban"
},
-   "118": {
+   "119": {
"code": "jv",
"name": "Basa Jawa",
"site": [
@@ -2987,7 +3000,7 @@
],
"localname": "Javanese"
},
-   "119": {
+   "120": {
"code": "ka",
"name": "ქართული",
"site": [
@@ -3018,7 +3031,7 @@
],
"localname": "Georgian"
},
-   "120": {
+   "121": {
"code": "kaa",
"name": "Qaraqalpaqsha",
"site": [
@@ -3031,7 +3044,7 @@
],
"localname": "Kara-Kalpak"
},
-   "121": {
+   "122": {
"code": "kab",
"name": "Taqbaylit",
"site": [
@@ -3044,7 +3057,7 @@
],
"localname": "Kabyle"
},
-   "122": {
+   "123": {
"code": "kbd",
"name": "Адыгэбзэ",
"site": [
@@ -3057,7 +3070,7 @@
],
"localname": "Kabardian"
},
-   "123": {
+   "124": {
"code": "kg",
"name": "Kongo",
"site": [
@@ -3070,7 +3083,7 @@
],
"localname": "Kongo"
},
-   "124": {
+   "125": {
"code": "ki",
"name": "Gĩkũyũ",
"site": [
@@ -3083,7 +3096,7 @@
],
"localname": "Kikuyu"
},
-   "125": {
+   "126": {
"code": "kj",
  

[MediaWiki-commits] [Gerrit] Get rid of undeployed extension OAI's schema creation - change (mediawiki...WikimediaMaintenance)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Get rid of undeployed extension OAI's schema creation
..

Get rid of undeployed extension OAI's schema creation

Bug: T70867
Bug: T134017
Change-Id: Ie347b45b5a741dddfb30b457ef3a33f9b7f773f8
---
M addWiki.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/addWiki.php b/addWiki.php
index 5dc29d7..63d2250 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -87,7 +87,6 @@
__METHOD__,
array( $this, 'noExecuteCommands' )
);
-   $dbw->sourceFile( "$IP/extensions/OAI/sql/update_table.sql" );
$dbw->sourceFile( 
"$IP/extensions/AntiSpoof/sql/patch-antispoof.mysql.sql" );
$dbw->sourceFile( "$IP/extensions/CheckUser/cu_changes.sql" );
$dbw->sourceFile( "$IP/extensions/CheckUser/cu_log.sql" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie347b45b5a741dddfb30b457ef3a33f9b7f773f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
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] Add jamwiki to restbase and labs DNS configs - change (operations/puppet)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Add jamwiki to restbase and labs DNS configs
..

Add jamwiki to restbase and labs DNS configs

Bug: T134017
Change-Id: I893d7ca40594a5d4649ac1e7dccf09b5e33ca69b
---
M modules/restbase/templates/config.yaml.erb
M modules/role/manifests/labs/dnsrecursor.pp
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/286553/1

diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index 3577051..d292f8c 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -211,6 +211,7 @@
 /{domain:it.wikipedia.org}: *default_project
 /{domain:iu.wikipedia.org}: *default_project
 /{domain:ja.wikipedia.org}: *default_project
+/{domain:jam.wikipedia.org}: *default_project
 /{domain:jbo.wikipedia.org}: *default_project
 /{domain:jv.wikipedia.org}: *default_project
 /{domain:ka.wikipedia.org}: *default_project
diff --git a/modules/role/manifests/labs/dnsrecursor.pp 
b/modules/role/manifests/labs/dnsrecursor.pp
index da715c3..6ddef43 100644
--- a/modules/role/manifests/labs/dnsrecursor.pp
+++ b/modules/role/manifests/labs/dnsrecursor.pp
@@ -167,7 +167,7 @@
 'iswikisource', 'iswiktionary', 'itwikibooks', 'itwikinews',
 'itwikiquote', 'itwikisource', 'itwikiversity',
 'itwikivoyage', 'itwiktionary', 'iuwiki', 'iuwiktionary',
-'jawiki', 'jawikibooks', 'jawikinews', 'jawikiquote',
+'jawiki', 'jamwiki', 'jawikibooks', 'jawikinews', 'jawikiquote',
 'jawikisource', 'jawikiversity', 'jawiktionary', 'jbowiki',
 'jbowiktionary', 'jvwiki', 'jvwiktionary', 'kaawiki',
 'kabwiki', 'kawiki', 'kawikibooks', 'kawikiquote',

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

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

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


[MediaWiki-commits] [Gerrit] Fix PHP version check to stop 7.0 breakage - change (wikimedia...civicrm)

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

Change subject: Fix PHP version check to stop 7.0 breakage
..


Fix PHP version check to stop 7.0 breakage

Copied from https://github.com/civicrm/civicrm-packages/pull/147/files

Change-Id: I6729b3e25f998e8007da67fa24c56cb1433efa21
---
M packages/DB/DataObject.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/packages/DB/DataObject.php b/packages/DB/DataObject.php
index 88e6b2a..235ee1d 100644
--- a/packages/DB/DataObject.php
+++ b/packages/DB/DataObject.php
@@ -179,7 +179,7 @@
 // NOTE: Overload SEGFAULTS ON PHP4 + Zend Optimizer (see define before..)
 // these two are BC/FC handlers for call in PHP4/5
 
-if ( substr(phpversion(),0,1) == 5) {
+if ( substr(phpversion(),0,1) > 4) {
 class DB_DataObject_Overload
 {
 function __call($method,$args)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6729b3e25f998e8007da67fa24c56cb1433efa21
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Interwiki cache update - mainly for jamwiki, but other map c... - change (operations/mediawiki-config)

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

Change subject: Interwiki cache update - mainly for jamwiki, but other map 
changes included
..


Interwiki cache update - mainly for jamwiki, but other map changes included

Bug: T134017
Change-Id: Ia3fe48a30c7d79757babe8883f8cabc094498181
---
M wmf-config/interwiki.php
1 file changed, 34 insertions(+), 12 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index bd7ec09..25c3451 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 //advisory.wikimedia.org/wiki/$1',
@@ -123,6 +123,7 @@
'__global:hammondwiki' => '0 
http://www.dairiki.org/HammondWiki/index.php3?$1',
'__global:hdl' => '0 http://hdl.handle.net/$1',
'__global:heroeswiki' => '0 http://heroeswiki.com/$1',
+   '__global:horizon' => '1 https://horizon.wikimedia.org/$1',
'__global:hrwiki' => '0 http://www.hrwiki.org/index.php/$1',
'__global:hrfwiki' => '0 http://fanstuff.hrwiki.org/index.php/$1',
'__global:hupwiki' => '0 http://wiki.hup.hu/index.php/$1',
@@ -304,6 +305,8 @@
'__global:usej' => '0 http://www.tejo.org/usej/$1',
'__global:usemod' => '0 http://www.usemod.com/cgi-bin/wiki.pl?$1',
'__global:usability' => '1 //usability.wikimedia.org/wiki/$1',
+   '__global:vd' => '0 //fr.vikidia.org/wiki/$1',
+   '__global:vikidia' => '0 //fr.vikidia.org/wiki/$1',
'__global:vinismo' => '0 http://vinismo.com/en/$1',
'__global:vlos' => '0 http://www.thuvienkhoahoc.com/tusach/$1',
'__global:vkol' => '0 http://kol.coldfront.net/thekolwiki/index.php/$1',
@@ -541,6 +544,7 @@
'_wiki:it' => '1 //it.wikipedia.org/wiki/$1',
'_wiki:iu' => '1 //iu.wikipedia.org/wiki/$1',
'_wiki:ja' => '1 //ja.wikipedia.org/wiki/$1',
+   '_wiki:jam' => '1 //jam.wikipedia.org/wiki/$1',
'_wiki:jbo' => '1 //jbo.wikipedia.org/wiki/$1',
'_wiki:jv' => '1 //jv.wikipedia.org/wiki/$1',
'_wiki:ka' => '1 //ka.wikipedia.org/wiki/$1',
@@ -853,6 +857,7 @@
'_wiktionary:it' => '1 //it.wiktionary.org/wiki/$1',
'_wiktionary:iu' => '1 //iu.wiktionary.org/wiki/$1',
'_wiktionary:ja' => '1 //ja.wiktionary.org/wiki/$1',
+   '_wiktionary:jam' => '1 //jam.wiktionary.org/wiki/$1',
'_wiktionary:jbo' => '1 //jbo.wiktionary.org/wiki/$1',
'_wiktionary:jv' => '1 //jv.wiktionary.org/wiki/$1',
'_wiktionary:ka' => '1 //ka.wiktionary.org/wiki/$1',
@@ -1165,6 +1170,7 @@
'_wikiquote:it' => '1 //it.wikiquote.org/wiki/$1',
'_wikiquote:iu' => '1 //iu.wikiquote.org/wiki/$1',
'_wikiquote:ja' => '1 //ja.wikiquote.org/wiki/$1',
+   '_wikiquote:jam' => '1 //jam.wikiquote.org/wiki/$1',
'_wikiquote:jbo' => '1 //jbo.wikiquote.org/wiki/$1',
'_wikiquote:jv' => '1 //jv.wikiquote.org/wiki/$1',
'_wikiquote:ka' => '1 //ka.wikiquote.org/wiki/$1',
@@ -1477,6 +1483,7 @@
'_wikibooks:it' => '1 //it.wikibooks.org/wiki/$1',
'_wikibooks:iu' => '1 //iu.wikibooks.org/wiki/$1',
'_wikibooks:ja' => '1 //ja.wikibooks.org/wiki/$1',
+   '_wikibooks:jam' => '1 //jam.wikibooks.org/wiki/$1',
'_wikibooks:jbo' => '1 //jbo.wikibooks.org/wiki/$1',
'_wikibooks:jv' => '1 //jv.wikibooks.org/wiki/$1',
'_wikibooks:ka' => '1 //ka.wikibooks.org/wiki/$1',
@@ -1789,6 +1796,7 @@
'_wikinews:it' => '1 //it.wikinews.org/wiki/$1',
'_wikinews:iu' => '1 //iu.wikinews.org/wiki/$1',
'_wikinews:ja' => '1 //ja.wikinews.org/wiki/$1',
+   '_wikinews:jam' => '1 //jam.wikinews.org/wiki/$1',
'_wikinews:jbo' => '1 //jbo.wikinews.org/wiki/$1',
'_wikinews:jv' => '1 //jv.wikinews.org/wiki/$1',
'_wikinews:ka' => '1 //ka.wikinews.org/wiki/$1',
@@ -2101,6 +2109,7 @@
'_wikisource:it' => '1 //it.wikisource.org/wiki/$1',
'_wikisource:iu' => '1 //iu.wikisource.org/wiki/$1',
'_wikisource:ja' => '1 //ja.wikisource.org/wiki/$1',
+   '_wikisource:jam' => '1 //jam.wikisource.org/wiki/$1',
'_wikisource:jbo' => '1 //jbo.wikisource.org/wiki/$1',
'_wikisource:jv' => '1 //jv.wikisource.org/wiki/$1',
'_wikisource:ka' => '1 //ka.wikisource.org/wiki/$1',
@@ -2414,6 +2423,7 @@
'_wikimedia:it' => '1 //it.wikimedia.org/wiki/$1',
'_wikimedia:iu' => '1 //iu.wikimedia.org/wiki/$1',
'_wikimedia:ja' => '1 //ja.wikimedia.org/wiki/$1',
+   '_wikimedia:jam' => '1 //jam.wikimedia.org/wiki/$1',
'_wikimedia:jbo' => '1 //jbo.wikimedia.org/wiki/$1',
'_wikimedia:jv' => '1 //jv.wikimedia.org/wiki/$1',
'_wikimedia:ka' => '1 //ka.wikimedia.org/wiki/$1',
@@ -2725,6 +2735,7 @@
'_wikiversity:it' => '1 

[MediaWiki-commits] [Gerrit] Interwiki cache update - mainly for jamwiki, but other map c... - change (operations/mediawiki-config)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Interwiki cache update - mainly for jamwiki, but other map 
changes included
..

Interwiki cache update - mainly for jamwiki, but other map changes included

Bug: T134017
Change-Id: Ia3fe48a30c7d79757babe8883f8cabc094498181
---
M wmf-config/interwiki.php
1 file changed, 34 insertions(+), 12 deletions(-)


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index bd7ec09..25c3451 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 //advisory.wikimedia.org/wiki/$1',
@@ -123,6 +123,7 @@
'__global:hammondwiki' => '0 
http://www.dairiki.org/HammondWiki/index.php3?$1',
'__global:hdl' => '0 http://hdl.handle.net/$1',
'__global:heroeswiki' => '0 http://heroeswiki.com/$1',
+   '__global:horizon' => '1 https://horizon.wikimedia.org/$1',
'__global:hrwiki' => '0 http://www.hrwiki.org/index.php/$1',
'__global:hrfwiki' => '0 http://fanstuff.hrwiki.org/index.php/$1',
'__global:hupwiki' => '0 http://wiki.hup.hu/index.php/$1',
@@ -304,6 +305,8 @@
'__global:usej' => '0 http://www.tejo.org/usej/$1',
'__global:usemod' => '0 http://www.usemod.com/cgi-bin/wiki.pl?$1',
'__global:usability' => '1 //usability.wikimedia.org/wiki/$1',
+   '__global:vd' => '0 //fr.vikidia.org/wiki/$1',
+   '__global:vikidia' => '0 //fr.vikidia.org/wiki/$1',
'__global:vinismo' => '0 http://vinismo.com/en/$1',
'__global:vlos' => '0 http://www.thuvienkhoahoc.com/tusach/$1',
'__global:vkol' => '0 http://kol.coldfront.net/thekolwiki/index.php/$1',
@@ -541,6 +544,7 @@
'_wiki:it' => '1 //it.wikipedia.org/wiki/$1',
'_wiki:iu' => '1 //iu.wikipedia.org/wiki/$1',
'_wiki:ja' => '1 //ja.wikipedia.org/wiki/$1',
+   '_wiki:jam' => '1 //jam.wikipedia.org/wiki/$1',
'_wiki:jbo' => '1 //jbo.wikipedia.org/wiki/$1',
'_wiki:jv' => '1 //jv.wikipedia.org/wiki/$1',
'_wiki:ka' => '1 //ka.wikipedia.org/wiki/$1',
@@ -853,6 +857,7 @@
'_wiktionary:it' => '1 //it.wiktionary.org/wiki/$1',
'_wiktionary:iu' => '1 //iu.wiktionary.org/wiki/$1',
'_wiktionary:ja' => '1 //ja.wiktionary.org/wiki/$1',
+   '_wiktionary:jam' => '1 //jam.wiktionary.org/wiki/$1',
'_wiktionary:jbo' => '1 //jbo.wiktionary.org/wiki/$1',
'_wiktionary:jv' => '1 //jv.wiktionary.org/wiki/$1',
'_wiktionary:ka' => '1 //ka.wiktionary.org/wiki/$1',
@@ -1165,6 +1170,7 @@
'_wikiquote:it' => '1 //it.wikiquote.org/wiki/$1',
'_wikiquote:iu' => '1 //iu.wikiquote.org/wiki/$1',
'_wikiquote:ja' => '1 //ja.wikiquote.org/wiki/$1',
+   '_wikiquote:jam' => '1 //jam.wikiquote.org/wiki/$1',
'_wikiquote:jbo' => '1 //jbo.wikiquote.org/wiki/$1',
'_wikiquote:jv' => '1 //jv.wikiquote.org/wiki/$1',
'_wikiquote:ka' => '1 //ka.wikiquote.org/wiki/$1',
@@ -1477,6 +1483,7 @@
'_wikibooks:it' => '1 //it.wikibooks.org/wiki/$1',
'_wikibooks:iu' => '1 //iu.wikibooks.org/wiki/$1',
'_wikibooks:ja' => '1 //ja.wikibooks.org/wiki/$1',
+   '_wikibooks:jam' => '1 //jam.wikibooks.org/wiki/$1',
'_wikibooks:jbo' => '1 //jbo.wikibooks.org/wiki/$1',
'_wikibooks:jv' => '1 //jv.wikibooks.org/wiki/$1',
'_wikibooks:ka' => '1 //ka.wikibooks.org/wiki/$1',
@@ -1789,6 +1796,7 @@
'_wikinews:it' => '1 //it.wikinews.org/wiki/$1',
'_wikinews:iu' => '1 //iu.wikinews.org/wiki/$1',
'_wikinews:ja' => '1 //ja.wikinews.org/wiki/$1',
+   '_wikinews:jam' => '1 //jam.wikinews.org/wiki/$1',
'_wikinews:jbo' => '1 //jbo.wikinews.org/wiki/$1',
'_wikinews:jv' => '1 //jv.wikinews.org/wiki/$1',
'_wikinews:ka' => '1 //ka.wikinews.org/wiki/$1',
@@ -2101,6 +2109,7 @@
'_wikisource:it' => '1 //it.wikisource.org/wiki/$1',
'_wikisource:iu' => '1 //iu.wikisource.org/wiki/$1',
'_wikisource:ja' => '1 //ja.wikisource.org/wiki/$1',
+   '_wikisource:jam' => '1 //jam.wikisource.org/wiki/$1',
'_wikisource:jbo' => '1 //jbo.wikisource.org/wiki/$1',
'_wikisource:jv' => '1 //jv.wikisource.org/wiki/$1',
'_wikisource:ka' => '1 //ka.wikisource.org/wiki/$1',
@@ -2414,6 +2423,7 @@
'_wikimedia:it' => '1 //it.wikimedia.org/wiki/$1',
'_wikimedia:iu' => '1 //iu.wikimedia.org/wiki/$1',
'_wikimedia:ja' => '1 //ja.wikimedia.org/wiki/$1',
+   '_wikimedia:jam' => '1 //jam.wikimedia.org/wiki/$1',
'_wikimedia:jbo' => '1 //jbo.wikimedia.org/wiki/$1',
'_wikimedia:jv' => '1 //jv.wikimedia.org/wiki/$1',
'_wikimedia:ka' => '1 //ka.wikimedia.org/wiki/$1',

[MediaWiki-commits] [Gerrit] CRM-17846 - Fixing lock name to be less than 64 characters f... - change (wikimedia...civicrm)

2016-05-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: CRM-17846 - Fixing lock name to be less than 64 characters for 
MySQL 5.7 compatibility (#7984)
..

CRM-17846 - Fixing lock name to be less than 64 characters for MySQL 5.7 
compatibility (#7984)

* CRM-17846 - Fixing lock name to be less than 64 characters for MySQL 5.7 
compatibility - 4.6LTS

* Removing spaces to make Jenkins happy

* Applying MySQL Lock fix contribution from Eileen

* Fixing spacing to keep Jenkins happy

* Use 4.6 version settings call

Change-Id: I31e21251803e5c4fd7ec9e072a56593a232c3d0a
---
M CRM/Core/Lock.php
1 file changed, 54 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/51/286551/1

diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php
index 9c28de7..30b31b4 100644
--- a/CRM/Core/Lock.php
+++ b/CRM/Core/Lock.php
@@ -3,7 +3,7 @@
  ++
  | CiviCRM version 4.6|
  ++
- | Copyright CiviCRM LLC (c) 2004-2015|
+ | Copyright CiviCRM LLC (c) 2004-2016|
  ++
  | This file is a part of CiviCRM.|
  ||
@@ -24,25 +24,30 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing|
  ++
  */
-
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  * $Id$
  *
  */
 class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface {
-
+  /**
+   * This variable (despite it's name) roughly translates to 'lock that we 
actually care about'.
+   *
+   * Prior to version 5.7.5 mysql only supports a single named lock. This 
variable is
+   * part of the skullduggery involved in 'say it's no so Frank'.
+   *
+   * See further comments on the aquire function.
+   *
+   * @var bool
+   */
   static $jobLog = FALSE;
-
   // lets have a 3 second timeout for now
   const TIMEOUT = 3;
-
   protected $_hasLock = FALSE;
-
   protected $_name;
-
+  protected $_id;
   /**
* Use MySQL's GET_LOCK(). Locks are shared across all Civi instances
* on the same MySQL server.
@@ -58,7 +63,6 @@
   public static function createGlobalLock($name) {
 return new static($name, NULL, TRUE);
   }
-
   /**
* Use MySQL's GET_LOCK(), but apply prefixes to the lock names.
* Locks are unique to each instance of Civi.
@@ -74,7 +78,6 @@
   public static function createScopedLock($name) {
 return new static($name);
   }
-
   /**
* Use MySQL's GET_LOCK(), but conditionally apply prefixes to the lock names
* (if civimail_server_wide_lock is disabled).
@@ -95,7 +98,6 @@
 );
 return new static($name, NULL, $serverWideLock);
   }
-
   /**
* Initialize the constants used during lock acquire / release
*
@@ -124,85 +126,105 @@
 else {
   $this->_name = $database . '.' . $domainID . '.' . $name;
 }
+// MySQL 5.7 doesn't like long lock names so creating a lock id
+$this->_id = sha1($this->_name);
 if (defined('CIVICRM_LOCK_DEBUG')) {
-  CRM_Core_Error::debug_log_message('trying to construct lock for ' . 
$this->_name);
+  CRM_Core_Error::debug_log_message('trying to construct lock for ' . 
$this->_name . '(' . $this->_id . ')');
 }
 $this->_timeout = $timeout !== NULL ? $timeout : self::TIMEOUT;
   }
-
   public function __destruct() {
 $this->release();
   }
-
   /**
+   * Acquire lock.
+   *
+   * The advantage of mysql locks is that they can be used across processes. 
However, only one
+   * can be used at once within a process. An attempt to use a second one 
within a process
+   * prior to mysql 5.7.5 results in the first being released.
+   *
+   * The process here is
+   *  1) first attempt to grab a lock for a mailing job - self::jobLog will be 
populated with the
+   * lock id & a mysql lock will be created for the ID.
+   *
+   * If a second function in the same process attempts to grab the lock it 
will enter the hackyHandleBrokenCode routine
+   * which says 'I won't break a mailing lock for you but if you are not a 
civimail send process I'll let you
+   * pretend you have a lock already and you can go ahead with whatever you 
were doing under the delusion you
+   * have a lock.
+   *
+   * @todo bypass hackyHandleBrokenCode for mysql version 5.7.5+
+   *
+   * If a second function in a separate process attempts to grab the lock 
already in use it should be rejected,
+   * but it appears it IS allowed to grab a different lock & unlike in the 
same process the 

[MediaWiki-commits] [Gerrit] Initialize configuration for jam.wikipedia - change (operations/mediawiki-config)

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

Change subject: Initialize configuration for jam.wikipedia
..


Initialize configuration for jam.wikipedia

  - Add jamwiki (Jamaican) to langlist.
  - Specific database lists: all, s3, small, wikipedia, commonsupload
  - Features database lists: flow, visualeditor-default, wikidataclient, 
securepollglobal
  - Timzone: America/Jamaica (from PHP docs)
  - Project name: "Wikipidia" (from Incubator)
  - Logos from https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2-jam.svg
  - Namespaces

Bug: T134017
Signed-off-by: Sébastien Santoro 
Change-Id: Id788c9b4043ad1207fd0742f6fd5a605b04c5405
---
M dblists/all.dblist
M dblists/commonsuploads.dblist
M dblists/flow.dblist
M dblists/s3.dblist
M dblists/securepollglobal.dblist
M dblists/small.dblist
M dblists/visualeditor-default.dblist
M dblists/wikidataclient.dblist
M dblists/wikipedia.dblist
M langlist
A static/images/project-logos/jamwiki-1.5x.png
A static/images/project-logos/jamwiki-2x.png
A static/images/project-logos/jamwiki.png
M wikiversions.json
M wmf-config/InitialiseSettings.php
15 files changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/dblists/all.dblist b/dblists/all.dblist
index 559dcbe..73983e3 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -371,6 +371,7 @@
 itwiktionary
 iuwiki
 iuwiktionary
+jamwiki
 jawiki
 jawikibooks
 jawikinews
diff --git a/dblists/commonsuploads.dblist b/dblists/commonsuploads.dblist
index 6b6ccef..becdb5f 100644
--- a/dblists/commonsuploads.dblist
+++ b/dblists/commonsuploads.dblist
@@ -218,6 +218,7 @@
 itwiktionary
 iuwiki
 iuwiktionary
+jamwiki
 jawikiquote
 jawikiversity
 jbowiki
diff --git a/dblists/flow.dblist b/dblists/flow.dblist
index de8b663..6969635 100644
--- a/dblists/flow.dblist
+++ b/dblists/flow.dblist
@@ -348,6 +348,7 @@
 itwiktionary
 iuwiki
 iuwiktionary
+jamwiki
 jawiki
 jawikibooks
 jawikinews
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index d4a1c60..c3da488 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -351,6 +351,7 @@
 itwiktionary
 iuwiki
 iuwiktionary
+jamwiki
 jawikibooks
 jawikinews
 jawikiquote
diff --git a/dblists/securepollglobal.dblist b/dblists/securepollglobal.dblist
index 19e9661..18db14e 100644
--- a/dblists/securepollglobal.dblist
+++ b/dblists/securepollglobal.dblist
@@ -371,6 +371,7 @@
 itwiktionary
 iuwiki
 iuwiktionary
+jamwiki
 jawiki
 jawikibooks
 jawikinews
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 5dcb392..38f03d4 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -200,6 +200,7 @@
 iswikisource
 iuwiki
 iuwiktionary
+jamwiki
 jawikiquote
 jawikiversity
 jbowiki
diff --git a/dblists/visualeditor-default.dblist 
b/dblists/visualeditor-default.dblist
index fa425fa..cc0c0ec 100644
--- a/dblists/visualeditor-default.dblist
+++ b/dblists/visualeditor-default.dblist
@@ -98,6 +98,7 @@
 iowiki
 iswiki
 itwiki
+jamwiki
 jbowiki
 jvwiki
 kaawiki
diff --git a/dblists/wikidataclient.dblist b/dblists/wikidataclient.dblist
index 75a7020..3e3dfdc 100644
--- a/dblists/wikidataclient.dblist
+++ b/dblists/wikidataclient.dblist
@@ -272,6 +272,7 @@
 itwikiversity
 itwikivoyage
 iuwiki
+jamwiki
 jawiki
 jawikibooks
 jawikinews
diff --git a/dblists/wikipedia.dblist b/dblists/wikipedia.dblist
index 52ba32e..7173b1a 100644
--- a/dblists/wikipedia.dblist
+++ b/dblists/wikipedia.dblist
@@ -119,6 +119,7 @@
 itwiki
 iuwiki
 jawiki
+jamwiki
 jbowiki
 jvwiki
 kaawiki
diff --git a/langlist b/langlist
index c953c24..1d4b3dd 100644
--- a/langlist
+++ b/langlist
@@ -115,6 +115,7 @@
 it
 iu
 ja
+jam
 jbo
 jv
 ka
diff --git a/static/images/project-logos/jamwiki-1.5x.png 
b/static/images/project-logos/jamwiki-1.5x.png
new file mode 100644
index 000..ad24f36
--- /dev/null
+++ b/static/images/project-logos/jamwiki-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/jamwiki-2x.png 
b/static/images/project-logos/jamwiki-2x.png
new file mode 100644
index 000..f1c7c58
--- /dev/null
+++ b/static/images/project-logos/jamwiki-2x.png
Binary files differ
diff --git a/static/images/project-logos/jamwiki.png 
b/static/images/project-logos/jamwiki.png
new file mode 100644
index 000..e1e4430
--- /dev/null
+++ b/static/images/project-logos/jamwiki.png
Binary files differ
diff --git a/wikiversions.json b/wikiversions.json
index c948a3a..f3cd731 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -372,6 +372,7 @@
 "itwiktionary": "php-1.27.0-wmf.22",
 "iuwiki": "php-1.27.0-wmf.22",
 "iuwiktionary": "php-1.27.0-wmf.22",
+"jamwiki": "php-1.27.0-wmf.22",
 "jawiki": "php-1.27.0-wmf.22",
 "jawikibooks": "php-1.27.0-wmf.22",
 "jawikinews": "php-1.27.0-wmf.22",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cb6b82e..7227407 100644
--- 

[MediaWiki-commits] [Gerrit] Fix PHP version check to stop 7.0 breakage - change (wikimedia...civicrm)

2016-05-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix PHP version check to stop 7.0 breakage
..

Fix PHP version check to stop 7.0 breakage

Change-Id: I6729b3e25f998e8007da67fa24c56cb1433efa21
---
M packages/DB/DataObject.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/50/286550/1

diff --git a/packages/DB/DataObject.php b/packages/DB/DataObject.php
index 88e6b2a..87536d8 100644
--- a/packages/DB/DataObject.php
+++ b/packages/DB/DataObject.php
@@ -179,7 +179,7 @@
 // NOTE: Overload SEGFAULTS ON PHP4 + Zend Optimizer (see define before..)
 // these two are BC/FC handlers for call in PHP4/5
 
-if ( substr(phpversion(),0,1) == 5) {
+if (version_compare(phpversion(),'5.0.0','ge')) {
 class DB_DataObject_Overload
 {
 function __call($method,$args)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6729b3e25f998e8007da67fa24c56cb1433efa21
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Truncate lock names for MySQL 5.7 - change (wikimedia...civicrm)

2016-05-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Truncate lock names for MySQL 5.7
..

Truncate lock names for MySQL 5.7

Copied from a patch attached to
https://issues.civicrm.org/jira/browse/CRM-17846

Change-Id: I3f472844d8c63ed92ee7cb8c49e21d69228e4725
---
M CRM/Core/Lock.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/49/286549/1

diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php
index 9c28de7..12c1e54 100644
--- a/CRM/Core/Lock.php
+++ b/CRM/Core/Lock.php
@@ -124,6 +124,10 @@
 else {
   $this->_name = $database . '.' . $domainID . '.' . $name;
 }
+if (strlen($this->_name) > 64) {
+  $this->_name = sha1( $this->_name );
+}
+
 if (defined('CIVICRM_LOCK_DEBUG')) {
   CRM_Core_Error::debug_log_message('trying to construct lock for ' . 
$this->_name);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f472844d8c63ed92ee7cb8c49e21d69228e4725
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] UpdateBetaFeatureUserCountsJob: Actually return true at the end - change (mediawiki...BetaFeatures)

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

Change subject: UpdateBetaFeatureUserCountsJob: Actually return true at the end
..


UpdateBetaFeatureUserCountsJob: Actually return true at the end

Change-Id: I69bb96ea8209019a4dc9bddc2cbe4f293dd55a6e
---
M includes/UpdateBetaFeatureUserCountsJob.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/UpdateBetaFeatureUserCountsJob.php 
b/includes/UpdateBetaFeatureUserCountsJob.php
index 4b0e4ec..9e41973 100644
--- a/includes/UpdateBetaFeatureUserCountsJob.php
+++ b/includes/UpdateBetaFeatureUserCountsJob.php
@@ -66,11 +66,13 @@
);
}
 
-   return $dbw->replace(
+   $dbw->replace(
'betafeatures_user_counts',
array( 'feature' ),
$rows,
__METHOD__
);
+
+   return true;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69bb96ea8209019a4dc9bddc2cbe4f293dd55a6e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
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] Show the cross-wiki notifications beta feature invitation on... - change (operations/mediawiki-config)

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

Change subject: Show the cross-wiki notifications beta feature invitation on 
all wikis
..


Show the cross-wiki notifications beta feature invitation on all wikis

Bug: T117669
Change-Id: I6d0dcb572379df2e3874eda9f0cfac9348ca75a8
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b15f42d..cb6b82e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15447,8 +15447,7 @@
'default' => true,
 ],
 'wmgEchoShowFooterNotice' => [
-   'default' => false,
-   'testwiki' => true,
+   'default' => true,
 ],
 'wmgEchoFooterNoticeURL' => [
'default' => 
'https://wikimedia.qualtrics.com/SE/?SID=SV_eRMpgEPhVcUEkn3',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d0dcb572379df2e3874eda9f0cfac9348ca75a8
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CRM-18193 default log_conn values for interacting with mysql... - change (wikimedia...civicrm)

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

Change subject: CRM-18193 default log_conn values for interacting with mysql 
outside of CiviCRM.
..


CRM-18193 default log_conn values for interacting with mysql outside of CiviCRM.

In this instance @uniqueID will not be set. We had a go at setting it
within the trigger but that was unreliable. Eventual decision was a
string 'c_' to identify a system connection + a timestamp to hourly
granularity + the connection id. Proposed further work is to
specifically block the revert from the UI for these and add a higher
permission or a 'yes I really really mean it' param to the revert api
for these.

Change-Id: I2ce37d945c86227c35e50e7f33c4254f30d3f975
---
M CRM/Logging/Schema.php
1 file changed, 10 insertions(+), 7 deletions(-)

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



diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index 67c46ef..4a2333c 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -838,18 +838,21 @@
 $deleteSQL .= "OLD.$column, ";
   }
   if (civicrm_api3('Setting', 'getvalue', array('name' => 
'logging_uniqueid_date', 'group' => 'CiviCRM Preferences'))) {
-$sqlStmt .= "@uniqueID, @civicrm_user_id, '{eventName}');";
-$deleteSQL .= "@uniqueID, @civicrm_user_id, '{eventName}');";
+// Note that when connecting directly via mysql @uniqueID may not be 
set so a fallback is
+// 'c_' to identify a non-CRM connection + timestamp to the hour + 
connection_id
+// If the connection_id is longer than 6 chars it will be truncated.
+// We tried setting the @uniqueID in the trigger but it was unreliable.
+// An external interaction could split over 2 connections & it seems 
worth blocking the revert on
+// these reports & adding extra permissioning to the api for this.
+$connectionSQLString = "COALESCE(@uniqueID, LEFT(CONCAT('c_', 
unix_timestamp()/3600, CONNECTION_ID()), 17))";
   }
   else {
 // The log tables have not yet been converted to have varchar(17) 
fields for log_conn_id.
 // Continue to use the less reliable connection_id for al tables for 
now.
-$sqlStmt .= "CONNECTION_ID(), @civicrm_user_id, '{eventName}');";
-$deleteSQL .= "@uniqueID, @civicrm_user_id, '{eventName}');";
+$connectionSQLString = "CONNECTION_ID()";
   }
-
-  $sqlStmt .= "END IF;";
-  $deleteSQL .= "END IF;";
+  $sqlStmt .= $connectionSQLString . ", @civicrm_user_id, '{eventName}'); 
END IF;";
+  $deleteSQL .= $connectionSQLString . ", @civicrm_user_id, 
'{eventName}'); END IF;";
 
   $insertSQL .= $sqlStmt;
   $updateSQL .= $sqlStmt;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ce37d945c86227c35e50e7f33c4254f30d3f975
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove wmf EntityTag.getdetails api - change (wikimedia...civicrm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Remove wmf EntityTag.getdetails api
..

Remove wmf EntityTag.getdetails api

Explicitly removing this in preparation for 4.7 update, since I'd rather we did 
QA on it's removal than see it quietly dropped. I grepped got 'getdetails' and 
could
not find evidence we still use this api. I think that code got removed in our 
last upgrade & the comments seem to bear that out.

Bug: T133806
Change-Id: I4e65b0914f26a5a1bda6a4e204186a5bc0bfa8be
---
M api/v3/EntityTag.php
1 file changed, 0 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/48/286548/1

diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php
index 2992e29..c775318 100644
--- a/api/v3/EntityTag.php
+++ b/api/v3/EntityTag.php
@@ -71,27 +71,6 @@
 }
 
 /**
- * @deprecated
- *
- * This is ported from wmf 4.2 but (hopefully) no longer used
- * and should be removed after another a few more checks to ensure it
- * is not called.
- *
- * @param $params
- * @return array
- */
-function civicrm_api3_entity_tag_getdetails($params) {
-$values = CRM_Core_BAO_EntityTag::getTagDetails($params['entity_id'], 
$params['entity_table']);
-return civicrm_api3_create_success($values, $params);
-}
-
-function _civicrm_api3_entity_tag_getdetails_spec(&$params) {
-$params['entity_id']['api.required'] = 1;
-$params['entity_id']['api.aliases'] = array('contact_id');
-$params['entity_table']['api.default'] = 'civicrm_contact';
-}
-
-/**
  * Create an entity tag.
  *
  * @param array $params

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e65b0914f26a5a1bda6a4e204186a5bc0bfa8be
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Document mInterwikis in LinksUpdate - change (mediawiki/core)

2016-05-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Document mInterwikis in LinksUpdate
..

Document mInterwikis in LinksUpdate

Change-Id: If10840c5df849455027b5a497097e583fb982a65
---
M includes/deferred/LinksUpdate.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/286547/1

diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index 4215ed0..c0205be 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -55,6 +55,9 @@
/** @var array Map of language codes to titles */
public $mInterlangs;
 
+   /** @var array 2-D map of (prefix => DBK => 1) */
+   public $mInterwikis;
+
/** @var array Map of arbitrary name to value */
public $mProperties;
 

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

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

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


[MediaWiki-commits] [Gerrit] udpmxircecho: fix utf-8 encoding issue - change (operations/puppet)

2016-05-02 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: udpmxircecho: fix utf-8 encoding issue
..

udpmxircecho: fix utf-8 encoding issue

When starting this on the new IRC server, it spammed a whole lot

'ascii' codec can't decode byte 0xd0 in position 209: ordinal not in range(128)

and for example the ru.wikipedia channel stayed empty.

This fixes that issue, and makes it output things again.

Bug:T123729
Change-Id: I60a4d2455e8e728b38c7b6a145e28ed24b836d7f
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/286546/1

diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index bda431b..df2ff38 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -2,6 +2,9 @@
 #
 # usage: udpmxircecho.py nickname server
 import sys
+reload(sys)
+sys.setdefaultencoding('utf8')
+
 <% if scope.function_os_version(['debian >= jessie']) %>
 from irc.bot import SingleServerIRCBot
 <% else %>

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

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

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


[MediaWiki-commits] [Gerrit] Updated MySql trigger code - change (wikimedia...civicrm)

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

Change subject: Updated MySql trigger code
..


Updated MySql trigger code

NB - I think I should move this to our wmf_civicrm drupal module - but let's 
get the commit update merged first for history

Bug: T133745
Change-Id: I72d9543deedb5e9236f64f8c5efe0f0cf37d
---
M sql/trigger_create.mysql
1 file changed, 2,797 insertions(+), 439 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72d9543deedb5e9236f64f8c5efe0f0cf37d
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Repurpose survey call-out in the footer for beta feature inv... - change (mediawiki...Echo)

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

Change subject: Repurpose survey call-out in the footer for beta feature 
invitation
..


Repurpose survey call-out in the footer for beta feature invitation

Removing the info popup because we don't have to show
a privacy notice when linking within the wiki.

This adds a database query to every page view for logged-in
users; If78bfc710, once merged, will fix that.

Bug: T117669
Change-Id: I8451db34ae8e94264e4921ecd6df6e4b32c7623a
(cherry picked from commit 4f7f1a3a0984add098f21d281f1c8b0158005aff)
---
M Echo.php
M Hooks.php
M Resources.php
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiEchoNotifications.php
M modules/ooui/mw.echo.ui.FooterNoticeWidget.js
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
8 files changed, 37 insertions(+), 47 deletions(-)

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



diff --git a/Echo.php b/Echo.php
index 0c2081d..ac1ce85 100644
--- a/Echo.php
+++ b/Echo.php
@@ -507,8 +507,8 @@
 // By default, send emails for each notification as they come in
 $wgDefaultUserOptions['echo-email-frequency'] = 0; 
/*EchoHooks::EMAIL_IMMEDIATELY*/
 
-// By default, do not dismiss the feedback alert
-$wgDefaultUserOptions['echo-dismiss-feedback-alert' ] = 0;
+// By default, do not dismiss the beta feature invitation
+$wgDefaultUserOptions['echo-dismiss-beta-invitation' ] = 0;
 
 if ( $wgAllowHTMLEmail ) {
$wgDefaultUserOptions['echo-email-format'] = 'html'; 
/*EchoHooks::EMAIL_FORMAT_HTML*/
diff --git a/Hooks.php b/Hooks.php
index d1dd4d1..e687fc6 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -420,7 +420,7 @@
}
 
if ( $wgEchoShowFooterNotice ) {
-   $preferences['echo-dismiss-feedback-alert'] = array(
+   $preferences['echo-dismiss-beta-invitation'] = array(
'type' => 'api',
);
}
@@ -752,7 +752,7 @@
 * @return bool true in all cases
 */
static function onPersonalUrls( &$personal_urls, &$title, $sk ) {
-   global $wgEchoNewMsgAlert;
+   global $wgEchoNewMsgAlert, $wgEchoShowFooterNotice;
$user = $sk->getUser();
if ( $user->isAnon() ) {
return true;
@@ -814,6 +814,18 @@
'alert' => $seenAlertTime,
'message' => $seenMsgTime
) );
+
+   if (
+   $wgEchoShowFooterNotice &&
+   !$user->getOption( 'echo-cross-wiki-notifications' ) &&
+   !$user->getOption( 'echo-dismiss-beta-invitation' )
+   ) {
+   $unreadWikis = EchoUnreadWikis::newFromUser( $user );
+   $counts = $unreadWikis->getUnreadCounts();
+   if ( count( $counts ) > 1 ) {
+   $sk->getOutput()->addJsConfigVars( 
'wgEchoShowBetaInvitation', true );
+   }
+   }
 
$msgText = EchoNotificationController::formatNotificationCount( 
$msgCount );
$alertText = 
EchoNotificationController::formatNotificationCount( $alertCount );
@@ -1229,10 +1241,9 @@
}
 
public static function onResourceLoaderGetConfigVars( &$vars ) {
-   global $wgEchoShowFooterNotice, $wgEchoFooterNoticeURL;
+   global $wgEchoFooterNoticeURL;
 
$vars['wgEchoMaxNotificationCount'] = 
MWEchoNotifUser::MAX_BADGE_COUNT;
-   $vars['wgEchoShowFooterNotice'] = $wgEchoShowFooterNotice;
$vars['wgEchoFooterNoticeURL'] = $wgEchoFooterNoticeURL;
 
return true;
diff --git a/Resources.php b/Resources.php
index 44369a1..d0c5229 100644
--- a/Resources.php
+++ b/Resources.php
@@ -52,6 +52,13 @@
'dependencies' => array(
'ext.echo.ui',
'ext.echo.styles.badge',
+   'mediawiki.util',
+   ),
+   'messages' => array(
+   'echo-popup-footer-beta-invitation',
+   'echo-popup-footer-beta-invitation-link',
+   // echo-popup-footer-beta-invitation uses this message 
with {{int:}}:
+   'echo-pref-beta-feature-cross-wiki-message',
),
'targets' => array( 'desktop' ),
),
@@ -119,9 +126,6 @@
'echo-notification-message',
'echo-notification-loginrequired',
'echo-notification-popup-loginrequired',
-   'echo-popup-footer-feedback',
-   'echo-popup-footer-feedback-survey',
-   'echo-popup-footer-feedback-info',
'notification-link-text-collapse-all',

[MediaWiki-commits] [Gerrit] FooterNoticeWidget: Top-align the close icon - change (mediawiki...Echo)

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

Change subject: FooterNoticeWidget: Top-align the close icon
..


FooterNoticeWidget: Top-align the close icon

Bug: T117669
Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
(cherry picked from commit 73b0a083d42057a4463f954179dfdb997c95c951)
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index be0528e..1549ae2 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -29,6 +29,8 @@
&-info {
.mw-echo-ui-mixin-hover-opacity();
 
+   vertical-align: top;
+
.oo-ui-iconElement-icon {
width: 1.3em !important;
height: 1.3em !important;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't show edit link if editing is not supported for content... - change (mediawiki...MobileFrontend)

2016-05-02 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Don't show edit link if editing is not supported for content 
handler
..

Don't show edit link if editing is not supported for content handler

Bug: T134206
Change-Id: I0b16e1e03c26688461cffa70b3f4b833806c390f
---
M includes/skins/SkinMinerva.php
1 file changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ec80170..b498261 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -24,6 +24,9 @@
protected $mobileContext;
/** @var bool whether the page is the user's page, i.e. User:Username */
public $isUserPage = false;
+   /** @var ContentHandler Content handler of page */
+   public $contentHandler = null;
+
/**
 * @var boolean Whether the language button should be included in the 
secondary
 * actions HTML on non-main pages
@@ -128,7 +131,13 @@
// All actions disabled on main apge.
if ( !$title->isMainPage() &&
in_array( $action, $this->getMFConfig()->get( 
'MinervaPageActions' ) ) ) {
-   return true;
+
+   if ( $action === 'edit' ) {
+   return 
$this->contentHandler->supportsDirectEditing() &&
+   
$this->contentHandler->supportsDirectApiEditing();
+   } else {
+   return true;
+   }
} else {
return false;
}
@@ -206,6 +215,8 @@
$this->mobileContext = MobileContext::singleton();
$this->isMobileMode = 
$this->mobileContext->shouldDisplayMobileView();
$title = $this->getTitle();
+   $this->contentHandler = ContentHandler::getForTitle( $title );
+
if ( $title->inNamespace( NS_USER ) && !$title->isSubpage() ) {
$pageUserId = User::idFromName( $title->getText() );
if ( $pageUserId ) {

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

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

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


[MediaWiki-commits] [Gerrit] udpmxircecho: remove newlines from RC data - change (operations/puppet)

2016-05-02 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: udpmxircecho: remove newlines from RC data
..

udpmxircecho: remove newlines from RC data

After a lot of debugging we found out why the IRC bot
works on the old IRC server but not on the new one.

< mutante> May  2 22:20:38 kraz udpmxircecho.py[30092]: Carriage returns not 
allowed in privmsg(text)

< Krenair> Well, it is a different version of SingleServerIRCBot

< Krenair> confirmed, old server accepts messages with linebreaks, old one does 
not

Bug:T123729
Change-Id: I5a7809fd3320a9c6dfde36abc880e78f2920e607
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/286544/1

diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index 5ffb0b4..bda431b 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -28,7 +28,7 @@
 if len(sp) == 2:
 channel = sp[0]
 text = sp[1]
-text = text.lstrip()
+text = 
text.lstrip().replace('\r','').replace('\n','')
 
 if channel not in self.bot.chans:
 self.bot.chans.append(channel)

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

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

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


[MediaWiki-commits] [Gerrit] Fix topic creation on mobile - change (mediawiki...Flow)

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

Change subject: Fix topic creation on mobile
..


Fix topic creation on mobile

There is code to only save the 'flow-editor' preference on-change
if the user's old preferred editor is available.

This means it won't get forced to 'wikitext' on mobile (where VE isn't
available).  However, we should still emit the 'change' event,
since the meaning of the EditorSwitcherWidget 'change' event is:

"The contents of the editor changed."

This allows the topic creation button to un-disable.

Bug: T134060
Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
(cherry picked from commit 292ff27a84aff04f1f33d881a2033835879dcc78)
---
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js 
b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
index 7971194..1edd1ff 100644
--- a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
+++ b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
@@ -446,6 +446,8 @@
return;
}
 
+   this.emit( 'change' );
+
// Normalize 'none' to 'wikitext'
if ( currentPref === 'none' ) {
currentPref = 'wikitext';
@@ -467,8 +469,6 @@
// Ensure we also see that preference in the current 
page
mw.user.options.set( 'flow-editor', name );
}
-
-   this.emit( 'change' );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't auto-create frozen index - change (mediawiki...CirrusSearch)

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

Change subject: Don't auto-create frozen index
..


Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index creation,
this is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
---
M CirrusSearch.php
M includes/Connection.php
2 files changed, 17 insertions(+), 6 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index cba4dbd..f55f2f7 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -908,6 +908,13 @@
  */
 $wgCirrusSearchMasterTimeout = '30s';
 
+/**
+ * Allow runtime creation of the frozen index. This can cause race conditions 
if many
+ * things are writing in parallel and is not suggested. This is a temporary 
fix and
+ * will be removed post-haste.
+ */
+$wgCirrusSearchCreateFrozenIndex = true;
+
 $includes = __DIR__ . "/includes/";
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/includes/Connection.php b/includes/Connection.php
index 5a6f9dc..002b243 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -194,13 +194,17 @@
 * @return \Elastica\Index
 */
public function getFrozenIndex() {
+   global $wgCirrusSearchCreateFrozenIndex;
+
$index = $this->getIndex( 
'mediawiki_cirrussearch_frozen_indexes' );
-   if ( !$index->exists() ) {
-   $options = array(
-   'number_of_shards' => 1,
-   'auto_expand_replicas' => '0-2',
-);
-   $index->create( $options, true );
+   if ( $wgCirrusSearchCreateFrozenIndex ) {
+   if ( !$index->exists() ) {
+   $options = array(
+   'number_of_shards' => 1,
+   'auto_expand_replicas' => '0-2',
+);
+   $index->create( $options, true );
+   }
}
return $index;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Keep a reference of leaflet layer objects created in the cod... - change (mediawiki...Kartographer)

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

Change subject: Keep a reference of leaflet layer objects created in the code, 
for internal/developer use.
..


Keep a reference of leaflet layer objects created
in the code, for internal/developer use.

Bug: T134202
Change-Id: I0201df4f427ecc18d066336ee221054daa2f7153
---
M modules/kartographer.js
1 file changed, 17 insertions(+), 6 deletions(-)

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



diff --git a/modules/kartographer.js b/modules/kartographer.js
index d8e7c43..9782318 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -1,7 +1,6 @@
 ( function ( $, mw ) {
 
// Load this script after lib/mapbox-lib.js
-
var scale, urlFormat, windowManager, mapDialog,
mapServer = mw.config.get( 'wgKartographerMapServer' ),
forceHttps = mapServer[ 4 ] === 's',
@@ -96,17 +95,26 @@
map.addControl( new mw.kartographer.FullScreenControl( 
{ mapPositionData: data } ) );
}
 
-   L.tileLayer( mapServer + '/' + style + urlFormat, {
+   /**
+* @property {L.TileLayer} Reference to `Wikimedia` tile layer.
+*/
+   map.wikimediaLayer = L.tileLayer( mapServer + '/' + style + 
urlFormat, {
maxZoom: 18,
attribution: mw.message( 'kartographer-attribution' 
).parse()
} ).addTo( map );
+
+   /**
+* @property {Object} Hash map of data groups and their 
corresponding
+*   {@link L.mapbox.FeatureLayer layers}.
+*/
+   map.dataLayers = {};
 
if ( data.overlays ) {
 
getMapGroupData( data.overlays ).done( function ( 
mapData ) {
$.each( data.overlays, function ( index, group 
) {
if ( mapData.hasOwnProperty( group ) && 
mapData[ group ] ) {
-   mw.kartographer.addDataLayer( 
map, mapData[ group ] );
+   map.dataLayers[ group ] = 
mw.kartographer.addDataLayer( map, mapData[ group ] );
} else {
mw.log( 'Layer not found or 
contains no data: "' + group + '"' );
}
@@ -114,7 +122,6 @@
} );
 
}
-
return map;
};
 
@@ -314,6 +321,8 @@
}
 
mw.hook( 'wikipage.content' ).add( function ( $content ) {
+   var mapsInArticle = [];
+
$content.on( 'click', '.mw-kartographer-link', function ( ) {
var data = getMapData( this );
 
@@ -328,7 +337,6 @@
sleepNote: false,
sleepOpacity: 1
} );
-
$content.find( '.mw-kartographer-interactive' ).each( function 
() {
var map,
data = getMapData( this );
@@ -338,13 +346,16 @@
map = mw.kartographer.createMap( this, data );
map.doubleClickZoom.disable();
 
-   mw.hook( 'wikipage.maps' ).fire( map, false /* 
isFullScreen */ );
+   mapsInArticle.push( map );
 
$( this ).on( 'dblclick', function () {
mw.kartographer.openFullscreenMap( 
data, map );
} );
}
} );
+
+   // Allow customizations of interactive maps in article.
+   mw.hook( 'wikipage.maps' ).fire( mapsInArticle, false /* 
isFullScreen */ );
} );
 
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0201df4f427ecc18d066336ee221054daa2f7153
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix JSAPI. - change (mediawiki...parsoid)

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

Change subject: Fix JSAPI.
..


Fix JSAPI.

Follow-up to 39e10aea.

Change-Id: Ic30a47bcf1ec18267ee310b9aa9ab88e8f31207c
---
M lib/html2wt/SelectiveSerializer.js
M lib/html2wt/WikitextSerializer.js
M lib/jsapi.js
M tests/mocha/jsapi.js
4 files changed, 37 insertions(+), 24 deletions(-)

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



diff --git a/lib/html2wt/SelectiveSerializer.js 
b/lib/html2wt/SelectiveSerializer.js
index 51bf679..ddfac1a 100644
--- a/lib/html2wt/SelectiveSerializer.js
+++ b/lib/html2wt/SelectiveSerializer.js
@@ -43,7 +43,7 @@
  */
 SSP.serializeDOM = Promise.method(function(body) {
console.assert(DU.isBody(body), 'Expected a body node.');
-   console.assert(this.env.page.editedDoc, 'Should be set.');
+   console.assert(this.env.page.editedDoc, 'Should be set.');  // See 
WSP.serializeDOM
 
var startTimers = new Map();
var stats = this.stats;
diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index 53e57bd..7a9300b 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -1251,6 +1251,11 @@
  */
 WSP.serializeDOM = Promise.method(function(body, selserMode) {
console.assert(DU.isBody(body), 'Expected a body node.');
+   // `editedDoc` is simply body's ownerDocument.  However, since we make
+   // recursive calls to WSP.serializeDOM with elements from dom fragments
+   // from data-mw, we need this to be set prior to the initial call.
+   // It's mainly required for correct serialization of citations in some
+   // scenarios (Ex:  nested in ).
console.assert(this.env.page.editedDoc, 'Should be set.');
 
this.logType = selserMode ? "trace/selser" : "trace/wts";
diff --git a/lib/jsapi.js b/lib/jsapi.js
index 8d8fece..4942e76 100644
--- a/lib/jsapi.js
+++ b/lib/jsapi.js
@@ -17,7 +17,9 @@
 var NodeFilter = DOMImpl.NodeFilter;
 var DU = require('./utils/DOMUtils.js').DOMUtils;
 var Promise = require('./utils/promise.js');
-var WikitextSerializer = 
require('./html2wt/WikitextSerializer.js').WikitextSerializer;
+
+// Note that the JSAPI exposes data-mw directly as a DOM attribute to
+// allow clients to easily edit it.
 
 // WTS helper
 var wts = function(env, nodes) {
@@ -32,7 +34,7 @@
body.appendChild(nodes[i].cloneNode(true));
}
}
-   return (new WikitextSerializer({ env: env })).serializeDOM(body);
+   return DU.serializeDOM(env, body, false);
 };
 
 // toString helper
@@ -189,7 +191,8 @@
// each Transclusion node could represent multiple templates.
var parent = this;
var result = [];
-   DU.getDataMw(node).parts.forEach(function(part, i) {
+   var parts = DU.getJSONAttribute(node, 'data-mw', {}).parts || 
[];
+   parts.forEach(function(part, i) {
if (part.template) {
result.push(new PTemplate(parent.pdoc, parent, 
node, i));
}
@@ -526,8 +529,13 @@
get: function() { return this.node.ownerDocument; },
},
dataMw: {
-   get: function() { return DU.getDataMw(this.node); },
-   set: function(v) { DU.setDataMw(this.node, v); this.update(); },
+   get: function() {
+   return DU.getJSONAttribute(this.node, 'data-mw', {});
+   },
+   set: function(v) {
+   DU.setJSONAttribute(this.node, 'data-mw', v);
+   this.update();
+   },
},
/**
 * Internal helper: enumerate all PNodeLists contained within this node.
diff --git a/tests/mocha/jsapi.js b/tests/mocha/jsapi.js
index cae631c..65dc63b 100644
--- a/tests/mocha/jsapi.js
+++ b/tests/mocha/jsapi.js
@@ -37,7 +37,7 @@
pdoc.document.should.have.property('outerHTML');
});
});
-   it.skip('filters out templates', function() {
+   it('filters out templates', function() {
var text = "I has a template! {{foo|bar|baz|eggs=spam}} See 
it?\n";
var pdoc, templates, template;
return Parsoid.parse(text, { pdoc: true }).then(function(_pdoc) 
{
@@ -68,7 +68,7 @@
wt.should.equal('spam');
});
});
-   it.skip('filters templates, recursively', function() {
+   it('filters templates, recursively', function() {
var text = "{{foo|{{bar}}={{baz|{{spam}}";
return Parsoid.parse(text, { pdoc: true }).then(function(pdoc) {
var templates = pdoc.filterTemplates();
@@ -77,7 +77,7 @@
templates.length.should.equal(3);
});

[MediaWiki-commits] [Gerrit] cirrus: Don't auto-create frozen index - change (operations/mediawiki-config)

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

Change subject: cirrus: Don't auto-create frozen index
..


cirrus: Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index create.
This is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Iac1f069d4f1a8cad18b826a958545338199cb8b9
---
M wmf-config/CirrusSearch-production.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index dc2239f..1130bbb 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -123,3 +123,6 @@
 
 // cache morelike queries to ObjectCache for 24 hours
 $wgCirrusSearchMoreLikeThisTTL = 86400;
+
+// This was causing race conditions and is a temporary fix. A better fix is 
coming soon (T133793)
+$wgCirrusSearchCreateFrozenIndex = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac1f069d4f1a8cad18b826a958545338199cb8b9
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't auto-create frozen index - change (mediawiki...CirrusSearch)

2016-05-02 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Don't auto-create frozen index
..

Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index creation,
this is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
---
M CirrusSearch.php
M includes/Connection.php
2 files changed, 17 insertions(+), 6 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index cba4dbd..f55f2f7 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -908,6 +908,13 @@
  */
 $wgCirrusSearchMasterTimeout = '30s';
 
+/**
+ * Allow runtime creation of the frozen index. This can cause race conditions 
if many
+ * things are writing in parallel and is not suggested. This is a temporary 
fix and
+ * will be removed post-haste.
+ */
+$wgCirrusSearchCreateFrozenIndex = true;
+
 $includes = __DIR__ . "/includes/";
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/includes/Connection.php b/includes/Connection.php
index 5a6f9dc..002b243 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -194,13 +194,17 @@
 * @return \Elastica\Index
 */
public function getFrozenIndex() {
+   global $wgCirrusSearchCreateFrozenIndex;
+
$index = $this->getIndex( 
'mediawiki_cirrussearch_frozen_indexes' );
-   if ( !$index->exists() ) {
-   $options = array(
-   'number_of_shards' => 1,
-   'auto_expand_replicas' => '0-2',
-);
-   $index->create( $options, true );
+   if ( $wgCirrusSearchCreateFrozenIndex ) {
+   if ( !$index->exists() ) {
+   $options = array(
+   'number_of_shards' => 1,
+   'auto_expand_replicas' => '0-2',
+);
+   $index->create( $options, true );
+   }
}
return $index;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Don't auto-create frozen index - change (mediawiki...CirrusSearch)

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

Change subject: Don't auto-create frozen index
..


Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index creation,
this is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
---
M CirrusSearch.php
M includes/Connection.php
2 files changed, 17 insertions(+), 6 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index cba4dbd..f55f2f7 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -908,6 +908,13 @@
  */
 $wgCirrusSearchMasterTimeout = '30s';
 
+/**
+ * Allow runtime creation of the frozen index. This can cause race conditions 
if many
+ * things are writing in parallel and is not suggested. This is a temporary 
fix and
+ * will be removed post-haste.
+ */
+$wgCirrusSearchCreateFrozenIndex = true;
+
 $includes = __DIR__ . "/includes/";
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/includes/Connection.php b/includes/Connection.php
index 5a6f9dc..002b243 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -194,13 +194,17 @@
 * @return \Elastica\Index
 */
public function getFrozenIndex() {
+   global $wgCirrusSearchCreateFrozenIndex;
+
$index = $this->getIndex( 
'mediawiki_cirrussearch_frozen_indexes' );
-   if ( !$index->exists() ) {
-   $options = array(
-   'number_of_shards' => 1,
-   'auto_expand_replicas' => '0-2',
-);
-   $index->create( $options, true );
+   if ( $wgCirrusSearchCreateFrozenIndex ) {
+   if ( !$index->exists() ) {
+   $options = array(
+   'number_of_shards' => 1,
+   'auto_expand_replicas' => '0-2',
+);
+   $index->create( $options, true );
+   }
}
return $index;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] cirrus: Don't auto-create frozen index - change (operations/mediawiki-config)

2016-05-02 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: cirrus: Don't auto-create frozen index
..

cirrus: Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index create.
This is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Iac1f069d4f1a8cad18b826a958545338199cb8b9
---
M wmf-config/CirrusSearch-production.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index dc2239f..1130bbb 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -123,3 +123,6 @@
 
 // cache morelike queries to ObjectCache for 24 hours
 $wgCirrusSearchMoreLikeThisTTL = 86400;
+
+// This was causing race conditions and is a temporary fix. A better fix is 
coming soon (T133793)
+$wgCirrusSearchCreateFrozenIndex = false;

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

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

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


[MediaWiki-commits] [Gerrit] Don't auto-create frozen index - change (mediawiki...CirrusSearch)

2016-05-02 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Don't auto-create frozen index
..

Don't auto-create frozen index

Codfw is experiencing a race condition with frozen index creation,
this is a temporary fix to make the cluster happy. See T133793 for
a complete fix.

Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
---
M CirrusSearch.php
M includes/Connection.php
2 files changed, 17 insertions(+), 6 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index cba4dbd..f55f2f7 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -908,6 +908,13 @@
  */
 $wgCirrusSearchMasterTimeout = '30s';
 
+/**
+ * Allow runtime creation of the frozen index. This can cause race conditions 
if many
+ * things are writing in parallel and is not suggested. This is a temporary 
fix and
+ * will be removed post-haste.
+ */
+$wgCirrusSearchCreateFrozenIndex = true;
+
 $includes = __DIR__ . "/includes/";
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/includes/Connection.php b/includes/Connection.php
index 5a6f9dc..002b243 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -194,13 +194,17 @@
 * @return \Elastica\Index
 */
public function getFrozenIndex() {
+   global $wgCirrusSearchCreateFrozenIndex;
+
$index = $this->getIndex( 
'mediawiki_cirrussearch_frozen_indexes' );
-   if ( !$index->exists() ) {
-   $options = array(
-   'number_of_shards' => 1,
-   'auto_expand_replicas' => '0-2',
-);
-   $index->create( $options, true );
+   if ( $wgCirrusSearchCreateFrozenIndex ) {
+   if ( !$index->exists() ) {
+   $options = array(
+   'number_of_shards' => 1,
+   'auto_expand_replicas' => '0-2',
+);
+   $index->create( $options, true );
+   }
}
return $index;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic056924c2600f8d9ddae8e51ce8dcbab8cadd700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Manage $wgCOntLang and $wgParser in MediaWikiServices. - change (mediawiki/core)

2016-05-02 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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

Change subject: Manage $wgCOntLang and $wgParser in MediaWikiServices.
..

Manage $wgCOntLang and $wgParser in MediaWikiServices.

Some global singletons are currently accessible via global variables.
This change introduces a mechanism for keeping such globals in sync
with the service instances in the global MediaWikiServices instance.

Change-Id: I70a3a4d2b342489433edd300698126916b436cb8
---
M autoload.php
M includes/MediaWikiServices.php
M includes/ServiceWiring.php
A includes/Services/GlobalServiceStub.php
M includes/Setup.php
M includes/installer/CliInstaller.php
M includes/installer/WebInstaller.php
M tests/phpunit/includes/MediaWikiServicesTest.php
A tests/phpunit/includes/Services/GlobalServiceStubTest.php
M tests/phpunit/includes/Services/ServiceContainerTest.php
10 files changed, 178 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/286540/1

diff --git a/autoload.php b/autoload.php
index c8277f5..ce80a3a 100644
--- a/autoload.php
+++ b/autoload.php
@@ -796,6 +796,7 @@
'MediaWiki\\Logger\\NullSpi' => __DIR__ . 
'/includes/debug/logger/NullSpi.php',
'MediaWiki\\Logger\\Spi' => __DIR__ . '/includes/debug/logger/Spi.php',
'MediaWiki\\Services\\DestructibleService' => __DIR__ . 
'/includes/Services/DestructibleService.php',
+   'MediaWiki\\Services\\GlobalServiceStub' => __DIR__ . 
'/includes/Services/GlobalServiceStub.php',
'MediaWiki\\Services\\ServiceContainer' => __DIR__ . 
'/includes/Services/ServiceContainer.php',
'MediaWiki\\Services\\NoSuchServiceException' => __DIR__ . 
'/includes/Services/NoSuchServiceException.php',
'MediaWiki\\Services\\CannotReplaceActiveServiceException' => __DIR__ . 
'/includes/Services/CannotReplaceActiveServiceException.php',
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index 3792943..88cadfd 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -6,11 +6,13 @@
 use EventRelayerGroup;
 use GlobalVarConfig;
 use Hooks;
+use Language;
 use LBFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use LoadBalancer;
 use MediaWiki\Services\ServiceContainer;
 use MWException;
+use Parser;
 use ResourceLoader;
 use SearchEngine;
 use SearchEngineConfig;
@@ -18,6 +20,7 @@
 use SiteLookup;
 use SiteStore;
 use SkinFactory;
+use StubObject;
 
 /**
  * Service locator for MediaWiki core services.
@@ -82,6 +85,7 @@
// configuration from.
$bootstrapConfig = new GlobalVarConfig();
self::$instance = self::newInstance( $bootstrapConfig );
+   self::$instance->updateLegacyGlobals();
}
 
return self::$instance;
@@ -105,6 +109,7 @@
 
$old = self::getInstance();
self::$instance = $services;
+   self::$instance->updateLegacyGlobals();
 
return $old;
}
@@ -158,6 +163,7 @@
self::$instance->destroy();
 
self::$instance = self::newInstance( $bootstrapConfig );
+   self::$instance->updateLegacyGlobals();
}
 
/**
@@ -307,6 +313,39 @@
} );
}
 
+   /**
+* Sets global variables to new service instances.
+*
+* Some legacy services are accessed via global variables, e.g. $wgUser 
and $wgContLang.
+* In order to allow such service instances to be managed by 
MediaWikiServices,
+* these global variables need to be kept in sync with the global 
MediaWikiServices
+* instance.
+*
+* @warning: this should only be called on the global instance!
+*/
+   private function updateLegacyGlobals() {
+   $bindings = [
+   'wgContLang' => 'ContentLanguage',
+   'wgParser' => 'WikitextParser',
+   // TODO: $wgMemc, $wgParser (stub?), $wgOut
+   // XXX: $wgAuth may be set in LocalSettings.php!
+   ];
+
+   // update globals that are set and not stubs
+   foreach ( $bindings as $var => $service) {
+   if ( isset( $GLOBALS[$var] ) && !( $GLOBALS[$var] 
instanceof StubObject ) ) {
+   $GLOBALS[$var] = $this->getService( $service );
+   }
+   }
+
+   // XXX: initContLang() seems to be unused. Can we remove it?
+   if ( isset( $GLOBALS['wgContLang'] ) ) {
+   $GLOBALS['wgContLang']->initContLang();
+   }
+
+   // TODO: from RequestContext: $wgUser, $wgLang (stub?), 
$wgRequest, $wgTitle
+   }
+
// CONVENIENCE GETTERS 

[MediaWiki-commits] [Gerrit] Initial reorganization of js for new forms - change (mediawiki...DonationInterface)

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

Change subject: Initial reorganization of js for new forms
..


Initial reorganization of js for new forms

Standard ext. module names, encapsulated validation functions, less
duplication.

For starters, the new validation module just redirects to the old
global functions.

Bug: T86248
Change-Id: Ib3fbeb436dbba14815f920f0e93d7b30521c5f56
---
M DonationInterface.php
M adyen_gateway/forms/js/adyen.js
M amazon_gateway/amazon.js
M astropay_gateway/astropay_gateway.body.php
A modules/js/ext.donationInterface.forms.js
A modules/js/ext.donationInterface.validation.js
M worldpay_gateway/forms/js/esop.js
7 files changed, 202 insertions(+), 127 deletions(-)

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



diff --git a/DonationInterface.php b/DonationInterface.php
index ad0a0dd..add9f90 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -937,7 +937,35 @@
'scripts' => 'jquery.payment/jquery.payment.js',
 ) + $wgResourceTemplate;
 
-//Forms
+// Forms
+// Exchange rates for all currencies
+$wgResourceModules[ 'ext.donationInterface.currencyRates' ] = array(
+   'class' => 'CurrencyRatesModule',
+);
+
+// Validation for modern forms
+// FIXME: just redirecting to crappy old functions for now.
+// Migrate everything using di.form.core.validate to mustache,
+// then completely rewrite those functions
+$wgResourceModules[ 'ext.donationInterface.validation' ] = array(
+   'scripts' => 'ext.donationInterface.validation.js',
+   'dependencies' => array(
+   'di.form.core.validate',
+   /*'ext.donationInterface.currencyRates',
+   'ext.donationInterface.errorMessages',*/
+   ),
+   'localBasePath' => __DIR__ . '/modules/js',
+   'remoteExtPath' => 'DonationInterface/modules/js',
+);
+
+// Basic setup for modern forms
+$wgResourceModules[ 'ext.donationInterface.forms' ] = array(
+   'scripts' => 'ext.donationInterface.forms.js',
+   'dependencies' => 'ext.donationInterface.validation',
+   'localBasePath' => __DIR__ . '/modules/js',
+   'remoteExtPath' => 'DonationInterface/modules/js',
+);
+
 $wgResourceModules['ext.donationinterface.mustache.styles'] = array (
'styles' => array(
'forms.css'
@@ -949,11 +977,12 @@
 
 $wgResourceModules['ext.donationinterface.adyen.scripts'] = array (
'scripts' => 'adyen.js',
-   'dependencies' => 'di.form.core.validate',
+   'dependencies' => 'ext.donationInterface.forms',
'localBasePath' => __DIR__ . '/adyen_gateway/forms/js',
'remoteExtPath' => 'DonationInterface/adyen_gateway/forms/js'
 );
 
+// TODO: remove
 $wgResourceModules['ext.donationinterface.astropay.scripts'] = array (
'scripts' => 'astropay.js',
'dependencies' => 'di.form.core.validate',
@@ -963,7 +992,7 @@
 
 $wgResourceModules['ext.donationinterface.worldpay.esopjs'] = array (
'scripts' => 'esop.js',
-   'dependencies' => 'di.form.core.validate',
+   'dependencies' => 'ext.donationInterface.forms',
'localBasePath' => __DIR__ . '/worldpay_gateway/forms/js',
'remoteExtPath' => 'DonationInterface/worldpay_gateway/forms/js',
'messages' => array(
@@ -971,6 +1000,7 @@
)
 );
 
+// FIXME: remove if unused
 $wgResourceModules['ext.donationinterface.worldpay.iframecss'] = array (
'styles' => 'iframe.css',
'dependencies' => 'di.form.core.validate',
@@ -987,7 +1017,7 @@
 
 $wgResourceModules['ext.donationinterface.amazon.scripts'] = array(
'scripts' => 'amazon.js',
-   'dependencies' => 'di.form.core.validate',
+   'dependencies' => 'ext.donationInterface.validation',
'localBasePath' => __DIR__ . '/amazon_gateway',
'remoteExtPath' => 'DonationInterface/amazon_gateway',
'messages' => array(
@@ -1061,6 +1091,7 @@
 );
 
 // minimum amounts for all currencies
+// FIXME: this is actually rates, remove
 $wgResourceModules[ 'di.form.core.minimums' ] = array(
'class' => 'CurrencyRatesModule',
 );
@@ -1068,7 +1099,10 @@
 // form validation resource
 $wgResourceModules[ 'di.form.core.validate' ] = array(
'scripts' => 'validate_input.js',
-   'dependencies' => array( 'di.form.core.minimums', 
'ext.donationInterface.errorMessages' ),
+   'dependencies' => array(
+   'ext.donationInterface.currencyRates',
+   'ext.donationInterface.errorMessages'
+   ),
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'DonationInterface/modules'
 );
diff --git a/adyen_gateway/forms/js/adyen.js b/adyen_gateway/forms/js/adyen.js
index 78513dc..e23bb5a 100644
--- a/adyen_gateway/forms/js/adyen.js
+++ b/adyen_gateway/forms/js/adyen.js
@@ -1,61 +1,63 @@
-window.displayCreditCardForm = function () {
-   $( '#overlay' ).show();
-   $( '#paymentContinueBtn' ).removeClass( 

[MediaWiki-commits] [Gerrit] Change-Prop: Enable summary and definition updates. - change (operations/puppet)

2016-05-02 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

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

Change subject: Change-Prop: Enable summary and definition updates.
..

Change-Prop: Enable summary and definition updates.

First step in production testing of a change-prop service.

Apart from a puppet dependency, this change is dependent
on code deploy with dependency update of change-prop
to include https://github.com/d00rman/kafka-node/pull/1

Change-Id: I2bdd3cc97651cd27722daa6d93996653037c891a
---
M hieradata/labs/deployment-prep/common.yaml
M modules/changeprop/manifests/init.pp
M modules/changeprop/templates/config.yaml.erb
3 files changed, 50 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/286539/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 582f22d..8651189 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -15,6 +15,7 @@
 citoid::zotero_host: deployment-zotero01.deployment-prep.eqiad.wmflabs
 citoid::zotero_port: 1969
 changeprop::mwapi_uri: 
http://deployment-mediawiki02.deployment-prep.eqiad.wmflabs/w/api.php
+changeprop::restbase_uri: http://deployment-restbase02.eqiad.wmflabs:7231
 graphoid::domains:
   - wmflabs.org
   - mediawiki.org
diff --git a/modules/changeprop/manifests/init.pp 
b/modules/changeprop/manifests/init.pp
index eecd101..f521492 100644
--- a/modules/changeprop/manifests/init.pp
+++ b/modules/changeprop/manifests/init.pp
@@ -14,9 +14,14 @@
 # [*mwapi_uri*]
 #   The full URI of the MW API contact point. Default:
 #   http://api.svc.${::mw_primary}.wmnet/w/api.php
+#
+# [*restbase_uri*]
+#   The host/IP where to reach RESTBase. Default:
+#   http://restbase.svc.${::rb_site}.wmnet:7231
 class changeprop(
 $zk_uri,
 $mwapi_uri = "http://api.svc.${::mw_primary}.wmnet/w/api.php;,
+$restbase_uri = "http://restbase.svc.${::rb_site}.wmnet:7231;,
 ) {
 
 service::node { 'changeprop':
diff --git a/modules/changeprop/templates/config.yaml.erb 
b/modules/changeprop/templates/config.yaml.erb
index 6ddfe0f..6259ede 100644
--- a/modules/changeprop/templates/config.yaml.erb
+++ b/modules/changeprop/templates/config.yaml.erb
@@ -23,4 +23,47 @@
   options:
 uri: <%= @zk_uri %>
 dc_name: <%= scope.lookupvar('::site') %>
-templates: {}
+templates:
+  summary_rerender:
+topic: resource_change
+retry_limit: 2
+retry_delay: 500
+retry_on:
+  status:
+- '5xx'
+match:
+  meta:
+uri: 
'/^https?:\/\/[a-zA-Z0-9\:\.]+\/api\/rest_v1\/page\/html\/([^/]+)$/'
+  tags:
+- restbase
+match_not:
+  meta:
+domain: '/wiktionary.org$/'
+exec:
+  method: get
+  # Don't encode title since it should be already encoded
+  uri: '<%= @restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri[1]}}'
+  headers:
+cache-control: no-cache
+
+  definition_rerender:
+topic: resource_change
+retry_limit: 2
+retry_delay: 500
+retry_on:
+  status:
+- '5xx'
+match:
+  meta:
+# These URIs are coming from RESTBase, so we know that 
article titles will be normalized
+# and main namespace articles will not have : 
(uri-encoded, so %3a or %3A)
+uri: 
'/^https?:\/\/[a-zA-Z0-9\:\.]+\/api\/rest_v1\/page\/html\/((?:(?!%3a|%3A).)+)$/'
+domain: '/wiktionary.org$/'
+  tags:
+- restbase
+exec:
+  method: get
+  # Don't encode title since it should be already encoded
+  uri: '<%= @restbase_uri 
%>/{{message.meta.domain}}/v1/page/definition/{{match.meta.uri[1]}}'
+  headers:
+cache-control: no-cache

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

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

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


[MediaWiki-commits] [Gerrit] Also send IRC stream to kraz - change (operations/mediawiki-config)

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

Change subject: Also send IRC stream to kraz
..


Also send IRC stream to kraz

New IRC server

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ca2f1e8..2ffd094 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3191,6 +3191,13 @@
'omit_bots' => false,
];
 
+   $wgRCFeeds['kraz'] = [
+   'formatter' => 'IRCColourfulRCFeedFormatter',
+   'uri' => "udp://208.80.153.44:$wmgRC2UDPPort/$wmgRC2UDPPrefix",
+   'add_interwiki_prefix' => false,
+   'omit_bots' => false,
+   ];
+
// RCStream / stream.wikimedia.org
if ( $wmfRealm === 'production' ) {
$wgRCFeeds['rcs1001'] = [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5994d3ab550f948928d4a7b32a6d8190512c923d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Clarify beta feature description - change (mediawiki...Echo)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Clarify beta feature description
..

Clarify beta feature description

Bug: T134014
Change-Id: I933169e2d7a6e1cc5a4e7134748702f8efb21b85
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 17b6aa1..efd0621 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -56,7 +56,7 @@
"echo-pref-cross-wiki-notifications": "Show notifications from other 
wikis",
"echo-pref-new-message-indicator": "Show talk page message indicator in 
my toolbar",
"echo-pref-beta-feature-cross-wiki-message": "Enhanced notifications",
-   "echo-pref-beta-feature-cross-wiki-description": "View and organize 
notifications more easily. Includes cross-wiki notifications, which lets you 
see messages from other wikis.",
+   "echo-pref-beta-feature-cross-wiki-description": "View and organize 
notifications more easily. Includes cross-wiki notifications, which lets you 
see messages from other wikis. (To receive cross-wiki notifications on a given 
wiki, you must activate the beta feature on that wiki.)",
"echo-learn-more": "Learn more",
"echo-log": "Public log",
"echo-new-messages": "You have new messages",

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

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

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


[MediaWiki-commits] [Gerrit] Also send IRC stream to kraz - change (operations/mediawiki-config)

2016-05-02 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Also send IRC stream to kraz
..

Also send IRC stream to kraz

New IRC server

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ca2f1e8..2ffd094 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3191,6 +3191,13 @@
'omit_bots' => false,
];
 
+   $wgRCFeeds['kraz'] = [
+   'formatter' => 'IRCColourfulRCFeedFormatter',
+   'uri' => "udp://208.80.153.44:$wmgRC2UDPPort/$wmgRC2UDPPrefix",
+   'add_interwiki_prefix' => false,
+   'omit_bots' => false,
+   ];
+
// RCStream / stream.wikimedia.org
if ( $wmfRealm === 'production' ) {
$wgRCFeeds['rcs1001'] = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5994d3ab550f948928d4a7b32a6d8190512c923d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki... - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged.

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

CiviCRM submodule update, country search fix

cc49c17 Fix for country search

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50c00073a58db1068bc6a2ea272ac4bb4792846c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki... - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

CiviCRM submodule update, country search fix

cc49c17 Fix for country search

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/36/286536/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50c00073a58db1068bc6a2ea272ac4bb4792846c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Repurpose survey call-out in the footer for beta feature inv... - change (mediawiki...Echo)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Repurpose survey call-out in the footer for beta feature 
invitation
..

Repurpose survey call-out in the footer for beta feature invitation

Removing the info popup because we don't have to show
a privacy notice when linking within the wiki.

This adds a database query to every page view for logged-in
users; If78bfc710, once merged, will fix that.

Bug: T117669
Change-Id: I8451db34ae8e94264e4921ecd6df6e4b32c7623a
(cherry picked from commit 4f7f1a3a0984add098f21d281f1c8b0158005aff)
---
M Echo.php
M Hooks.php
M Resources.php
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiEchoNotifications.php
M modules/ooui/mw.echo.ui.FooterNoticeWidget.js
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
8 files changed, 37 insertions(+), 47 deletions(-)


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

diff --git a/Echo.php b/Echo.php
index 0c2081d..ac1ce85 100644
--- a/Echo.php
+++ b/Echo.php
@@ -507,8 +507,8 @@
 // By default, send emails for each notification as they come in
 $wgDefaultUserOptions['echo-email-frequency'] = 0; 
/*EchoHooks::EMAIL_IMMEDIATELY*/
 
-// By default, do not dismiss the feedback alert
-$wgDefaultUserOptions['echo-dismiss-feedback-alert' ] = 0;
+// By default, do not dismiss the beta feature invitation
+$wgDefaultUserOptions['echo-dismiss-beta-invitation' ] = 0;
 
 if ( $wgAllowHTMLEmail ) {
$wgDefaultUserOptions['echo-email-format'] = 'html'; 
/*EchoHooks::EMAIL_FORMAT_HTML*/
diff --git a/Hooks.php b/Hooks.php
index d1dd4d1..e687fc6 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -420,7 +420,7 @@
}
 
if ( $wgEchoShowFooterNotice ) {
-   $preferences['echo-dismiss-feedback-alert'] = array(
+   $preferences['echo-dismiss-beta-invitation'] = array(
'type' => 'api',
);
}
@@ -752,7 +752,7 @@
 * @return bool true in all cases
 */
static function onPersonalUrls( &$personal_urls, &$title, $sk ) {
-   global $wgEchoNewMsgAlert;
+   global $wgEchoNewMsgAlert, $wgEchoShowFooterNotice;
$user = $sk->getUser();
if ( $user->isAnon() ) {
return true;
@@ -814,6 +814,18 @@
'alert' => $seenAlertTime,
'message' => $seenMsgTime
) );
+
+   if (
+   $wgEchoShowFooterNotice &&
+   !$user->getOption( 'echo-cross-wiki-notifications' ) &&
+   !$user->getOption( 'echo-dismiss-beta-invitation' )
+   ) {
+   $unreadWikis = EchoUnreadWikis::newFromUser( $user );
+   $counts = $unreadWikis->getUnreadCounts();
+   if ( count( $counts ) > 1 ) {
+   $sk->getOutput()->addJsConfigVars( 
'wgEchoShowBetaInvitation', true );
+   }
+   }
 
$msgText = EchoNotificationController::formatNotificationCount( 
$msgCount );
$alertText = 
EchoNotificationController::formatNotificationCount( $alertCount );
@@ -1229,10 +1241,9 @@
}
 
public static function onResourceLoaderGetConfigVars( &$vars ) {
-   global $wgEchoShowFooterNotice, $wgEchoFooterNoticeURL;
+   global $wgEchoFooterNoticeURL;
 
$vars['wgEchoMaxNotificationCount'] = 
MWEchoNotifUser::MAX_BADGE_COUNT;
-   $vars['wgEchoShowFooterNotice'] = $wgEchoShowFooterNotice;
$vars['wgEchoFooterNoticeURL'] = $wgEchoFooterNoticeURL;
 
return true;
diff --git a/Resources.php b/Resources.php
index 44369a1..d0c5229 100644
--- a/Resources.php
+++ b/Resources.php
@@ -52,6 +52,13 @@
'dependencies' => array(
'ext.echo.ui',
'ext.echo.styles.badge',
+   'mediawiki.util',
+   ),
+   'messages' => array(
+   'echo-popup-footer-beta-invitation',
+   'echo-popup-footer-beta-invitation-link',
+   // echo-popup-footer-beta-invitation uses this message 
with {{int:}}:
+   'echo-pref-beta-feature-cross-wiki-message',
),
'targets' => array( 'desktop' ),
),
@@ -119,9 +126,6 @@
'echo-notification-message',
'echo-notification-loginrequired',
'echo-notification-popup-loginrequired',
-   'echo-popup-footer-feedback',
-   'echo-popup-footer-feedback-survey',
-   'echo-popup-footer-feedback-info',

[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)

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

Change subject: Merge master into deployment
..


Merge master into deployment

d54b714 wire 'cancel' in to another spot [redux]

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I427057519a6a0baf9321ab1a112d4b0d1db7366d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Cdentinger 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Show the cross-wiki notifications beta feature invitation on... - change (operations/mediawiki-config)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Show the cross-wiki notifications beta feature invitation on 
all wikis
..

Show the cross-wiki notifications beta feature invitation on all wikis

Change-Id: I6d0dcb572379df2e3874eda9f0cfac9348ca75a8
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b15f42d..cb6b82e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15447,8 +15447,7 @@
'default' => true,
 ],
 'wmgEchoShowFooterNotice' => [
-   'default' => false,
-   'testwiki' => true,
+   'default' => true,
 ],
 'wmgEchoFooterNoticeURL' => [
'default' => 
'https://wikimedia.qualtrics.com/SE/?SID=SV_eRMpgEPhVcUEkn3',

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

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

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


[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)

2016-05-02 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

d54b714 wire 'cancel' in to another spot [redux]

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/33/286533/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I427057519a6a0baf9321ab1a112d4b0d1db7366d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Cdentinger 

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


[MediaWiki-commits] [Gerrit] FooterNoticeWidget: Top-align the close icon - change (mediawiki...Echo)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: FooterNoticeWidget: Top-align the close icon
..

FooterNoticeWidget: Top-align the close icon

Bug: T117669
Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
(cherry picked from commit 73b0a083d42057a4463f954179dfdb997c95c951)
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index be0528e..1549ae2 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -29,6 +29,8 @@
&-info {
.mw-echo-ui-mixin-hover-opacity();
 
+   vertical-align: top;
+
.oo-ui-iconElement-icon {
width: 1.3em !important;
height: 1.3em !important;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] CiviCRM submodule update, country search fix - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged.

Change subject: CiviCRM submodule update, country search fix
..


CiviCRM submodule update, country search fix

cc49c17 Fix for country search

Change-Id: Id104343f1e8bc655d7e00c9b73189d52eb468ee0
---
M civicrm
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/civicrm b/civicrm
index b05ffb4..cc49c17 16
--- a/civicrm
+++ b/civicrm
-Subproject commit b05ffb44338b3710c164160638d8f5c505e77066
+Subproject commit cc49c172ff4edb355a89fb3dfe094793f65cc5fd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id104343f1e8bc655d7e00c9b73189d52eb468ee0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CiviCRM submodule update, country search fix - change (wikimedia...crm)

2016-05-02 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CiviCRM submodule update, country search fix
..

CiviCRM submodule update, country search fix

cc49c17 Fix for country search

Change-Id: Id104343f1e8bc655d7e00c9b73189d52eb468ee0
---
M civicrm
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/31/286531/1

diff --git a/civicrm b/civicrm
index b05ffb4..cc49c17 16
--- a/civicrm
+++ b/civicrm
-Subproject commit b05ffb44338b3710c164160638d8f5c505e77066
+Subproject commit cc49c172ff4edb355a89fb3dfe094793f65cc5fd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id104343f1e8bc655d7e00c9b73189d52eb468ee0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] wire 'cancel' in to another spot [redux] - change (wikimedia...crm)

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

Change subject: wire 'cancel' in to another spot [redux]
..


wire 'cancel' in to another spot [redux]

Change-Id: I6cd5799a200599f90135d6b71080b9871fe73469
---
M sites/all/modules/wmf_audit/BaseAuditProcessor.php
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/sites/all/modules/wmf_audit/BaseAuditProcessor.php 
b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
index d457409..af04821 100644
--- a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
+++ b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
@@ -424,9 +424,13 @@
}
wmf_audit_echo( 'X' );
} else {
-   //@TODO: Some version of makemissing 
should make these, too. Gar.
-   
$remaining['negative'][$this->get_record_human_date( $record )][] = $record;
-   wmf_audit_echo( '.' );
+   // Ignore cancels with no parents 
because they must have
+   // been cancelled before reaching Civi.
+   if ( ! $this->record_is_cancel( $record 
) ) {
+   //@TODO: Some version of 
makemissing should make these, too. Gar.
+   
$remaining['negative'][$this->get_record_human_date( $record )][] = $record;
+   wmf_audit_echo( '.' );
+   }
}
}
wmf_audit_echo( "Processed $neg_count 'negative' 
transactions\n" );
@@ -983,7 +987,11 @@
'recurring' => array(),
);
foreach ( $transactions as $transaction ) {
-   if ( $this->record_is_refund( $transaction ) || 
$this->record_is_chargeback( $transaction ) ) { //negative
+   if (
+   $this->record_is_refund( $transaction ) ||
+   $this->record_is_chargeback( $transaction ) ||
+   $this->record_is_cancel( $transaction )
+   ) { //negative
if ( 
$this->negative_transaction_exists_in_civi( $transaction ) === false ) {
wmf_audit_echo( '-' ); //add a 
subtraction. I am the helpfulest comment ever.
$missing['negative'][] = $transaction;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6cd5799a200599f90135d6b71080b9871fe73469
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix dependency order - change (mediawiki...UIFeedback)

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

Change subject: Fix dependency order
..


Fix dependency order

Change-Id: I5959883f0c7e7fccedd39ba05451a15e4fadf2ba
---
M UiFeedback.php
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/UiFeedback.php b/UiFeedback.php
index ee31e06..90293b0 100644
--- a/UiFeedback.php
+++ b/UiFeedback.php
@@ -35,12 +35,18 @@
 $wgGroupPermissions[ 'UIFeedback_Administator' ][ 'write_uifeedback' ] = true;
 
 // Register modules
+$wgResourceModules[ 'jquery.htmlfeedback' ] = array(
+   'scripts'   => array(
+   'resources/lib.canvas-to-blob.js',
+   'resources/lib.html2canvas.js',
+   'resources/lib.jquery.htmlfeedback.js',
+   ),
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'UIFeedback',
+);
 $wgResourceModules[ 'ext.uiFeedback' ] = array(
'scripts'   => array(
'resources/ext.uiFeedback.js',
-   'resources/lib.jquery.htmlfeedback.js',
-   'resources/lib.html2canvas.js',
-   'resources/lib.canvas-to-blob.js',
),
'styles'=> array( 'resources/ext.uiFeedback.css' ),
'dependencies'  => array(
@@ -50,6 +56,7 @@
'jquery.cookie',
'jquery.ui.draggable',
'jquery.client',
+   'jquery.htmlfeedback',
 
'mediawiki.api',
'mediawiki.util',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5959883f0c7e7fccedd39ba05451a15e4fadf2ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UIFeedback
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
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] FooterNoticeWidget: Top-align the close icon - change (mediawiki...Echo)

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

Change subject: FooterNoticeWidget: Top-align the close icon
..


FooterNoticeWidget: Top-align the close icon

Bug: T117669
Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index be0528e..1549ae2 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -29,6 +29,8 @@
&-info {
.mw-echo-ui-mixin-hover-opacity();
 
+   vertical-align: top;
+
.oo-ui-iconElement-icon {
width: 1.3em !important;
height: 1.3em !important;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Keep a reference of leaflet layer objects created in the cod... - change (mediawiki...Kartographer)

2016-05-02 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: Keep a reference of leaflet layer objects created in the code, 
for internal/developer use.
..

Keep a reference of leaflet layer objects created
in the code, for internal/developer use.

Bug: T134202
Change-Id: I0201df4f427ecc18d066336ee221054daa2f7153
---
M modules/kartographer.js
1 file changed, 19 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/30/286530/1

diff --git a/modules/kartographer.js b/modules/kartographer.js
index d8e7c43..07bfa69 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -1,7 +1,6 @@
 ( function ( $, mw ) {
 
// Load this script after lib/mapbox-lib.js
-
var scale, urlFormat, windowManager, mapDialog,
mapServer = mw.config.get( 'wgKartographerMapServer' ),
forceHttps = mapServer[ 4 ] === 's',
@@ -96,17 +95,26 @@
map.addControl( new mw.kartographer.FullScreenControl( 
{ mapPositionData: data } ) );
}
 
-   L.tileLayer( mapServer + '/' + style + urlFormat, {
-   maxZoom: 18,
-   attribution: mw.message( 'kartographer-attribution' 
).parse()
-   } ).addTo( map );
+   /**
+* @property {L.TileLayer} Reference to `Wikimedia` tile layer.
+*/
+   map.wikimediaLayer = L.tileLayer( mapServer + '/' + style + 
urlFormat, {
+   maxZoom: 18,
+   attribution: mw.message( 
'kartographer-attribution' ).parse()
+   } ).addTo( map );
+
+   /**
+* @property {Object} Hash map of data groups and their 
corresponding
+*   {@link L.mapbox.FeatureLayer layers}.
+*/
+   map.dataLayers = {};
 
if ( data.overlays ) {
 
getMapGroupData( data.overlays ).done( function ( 
mapData ) {
$.each( data.overlays, function ( index, group 
) {
if ( mapData.hasOwnProperty( group ) && 
mapData[ group ] ) {
-   mw.kartographer.addDataLayer( 
map, mapData[ group ] );
+   map.dataLayers[group] = 
mw.kartographer.addDataLayer( map, mapData[ group ] );
} else {
mw.log( 'Layer not found or 
contains no data: "' + group + '"' );
}
@@ -114,7 +122,6 @@
} );
 
}
-
return map;
};
 
@@ -329,6 +336,7 @@
sleepOpacity: 1
} );
 
+   var mapsInArticle = [];
$content.find( '.mw-kartographer-interactive' ).each( function 
() {
var map,
data = getMapData( this );
@@ -338,13 +346,16 @@
map = mw.kartographer.createMap( this, data );
map.doubleClickZoom.disable();
 
-   mw.hook( 'wikipage.maps' ).fire( map, false /* 
isFullScreen */ );
+   mapsInArticle.push(map);
 
$( this ).on( 'dblclick', function () {
mw.kartographer.openFullscreenMap( 
data, map );
} );
}
} );
+
+   // Allow customizations of interactive maps in article.
+   mw.hook( 'wikipage.maps' ).fire( mapsInArticle, false /* 
isFullScreen */ );
} );
 
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0201df4f427ecc18d066336ee221054daa2f7153
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

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


[MediaWiki-commits] [Gerrit] Fix CheckUserHooks IDEA errors and long lines - change (mediawiki...CheckUser)

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

Change subject: Fix CheckUserHooks IDEA errors and long lines
..


Fix CheckUserHooks IDEA errors and long lines

Change-Id: I6d2026cc3ae65930e823f2dcc859daf0e5e6889f
---
M CheckUser.hooks.php
1 file changed, 25 insertions(+), 6 deletions(-)

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



diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php
index 7a5a8df..fecffe1 100755
--- a/CheckUser.hooks.php
+++ b/CheckUser.hooks.php
@@ -5,6 +5,8 @@
 * Saves user data into the cu_changes table
 * Note that other extensions (like AbuseFilter) may call this function 
directly
 * if they want to send data to CU without creating a recentchanges 
entry
+* @param RecentChange $rc
+* @return bool
 */
public static function updateCheckUserData( RecentChange $rc ) {
global $wgRequest;
@@ -84,6 +86,11 @@
/**
 * Hook function to store password reset
 * Saves user data into the cu_changes table
+*
+* @param User $user Sender
+* @param string $ip
+* @param User $account Receiver
+* @return bool
 */
public static function updateCUPasswordResetData( User $user, $ip, 
$account ) {
global $wgRequest;
@@ -102,7 +109,8 @@
'cuc_minor'  => 0,
'cuc_user'   => $user->getId(),
'cuc_user_text'  => $user->getName(),
-   'cuc_actiontext' => wfMessage( 
'checkuser-reset-action', $account->getName() )->inContentLanguage()->text(),
+   'cuc_actiontext' => wfMessage( 
'checkuser-reset-action', $account->getName() )
+   ->inContentLanguage()->text(),
'cuc_comment'=> '',
'cuc_this_oldid' => 0,
'cuc_last_oldid' => 0,
@@ -122,6 +130,11 @@
/**
 * Hook function to store email data
 * Saves user data into the cu_changes table
+* @param MailAddress $to
+* @param MailAddress $from
+* @param string $subject
+* @param string $text
+* @return bool
 */
public static function updateCUEmailData( $to, $from, $subject, $text ) 
{
global $wgSecretKey, $wgRequest, $wgCUPublicKey;
@@ -147,7 +160,8 @@
'cuc_minor'  => 0,
'cuc_user'   => $userFrom->getId(),
'cuc_user_text'  => $userFrom->getName(),
-   'cuc_actiontext' => wfMessage( 
'checkuser-email-action', $hash )->inContentLanguage()->text(),
+   'cuc_actiontext' =>
+   wfMessage( 'checkuser-email-action', $hash 
)->inContentLanguage()->text(),
'cuc_comment'=> '',
'cuc_this_oldid' => 0,
'cuc_last_oldid' => 0,
@@ -332,9 +346,11 @@
'cuc_ip_hex_time', 
"$base/archives/patch-cu_changes_indexes.sql", true ) );
$updater->addExtensionUpdate( array( 'addIndex', 
'cu_changes',
'cuc_user_ip_time', 
"$base/archives/patch-cu_changes_indexes2.sql", true ) );
-   $updater->addExtensionField( 'cu_changes', 
'cuc_private', "$base/archives/patch-cu_changes_privatedata.sql" );
+   $updater->addExtensionField(
+   'cu_changes', 'cuc_private', 
"$base/archives/patch-cu_changes_privatedata.sql" );
} elseif ( $updater->getDB()->getType() == 'postgres' ) {
-   $updater->addExtensionUpdate( array( 'addPgField', 
'cu_changes', 'cuc_private', 'BYTEA' ) );
+   $updater->addExtensionUpdate(
+   array( 'addPgField', 'cu_changes', 
'cuc_private', 'BYTEA' ) );
}
 
return true;
@@ -362,6 +378,8 @@
/**
 * Tell the parser test engine to create a stub cu_changes table,
 * or temporary pages won't save correctly during the test run.
+* @param array $tables
+* @return bool
 */
public static function checkUserParserTestTables( &$tables ) {
$tables[] = 'cu_changes';
@@ -374,7 +392,7 @@
 * privileged users.
 * @param $id Integer: user ID
 * @param $nt Title: user page title
-* @param $links Array: tool links
+* @param $links array: tool links
 * @return true
 */
public static function checkUserContributionsLinks( $id, $nt, &$links ) 
{
@@ -406,7 +424,8 @@
 * blocked by this Block.
 *
 * @param Block $block
-* @param Array &$blockIds
+* @param array &$blockIds
+

[MediaWiki-commits] [Gerrit] FooterNoticeWidget: Top-align the close icon - change (mediawiki...Echo)

2016-05-02 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: FooterNoticeWidget: Top-align the close icon
..

FooterNoticeWidget: Top-align the close icon

Bug: T117669
Change-Id: I70d8df95e719824c8f135d01d6d9bf63a20daf02
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index be0528e..1549ae2 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -29,6 +29,8 @@
&-info {
.mw-echo-ui-mixin-hover-opacity();
 
+   vertical-align: top;
+
.oo-ui-iconElement-icon {
width: 1.3em !important;
height: 1.3em !important;

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

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

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


[MediaWiki-commits] [Gerrit] Quote column name aliases - change (mediawiki/core)

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

Change subject: Quote column name aliases
..


Quote column name aliases

Sometimes, a column name alias is chosen that is a reserved word or is
otherwise invalid (such as an alias named "user" on postgres or mssql).
Let's unconditionally quote the alias so that no matter what the user
specifies, it will not cause the query to error out.

Bug: T118973
Change-Id: If3ea7324980355e78afcdb3bf2596d23bb96412d
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index c36cfdb..8807e13 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1847,7 +1847,7 @@
if ( !$alias || (string)$alias === (string)$name ) {
return $name;
} else {
-   return $name . ' AS ' . $alias; // PostgreSQL needs AS
+   return $name . ' AS ' . $this->addIdentifierQuotes( 
$alias ); // PostgreSQL needs AS
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3ea7324980355e78afcdb3bf2596d23bb96412d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Skizzerz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix dependency order - change (mediawiki...UIFeedback)

2016-05-02 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Fix dependency order
..

Fix dependency order

Change-Id: I5959883f0c7e7fccedd39ba05451a15e4fadf2ba
---
M UiFeedback.php
1 file changed, 10 insertions(+), 3 deletions(-)


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

diff --git a/UiFeedback.php b/UiFeedback.php
index ee31e06..90293b0 100644
--- a/UiFeedback.php
+++ b/UiFeedback.php
@@ -35,12 +35,18 @@
 $wgGroupPermissions[ 'UIFeedback_Administator' ][ 'write_uifeedback' ] = true;
 
 // Register modules
+$wgResourceModules[ 'jquery.htmlfeedback' ] = array(
+   'scripts'   => array(
+   'resources/lib.canvas-to-blob.js',
+   'resources/lib.html2canvas.js',
+   'resources/lib.jquery.htmlfeedback.js',
+   ),
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'UIFeedback',
+);
 $wgResourceModules[ 'ext.uiFeedback' ] = array(
'scripts'   => array(
'resources/ext.uiFeedback.js',
-   'resources/lib.jquery.htmlfeedback.js',
-   'resources/lib.html2canvas.js',
-   'resources/lib.canvas-to-blob.js',
),
'styles'=> array( 'resources/ext.uiFeedback.css' ),
'dependencies'  => array(
@@ -50,6 +56,7 @@
'jquery.cookie',
'jquery.ui.draggable',
'jquery.client',
+   'jquery.htmlfeedback',
 
'mediawiki.api',
'mediawiki.util',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5959883f0c7e7fccedd39ba05451a15e4fadf2ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UIFeedback
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] Update Microsoft SQL Server schema - change (mediawiki/core)

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

Change subject: Update Microsoft SQL Server schema
..


Update Microsoft SQL Server schema

The MSSQL schema is now brought in-line with the MySQL schema.
Additionally, various issues that prevented successful installation or
updates via MSSQL were fixed, notably with respect to creating bits of
the database should other bits already exist as well as issues with
previous updater patches not working correctly.

Additional MSSQL bugfixes will come in separate patches, as they are less
related to the schema/install/upgrade process.

Change-Id: If3eea625499d3cb14abba40f528208173067a53a
---
M includes/db/DatabaseMssql.php
M includes/installer/MssqlInstaller.php
M includes/installer/MssqlUpdater.php
D maintenance/mssql/archives/named_constraints.sql
A maintenance/mssql/archives/patch-add-cl_collation_ext_index.sql
A maintenance/mssql/archives/patch-bot_passwords.sql
A maintenance/mssql/archives/patch-categorylinks-constraints.sql
A maintenance/mssql/archives/patch-drop-page_counter.sql
A maintenance/mssql/archives/patch-drop-rc_cur_time.sql
A maintenance/mssql/archives/patch-drop-ss_total_views.sql
A maintenance/mssql/archives/patch-drop-user_options.sql
A maintenance/mssql/archives/patch-filearchive-constraints.sql
A maintenance/mssql/archives/patch-filearchive-schema.sql
A maintenance/mssql/archives/patch-il_from_namespace.sql
A maintenance/mssql/archives/patch-image-constraints.sql
A maintenance/mssql/archives/patch-image-schema.sql
A maintenance/mssql/archives/patch-kill-cl_collation_index.sql
A maintenance/mssql/archives/patch-oldimage-constraints.sql
A maintenance/mssql/archives/patch-oldimage-schema.sql
A maintenance/mssql/archives/patch-pl_from_namespace.sql
A maintenance/mssql/archives/patch-pp_sortkey.sql
A maintenance/mssql/archives/patch-tl_from_namespace.sql
A maintenance/mssql/archives/patch-uploadstash-constraints.sql
M maintenance/mssql/tables.sql
24 files changed, 716 insertions(+), 168 deletions(-)

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



diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index ce34537..67022f4 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -38,6 +38,7 @@
protected $mBinaryColumnCache = null;
protected $mBitColumnCache = null;
protected $mIgnoreDupKeyErrors = false;
+   protected $mIgnoreErrors = [];
 
protected $mPort;
 
@@ -206,35 +207,31 @@
$success = (bool)$stmt;
}
 
+   // make a copy so that anything we add below does not get 
reflected in future queries
+   $ignoreErrors = $this->mIgnoreErrors;
+
if ( $this->mIgnoreDupKeyErrors ) {
-   // ignore duplicate key errors, but nothing else
+   // ignore duplicate key errors
// this emulates INSERT IGNORE in MySQL
-   if ( $success === false ) {
-   $errors = sqlsrv_errors( SQLSRV_ERR_ERRORS );
-   $success = true;
-
-   foreach ( $errors as $err ) {
-   if ( $err['SQLSTATE'] == '23000' && 
$err['code'] == '2601' ) {
-   continue; // duplicate key 
error caused by unique index
-   } elseif ( $err['SQLSTATE'] == '23000' 
&& $err['code'] == '2627' ) {
-   continue; // duplicate key 
error caused by primary key
-   } elseif ( $err['SQLSTATE'] == '01000' 
&& $err['code'] == '3621' ) {
-   continue; // generic "the 
statement has been terminated" error
-   }
-
-   $success = false; // getting here means 
we got an error we weren't expecting
-   break;
-   }
-
-   if ( $success ) {
-   $this->mAffectedRows = 0;
-   return $stmt;
-   }
-   }
+   $ignoreErrors[] = '2601'; // duplicate key error caused 
by unique index
+   $ignoreErrors[] = '2627'; // duplicate key error caused 
by primary key
+   $ignoreErrors[] = '3621'; // generic "the statement has 
been terminated" error
}
 
if ( $success === false ) {
-   return false;
+   $errors = sqlsrv_errors();
+   $success = true;
+
+   foreach ( $errors as $err ) {
+   if ( !in_array( 

[MediaWiki-commits] [Gerrit] Pass through errors creating the main page to the installer. - change (mediawiki/core)

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

Change subject: Pass through errors creating the main page to the installer.
..


Pass through errors creating the main page to the installer.

Right now, any errors from inserting the main page are silently ignored by
the installer, causing it to report success even in case of failure. Let's
fix that.

Change-Id: I1da3aa076eefa212b5cc0f796a48f944e8c06fd2
---
M includes/installer/Installer.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 3d1c860..d747707 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -1697,7 +1697,7 @@
wfMessage( 'mainpagedocfooter' 
)->inContentLanguage()->text()
);
 
-   $page->doEditContent( $content,
+   $status = $page->doEditContent( $content,
'',
EDIT_NEW,
false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1da3aa076eefa212b5cc0f796a48f944e8c06fd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Skizzerz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix topic creation on mobile - change (mediawiki...Flow)

2016-05-02 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix topic creation on mobile
..

Fix topic creation on mobile

There is code to only save the 'flow-editor' preference on-change
if the user's old preferred editor is available.

This means it won't get forced to 'wikitext' on mobile (where VE isn't
available).  However, we should still emit the 'change' event,
since the meaning of the EditorSwitcherWidget 'change' event is:

"The contents of the editor changed."

This allows the topic creation button to un-disable.

Bug: T134060
Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
(cherry picked from commit 292ff27a84aff04f1f33d881a2033835879dcc78)
---
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js 
b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
index 7971194..1edd1ff 100644
--- a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
+++ b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
@@ -446,6 +446,8 @@
return;
}
 
+   this.emit( 'change' );
+
// Normalize 'none' to 'wikitext'
if ( currentPref === 'none' ) {
currentPref = 'wikitext';
@@ -467,8 +469,6 @@
// Ensure we also see that preference in the current 
page
mw.user.options.set( 'flow-editor', name );
}
-
-   this.emit( 'change' );
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Use mw.api.postWithToken - change (mediawiki...UIFeedback)

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

Change subject: Use mw.api.postWithToken
..


Use mw.api.postWithToken

Remove explicit dependency to 'user.tokens' and 'mediawiki.user',
because they are not called explicitly anymore.

Depends-On:I7a0fec3c1ef2c7881d4c
Change-Id: I25a8a8832fab131e026fb062e7c4968193260b07
---
M UiFeedback.php
M resources/ext.uiFeedback.js
2 files changed, 15 insertions(+), 16 deletions(-)

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



diff --git a/UiFeedback.php b/UiFeedback.php
index 2497d62..ee31e06 100644
--- a/UiFeedback.php
+++ b/UiFeedback.php
@@ -46,14 +46,12 @@
'dependencies'  => array(
'user.groups',
'user.options',
-   'user.tokens',
 
'jquery.cookie',
'jquery.ui.draggable',
'jquery.client',
 
'mediawiki.api',
-   'mediawiki.user',
'mediawiki.util',
),
'messages'  => array(
diff --git a/resources/ext.uiFeedback.js b/resources/ext.uiFeedback.js
index 41980ee..556354c 100644
--- a/resources/ext.uiFeedback.js
+++ b/resources/ext.uiFeedback.js
@@ -733,23 +733,24 @@
mw.log( 'API 
result:', data );
/* sending the 
image to the upload api */
/* thanks to 
danwe_wmde for pointing me at the upload-wizard extension */
-   var xhr = new 
XMLHttpRequest();
-   
xhr.addEventListener( 'load', function ( e ) {
+
+   
api.postWithToken( 'csrf',
+   {
+   action: 
'upload',
+   format: 
'json',
+   
filename: filename,
+   file: 
canvasBytes
+   }, {
+   
contentType: 'multipart/form-data'
+   } )
+   .done( function 
() {

show_notification( mw.message( 'ui-feedback-notify-upload-sent', 
mw.util.getUrl( 'Special:UiFeedback' ) ), 5000, 'purple' );

resetForm();
-   }, false );
-   
xhr.addEventListener( 'error', function ( e ) {
-   
show_notification( mw.message( 'ui-feedback-notify-upload-fail' ), 5000, 
'purple' );
-   }, false );
 
-   var formData = 
new FormData();
-   
formData.append( 'action', 'upload' );
-   
formData.append( 'format', 'json' );
-   
formData.append( 'token', mw.user.tokens.get( 'editToken' ) );
-   
formData.append( 'filename', filename );
-   
formData.append( 'file', canvasBytes );
-   xhr.open( 
'POST', mw.util.wikiScript( 'api' ), true );
-   xhr.send( 
formData );
+   } )
+   .fail( function 
() {
+   
show_notification( mw.message( 'ui-feedback-notify-upload-fail' ), 5000, 
'purple' );
+   } );

show_notification( mw.message( 'ui-feedback-notify-upload-progress' ), 5000, 
'purple' );
} ).fail( function ( 
error ) {
mw.log( 'API 
failed :(', error );

-- 
To view, visit 

  1   2   3   4   >