[MediaWiki-commits] [Gerrit] cherry pick from REL1_22 Change-Id: I6759c48b91afb9ac74edebe... - change (mediawiki...BlueSpiceExtensions)

2015-03-31 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

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

Change subject: cherry pick from REL1_22 Change-Id: 
I6759c48b91afb9ac74edebed2c1e42989fa89052
..

cherry pick from REL1_22 Change-Id: I6759c48b91afb9ac74edebed2c1e42989fa89052

Change-Id: I31ab69f0959d48878862b8ccad609bf4c5b91dc8
---
M Flexiskin/Flexiskin.class.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php
index 54c3167..943702b 100644
--- a/Flexiskin/Flexiskin.class.php
+++ b/Flexiskin/Flexiskin.class.php
@@ -294,7 +294,7 @@
$oStatus = BsFileSystemHelper::uploadFile(self::getVal('name'), 
flexiskin . DS . self::getVal('id') . DS . images);
 
if (!$oStatus-isGood())
-   $aResult = json_encode(array('success' = false, 'msg' 
= err_cd: . $aStatus['status']));
+   $aResult = json_encode(array('success' = false, 'msg' 
= err_cd: . $oStatus-getMessage()));
else
$aResult = json_encode(array('success' = true, 'name' 
= $oStatus-getValue()));
$oAjaxResponse = new AjaxResponse( $aResult );
@@ -313,7 +313,9 @@
$aConfigs = json_decode($aConfigs);
foreach ($aConfigs as $aConfig) {
$func = Flexiskin::format_ . $aConfig-id;
-   if (is_callable($func))
+   $bReturn = wfRunHooks(BSFlexiskinGenerateStyleFile, 
array($func, $aConfig));
+   
+   if ( $bReturn === true  is_callable($func))
$aFile[] = call_user_func($func, $aConfig);
}
return implode( \n, $aFile);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31ab69f0959d48878862b8ccad609bf4c5b91dc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Tweichart weich...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] BlueSpiceSkin: Skin js components are loaded earlier - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: BlueSpiceSkin: Skin js components are loaded earlier
..


BlueSpiceSkin: Skin js components are loaded earlier

* This stops some flickering and the page loading looks faster - even on pages 
with heavy extjs stuff

Change-Id: Idf7d6a75fa202e3bc85f09cea7d46e051b54b12d
(cherry picked from commit cb43477726d51a43cb433ebd6877a3bbd25945a4)
---
M BlueSpiceSkin.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index e193e40..2804f69 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -56,9 +56,9 @@
'messages' = array(
'bs-tools-button'
),
+   'position' = 'top',
'styles' = array(),
'dependencies' = array(
-   'ext.bluespice',
'mediawiki.jqueryMsg',
'jquery.ui.tabs',
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf7d6a75fa202e3bc85f09cea7d46e051b54b12d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Pwirth wi...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] changed return value so it works again for widgetbar - change (mediawiki...BlueSpiceExtensions)

2015-03-31 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: changed return value so it works again for widgetbar
..


changed return value so it works again for widgetbar

Change-Id: Ifd7357114d1dea332582554eb87bfc5395d9fd68
---
M SmartList/SmartList.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved
  Pwirth: Looks good to me, but someone else must approve



diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index e712725..871a526 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -495,7 +495,7 @@
$aTmpViews = array();
$this-onBSWidgetBarGetDefaultWidgets( $aTmpViews, null, null );
 
-   return $aTmpViews;
+   return $aTmpViews['SMARTLIST'];
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd7357114d1dea332582554eb87bfc5395d9fd68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Pwirth wi...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Removed LESS include path - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Removed LESS include path
..


Removed LESS include path

This caused trouble with existing customer skins and had no advantage at
the moment.

Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
(cherry picked from commit 5c5692b294fdeade482ab762ede73f1b31ce0e49)
---
M BlueSpiceSkin.php
M includes/BlueSpiceSkinHooks.php
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index 2804f69..9d71af4 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -89,11 +89,6 @@
'myskin', 'nostalgia', 'simple', 'standard' );
 
 // Set LESS global variables
-   $localBasePath = dirname( __DIR__ );
-   $wgResourceLoaderLESSImportPaths = array_merge( 
$wgResourceLoaderLESSImportPaths, array(
-   $localBasePath/resources/,
-   ) );
-
 $wgResourceLoaderLESSVars += array(
'body-font-size' = '1em',
'bs-color-primary' = '#3e5389', //blue
@@ -118,4 +113,4 @@
'bs-width-page' = '1222px',
'bs-width-navcol' = '276px',
'bs-margin-left-content' = '302px'
-);
\ No newline at end of file
+);
diff --git a/includes/BlueSpiceSkinHooks.php b/includes/BlueSpiceSkinHooks.php
index 840788e..18ed4eb 100644
--- a/includes/BlueSpiceSkinHooks.php
+++ b/includes/BlueSpiceSkinHooks.php
@@ -83,7 +83,7 @@
'text' = wfMessage( 
'bs-navigation-contact' )-plain(),
'href' = 
'http://www.blue-spice.org/de/ueber-uns/kontakt-anfahrt/',
'id' = 'contact'
-   ),
+   )
)
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_23
Gerrit-Owner: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Removed LESS include path - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

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

Change subject: Removed LESS include path
..

Removed LESS include path

This caused trouble with existing customer skins and had no advantage at
the moment.

Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
(cherry picked from commit 5c5692b294fdeade482ab762ede73f1b31ce0e49)
---
M BlueSpiceSkin.php
M includes/BlueSpiceSkinHooks.php
2 files changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/16/200816/1

diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index 2804f69..9d71af4 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -89,11 +89,6 @@
'myskin', 'nostalgia', 'simple', 'standard' );
 
 // Set LESS global variables
-   $localBasePath = dirname( __DIR__ );
-   $wgResourceLoaderLESSImportPaths = array_merge( 
$wgResourceLoaderLESSImportPaths, array(
-   $localBasePath/resources/,
-   ) );
-
 $wgResourceLoaderLESSVars += array(
'body-font-size' = '1em',
'bs-color-primary' = '#3e5389', //blue
@@ -118,4 +113,4 @@
'bs-width-page' = '1222px',
'bs-width-navcol' = '276px',
'bs-margin-left-content' = '302px'
-);
\ No newline at end of file
+);
diff --git a/includes/BlueSpiceSkinHooks.php b/includes/BlueSpiceSkinHooks.php
index 840788e..18ed4eb 100644
--- a/includes/BlueSpiceSkinHooks.php
+++ b/includes/BlueSpiceSkinHooks.php
@@ -83,7 +83,7 @@
'text' = wfMessage( 
'bs-navigation-contact' )-plain(),
'href' = 
'http://www.blue-spice.org/de/ueber-uns/kontakt-anfahrt/',
'id' = 'contact'
-   ),
+   )
)
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_23
Gerrit-Owner: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Removed LESS include path - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread Tweichart (Code Review)
Tweichart has submitted this change and it was merged.

Change subject: Removed LESS include path
..


Removed LESS include path

This caused trouble with existing customer skins and had no advantage at
the moment.

Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
---
M BlueSpiceSkin.php
M includes/BlueSpiceSkinHooks.php
2 files changed, 1 insertion(+), 6 deletions(-)

Approvals:
  Tweichart: Looks good to me, approved



diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index e193e40..fe7030a 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -89,11 +89,6 @@
'myskin', 'nostalgia', 'simple', 'standard' );
 
 // Set LESS global variables
-   $localBasePath = dirname( __DIR__ );
-   $wgResourceLoaderLESSImportPaths = array_merge( 
$wgResourceLoaderLESSImportPaths, array(
-   $localBasePath/resources/,
-   ) );
-
 $wgResourceLoaderLESSVars += array(
'body-font-size' = '1em',
'bs-color-primary' = '#3e5389', //blue
diff --git a/includes/BlueSpiceSkinHooks.php b/includes/BlueSpiceSkinHooks.php
index 840788e..18ed4eb 100644
--- a/includes/BlueSpiceSkinHooks.php
+++ b/includes/BlueSpiceSkinHooks.php
@@ -83,7 +83,7 @@
'text' = wfMessage( 
'bs-navigation-contact' )-plain(),
'href' = 
'http://www.blue-spice.org/de/ueber-uns/kontakt-anfahrt/',
'id' = 'contact'
-   ),
+   )
)
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72204d3472f1a1c471f3d71ef70e13795a887346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] dsh: use FQDN for mediawiki-installation hosts - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: dsh: use FQDN for mediawiki-installation hosts
..


dsh: use FQDN for mediawiki-installation hosts

This is to prevent rsync issues in deployment when a scap-proxy
runs rsync at the same time as a regular appserver does.

scap removes scap proxies from the mediawiki-installation list to
prevent this but fails to do so since the current scap-proxy list
uses FQDNs and a simple diff is executed between the two lists.

This is explained and the requested solution in:

see comment #1151838 on T93983

Bug:T93983

Change-Id: I6ddd5df7e239969caa59eb88ada1f5cfa0fe195b
---
M modules/dsh/files/group/mediawiki-installation
1 file changed, 484 insertions(+), 482 deletions(-)

Approvals:
  BryanDavis: Looks good to me, but someone else must approve
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/dsh/files/group/mediawiki-installation 
b/modules/dsh/files/group/mediawiki-installation
index 430e800..4ce5e8c 100644
--- a/modules/dsh/files/group/mediawiki-installation
+++ b/modules/dsh/files/group/mediawiki-installation
@@ -1,485 +1,487 @@
-silver
-tin
-terbium
+# !all names added here must be FQDN's now (T93983) !
 
-snapshot1001
-snapshot1002
-snapshot1003
-snapshot1004
-tmh1001
-tmh1002
-mw1001
-mw1002
-mw1003
-mw1004
-mw1005
-mw1006
-mw1007
-mw1008
-mw1009
-mw1010
-mw1011
-mw1012
-mw1013
-mw1014
-mw1015
-mw1016
-mw1017
-mw1018
-mw1019
-mw1020
-mw1021
-mw1022
-mw1023
-mw1024
-mw1025
-mw1026
-mw1027
-mw1028
-mw1029
-mw1030
-mw1031
-mw1032
-mw1033
-mw1034
-mw1035
-mw1036
-mw1037
-mw1038
-mw1039
-mw1040
-mw1041
-mw1042
-mw1043
-mw1044
-mw1045
-mw1046
-mw1047
-mw1048
-mw1049
-mw1050
-mw1051
-mw1052
-mw1053
-mw1054
-mw1055
-mw1056
-mw1057
-mw1058
-mw1059
-mw1060
-mw1061
-mw1062
-mw1063
-mw1064
-mw1065
-mw1066
-mw1067
-mw1068
-mw1069
-mw1070
-mw1071
-mw1072
-mw1073
-mw1074
-mw1075
-mw1076
-mw1077
-mw1078
-mw1079
-mw1080
-mw1081
-mw1082
-mw1083
-mw1084
-mw1085
-mw1086
-mw1087
-mw1088
-mw1089
-mw1090
-mw1091
-mw1092
-mw1093
-mw1094
-mw1095
-mw1096
-mw1097
-mw1098
-mw1099
-mw1100
-mw1101
-mw1102
-mw1103
-mw1104
-mw1105
-mw1106
-mw1107
-mw1108
-mw1109
-mw1110
-mw
-mw1112
-mw1113
-mw1114
-mw1115
-mw1116
-mw1117
-mw1118
-mw1119
-mw1120
-mw1121
-mw1122
-mw1123
-mw1124
-mw1125
-mw1126
-mw1127
-mw1128
-mw1129
-mw1130
-mw1131
-mw1132
-mw1133
-mw1134
-mw1135
-mw1136
-mw1137
-mw1138
-mw1139
-mw1140
-mw1141
-mw1142
-mw1143
-mw1144
-mw1145
-mw1146
-mw1147
-mw1148
-mw1149
-mw1150
-mw1151
-mw1152
-mw1153
-mw1154
-mw1155
-mw1156
-mw1157
-mw1158
-mw1159
-mw1160
-mw1161
-mw1162
-mw1163
-mw1164
-mw1165
-mw1166
-mw1167
-mw1168
-mw1169
-mw1170
-mw1171
-mw1172
-mw1173
-mw1174
-mw1175
-mw1176
-mw1177
-mw1178
-mw1179
-mw1180
-mw1181
-mw1182
-mw1183
-mw1184
-mw1185
-mw1186
-mw1187
-mw1188
-mw1189
-mw1190
-mw1191
-mw1192
-mw1193
-mw1194
-mw1195
-mw1196
-mw1197
-mw1198
-mw1199
-mw1200
-mw1201
-mw1202
-mw1203
-mw1204
-mw1205
-mw1206
-mw1207
-mw1208
-mw1209
-mw1210
-mw1211
-mw1212
-mw1213
-mw1214
-mw1215
-mw1216
-mw1217
-mw1218
-mw1219
-mw1220
-mw1221
-mw1222
-mw1223
-mw1224
-mw1225
-mw1226
-mw1227
-mw1228
-mw1229
-mw1230
-mw1231
-mw1232
-mw1233
-mw1234
-mw1235
-mw1236
-mw1237
-mw1238
-mw1239
-mw1240
-mw1241
-mw1242
-mw1243
-mw1244
-mw1245
-mw1246
-mw1247
-mw1248
-mw1249
-mw1250
-mw1251
-mw1252
-mw1253
-mw1254
-mw1255
-mw1256
-mw1257
-mw1258
+silver.wikimedia.org
+tin.eqiad.wmnet
+terbium.eqiad.wmnet
 
-#Codfw
-#mw2001
-#mw2002
-#mw2003
-#mw2004
-#mw2005
-#mw2006
-#mw2007
-#mw2008
-#mw2009
-#mw2010
-#mw2011
-#mw2012
-#mw2013
-#mw2014
-#mw2015
-#mw2016
-#mw2017
-#mw2018
-#mw2019
-#mw2020
-#mw2021
-#mw2022
-#mw2023
-#mw2024
-#mw2025
-#mw2026
-#mw2027
-#mw2028
-#mw2029
-#mw2030
-#mw2031
-#mw2032
-#mw2033
-#mw2034
-#mw2035
-#mw2036
-#mw2037
-#mw2038
-#mw2039
-#mw2040
-#mw2041
-#mw2042
-#mw2043
-#mw2044
-#mw2045
-#mw2046
-#mw2047
-#mw2048
-#mw2049
-#mw2050
-#mw2051
-#mw2052
-#mw2053
-#mw2054
-#mw2055
-#mw2056
-#mw2057
-#mw2058
-#mw2059
-#mw2060
-#mw2061
-#mw2062
-#mw2063
-#mw2064
-#mw2065
-#mw2066
-#mw2067
-#mw2068
-#mw2069
-#mw2070
-#mw2071
-#mw2072
-#mw2073
-#mw2074
-#mw2075
-#mw2076
-#mw2077
-#mw2078
-#mw2079
-#mw2080
-#mw2081
-#mw2082
-#mw2083
-#mw2084
-#mw2085
-#mw2086
-#mw2087
-#mw2088
-#mw2089
-#mw2090
-#mw2091
-#mw2092
-#mw2093
-#mw2094
-#mw2095
-#mw2096
-#mw2097
-#mw2098
-#mw2099
-#mw2100
-#mw2101
-#mw2102
-#mw2103
-#mw2104
-#mw2105
-#mw2106
-#mw2107
-#mw2108
-#mw2109
-#mw2110
-#mw2111
-#mw2112
-#mw2113
-#mw2114
-#mw2115
-#mw2116
-#mw2117
-#mw2118
-#mw2119
-#mw2120
-#mw2121
-#mw2122
-#mw2123
-#mw2124
-#mw2125
-#mw2126
-#mw2127
-#mw2128
-#mw2129
-#mw2130
-#mw2131
-#mw2132
-#mw2133
-#mw2134
-#mw2135
-#mw2136
-#mw2137
-#mw2138
-#mw2139
-#mw2140
-#mw2141
-#mw2142
-#mw2143
-#mw2144
-#mw2145
-#mw2146
-#mw2147
-#mw2148
-#mw2149
-#mw2150
-#mw2151
-#mw2152
-#mw2153
-#mw2154
-#mw2155
-#mw2156
-#mw2157
-#mw2158
-#mw2159
-#mw2160
-#mw2161
-#mw2162
-#mw2163
-#mw2164

[MediaWiki-commits] [Gerrit] cherry pick from REL1_22 Change-Id: I6759c48b91afb9ac74edebe... - change (mediawiki...BlueSpiceExtensions)

2015-03-31 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

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

Change subject: cherry pick from REL1_22 Change-Id: 
I6759c48b91afb9ac74edebed2c1e42989fa89052
..

cherry pick from REL1_22 Change-Id: I6759c48b91afb9ac74edebed2c1e42989fa89052

Change-Id: I18379577769e889dc923d29644881957f63e6588
---
M Flexiskin/Flexiskin.class.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php
index 54c3167..898fc01 100644
--- a/Flexiskin/Flexiskin.class.php
+++ b/Flexiskin/Flexiskin.class.php
@@ -294,7 +294,7 @@
$oStatus = BsFileSystemHelper::uploadFile(self::getVal('name'), 
flexiskin . DS . self::getVal('id') . DS . images);
 
if (!$oStatus-isGood())
-   $aResult = json_encode(array('success' = false, 'msg' 
= err_cd: . $aStatus['status']));
+   $aResult = json_encode(array('success' = false, 'msg' 
= err_cd: . $oStatus-getMessage()));
else
$aResult = json_encode(array('success' = true, 'name' 
= $oStatus-getValue()));
$oAjaxResponse = new AjaxResponse( $aResult );
@@ -313,7 +313,9 @@
$aConfigs = json_decode($aConfigs);
foreach ($aConfigs as $aConfig) {
$func = Flexiskin::format_ . $aConfig-id;
-   if (is_callable($func))
+   $bReturn = wfRunHooks(BSFlexiskinGenerateStyleFile, 
array($func, $aConfig));
+
+   if ( $bReturn === true  is_callable($func))
$aFile[] = call_user_func($func, $aConfig);
}
return implode( \n, $aFile);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18379577769e889dc923d29644881957f63e6588
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Tweichart weich...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] BlueSpiceSkin: Skin js components are loaded earlier - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: BlueSpiceSkin: Skin js components are loaded earlier
..

BlueSpiceSkin: Skin js components are loaded earlier

* This stops some flickering and the page loading looks faster - even on pages 
with heavy extjs stuff

Change-Id: Idf7d6a75fa202e3bc85f09cea7d46e051b54b12d
(cherry picked from commit cb43477726d51a43cb433ebd6877a3bbd25945a4)
---
M BlueSpiceSkin.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/14/200814/1

diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index e193e40..2804f69 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -56,9 +56,9 @@
'messages' = array(
'bs-tools-button'
),
+   'position' = 'top',
'styles' = array(),
'dependencies' = array(
-   'ext.bluespice',
'mediawiki.jqueryMsg',
'jquery.ui.tabs',
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf7d6a75fa202e3bc85f09cea7d46e051b54b12d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Pwirth wi...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] BlueSpiceSkin: Skin js components are loaded earlier - change (mediawiki...BlueSpiceSkin)

2015-03-31 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: BlueSpiceSkin: Skin js components are loaded earlier
..


BlueSpiceSkin: Skin js components are loaded earlier

* This stops some flickering and the page loading looks faster - even on pages 
with heavy extjs stuff

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

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



diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index e193e40..2804f69 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -56,9 +56,9 @@
'messages' = array(
'bs-tools-button'
),
+   'position' = 'top',
'styles' = array(),
'dependencies' = array(
-   'ext.bluespice',
'mediawiki.jqueryMsg',
'jquery.ui.tabs',
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf7d6a75fa202e3bc85f09cea7d46e051b54b12d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Pwirth wi...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Use HTMLForm for Special:FileDuplicateSearch - change (mediawiki/core)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use HTMLForm for Special:FileDuplicateSearch
..


Use HTMLForm for Special:FileDuplicateSearch

* Prepare the usage of MediaWiki UI.
* Add new HTMLForm output mode inline (very close to raw)

Bug: 71436
Change-Id: I12240aaf624dff5219b344648b20373594b5ec46
---
M includes/htmlform/HTMLForm.php
M includes/htmlform/HTMLFormField.php
M includes/specials/SpecialFileDuplicateSearch.php
3 files changed, 48 insertions(+), 18 deletions(-)

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



diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index 908fdf2..39ed24f 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -207,6 +207,7 @@
'table',
'div',
'raw',
+   'inline',
);
 
/**
@@ -1366,6 +1367,8 @@
$html = Html::rawElement( 'table',
$attribs,
Html::rawElement( 'tbody', 
array(), \n$html\n ) ) . \n;
+   } elseif ( $displayFormat === 'inline' ) {
+   $html = Html::rawElement( 'span', $attribs, 
\n$html\n );
} else {
$html = Html::rawElement( 'div', $attribs, 
\n$html\n );
}
diff --git a/includes/htmlform/HTMLFormField.php 
b/includes/htmlform/HTMLFormField.php
index 645b507..9576c77 100644
--- a/includes/htmlform/HTMLFormField.php
+++ b/includes/htmlform/HTMLFormField.php
@@ -567,6 +567,27 @@
}
 
/**
+* Get the complete field as an inline element.
+* @since 1.25
+* @param string $value The value to set the input to.
+* @return string Complete HTML inline element
+*/
+   public function getInline( $value ) {
+   list( $errors, $errorClass ) = $this-getErrorsAndErrorClass( 
$value );
+   $inputHtml = $this-getInputHTML( $value );
+   $helptext = $this-getHelpTextHtmlDiv( $this-getHelpText() );
+   $cellAttributes = array();
+   $label = $this-getLabelHtml( $cellAttributes );
+
+   $html = \n . $errors .
+   $label . '#160;' .
+   $inputHtml .
+   $helptext;
+
+   return $html;
+   }
+
+   /**
 * Generate help text HTML in table format
 * @since 1.20
 *
diff --git a/includes/specials/SpecialFileDuplicateSearch.php 
b/includes/specials/SpecialFileDuplicateSearch.php
index 606f837..da79bb8 100644
--- a/includes/specials/SpecialFileDuplicateSearch.php
+++ b/includes/specials/SpecialFileDuplicateSearch.php
@@ -110,25 +110,31 @@
$out = $this-getOutput();
 
# Create the input form
-   $out-addHTML(
-   Html::openElement(
-   'form',
-   array( 'id' = 'fileduplicatesearch', 'method' 
= 'get', 'action' = wfScript() )
-   ) . \n .
-   Html::hidden( 'title', 
$this-getPageTitle()-getPrefixedDBkey() ) . \n .
-   Html::openElement( 'fieldset' ) . \n .
-   Html::element( 'legend', null, $this-msg( 
'fileduplicatesearch-legend' )-text() ) . \n .
-   Xml::inputLabel(
-   $this-msg( 
'fileduplicatesearch-filename' )-text(),
-   'filename',
-   'filename',
-   50,
-   $this-filename
-   ) . \n .
-   Xml::submitButton( $this-msg( 
'fileduplicatesearch-submit' )-text() ) . \n .
-   Html::closeElement( 'fieldset' ) . \n .
-   Html::closeElement( 'form' )
+   $formFields = array(
+   'filename' = array(
+   'type' = 'text',
+   'name' = 'filename',
+   'label-message' = 
'fileduplicatesearch-filename',
+   'id' = 'filename',
+   'size' = 50,
+   'value' = $this-filename,
+   'cssclass' = 'mw-ui-input-inline'
+   ),
);
+   $hiddenFields = array(
+   'title' = $this-getPageTitle()-getPrefixedDBKey(),
+   );
+   $htmlForm = HTMLForm::factory( 'inline', $formFields, 
$this-getContext() );
+   

[MediaWiki-commits] [Gerrit] ganglia: autogenerate datasources from the list of clusters - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ganglia: autogenerate datasources from the list of clusters
..


ganglia: autogenerate datasources from the list of clusters

Bug:T93776
Change-Id: Ia32ea48028ff3b082f240cc01c602b0e9a6587f9
---
M hieradata/codfw.yaml
M hieradata/common.yaml
M hieradata/esams.yaml
M manifests/role/ganglia.pp
A modules/ganglia_new/lib/puppet/parser/functions/ganglia_aggregator_config.rb
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
6 files changed, 174 insertions(+), 125 deletions(-)

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



diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index ebb6b56..c23a88a 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -25,3 +25,4 @@
   - '10.192.32.23:11211:1 shard16'
 jobrunner_state: 'stopped'
 ganglia_class: new
+ganglia_aggregators: install2001.wikimedia.org:10649
diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index a87bf6a..8732306 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -5,195 +5,258 @@
   decommissioned:
 name: Decommissioned servers
 id: 1
-sites: []
+sites: {}
   lvs:
 name: LVS loadbalancers
 id: 2
 sites:
-  - eqiad
-  - codfw
-  - esams
-  - ulsfo
+  eqiad:
+- lvs1001.wikimedia.org
+- lvs1002.wikimedia.org
+  codfw: []
+  esams: []
+  ulsfo:
+- lvs4001.ulsfo.wmnet
+- lvs4003.ulsfo.wmnet
   search:
 name: Search
 id: 4
-sites: []
+sites: {}
   mysql:
 name: MySQL
 id: 5
 sites:
-  - eqiad
-  - codfw
+  eqiad:
+- dbstore1001.eqiad.wmnet
+- dbstore1002.eqiad.wmnet
+  codfw: []
   misc:
 name: Miscellaneous
 id: 8
 sites:
-  - eqiad
-  - codfw
-  - esams
-  - ulsfo
+  eqiad:
+- carbon.wikimedia.org
+- ms1004.eqiad.wmnet
+  codfw: []
+  esams: []
   appserver:
 name: Application servers
 id: 11
 sites:
-  - eqiad
-  - codfw
+  eqiad:
+- mw1054.eqiad.wmnet
+- mw1055.eqiad.wmnet
+  codfw: []
   imagescaler:
 name: Image scalers
 id: 12
 sites:
-  - eqiad
-  - codfw
+  eqiad:
+- mw1153.eqiad.wmnet
+- mw1154.eqiad.wmnet
+  codfw: []
   api_appserver:
 name: API application servers
 id: 13
 sites:
-  - eqiad
-  - codfw
+  eqiad:
+- mw1114.eqiad.wmnet
+- mw1115.eqiad.wmnet
+  codfw: []
   pdf:
 name: PDF servers
 id: 15
 sites:
-  - eqiad
+  eqiad:
+- ocg1001.eqiad.wmnet
   cache_text:
 name: Text caches
 id: 20
 sites:
-  - eqiad
-  - esams
-  - ulsfo
+  eqiad:
+- cp1052.eqiad.wmnet
+- cp1053.eqiad.wmnet
+  esams: []
+  ulsfo:
+- cp4008.ulsfo.wmnet
+- cp4016.ulsfo.wmnet
   cache_bits:
 name: Bits caches
 id: 21
 sites:
-  - eqiad
-  - esams
-  - ulsfo
+  eqiad:
+- cp1056.eqiad.wmnet
+- cp1057.eqiad.wmnet
+  esams: []
+  ulsfo:
+- cp4008.ulsfo.wmnet
+- cp4016.ulsfo.wmnet
   cache_upload:
 name: Upload caches
 id: 22
 sites:
-  - eqiad
-  - esams
-  - ulsfo
+  eqiad:
+- cp1048.eqiad.wmnet
+- cp1061.eqiad.wmnet
+  esams: []
+  ulsfo:
+- cp4005.ulsfo.wmnet
+- cp4013.ulsfo.wmnet
   payments:
 name: Fundraiser payments
+
 id: 23
-sites:
-  - eqiad
-  - codfw
+sites: []
   ssl:
 name: SSL cluster
 id: 26
-sites:
-  - eqiad
-  - esams
+sites: {}
   swift:
 name: Swift
 id: 27
 sites:
-  - eqiad
-  - codfw
-  - esams
+  eqiad:
+- ms-fe1001.eqiad.wmnet
+- ms-fe1002.eqiad.wmnet
+  codfw: []
+  esams: []
   cache_mobile:
 name: Mobile caches
 id: 28
 sites:
-  - eqiad
-  - esams
-  - ulsfo
-  virt:
+  eqiad:
+- cp1046.eqiad.wmnet
+- cp1047.eqiad.wmnet
+  esams: []
+  ulsfo:
+- cp4011.ulsfo.wmnet
+- cp4019.ulsfo.wmnet
+  virt: 
 name: Virtualization cluster
 id: 29
 sites:
-  - eqiad
+  eqiad:
+- labnet1001.eqiad.wmnet
+- virt1000.wikimedia.org
   jobrunner:
 name: Jobrunners
 id: 31
 sites:
-  - eqiad
-  - codfw
-  analytics:
+  eqiad:
+- mw1001.eqiad.wmnet
+- mw1002.eqiad.wmnet
+  codfw: []
+  analytics: 
 name: Analytics cluster
 id: 32
 sites:
-  - eqiad
+  eqiad:
+- analytics1013.eqiad.wmnet
+- analytics1014.eqiad.wmnet
+- analytics1019.eqiad.wmnet
   memcached:
 name: Memcached
 id: 33
 sites:
-  - eqiad
-  - codfw
-  videoscaler:
+  eqiad:
+- 

[MediaWiki-commits] [Gerrit] Allow multiple target pages per event - change (mediawiki...Echo)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow multiple target pages per event
..


Allow multiple target pages per event

Bug: T85064
Change-Id: I338f3d73efb98a3bb66ef64fdeeb66e752a453c2
---
M Hooks.php
A RELEASE_NOTES
A db_patches/patch-multiple_target_pages.sql
A db_patches/patch-multiple_target_pages.sqlite.sql
M echo.sql
M includes/DataOutputFormatter.php
M includes/mapper/NotificationMapper.php
M includes/mapper/TargetPageMapper.php
M model/Notification.php
M tests/phpunit/includes/mapper/NotificationMapperTest.php
M tests/phpunit/includes/mapper/TargetPageMapperTest.php
M tests/phpunit/model/NotificationTest.php
12 files changed, 174 insertions(+), 55 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 5e425d0..6e9334a 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -115,6 +115,7 @@
if ( $updater-getDB()-getType() === 'sqlite' ) {
$updater-modifyExtensionField( 'echo_event', 
'event_agent', $dir/db_patches/patch-event_agent-split.sqlite.sql );
$updater-modifyExtensionField( 'echo_event', 
'event_variant', $dir/db_patches/patch-event_variant_nullability.sqlite.sql );
+   $updater-addExtensionField( 'echo_target_page', 
'etp_id', $dir/db_patches/patch-multiple_target_pages.sqlite.sql );
// There is no need to run the patch-event_extra-size 
or patch-event_agent_ip-size because
// sqlite ignores numeric arguments in parentheses that 
follow the type name (ex: VARCHAR(255))
// see http://www.sqlite.org/datatype3.html Section 2.2 
for more info
@@ -123,6 +124,7 @@
$updater-modifyExtensionField( 'echo_event', 
'event_variant', $dir/db_patches/patch-event_variant_nullability.sql );
$updater-modifyExtensionField( 'echo_event', 
'event_extra', $dir/db_patches/patch-event_extra-size.sql );
$updater-modifyExtensionField( 'echo_event', 
'event_agent_ip', $dir/db_patches/patch-event_agent_ip-size.sql );
+   $updater-addExtensionField( 'echo_target_page', 
'etp_id', $dir/db_patches/patch-multiple_target_pages.sql );
}
 
$updater-addExtensionField( 'echo_notification', 
'notification_bundle_base',
@@ -663,10 +665,7 @@
$mapper = new EchoTargetPageMapper();
$targetPages = $mapper-fetchByUserPageId( $user, 
$title-getArticleID() );
if ( $targetPages ) {
-   $eventIds = array();
-   foreach ( $targetPages as $targetPage ) {
-   $eventIds[] = $targetPage-getEventId();
-   }
+   $eventIds = array_keys( $targetPages );
$notifUser = MWEchoNotifUser::newFromUser( 
$user );
$notifUser-markRead( $eventIds );
}
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
new file mode 100644
index 000..c6d0fcf
--- /dev/null
+++ b/RELEASE_NOTES
@@ -0,0 +1,7 @@
+March, 2015
+---
+
+* Echo events now support multiple target pages.  As a result The api output 
of individual
+ notifications within api.php?action=querymeta=notifications no longer has a 
'targetpage'
+ property.  This has been replaced with a 'targetpages' property which is the 
same as
+ 'targetpage' was, but now as an array.
diff --git a/db_patches/patch-multiple_target_pages.sql 
b/db_patches/patch-multiple_target_pages.sql
new file mode 100644
index 000..5d574f9
--- /dev/null
+++ b/db_patches/patch-multiple_target_pages.sql
@@ -0,0 +1,3 @@
+ALTER TABLE /*_*/echo_target_page ADD etp_id int unsigned not null primary key 
auto_increment;
+DROP INDEX /*i*/echo_target_page_user_event ON /*_*/echo_target_page;
+CREATE INDEX /*i*/echo_target_page_user_event ON /*_*/echo_target_page 
(etp_user, etp_event);
diff --git a/db_patches/patch-multiple_target_pages.sqlite.sql 
b/db_patches/patch-multiple_target_pages.sqlite.sql
new file mode 100644
index 000..0943bca
--- /dev/null
+++ b/db_patches/patch-multiple_target_pages.sqlite.sql
@@ -0,0 +1,27 @@
+-- Sqlite can't add a primary key to an existing table
+
+-- give current table temporary name
+ALTER TABLE /*_*/echo_target_page RENAME TO /*_*/temp_echo_target_page;
+
+-- recreate table with our new setup
+CREATE TABLE /*_*/echo_target_page (
+etp_id int unsigned not null primary key auto_increment,
+etp_user int unsigned not null default 0,
+etp_page int unsigned not null default 0,
+etp_event int unsigned not null default 0
+) /*$wgDBTableOptions*/;
+
+-- copy over old data into new table
+INSERT INTO /*_*/echo_target_page
+   (etp_user, 

[MediaWiki-commits] [Gerrit] ganglia: fix cluster sites for payments - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ganglia: fix cluster sites for payments
..


ganglia: fix cluster sites for payments

Change-Id: I30f814c5481a39db48bc6c1eea75a147842507ba
---
M hieradata/common.yaml
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 8732306..820b4ba 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -104,9 +104,8 @@
 - cp4013.ulsfo.wmnet
   payments:
 name: Fundraiser payments
-
 id: 23
-sites: []
+sites: {}
   ssl:
 name: SSL cluster
 id: 26

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30f814c5481a39db48bc6c1eea75a147842507ba
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Cut down on file stat time in resource module safeFilemtime() - change (mediawiki/core)

2015-03-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Cut down on file stat time in resource module safeFilemtime()
..

Cut down on file stat time in resource module safeFilemtime()

* If stat cache is not enabled, this used to do two queries

Change-Id: Icfed675b27f952ec13b9d0af3e345b1486ea7c8f
---
M includes/resourceloader/ResourceLoaderModule.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/200821/1

diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index d689044..572428e 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -636,9 +636,10 @@
 * @return int UNIX timestamp
 */
protected static function safeFilemtime( $filename ) {
-   if ( !file_exists( $filename ) ) {
-   return 1;
-   }
-   return filemtime( $filename );
+   wfSuppressWarnings();
+   $mtime = filemtime( $filename ) ?: 1;
+   wfRestoreWarnings();
+
+   return $mtime;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfed675b27f952ec13b9d0af3e345b1486ea7c8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] labelview: inherit from EditableTemplatedWidget - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: labelview: inherit from EditableTemplatedWidget
..


labelview: inherit from EditableTemplatedWidget

Change-Id: I0f97b8bb067934613e7ed24c7e8fbc02b9b966ed
---
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/resources.php
2 files changed, 30 insertions(+), 96 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
index a4a09d4..bc8d473 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
@@ -5,12 +5,12 @@
 ( function( $, mw, wb ) {
'use strict';
 
-   var PARENT = $.ui.TemplatedWidget;
+   var PARENT = $.ui.EditableTemplatedWidget;
 
 /**
  * Manages a label.
  * @since 0.5
- * @extends jQuery.ui.TemplatedWidget
+ * @extends jQuery.ui.EditableTemplatedWidget
  *
  * @option {wikibase.datamodel.Term} value
  *
@@ -47,14 +47,9 @@
},
 
/**
-* @type {boolean}
-*/
-   _isInEditMode: false,
-
-   /**
 * @see jQuery.ui.TemplatedWidget._create
 *
-* @throws {Error} if required parameters are not specified properly.
+* @throws {Error} if a required option is not specified properly.
 */
_create: function() {
if(
@@ -62,7 +57,7 @@
|| !this.options.entityId
|| !this.options.labelsChanger
) {
-   throw new Error( 'Required parameter(s) missing' );
+   throw new Error( 'Required option not specified 
properly' );
}
 
var self = this;
@@ -87,7 +82,7 @@
PARENT.prototype._create.call( this );
 
if( this.$text.text() === '' ) {
-   this._draw();
+   this.draw();
}
},
 
@@ -95,7 +90,7 @@
 * @see jQuery.ui.TemplatedWidget.destroy
 */
destroy: function() {
-   if( this._isInEditMode ) {
+   if( this.isInEditMode() ) {
var self = this;
 
this.element.one( this.widgetEventPrefix + 
'afterstopediting', function( event ) {
@@ -109,10 +104,11 @@
},
 
/**
-* Main draw routine.
+* @inheritdoc
 */
-   _draw: function() {
+   draw: function() {
var self = this,
+   deferred = $.Deferred(),
languageCode = this.options.value.getLanguageCode(),
labelText = this.options.value.getText();
 
@@ -120,7 +116,7 @@
labelText = null;
}
 
-   if( this.options.showEntityId  !( this._isInEditMode  
labelText ) ) {
+   if( this.options.showEntityId  !( this.isInEditMode()  
labelText ) ) {
this.$entityId.text( mw.msg( 'parentheses', 
this.options.entityId ) );
} else {
this.$entityId.empty();
@@ -128,9 +124,9 @@
 
this.element[labelText ? 'removeClass' : 'addClass']( 
'wb-empty' );
 
-   if( !this._isInEditMode ) {
+   if( !this.isInEditMode() ) {
this.$text.text( labelText || mw.msg( 
'wikibase-label-empty' ) );
-   return;
+   return deferred.resolve().promise();
}
 
var $input = $( 'input /' );
@@ -157,84 +153,41 @@
}
 
this.$text.empty().append( $input );
+
+   return deferred.resolve().promise();
},
 
/**
-* Starts the widget's edit mode.
+* @inheritdoc
+* @protected
 */
-   startEditing: function() {
-   if( this._isInEditMode ) {
-   return;
-   }
-   this.element.addClass( 'wb-edit' );
-   this._isInEditMode = true;
-   this._draw();
-   this._trigger( 'afterstartediting' );
-   },
-
-   /**
-* Stops the widget's edit mode.
-*
-* @param {boolean} dropValue
-*/
-   stopEditing: function( dropValue ) {
-   var self = this;
-
-   if( !this._isInEditMode ) {
-   return;
-   } else if( ( !this.isValid() || this.isInitialValue() )  
!dropValue ) {
-   return;
-   } else if( dropValue ) {
-   this._afterStopEditing( dropValue );
-   return;
-   }
-
-   this.disable();
-
-   this._trigger( 

[MediaWiki-commits] [Gerrit] mediawiki: fix dsh group lookup - change (operations/puppet)

2015-03-31 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: mediawiki: fix dsh group lookup
..


mediawiki: fix dsh group lookup

Following I6ddd5df7e239969caa59eb88ada1f5cfa0fe195b we can't do an exact
match anymore.

Change-Id: I4224aa33797dd42d4fc4d41ef970f283039c260b
---
M modules/nagios_common/files/check_commands/check_dsh_groups
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/nagios_common/files/check_commands/check_dsh_groups 
b/modules/nagios_common/files/check_commands/check_dsh_groups
index cf6f494..0170088 100755
--- a/modules/nagios_common/files/check_commands/check_dsh_groups
+++ b/modules/nagios_common/files/check_commands/check_dsh_groups
@@ -15,7 +15,8 @@
echo dsh group $GROUP not found
exit 3
fi
-   if [ `grep $HOST $FILE` != $HOST ] ; then
+
+   if ! grep -q ^${HOST}\. ${FILE}; then
echo Host $HOST is not in $GROUP dsh group
exit 2
fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4224aa33797dd42d4fc4d41ef970f283039c260b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Move Wikibase\Repo\View files to view/src - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Move Wikibase\Repo\View files to view/src
..

Move Wikibase\Repo\View files to view/src

Change-Id: I93dcd16611b13609d7a7703810c005804230fc65
---
M composer.json
R view/src/ClaimHtmlGenerator.php
R view/src/EditSectionGenerator.php
R view/src/EmptyEditSectionGenerator.php
R view/src/EntityTermsView.php
R view/src/EntityView.php
R view/src/EntityViewFactory.php
R view/src/EntityViewPlaceholderExpander.php
R view/src/ItemView.php
R view/src/PropertyView.php
R view/src/SiteLinksView.php
R view/src/SnakHtmlGenerator.php
R view/src/StatementGroupListView.php
R view/src/TextInjector.php
R view/src/ToolbarEditSectionGenerator.php
R view/tests/phpunit/ClaimHtmlGeneratorTest.php
R view/tests/phpunit/ClaimsViewTest.php
R view/tests/phpunit/EmptyEditSectionGeneratorTest.php
R view/tests/phpunit/EntityTermsViewTest.php
R view/tests/phpunit/EntityViewFactoryTest.php
R view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
R view/tests/phpunit/EntityViewTest.php
R view/tests/phpunit/ItemViewTest.php
R view/tests/phpunit/PropertyViewTest.php
R view/tests/phpunit/SiteLinksViewTest.php
R view/tests/phpunit/SnakHtmlGeneratorTest.php
R view/tests/phpunit/TextInjectorTest.php
R view/tests/phpunit/ToolbarEditSectionGeneratorTest.php
28 files changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 3e05984..4835316 100644
--- a/composer.json
+++ b/composer.json
@@ -66,7 +66,7 @@
repo/Wikibase.hooks.php
],
psr-4: {
-   Wikibase\\Repo\\View\\: repo/includes/View,
+   Wikibase\\Repo\\View\\: view/src,
Wikibase\\View\\: view/src
}
}
diff --git a/repo/includes/View/ClaimHtmlGenerator.php 
b/view/src/ClaimHtmlGenerator.php
similarity index 100%
rename from repo/includes/View/ClaimHtmlGenerator.php
rename to view/src/ClaimHtmlGenerator.php
diff --git a/repo/includes/View/EditSectionGenerator.php 
b/view/src/EditSectionGenerator.php
similarity index 100%
rename from repo/includes/View/EditSectionGenerator.php
rename to view/src/EditSectionGenerator.php
diff --git a/repo/includes/View/EmptyEditSectionGenerator.php 
b/view/src/EmptyEditSectionGenerator.php
similarity index 100%
rename from repo/includes/View/EmptyEditSectionGenerator.php
rename to view/src/EmptyEditSectionGenerator.php
diff --git a/repo/includes/View/EntityTermsView.php 
b/view/src/EntityTermsView.php
similarity index 100%
rename from repo/includes/View/EntityTermsView.php
rename to view/src/EntityTermsView.php
diff --git a/repo/includes/View/EntityView.php b/view/src/EntityView.php
similarity index 100%
rename from repo/includes/View/EntityView.php
rename to view/src/EntityView.php
diff --git a/repo/includes/View/EntityViewFactory.php 
b/view/src/EntityViewFactory.php
similarity index 100%
rename from repo/includes/View/EntityViewFactory.php
rename to view/src/EntityViewFactory.php
diff --git a/repo/includes/View/EntityViewPlaceholderExpander.php 
b/view/src/EntityViewPlaceholderExpander.php
similarity index 100%
rename from repo/includes/View/EntityViewPlaceholderExpander.php
rename to view/src/EntityViewPlaceholderExpander.php
diff --git a/repo/includes/View/ItemView.php b/view/src/ItemView.php
similarity index 100%
rename from repo/includes/View/ItemView.php
rename to view/src/ItemView.php
diff --git a/repo/includes/View/PropertyView.php b/view/src/PropertyView.php
similarity index 100%
rename from repo/includes/View/PropertyView.php
rename to view/src/PropertyView.php
diff --git a/repo/includes/View/SiteLinksView.php b/view/src/SiteLinksView.php
similarity index 100%
rename from repo/includes/View/SiteLinksView.php
rename to view/src/SiteLinksView.php
diff --git a/repo/includes/View/SnakHtmlGenerator.php 
b/view/src/SnakHtmlGenerator.php
similarity index 100%
rename from repo/includes/View/SnakHtmlGenerator.php
rename to view/src/SnakHtmlGenerator.php
diff --git a/repo/includes/View/StatementGroupListView.php 
b/view/src/StatementGroupListView.php
similarity index 100%
rename from repo/includes/View/StatementGroupListView.php
rename to view/src/StatementGroupListView.php
diff --git a/repo/includes/View/TextInjector.php b/view/src/TextInjector.php
similarity index 100%
rename from repo/includes/View/TextInjector.php
rename to view/src/TextInjector.php
diff --git a/repo/includes/View/ToolbarEditSectionGenerator.php 
b/view/src/ToolbarEditSectionGenerator.php
similarity index 100%
rename from repo/includes/View/ToolbarEditSectionGenerator.php
rename to view/src/ToolbarEditSectionGenerator.php
diff --git a/repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php 
b/view/tests/phpunit/ClaimHtmlGeneratorTest.php

[MediaWiki-commits] [Gerrit] protection length should be included in action=info - change (mediawiki/core)

2015-03-31 Thread AYUSH GARG (Code Review)
AYUSH GARG has uploaded a new change for review.

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

Change subject: protection length should be included in action=info
..

protection length should be included in action=info

Bug: T94129
Change-Id: I2df726e04c0555eb550036c31e538ec2594b517c
---
M includes/actions/InfoAction.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/200828/1

diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index 338d939..c8ae414 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -434,6 +434,8 @@
$message = $message-escaped();
}
}
+   $expiry = $this-msg( 'parentheses', 
$title-getRestrictionExpiry( $restrictionType ) )-plain();
+   $message = $message .   . $expiry;
 
// Messages: restriction-edit, restriction-move, 
restriction-create,
// restriction-upload

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2df726e04c0555eb550036c31e538ec2594b517c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AYUSH GARG ayush.c...@iitp.ac.in

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


[MediaWiki-commits] [Gerrit] Use HTMLForm for Special:Search - change (mediawiki/core)

2015-03-31 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Use HTMLForm for Special:Search
..

Use HTMLForm for Special:Search

Allows us to change the output of forms through HtmlForm on as much special
pages as possible.

Change-Id: Iba29770c53d8fd0425875f56c2e02691892e1715
---
M includes/specials/SpecialSearch.php
M resources/src/mediawiki.special/mediawiki.special.search.css
2 files changed, 32 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/200827/1

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 55be2c2..c3d61e9 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -1072,21 +1072,31 @@
 * @return string
 */
protected function shortDialog( $term, $resultsShown, $totalNum ) {
-   $out = Html::hidden( 'title', 
$this-getPageTitle()-getPrefixedText() );
-   $out .= Html::hidden( 'profile', $this-profile ) . \n;
-   // Term box
-   $out .= Html::input( 'search', $term, 'search', array(
-   'id' = $this-isPowerSearch() ? 'powerSearchText' : 
'searchText',
-   'size' = '50',
-   'autofocus' = trim( $term ) === '',
-   'class' = 'mw-ui-input mw-ui-input-inline',
-   ) ) . \n;
-   $out .= Html::hidden( 'fulltext', 'Search' ) . \n;
-   $out .= Html::submitButton(
-   $this-msg( 'searchbutton' )-text(),
-   array( 'class' = 'mw-ui-button mw-ui-progressive' ),
-   array( 'mw-ui-progressive' )
-   ) . \n;
+   $formFields = array(
+   'search' = array(
+   'type' = 'text',
+   'name' = 'search',
+   'value' = $term,
+   'hidelabel' = true,
+   'id' = $this-isPowerSearch() ? 
'powerSearchText' : 'searchText',
+   'size' = '50',
+   'autofocus' = trim( $term ) === '',
+   'cssclass' = 'mw-ui-input mw-ui-input-inline',
+   ),
+   );
+   $hiddenFields = array(
+   'title' = $this-getPageTitle()-getPrefixedText(),
+   'profile' = $this-profile,
+   'fulltext' = 'Search',
+   );
+
+   $form = HTMLForm::factory( 'inline', $formFields, 
$this-getContext() );
+   $form-addHiddeNFields( $hiddenFields );
+   $form-setAction( wfScript() );
+   $form-setMethod( 'get' );
+   $form-setSubmitProgressive();
+   $form-setSubmitTextMsg( $this-msg( 'searchbutton' ) );
+   $out = $form-prepareForm()-getHTML( false );
 
// Results-info
if ( $totalNum  0  $this-offset  $totalNum ) {
diff --git a/resources/src/mediawiki.special/mediawiki.special.search.css 
b/resources/src/mediawiki.special/mediawiki.special.search.css
index 8f845df..c79ec9c 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.css
@@ -172,3 +172,10 @@
 form#powersearch {
clear: both;
 }
+/* HTMLForm adjustments */
+.mw-htmlform-nolabel {
+   float: left;
+}
+#searchText {
+   float: inherit;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba29770c53d8fd0425875f56c2e02691892e1715
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de

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


[MediaWiki-commits] [Gerrit] Rework MessageSnakFormatterTest - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rework MessageSnakFormatterTest
..


Rework MessageSnakFormatterTest

... and clean up MessageSnakFormatter. This is a base patch for T63662.
This patch does not change any semantics, the next patch does.

* Make test independent from core.
* Add a lot more test cases.
* Add missing support for FORMAT_HTML_DIFF.
* Add missing docs.
* Fix outdated docs.

Bug: T63662
Change-Id: I93eca5e171e2d5ef7acf66b61fc0790debbfa0c9
---
M lib/includes/formatters/MessageSnakFormatter.php
M lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
2 files changed, 99 insertions(+), 34 deletions(-)

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



diff --git a/lib/includes/formatters/MessageSnakFormatter.php 
b/lib/includes/formatters/MessageSnakFormatter.php
index 2c8828d..a1ddbb4 100644
--- a/lib/includes/formatters/MessageSnakFormatter.php
+++ b/lib/includes/formatters/MessageSnakFormatter.php
@@ -4,6 +4,7 @@
 
 use InvalidArgumentException;
 use Message;
+use RuntimeException;
 use Wikibase\DataModel\Snak\Snak;
 
 /**
@@ -17,7 +18,7 @@
 class MessageSnakFormatter implements SnakFormatter {
 
/**
-* @var string
+* @var string One of the SnakFormatter::FORMAT_... constants.
 */
private $format;
 
@@ -27,16 +28,16 @@
private $message;
 
/**
-* @var String
+* @var string
 */
private $snakType;
 
/**
-* @param string $snakType
+* @param string $snakType Type of the snak, usually value, 
somevalue or novalue.
 * @param Message $message
-* @param string $format
+* @param string $format One of the SnakFormatter::FORMAT_... constants.
 *
-* @throws \InvalidArgumentException
+* @throws InvalidArgumentException
 */
public function __construct( $snakType, Message $message, $format ) {
if ( !is_string( $snakType ) ) {
@@ -53,10 +54,9 @@
}
 
/**
-* Returns the format ID of the format this formatter generates.
-* This uses the FORMAT_XXX constants defined in 
OutputFormatSnakFormatterFactory.
+* @see SnakFormatter::getFormat
 *
-* @return string
+* @return string One of the SnakFormatter::FORMAT_... constants.
 */
public function getFormat() {
return $this-format;
@@ -64,31 +64,35 @@
 
/**
 * Returns a string from the message provided to the constructor.
-* Depending on the desired format, the text is returned as HTML or 
wikitext.
+* Depending on the desired format, the text is returned as plain, 
wikitext or HTML.
 *
 * Note that this method does not look at the snak given. It simply 
returns the same
 * message always.
 *
-* @param Snak $snak
+* @see SnakFormatter::formatSnak
 *
-* @return string
+* @param Snak $snak Unused in this implementation.
+*
+* @throws RuntimeException If the requested output format is not known.
+* @return string Plain, wikitext or HTML
 */
public function formatSnak( Snak $snak ) {
-   if ( $this-format === SnakFormatter::FORMAT_HTML
-   || $this-format === SnakFormatter::FORMAT_HTML_WIDGET
-   ) {
-   $text = $this-message-parse();
-   } else {
-   $text = $this-message-text();
+   if ( $this-format === SnakFormatter::FORMAT_PLAIN ) {
+   return $this-message-plain();
+   } elseif ( $this-format === SnakFormatter::FORMAT_WIKI ) {
+   return $this-message-text();
+   } elseif ( strpos( $this-format, SnakFormatter::FORMAT_HTML ) 
=== 0 ) {
+   $html = $this-message-parse();
+   return $html;
}
 
-   return $text;
+   throw new RuntimeException( 'Unknown format' );
}
 
/**
 * Checks whether the snak type supplied to the constructor matches the 
given snak.
 *
-* @see SnakFormatter::canFormatSnak()
+* @see SnakFormatter::canFormatSnak
 *
 * @param Snak $snak
 *
diff --git a/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php 
b/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
index 83e9f7f..d13fe01 100644
--- a/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
@@ -2,54 +2,115 @@
 
 namespace Wikibase\Lib\Test;
 
+use DataValues\StringValue;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyNoValueSnak;
 use Wikibase\DataModel\Snak\PropertySomeValueSnak;
+use 

[MediaWiki-commits] [Gerrit] Create zend pipeline to manually trigger zend jobs - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Create zend pipeline to manually trigger zend jobs
..


Create zend pipeline to manually trigger zend jobs

The MediaWiki Core PHPUnit tests running under Zend are rather slow to
run in 'test' pipeline and have been removed.  The HHVM based job runs
though.

The release branches do not have hhvm jobs though, so it might be
helpful to manually trigger the Zend flavor when releasing a new
version.

Add a new pipeline 'zend' which only reacts when someone comment check
zend. Similar to experimental pipeline.

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ee28302..8d2af53 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -387,6 +387,23 @@
 failure:
   gerrit: {}
 
+  - name: zend
+description: 
+  Jobs manually triggered by whitelisted users commenting 'check zend'.
+  Useful for running zend tests that are only part of gate-and-submit.
+manager: IndependentPipelineManager
+trigger:
+  gerrit:
+- event: comment-added
+  comment_filter: (?im)^Patch Set \d+:\n\n\s*check zend\.?\s*$
+  email: *email_whitelist
+success-message: 'Zend build succeeded.'
+success:
+  gerrit: {}
+failure-message: 'Zend build failed.'
+failure:
+  gerrit: {}
+
   # Actual gate (report/vote in Gerrit)
   # Will auto-submit change on success!
   #
@@ -2076,6 +2093,9 @@
   - mediawiki-core-bundle-rubocop
   - mediawiki-core-ruby1.9.3lint
   - php-composer-package-validate
+zend:
+  # Comment check zend to manually run this
+  - mediawiki-phpunit-zend
 gate-and-submit:
   - mediawiki-gate
   - mediawiki-core-jsduck

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5c445f933bc76ed3a92713bf5d9dc596af26b44
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Made text profiling actually work with load.php - change (mediawiki/core)

2015-03-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Made text profiling actually work with load.php
..

Made text profiling actually work with load.php

Change-Id: I8d28ad8669e8c2f5d7025fe67fb75d0551975e07
---
M includes/profiler/output/ProfilerOutputText.php
M load.php
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/200818/1

diff --git a/includes/profiler/output/ProfilerOutputText.php 
b/includes/profiler/output/ProfilerOutputText.php
index d37d74f..d5a7180 100644
--- a/includes/profiler/output/ProfilerOutputText.php
+++ b/includes/profiler/output/ProfilerOutputText.php
@@ -70,7 +70,7 @@
print !--\n{$out}\n--\n;
}
} elseif ( $contentType === 'text/javascript' ) {
-   print \n/*\n${$out}*/\n;
+   print \n/*\n{$out}*/\n;
} elseif ( $contentType === 'text/css' ) {
print \n/*\n{$out}*/\n;
}
diff --git a/load.php b/load.php
index f66cd5a..ef2df31 100644
--- a/load.php
+++ b/load.php
@@ -43,6 +43,7 @@
 $resourceLoader = new ResourceLoader( $configFactory-makeConfig( 'main' ) );
 $resourceLoader-respond( new ResourceLoaderContext( $resourceLoader, 
$wgRequest ) );
 
+Profiler::instance()-setTemplated( true );
 wfLogProfilingData();
 
 // Shut down the database.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d28ad8669e8c2f5d7025fe67fb75d0551975e07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix more JS errors - change (mediawiki...ArticleFeedbackv5)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix more JS errors
..


Fix more JS errors

Same as https://gerrit.wikimedia.org/r/#/c/200518/
'value=' should be used, not 'value='

Change-Id: I83839dfae0359f3d7b092f522fe879ddeda03c68
---
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js 
b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
index 88ef64a..ba1d371 100644
--- a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
+++ b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -422,7 +422,7 @@
} );
 
// Disable the dividers
-   $( '#articleFeedbackv5-sort-select option[value=]' ).attr( 
'disabled', true );
+   $( '#articleFeedbackv5-sort-select option[value=]' ).attr( 
'disabled', true );
 
// Show more
$( '#articleFeedbackv5-show-more' ).bind( 'click', function( e 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83839dfae0359f3d7b092f522fe879ddeda03c68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] mediawiki.conf: Remove unused $currentExt and ZUUL_PROJECT e... - change (integration/jenkins)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki.conf: Remove unused $currentExt and ZUUL_PROJECT 
extraction
..


mediawiki.conf: Remove unused $currentExt and ZUUL_PROJECT extraction

Follows-up 31a6fc1.

Change-Id: I4e8055e34a5e0a2c7b178e5900565834bf4c1c66
---
M mediawiki/conf.d/50_mw_ext_loader.php
1 file changed, 0 insertions(+), 14 deletions(-)

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



diff --git a/mediawiki/conf.d/50_mw_ext_loader.php 
b/mediawiki/conf.d/50_mw_ext_loader.php
index d58c271..0485cf6 100644
--- a/mediawiki/conf.d/50_mw_ext_loader.php
+++ b/mediawiki/conf.d/50_mw_ext_loader.php
@@ -21,20 +21,6 @@
exit(1);
}
 
-   // Get the current project
-   $ZUUL_PROJECT = getenv( 'ZUUL_PROJECT' );
-
-   // Attempt to extract the extension name
-   $currentExt = null;
-   $m = array();
-   if ( preg_match_all(
-   '%^mediawiki/extensions/(.*)$%',
-   $ZUUL_PROJECT,
-   $m
-   ) ) {
-   $currentExt = $m[1][0];
-   }
-
$ext_to_load = array(
'require' = array(),
'load' = array(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e8055e34a5e0a2c7b178e5900565834bf4c1c66
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Rely less on file stat cache in FileDependency - change (mediawiki/core)

2015-03-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Rely less on file stat cache in FileDependency
..

Rely less on file stat cache in FileDependency

Change-Id: Ica16ddb7db00a56a16332c4dbb9a04e7b40a1844
---
M includes/cache/CacheDependency.php
1 file changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/200823/1

diff --git a/includes/cache/CacheDependency.php 
b/includes/cache/CacheDependency.php
index 9b48ecb..3c87c78 100644
--- a/includes/cache/CacheDependency.php
+++ b/includes/cache/CacheDependency.php
@@ -181,12 +181,16 @@
 
function loadDependencyValues() {
if ( is_null( $this-timestamp ) ) {
-   if ( !file_exists( $this-filename ) ) {
+   wfSuppressWarnings();
+   $lastmod = filemtime( $this-filename );
+   wfRestoreWarnings();
+
+   if ( $lastmod === false ) {
# Dependency on a non-existent file
# This is a valid concept!
$this-timestamp = false;
} else {
-   $this-timestamp = filemtime( $this-filename );
+   $this-timestamp = $lastmod;
}
}
}
@@ -195,7 +199,10 @@
 * @return bool
 */
function isExpired() {
-   if ( !file_exists( $this-filename ) ) {
+   wfSuppressWarnings();
+   $lastmod = filemtime( $this-filename );
+   wfRestoreWarnings();
+   if ( $lastmod === false ) {
if ( $this-timestamp === false ) {
# Still nonexistent
return false;
@@ -206,7 +213,6 @@
return true;
}
} else {
-   $lastmod = filemtime( $this-filename );
if ( $lastmod  $this-timestamp ) {
# Modified or created
wfDebug( Dependency triggered: 
{$this-filename} changed.\n );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica16ddb7db00a56a16332c4dbb9a04e7b40a1844
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove Chris's access - change (operations/puppet)

2015-03-31 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Remove Chris's access
..


Remove Chris's access

Added him to the absent group and removed him from other groups

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

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 7e5afd0..b13a392 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1,7 +1,7 @@
 groups:
   absent:
 description: meta group for absented users
-members: [bsitu , csalvia, edenhill, jgonera, mah, mwalker, nimishg, 
rainman, ssmith, swalling]
+members: [bsitu , cmcmahon, csalvia, edenhill, jgonera, mah, mwalker, 
nimishg, rainman, ssmith, swalling]
   wikidev:
 gid: 500
 description: container group for primary user groups.
@@ -41,7 +41,7 @@
 gid: 705
 description: replaces 'mortals' for software deployment
 members: [aaron, dr0ptp4kt, werdna, anomie, aude, awight, awjrichards, 
bd808, jdouglas,
-  brion, cmcmahon, cscott, csteipp, demon, ebernhardson, esanders, gilles,
+  brion, cscott, csteipp, demon, ebernhardson, esanders, gilles,
   gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, 
manybubbles,
   maxsem, mattflaschen, marktraceur, milimetric, mlitn, andyrussg,
   nikerabbit, reedy, rmoen, robla, spage, ssastry, tomasz, yurik,
@@ -124,7 +124,7 @@
   contint-admins:
 gid: 719
 description: users with some sudo permissions on jenkins hosts
-members: [bd808, cmcmahon, cscott, dduvall, demon, krinkle, reedy, 
marktraceur, twentyafterfour, zfilipin, thcipriani, legoktm]
+members: [bd808, cscott, dduvall, demon, krinkle, reedy, marktraceur, 
twentyafterfour, zfilipin, thcipriani, legoktm]
 privileges: ['ALL = (jenkins) NOPASSWD: ALL',
 'ALL = (jenkins-slave) NOPASSWD: ALL',
 'ALL = (gerritslave) NOPASSWD: ALL',
@@ -547,7 +547,7 @@
 catrope@catrope-Lenovo-IdeaPad-U300s]
 uid: 546
   cmcmahon:
-ensure: present
+ensure: absent
 gid: 500
 name: cmcmahon
 realname: Chris McMahon

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18ef0d910e71e7b443d77ffa89a2dc1b97e74f2f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Greg Grossmeier g...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Move Wikibase\Repo\View to Wikibase\View - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Move Wikibase\Repo\View to Wikibase\View
..

Move Wikibase\Repo\View to Wikibase\View

Change-Id: Ie0bd5ce523608d1e8dc4ed7ad5199764982b8ae7
---
M composer.json
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityParserOutputGeneratorFactory.php
M repo/includes/WikibaseRepo.php
M repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
M view/src/ClaimHtmlGenerator.php
M view/src/EditSectionGenerator.php
M view/src/EmptyEditSectionGenerator.php
M view/src/EntityTermsView.php
M view/src/EntityView.php
M view/src/EntityViewFactory.php
M view/src/EntityViewPlaceholderExpander.php
M view/src/ItemView.php
M view/src/PropertyView.php
M view/src/SiteLinksView.php
M view/src/SnakHtmlGenerator.php
M view/src/StatementGroupListView.php
M view/src/TextInjector.php
M view/src/ToolbarEditSectionGenerator.php
M view/tests/phpunit/ClaimHtmlGeneratorTest.php
M view/tests/phpunit/ClaimsViewTest.php
M view/tests/phpunit/EmptyEditSectionGeneratorTest.php
M view/tests/phpunit/EntityTermsViewTest.php
M view/tests/phpunit/EntityViewFactoryTest.php
M view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
M view/tests/phpunit/EntityViewTest.php
M view/tests/phpunit/ItemViewTest.php
M view/tests/phpunit/PropertyViewTest.php
M view/tests/phpunit/SiteLinksViewTest.php
M view/tests/phpunit/SnakHtmlGeneratorTest.php
M view/tests/phpunit/TextInjectorTest.php
M view/tests/phpunit/ToolbarEditSectionGeneratorTest.php
32 files changed, 97 insertions(+), 116 deletions(-)


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

diff --git a/composer.json b/composer.json
index 4835316..7b02206 100644
--- a/composer.json
+++ b/composer.json
@@ -66,7 +66,6 @@
repo/Wikibase.hooks.php
],
psr-4: {
-   Wikibase\\Repo\\View\\: view/src,
Wikibase\\View\\: view/src
}
}
diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 5e2f424..54858ee 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -20,11 +20,11 @@
 use Wikibase\Lib\Store\EntityInfoTermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
-use Wikibase\Repo\View\EmptyEditSectionGenerator;
-use Wikibase\Repo\View\EntityViewFactory;
 use Wikibase\Repo\View\RepoSpecialPageLinker;
-use Wikibase\Repo\View\ToolbarEditSectionGenerator;
 use Wikibase\Template\TemplateFactory;
+use Wikibase\View\EmptyEditSectionGenerator;
+use Wikibase\View\EntityViewFactory;
+use Wikibase\View\ToolbarEditSectionGenerator;
 
 /**
  * Creates the parser output for an entity.
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index de2f03f..1a8faa1 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -8,8 +8,8 @@
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
 use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\Repo\View\EntityViewFactory;
 use Wikibase\Template\TemplateFactory;
+use Wikibase\View\EntityViewFactory;
 
 /**
  * @since 0.5
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index f52297a..0fd0c42 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -70,7 +70,6 @@
 use Wikibase\Repo\Notifications\DatabaseChangeTransmitter;
 use Wikibase\Repo\Notifications\DummyChangeTransmitter;
 use Wikibase\Repo\Store\EntityPermissionChecker;
-use Wikibase\Repo\View\EntityViewFactory;
 use Wikibase\Settings;
 use Wikibase\SettingsArray;
 use Wikibase\SnakFactory;
@@ -88,6 +87,7 @@
 use Wikibase\Validators\TermValidatorFactory;
 use Wikibase\Validators\ValidatorErrorLocalizer;
 use Wikibase\ValuesFinder;
+use Wikibase\View\EntityViewFactory;
 
 /**
  * Top level factory for the WikibaseRepo extension.
diff --git a/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php 
b/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
index 6fc6326..fbf24fb 100644
--- a/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
+++ b/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
@@ -160,11 +160,11 @@
}
 
private function getEntityViewFactory() {
-   $entityViewFactory = $this-getMockBuilder( 
'Wikibase\Repo\View\EntityViewFactory' )
+   $entityViewFactory = $this-getMockBuilder( 
'Wikibase\View\EntityViewFactory' )
-disableOriginalConstructor()
-getMock();
 
-   $entityView = $this-getMockBuilder( 

[MediaWiki-commits] [Gerrit] Use external request ID if supplied - change (mediawiki...parsoid)

2015-03-31 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Use external request ID if supplied
..

Use external request ID if supplied

RESTBase sends out a X-Request-Id header with each request, allowing us
to track a particular request (and its sub-requests) throughout the
cluster. This patch adds the capability to Parsoid to honour and use it
if it has been supplied. Otherwise, a new request ID is generated.

Change-Id: I1e94dd7fe05fb0e5a5272a6c2129a9ee5c78d452
---
M api/ParsoidService.js
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/api/ParsoidService.js b/api/ParsoidService.js
index b35a3bc..1138291 100644
--- a/api/ParsoidService.js
+++ b/api/ParsoidService.js
@@ -51,8 +51,12 @@
// request ids
var buf = new Buffer(16);
app.use(function(req, res, next) {
-   uuid(null, buf);
-   res.local('reqId', buf.toString('hex'));
+   if(req.headers  req.headers['x-request-id']) {
+   res.local('reqId', req.headers['x-request-id']);
+   } else {
+   uuid(null, buf);
+   res.local('reqId', buf.toString('hex'));
+   }
next();
});
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e94dd7fe05fb0e5a5272a6c2129a9ee5c78d452
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Mobrovac mobro...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Trim whitespace from link targets - change (VisualEditor/VisualEditor)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Trim whitespace from link targets
..


Trim whitespace from link targets

We don't need stuff like href=%09http://example.com .

Bug: T94498
Change-Id: I4df99d2c12d67275b999f0eb1234bd7cd44fe10e
---
M src/ui/widgets/ve.ui.LinkTargetInputWidget.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js 
b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
index b6fcd57..e26a5e5 100644
--- a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
+++ b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
@@ -16,7 +16,10 @@
 ve.ui.LinkTargetInputWidget = function VeUiLinkTargetInputWidget( config ) {
// Parent constructor
OO.ui.TextInputWidget.call( this, $.extend( {
-   validate: /^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi
+   validate: 
/^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi,
+   inputFilter: function ( target ) {
+   return target.trim();
+   }
}, config ) );
 
// Properties

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4df99d2c12d67275b999f0eb1234bd7cd44fe10e
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Esanders esand...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Clean-up OtherProjectsSidebarGenerator - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clean-up OtherProjectsSidebarGenerator
..


Clean-up OtherProjectsSidebarGenerator

* Drop superfluous array initialization.
* Make comments more specific.
* Introduce some variables for readability/debugging.

Change-Id: I40383f8a0ba0ac806cd3e75ae3dffe17509b4ebb
---
M client/includes/Hooks/OtherProjectsSidebarGenerator.php
1 file changed, 35 insertions(+), 22 deletions(-)

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



diff --git a/client/includes/Hooks/OtherProjectsSidebarGenerator.php 
b/client/includes/Hooks/OtherProjectsSidebarGenerator.php
index a33a1dd..7402428 100644
--- a/client/includes/Hooks/OtherProjectsSidebarGenerator.php
+++ b/client/includes/Hooks/OtherProjectsSidebarGenerator.php
@@ -45,7 +45,10 @@
 * @param SiteStore $siteStore
 * @param string[] $siteIdsToOutput
 */
-   public function __construct( $localSiteId, SiteLinkLookup 
$siteLinkLookup, SiteStore $siteStore,
+   public function __construct(
+   $localSiteId,
+   SiteLinkLookup $siteLinkLookup,
+   SiteStore $siteStore,
array $siteIdsToOutput
) {
$this-localSiteId = $localSiteId;
@@ -57,7 +60,8 @@
/**
 * @param Title $title
 *
-* @return array[] array of arrays of link attributes, sorted by site 
group id
+* @return array[] Array of arrays of attributes describing sidebar 
links, sorted by the site's
+* group and global ids.
 */
public function buildProjectLinkSidebar( Title $title ) {
return $this-buildSidebarFromSiteLinks( $this-getSiteLinks( 
$title ) );
@@ -66,45 +70,45 @@
/**
 * @param SiteLink[] $siteLinks
 *
-* @return array[] array of arrays of link attributes, sorted by site 
group id
+* @return array[] Array of arrays of attributes describing sidebar 
links, sorted by the site's
+* group and global ids.
 */
private function buildSidebarFromSiteLinks( array $siteLinks ) {
-   $result = array();
+   $linksByGroup = array();
 
foreach ( $siteLinks as $siteLink ) {
if ( !in_array( $siteLink-getSiteId(), 
$this-siteIdsToOutput ) ) {
continue;
}
+
$site = $this-siteStore-getSite( 
$siteLink-getSiteId() );
-   if ( $site === null ) {
-   continue;
-   }
 
-   if ( !isset( $result[$site-getGroup()] ) ) {
-   $result[$site-getGroup()] = array();
+   if ( $site !== null ) {
+   $group = $site-getGroup();
+   $globalId = $site-getGlobalId();
+   // Index by site group and global id
+   $linksByGroup[$group][$globalId] = 
$this-buildSidebarLink( $siteLink, $site );
}
-
-   // Index by site group and global id
-   $result[$site-getGroup()][$site-getGlobalId()] = 
$this-buildSidebarLink( $siteLink, $site );
}
 
-   return $this-sortAndFlattenSidebar( $result );
+   return $this-sortAndFlattenSidebar( $linksByGroup );
}
 
/**
 * The arrays of link attributes are indexed by site group and by 
global site id.
 * Sort them by both and then return the flattened array.
 *
-* @param array[]
+* @param array[] $linksByGroup
 *
-* @return array[] array of arrays of link attributes, sorted by site 
group id
+* @return array[] Array of arrays of attributes describing sidebar 
links, sorted by the site's
+* group and global ids.
 */
-   private function sortAndFlattenSidebar( array $links ) {
+   private function sortAndFlattenSidebar( array $linksByGroup ) {
$result = array();
 
-   ksort( $links ); // Sort by group id
+   ksort( $linksByGroup ); // Sort by group id
 
-   foreach ( $links as $linksPerGroup ) {
+   foreach ( $linksByGroup as $linksPerGroup ) {
ksort( $linksPerGroup ); // Sort individual arrays by 
global site id
$result = array_merge( $result, array_values( 
$linksPerGroup ) );
}
@@ -132,10 +136,19 @@
 * @param SiteLink $siteLink
 * @param Site $site
 *
-* @return string[]
+* @return string[] Array of attributes describing a sidebar link.
 */
private function buildSidebarLink( SiteLink $siteLink, Site $site ) {
-   $node = array(

[MediaWiki-commits] [Gerrit] ganglia: fix cluster sites for payments - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: ganglia: fix cluster sites for payments
..

ganglia: fix cluster sites for payments

Change-Id: I30f814c5481a39db48bc6c1eea75a147842507ba
---
M hieradata/common.yaml
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/200819/1

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 8732306..e5f6a8b 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -103,10 +103,9 @@
 - cp4005.ulsfo.wmnet
 - cp4013.ulsfo.wmnet
   payments:
-name: Fundraiser payments
-
+name: Fundraiser payments
 id: 23
-sites: []
+sites: {}
   ssl:
 name: SSL cluster
 id: 26

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30f814c5481a39db48bc6c1eea75a147842507ba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Pass EditSectionGenerator to EntityViewFactory - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Pass EditSectionGenerator to EntityViewFactory
..

Pass EditSectionGenerator to EntityViewFactory

This is a prerequisite for T93745. EntityViewFactory is part of WikibaseView,
but it currently references RepoSpecialPageLinker, which is part of
WikibaseRepo.

Change-Id: I4bd4bfb3fde415b815a3daa16e28d967954af346
---
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityParserOutputGeneratorFactory.php
M repo/includes/View/EntityViewFactory.php
M repo/includes/WikibaseRepo.php
M repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
6 files changed, 48 insertions(+), 19 deletions(-)


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

diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 279d942..5e2f424 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -20,7 +20,11 @@
 use Wikibase\Lib\Store\EntityInfoTermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
+use Wikibase\Repo\View\EmptyEditSectionGenerator;
 use Wikibase\Repo\View\EntityViewFactory;
+use Wikibase\Repo\View\RepoSpecialPageLinker;
+use Wikibase\Repo\View\ToolbarEditSectionGenerator;
+use Wikibase\Template\TemplateFactory;
 
 /**
  * Creates the parser output for an entity.
@@ -76,6 +80,11 @@
 */
private $referencedEntitiesFinder;
 
+   /**
+* @var TemplateFactory
+*/
+   private $templateFactory;
+
public function __construct(
EntityViewFactory $entityViewFactory,
ParserOutputJsConfigBuilder $configBuilder,
@@ -83,7 +92,8 @@
ValuesFinder $valuesFinder,
EntityInfoBuilderFactory $entityInfoBuilderFactory,
LanguageFallbackChain $languageFallbackChain,
-   $languageCode
+   $languageCode,
+   TemplateFactory $templateFactory
) {
$this-entityViewFactory = $entityViewFactory;
$this-configBuilder = $configBuilder;
@@ -94,6 +104,7 @@
$this-languageCode = $languageCode;
 
$this-referencedEntitiesFinder = new 
ReferencedEntitiesFinder();
+   $this-templateFactory = $templateFactory;
}
 
/**
@@ -312,7 +323,7 @@
/**
 * @param ParserOutput $parserOutput
 * @param EntityRevision $entityRevision
-* @param EntityInfo $entityInfo obtained from 
EntityInfoBuilder::getEntityInfo
+* @param EntityInfo $entityInfo
 * @param bool $editable
 */
private function addHtmlToParserOutput(
@@ -327,12 +338,17 @@
$this-languageFallbackChain
);
 
+   $editSectionGenerator = $editable ? new 
ToolbarEditSectionGenerator(
+   new RepoSpecialPageLinker(),
+   $this-templateFactory
+   ) : new EmptyEditSectionGenerator();
+
$entityView = $this-entityViewFactory-newEntityView(
$entityRevision-getEntity()-getType(),
$this-languageCode,
$labelLookup,
$this-languageFallbackChain,
-   $editable
+   $editSectionGenerator
);
 
$html = $entityView-getHtml( $entityRevision );
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index e113b72..de2f03f 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -3,13 +3,13 @@
 namespace Wikibase;
 
 use ParserOptions;
-use RequestContext;
 use ValueFormatters\ValueFormatter;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\View\EntityViewFactory;
+use Wikibase\Template\TemplateFactory;
 
 /**
  * @since 0.5
@@ -18,6 +18,11 @@
  * @author Katie Filbert  aude.w...@gmail.com 
  */
 class EntityParserOutputGeneratorFactory {
+
+   /**
+* @var TemplateFactory
+*/
+   private $templateFactory;
 
/**
 * @var EntityViewFactory
@@ -55,7 +60,8 @@
EntityTitleLookup $entityTitleLookup,
EntityIdParser $entityIdParser,
ValuesFinder $valuesFinder,
-   LanguageFallbackChainFactory $languageFallbackChainFactory
+   LanguageFallbackChainFactory 

[MediaWiki-commits] [Gerrit] Remove 'index' from most-used list - change (translatewiki)

2015-03-31 Thread Mormegil (Code Review)
Mormegil has uploaded a new change for review.

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

Change subject: Remove 'index' from most-used list
..

Remove 'index' from most-used list

The message got here by mistake, it is just a customization message used
on sidebar of various Wikipedias. See
https://phabricator.wikimedia.org/T65416#1046553

Bug: T65416
Change-Id: Iac813a1fc7101a7de6b40231c3bced843067ef2a
---
M groups/MediaWiki/wikimedia-mostused-2015.txt
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/22/200822/1

diff --git a/groups/MediaWiki/wikimedia-mostused-2015.txt 
b/groups/MediaWiki/wikimedia-mostused-2015.txt
index b897b38..b283aa9 100644
--- a/groups/MediaWiki/wikimedia-mostused-2015.txt
+++ b/groups/MediaWiki/wikimedia-mostused-2015.txt
@@ -247,7 +247,6 @@
 linkstoimage
 tooltip-ca-addsection
 vector-action-addsection
-index
 translate-documentation-language
 globalusage-of-file
 noarticletext

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac813a1fc7101a7de6b40231c3bced843067ef2a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Mormegil morme...@centrum.cz

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


[MediaWiki-commits] [Gerrit] labelview: Updated documentation - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: labelview: Updated documentation
..


labelview: Updated documentation

Change-Id: Ia334e5fe3368fd1cb2f823d21148cd73fa72518a
---
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
1 file changed, 25 insertions(+), 23 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
index bc8d473..6d8721f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
@@ -1,32 +1,29 @@
-/**
- * @licence GNU GPL v2+
- * @author H. Snater  mediaw...@snater.com 
- */
 ( function( $, mw, wb ) {
'use strict';
 
var PARENT = $.ui.EditableTemplatedWidget;
 
 /**
- * Manages a label.
+ * Displays and allows editing of a `wikibase.datamodel.Term` acting as an 
`Entity`'s label.
  * @since 0.5
+ * @class jQuery.wikibase.labelview
  * @extends jQuery.ui.EditableTemplatedWidget
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
  *
- * @option {wikibase.datamodel.Term} value
+ * @constructor
  *
- * @option {string} [helpMessage]
- * Default: mw.msg( 'wikibase-label-input-help-message' )
- *
- * @option {wikibase.entityChangers.LabelsChanger} labelsChanger
- *
- * @option {string} entityId
- *
- * @option {boolean} [showEntityId]
- * Default: false
+ * @param {Object} options
+ * @param {wikibase.datamodel.Term} options.value
+ * @param {string} [options.helpMessage=mw.msg( 
'wikibase-label-input-help-message' )]
+ * @param {wikibase.entityChangers.LabelsChanger} options.labelsChanger
+ * @param {string} options.entityId
+ * @param {boolean} [options.showEntityId=false]
  */
 $.widget( 'wikibase.labelview', PARENT, {
/**
-* @see jQuery.ui.TemplatedWidget.options
+* @inheritdoc
+* @protected
 */
options: {
template: 'wikibase-labelview',
@@ -47,7 +44,8 @@
},
 
/**
-* @see jQuery.ui.TemplatedWidget._create
+* @inheritdoc
+* @protected
 *
 * @throws {Error} if a required option is not specified properly.
 */
@@ -87,7 +85,7 @@
},
 
/**
-* @see jQuery.ui.TemplatedWidget.destroy
+* @inheritdoc
 */
destroy: function() {
if( this.isInEditMode() ) {
@@ -185,21 +183,25 @@
},
 
/**
-* @return {boolean}
+* @inheritdoc
 */
isValid: function() {
return true;
},
 
/**
-* @return {boolean}
+* @inheritdoc
 */
isInitialValue: function() {
return this.value().equals( this.options.value );
},
 
/**
-* @see jQuery.ui.TemplatedWidget._setOption
+* @inheritdoc
+* @protected
+*
+* @throws {Error} when trying to set the widget's value to something 
other than a
+* `wikibase.datamodel.Term` instance.
 */
_setOption: function( key, value ) {
if( key === 'value'  !( value instanceof wb.datamodel.Term ) 
) {
@@ -216,7 +218,7 @@
},
 
/**
-* Gets/Sets the widget's value.
+* @inheritdoc
 *
 * @param {wikibase.datamodel.Term} [value]
 * @return {wikibase.datamodel.Term|undefined}
@@ -238,7 +240,7 @@
},
 
/**
-* @see jQuery.ui.TemplatedWidget.focus
+* @inheritdoc
 */
focus: function() {
if( this.isInEditMode() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia334e5fe3368fd1cb2f823d21148cd73fa72518a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
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 @uses for SitesModuleWorkerTest - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add @uses for SitesModuleWorkerTest
..


Add @uses for SitesModuleWorkerTest

Change-Id: I70bf6405a85ad2f9e9098404a9662bac79221f78
---
M lib/tests/phpunit/SitesModuleWorkerTest.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/lib/tests/phpunit/SitesModuleWorkerTest.php 
b/lib/tests/phpunit/SitesModuleWorkerTest.php
index 833b39e..6548da6 100644
--- a/lib/tests/phpunit/SitesModuleWorkerTest.php
+++ b/lib/tests/phpunit/SitesModuleWorkerTest.php
@@ -12,6 +12,11 @@
 /**
  * @covers Wikibase\Lib\SitesModuleWorker
  *
+ * @uses Xml
+ * @uses SiteList
+ * @uses Wikibase\SettingsArray
+ * @uses Wikibase\Lib\LanguageNameLookup
+ *
  * @group Wikibase
  *
  * @author Adrian Heine  adrian.he...@wikimedia.de 
@@ -40,6 +45,8 @@
}
 
/**
+* @uses Wikibase\Test\SitesModuleWorkerTest::newSitesModuleWorker
+*
 * @dataProvider getScriptProvider
 */
public function testGetScript( $sites, $groups, $specialGroups, 
$expected ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70bf6405a85ad2f9e9098404a9662bac79221f78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] mediawiki: fix dsh group lookup - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: mediawiki: fix dsh group lookup
..

mediawiki: fix dsh group lookup

Following I6ddd5df7e239969caa59eb88ada1f5cfa0fe195b we can't do an exact
match anymore.

Change-Id: I4224aa33797dd42d4fc4d41ef970f283039c260b
---
M modules/nagios_common/files/check_commands/check_dsh_groups
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/200824/1

diff --git a/modules/nagios_common/files/check_commands/check_dsh_groups 
b/modules/nagios_common/files/check_commands/check_dsh_groups
index cf6f494..aa2493a 100755
--- a/modules/nagios_common/files/check_commands/check_dsh_groups
+++ b/modules/nagios_common/files/check_commands/check_dsh_groups
@@ -15,10 +15,7 @@
echo dsh group $GROUP not found
exit 3
fi
-   if [ `grep $HOST $FILE` != $HOST ] ; then
-   echo Host $HOST is not in $GROUP dsh group
-   exit 2
-   fi
+grep -q ^${HOST} ${FILE} || ( echo Host $HOST is not in $GROUP dsh 
group  exit 2)
 done;
 
 echo 'OK'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4224aa33797dd42d4fc4d41ef970f283039c260b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't write to non-existing eu_entity_type column in test - change (mediawiki...Wikibase)

2015-03-31 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Don't write to non-existing eu_entity_type column in test
..

Don't write to non-existing eu_entity_type column in test

eu_entity_type has been dropped from the wbc_entity_usage table

Change-Id: Ief847599cc1e01fe546781c6980ab801d8df62f6
---
M client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git 
a/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php 
b/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php
index 3af5bf7..635281b 100644
--- a/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php
+++ b/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php
@@ -214,7 +214,6 @@
$aspect = 'X';
 
$db-insert( 'wbc_entity_usage', array(
-   'eu_entity_type' = $entityType,
'eu_entity_id' = $entityId,
'eu_aspect' = $aspect,
'eu_page_id' = (int)$pageId,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief847599cc1e01fe546781c6980ab801d8df62f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Don't log page-impression or widget-impression - change (mediawiki...WikiGrok)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't log page-impression or widget-impression
..


Don't log page-impression or widget-impression

Bug: T94443
Change-Id: Iec33ff6919ca0cf9f704c5b217ffee2cb54fb67d
---
M resources/dialog/WikiGrokDialog.js
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/resources/dialog/WikiGrokDialog.js 
b/resources/dialog/WikiGrokDialog.js
index abd9a73..3273e4d 100644
--- a/resources/dialog/WikiGrokDialog.js
+++ b/resources/dialog/WikiGrokDialog.js
@@ -79,8 +79,6 @@
 
/** @inheritdoc */
initialize: function ( options ) {
-   var self = this;
-
// Remove any disambiguation parentheticals from the 
title.
options.name = options.title.replace( / \(.+\)$/, '' );
 
@@ -95,10 +93,11 @@
} );
Panel.prototype.initialize.apply( this, arguments );
 
-   this.once( 'show', function () {
+   // Disable logging page-impression and 
widget-impression for now
+   //this.once( 'show', function () {
//self.logPageImpression();
-   self.initializeWidgetImpressionLogging();
-   } );
+   //self.initializeWidgetImpressionLogging();
+   //} );
},
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec33ff6919ca0cf9f704c5b217ffee2cb54fb67d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Bmansurov bmansu...@wikimedia.org
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Quick popover menu when hovering the contributions link - change (mediawiki...ContentTranslation)

2015-03-31 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Quick popover menu when hovering the contributions link
..

Quick popover menu when hovering the contributions link

Communicate that users can create new contributions (especially translations)
in a quick way.

When users hover the contributions link, show a popover with access
to different contribution areas:
- User contributions links to the contributions page
- Uploaded media links to My Uploads from Commons.
- Translations links to the Content Translation Dashboard

The popover menu will be shown open initially right after the user
enabled the content translation beta feature
(to help announce where to translate from).

Bug: T92938
Change-Id: I47ec9d602c1af918b26522f35d716f98ea3fe432
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M Resources.php
M i18n/en.json
M i18n/qqq.json
A modules/campaigns/styles/images/blue-beta.png
A modules/campaigns/styles/images/blue-beta.svg
A modules/campaigns/styles/images/translation.png
A modules/campaigns/styles/images/translation.svg
A modules/campaigns/styles/images/userAvatar.png
A modules/campaigns/styles/images/userAvatar.svg
A modules/campaigns/styles/images/wikimediaCommons.png
A modules/campaigns/styles/images/wikimediaCommons.svg
13 files changed, 63 insertions(+), 0 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 991bd46..ccb756f 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -63,6 +63,9 @@
$out-addModules( 'ext.cx.redlink' );
}
 
+   // Add a hover menu for contributions link in personal tool bar
+   $out-addModules( 'ext.cx.campaigns.contributionsmenu' );
+
// The current guided tours are only for the user namespace,
// so load the module only there.
// In the future there may be guided tours in other namespaces,
@@ -184,6 +187,19 @@
}
 
/**
+* Hook: User::UserSaveOptions
+*/
+   public static function onSaveOptions( $user, $saveOptions ) {
+   if ( $saveOptions['cx'] ) {
+   RequestContext::getMain()-getOutput()-addModules(
+   array( 'ext.cx.betafeature.init', 
'ext.cx.campaigns.contributionsmenu' )
+   );
+   }
+
+   return true;
+   }
+
+   /**
 * Hook: ResourceLoaderTestModules
 */
public static function onResourceLoaderTestModules( array $modules ) {
diff --git a/ContentTranslation.php b/ContentTranslation.php
index 72644ae..c39e77d 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -71,6 +71,7 @@
'ContentTranslationHooks::addNewContributionButton';
 $GLOBALS['wgHooks']['ListDefinedTags'][] = 
'ContentTranslationHooks::registerTags';
 $GLOBALS['wgHooks']['ChangeTagsListActive'][] = 
'ContentTranslationHooks::registerTags';
+$GLOBALS['wgHooks']['UserSaveOptions'][] =  
'ContentTranslationHooks::onSaveOptions';
 $GLOBALS['wgHooks']['EditPage::showEditForm:initial'][] =
'ContentTranslationHooks::newArticleCampign';
 $GLOBALS['wgHooks']['ResourceLoaderTestModules'][] =
diff --git a/Resources.php b/Resources.php
index 73df65c..cddb627 100644
--- a/Resources.php
+++ b/Resources.php
@@ -725,6 +725,32 @@
)
 ) + $resourcePaths;
 
+$wgResourceModules['ext.cx.betafeature.init'] = array(
+   'scripts' = array(
+   'campaigns/ext.cx.betafeature.init.js',
+   ),
+) + $resourcePaths;
+
+$wgResourceModules['ext.cx.campaigns.contributionsmenu'] = array(
+   'scripts' = array(
+   'campaigns/ext.cx.campaigns.contributionsmenu.js',
+   ),
+   'styles' = array(
+   'campaigns/styles/ext.cx.campaigns.contributionsmenu.less',
+   ),
+   'dependencies' = array(
+   'mediawiki.ui.button',
+   'jquery.client',
+   'mediawiki.util',
+   'ext.cx.widgets.callout',
+   ),
+   'messages' = array(
+   'cx-campaign-contributionsmenu-mycontributions',
+   'cx-campaign-contributionsmenu-mytranslations',
+   'cx-campaign-contributionsmenu-myuploads',
+   )
+) + $resourcePaths;
+
 $wgResourceModules['ext.cx.widgets.overlay'] = array(
'scripts' = array(
'widgets/overlay/ext.cx.overlay.js',
diff --git a/i18n/en.json b/i18n/en.json
index aba65c9..e8923a6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -165,6 +165,9 @@
cx-campaign-newarticle-notice: Now you can also create new content 
by btranslating/b! Do you want to try the Content Translation beta tool?,
cx-campaign-no-thanks: No, thanks,

[MediaWiki-commits] [Gerrit] Add language fallback for badge labels - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Add language fallback for badge labels
..

Add language fallback for badge labels

Bug: T94552
Change-Id: I158482cb9ff225ae9389c071919edf6a3f9a3aaa
---
M lib/includes/store/TermLookup.php
A repo/includes/EntityIdLabelFormatterFactory.php
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/WikibaseRepo.php
A repo/tests/phpunit/includes/EntityIdLabelFormatterFactoryTest.php
M view/src/EntityViewFactory.php
M view/src/SiteLinksView.php
M view/tests/phpunit/EntityViewFactoryTest.php
M view/tests/phpunit/SiteLinksViewTest.php
9 files changed, 130 insertions(+), 98 deletions(-)


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

diff --git a/lib/includes/store/TermLookup.php 
b/lib/includes/store/TermLookup.php
index 4fb59b6..9af057b 100644
--- a/lib/includes/store/TermLookup.php
+++ b/lib/includes/store/TermLookup.php
@@ -31,8 +31,7 @@
/**
 * Gets all labels of an Entity with the specified EntityId.
 *
-* If $languages is given, the result will contain the entries for the
-* requested languages, if they exist.
+* The result will contain the entries for the requested languages, if 
they exist.
 *
 * @param EntityId $entityId
 * @param string[] $languageCodes The list of languages to fetch
diff --git a/repo/includes/EntityIdLabelFormatterFactory.php 
b/repo/includes/EntityIdLabelFormatterFactory.php
new file mode 100644
index 000..f179fdd
--- /dev/null
+++ b/repo/includes/EntityIdLabelFormatterFactory.php
@@ -0,0 +1,38 @@
+?php
+
+namespace Wikibase\Repo;
+
+use Wikibase\Lib\EntityIdLabelFormatter;
+use Wikibase\Lib\SnakFormatter;
+use Wikibase\Lib\Store\LabelLookup;
+use Wikibase\View\EntityIdFormatterFactory;
+
+/**
+ * A factory for generating EntityIdHtmlLinkFormatters.
+ *
+ * @license GPL 2+
+ * @author Daniel Kinzler
+ */
+class EntityIdLabelFormatterFactory implements EntityIdFormatterFactory {
+
+   /**
+* @see EntityIdFormatterFactory::getOutputFormat
+*
+* @return string SnakFormatter::FORMAT_HTML
+*/
+   public function getOutputFormat() {
+   return SnakFormatter::FORMAT_PLAIN;
+   }
+
+   /**
+* @see EntityIdFormatterFactory::getEntityIdFormater
+*
+* @param LabelLookup $labelLookup
+*
+* @return EntityIdLabelFormatter
+*/
+   public function getEntityIdFormater( LabelLookup $labelLookup ) {
+   return new EntityIdLabelFormatter( $labelLookup );
+   }
+
+}
diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 2ca6043..9a42f45 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -150,6 +150,14 @@
$editable = $options-getEditSection();
 
$usedEntityIds = 
$this-referencedEntitiesFinder-findSnakLinks( $snaks );
+
+   // FIXME: Bad
+   if( $entity instanceof Item ) {
+   foreach( $entity-getSiteLinkList()-getIterator() as 
$sitelink ) {
+   $usedEntityIds += $sitelink-getBadges();
+   }
+   }
+
$entityInfo = $this-getEntityInfo( $usedEntityIds );
 
$configVars = $this-configBuilder-build( $entity, $entityInfo 
);
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index dc20e9a..4308a34 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -1015,8 +1015,8 @@
 
$entityViewFactory = new EntityViewFactory(
$this-getEntityIdHtmlLinkFormatterFactory(),
+   new EntityIdLabelFormatterFactory(),
$this-getHtmlSnakFormatterFactory(),
-   $this-getEntityLookup(),
$this-getSiteStore(),
$this-getDataTypeFactory(),
$templateFactory,
diff --git a/repo/tests/phpunit/includes/EntityIdLabelFormatterFactoryTest.php 
b/repo/tests/phpunit/includes/EntityIdLabelFormatterFactoryTest.php
new file mode 100644
index 000..3562ca3
--- /dev/null
+++ b/repo/tests/phpunit/includes/EntityIdLabelFormatterFactoryTest.php
@@ -0,0 +1,38 @@
+?php
+
+namespace Wikibase\Repo\Test;
+
+use PHPUnit_Framework_TestCase;
+use Wikibase\Lib\SnakFormatter;
+use Wikibase\Repo\EntityIdLabelFormatterFactory;
+
+/**
+ * @covers Wikibase\Repo\EntityIdHtmlLinkFormatterFactory
+ *
+ * @group ValueFormatters
+ * @group WikibaseLib
+ * @group Wikibase
+ *
+ * @licence GNU GPL v2+
+ * @author Daniel Kinzler
+ */
+class EntityIdLabelFormatterFactoryTest extends PHPUnit_Framework_TestCase {
+
+   private 

[MediaWiki-commits] [Gerrit] Add collections icon to menu - change (mediawiki...Gather)

2015-03-31 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Add collections icon to menu
..

Add collections icon to menu

Replace duplicate watchlist icon with new icon.

Bug: T93813
Change-Id: Ie68f991d3a13af5d2df121d1836bcad6a7ae3916
---
M includes/Gather.hooks.php
M resources/Resources.php
A resources/ext.gather.icons/plus.svg
3 files changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 3cf19fe..564e399 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -102,7 +102,7 @@
'text' = 
wfMessage( 'gather-lists-title' )-escaped(),
'href' = 
SpecialPage::getTitleFor( 'Gather' )-getLocalURL(),
// FIXME: 
Temporarily watchlist icon
-   'class' = 
CSS::iconClass( 'watchlist', 'before' ),
+   'class' = 
CSS::iconClass( 'collections-icon', 'before' ),

'data-event-name' = 'collections',
),
),
diff --git a/resources/Resources.php b/resources/Resources.php
index 3c4a94a..bd74619 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -53,6 +53,7 @@
'class' = 'ResourceLoaderImageModule',
'selector' = '.mw-ui-icon-{name}:before',
'images' = array(
+   'collections-icon' = 'ext.gather.icons/plus.svg',
'collections-read-more' = 'ext.gather.icons/next.svg',
'collection-owner' = 'ext.gather.icons/user.svg',
),
diff --git a/resources/ext.gather.icons/plus.svg 
b/resources/ext.gather.icons/plus.svg
new file mode 100644
index 000..38b3cf5
--- /dev/null
+++ b/resources/ext.gather.icons/plus.svg
@@ -0,0 +1,6 @@
+?xml version=1.0 encoding=UTF-8 standalone=no?
+svg xmlns=http://www.w3.org/2000/svg; viewBox=0 0 1000 800 
enable-background=new 0 0 1280 800 width=1000 height=800
+g id=g3
+path d=M113.87 
494.2V301.6h301.6V0h192.7v301.6h301.6v192.7h-301.7V800h-192.6V494.2h-301.6z 
id=path5 fill=#fff/
+/g
+/svg

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie68f991d3a13af5d2df121d1836bcad6a7ae3916
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez jhernan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add extension.json - change (mediawiki...ContactPage)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add extension.json
..


Add extension.json

Bug: T87901
Change-Id: Iba8dccbf5ec5b303610c89bb82ff13d86dc5883a
---
M ContactPage.php
M ContactPage_body.php
A extension.json
3 files changed, 63 insertions(+), 0 deletions(-)

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



diff --git a/ContactPage.php b/ContactPage.php
index ebbe44a..e2ae761 100644
--- a/ContactPage.php
+++ b/ContactPage.php
@@ -15,6 +15,11 @@
die( 1 );
 }
 
+/**
+ * This PHP entry point is deprecated. Please use wfLoadExtension() and the 
extension.json file instead.
+ * See https://www.mediawiki.org/wiki/Manual:Extension_registration for more 
details.
+ */
+
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
@@ -64,6 +69,7 @@
 
// The name to be used with SenderEmail.
// This will be shown in the recipient's email program
+   // Defaults to Contact Form on $wgSitename
'SenderName' = 'Contact Form on ' . $wgSitename,
 
// If true, users will be required to supply a name and an email address
diff --git a/ContactPage_body.php b/ContactPage_body.php
index 492174a..3931395 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -15,6 +15,16 @@
  * @ingroup SpecialPage
  */
 class SpecialContact extends UnlistedSpecialPage {
+
+   /**
+* Set default value after registration
+*/
+   public static function onRegistration() {
+   global $wgContactConfig, $wgSitename;
+   if ( $wgContactConfig['default']['SenderName'] === null ) {
+   $wgContactConfig['default']['SenderName'] = Contact 
Form on $wgSitename;
+   }
+   }
/**
 * Constructor
 */
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..cc3c58a
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,47 @@
+{
+   name: ContactPage,
+   version: 2.2,
+   author: [
+   Daniel Kinzler,
+   Sam Reed
+   ],
+   url: https://www.mediawiki.org/wiki/Extension:ContactPage;,
+   descriptionmsg: contactpage-desc,
+   license-name: GPL-2.0+,
+   type: specialpage,
+   ExtensionMessagesFiles: {
+   ContactPageAliases: ContactPage.alias.php
+   },
+   MessagesDirs: {
+   ContactPage: [
+   i18n
+   ]
+   },
+   config: {
+   ContactConfig: {
+   default: {
+   RecipientUser: null,
+   SenderEmail: null,
+   SenderName: null,
+   RequireDetails: false,
+   IncludeIP: false,
+   AdditionalFields: {
+   Text: {
+   label-message: emailmessage,
+   type: textarea,
+   rows: 20,
+   cols: 80,
+   required: true
+   }
+   }
+   }
+   }
+   },
+   callback: SpecialContact::onRegistration,
+   SpecialPages: {
+   Contact: SpecialContact
+   },
+   AutoloadClasses: {
+   SpecialContact: ContactPage_body.php
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba8dccbf5ec5b303610c89bb82ff13d86dc5883a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] build: Generate prettier task names for 'colorizeSvg' - change (oojs/ui)

2015-03-31 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: build: Generate prettier task names for 'colorizeSvg'
..

build: Generate prettier task names for 'colorizeSvg'

Like 'mediawiki-icons-layout' rather than 
'src/themes/mediawiki/icons-layout.json'.

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/49/200849/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 2b54962..fb15a70 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -45,7 +45,7 @@
var
theme = path.basename( path.dirname( 
fileName ) ),
lessFileName = fileName.replace( 
/\.json$/, '.less' ).replace( /^src\//, 'dist/tmp/' );
-   colorizeSvgFiles[ fileName ] = {
+   colorizeSvgFiles[ fileName.replace( 
/.+\/(\w+)\/([\w-]+)\.json$/, '$1-$2' ) ] = {
options: grunt.file.readJSON( fileName 
),
srcDir: 'src/themes/' + theme,
destDir: 'dist/themes/' + theme,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0220446ef880de005b5184e59460636a324e6a19
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com

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


[MediaWiki-commits] [Gerrit] Special:LinkSearch: display links to pages in content language - change (mediawiki/core)

2015-03-31 Thread AYUSH GARG (Code Review)
AYUSH GARG has uploaded a new change for review.

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

Change subject: Special:LinkSearch: display links to pages in content language
..

Special:LinkSearch: display links to pages in content language

Bug: T66064
Change-Id: Ib2af28bec7b9c6ec01c5628be07e1280cbbd2f83
---
M includes/specials/SpecialLinkSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/200843/1

diff --git a/includes/specials/SpecialLinkSearch.php 
b/includes/specials/SpecialLinkSearch.php
index 20aac18..bcb8a8d 100644
--- a/includes/specials/SpecialLinkSearch.php
+++ b/includes/specials/SpecialLinkSearch.php
@@ -69,7 +69,7 @@
 */
private function initServices() {
if ( !$this-linkRenderer ) {
-   $lang = $this-getContext()-getLanguage();
+   $lang = Language::factory( 'en' );
$titleFormatter = new MediaWikiTitleCodec( $lang, 
GenderCache::singleton() );
$this-linkRenderer = new MediaWikiPageLinkRenderer( 
$titleFormatter );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2af28bec7b9c6ec01c5628be07e1280cbbd2f83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AYUSH GARG ayush.c...@iitp.ac.in

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


[MediaWiki-commits] [Gerrit] Hygiene: Improve Collection::isOwner - change (mediawiki...Gather)

2015-03-31 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Hygiene: Improve Collection::isOwner
..

Hygiene: Improve Collection::isOwner

Compare using the object equals method instead of doing it manually.

Actually use the method wherever possible around Special:Gather.

Bug: T94556
Change-Id: I562789a3d4831725673e581f28183326898cb8ad
---
M includes/models/CollectionBase.php
M includes/specials/SpecialGather.php
2 files changed, 10 insertions(+), 18 deletions(-)


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

diff --git a/includes/models/CollectionBase.php 
b/includes/models/CollectionBase.php
index cf83b52..0632912 100644
--- a/includes/models/CollectionBase.php
+++ b/includes/models/CollectionBase.php
@@ -171,7 +171,7 @@
 * @return boolean
 */
public function isOwner( User $user ) {
-   return $this-owner-getName() == $user-getName();
+   return $this-owner-equals( $user );
}
 
 }
diff --git a/includes/specials/SpecialGather.php 
b/includes/specials/SpecialGather.php
index 7a53462..50c3184 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -115,8 +115,9 @@
$collection = models\Collection::newFromApi( $id, $user );
 
if ( $collection === null ||
-   ( !$collection-isPublic()  !$this-isOwner( 
$collection-getOwner() ) ) ) {
+   // If collection is private and current user doesn't 
own it
// FIXME: No permissions to visit this. Showing not 
found ATM.
+   ( !$collection-isPublic()  !$collection-isOwner( 
$this-getUser() ) ) ) {
$this-renderError( new views\NotFound() );
} else {
$this-getOutput()-addJsConfigVars( 
'wgGatherCollections', $collection-toArray() );
@@ -131,7 +132,9 @@
 * @param User $user owner of collections
 */
public function renderUserCollectionsList( User $user ) {
-   $collectionsList = models\CollectionsList::newFromApi( $user, 
$this-isOwner( $user ) );
+   $collectionsList = models\CollectionsList::newFromApi(
+   $user, $this-getUser()-equals( $user )
+   );
if ( $collectionsList-getCount()  0 ) {
$this-render( new views\CollectionsList( 
$collectionsList ) );
} else {
@@ -152,25 +155,14 @@
$view-render( $out );
}
 
-   /**
-* Returns if the user viewing the page is the owner of the 
collection/list
-* we are viewing
-*
-* @param User $user user owner of the current page
-*
-* @return boolean
-*/
-   private function isOwner( User $user ) {
-   return $this-getUser()-equals( $user );
-   }
-
// FIXME: Re-evaluate when UI supports editing image of collection.
private function updateCollectionImage( $collection ) {
$currentImage = $collection-getFile();
-   $user = $collection-getOwner();
$suggestedImage = $collection-getSuggestedImage();
$imageChanged = !$currentImage || 
$currentImage-getTitle()-getText() !== $suggestedImage;
-   if ( $imageChanged  $this-isOwner( $user )  
!$collection-isWatchlist() ) {
+   if ( $imageChanged 
+   $collection-isOwner( $this-getUser() ) 
+   !$collection-isWatchlist() ) {
// try to set the collection image to the first item in 
the collection.
try {
$api = new ApiMain( new DerivativeRequest(
@@ -179,7 +171,7 @@
'action' = 'editlist',
'id' = $collection-getId(),
'image' = $suggestedImage,
-   'token' = $user-getEditToken( 
'watch' ),
+   'token' = 
$collection-getOwner()-getEditToken( 'watch' ),
),
true
), true );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I562789a3d4831725673e581f28183326898cb8ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez jhernan...@wikimedia.org

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

[MediaWiki-commits] [Gerrit] Update Special:ListDatatypes for TimeValue - change (mediawiki...Wikibase)

2015-03-31 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Update Special:ListDatatypes for TimeValue
..

Update Special:ListDatatypes for TimeValue

I'm focusing on non-controversial changes in this patch. Missing in
this patch because it's still discussed:
* Interpretation of the calendar model.
* Negative years.
* Year zero.
* Meaning of the Z.
* Meaning of before and after = 0.
* Meaning of month with precision = year, and so on.
* If day/month can be zero.
* If leading zeros in years with more than 4 digits must be trimmed
  or not.

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


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

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 2571c56..b68a27d 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -422,7 +422,7 @@
wikibase-listdatatypes-string-head: String,
wikibase-listdatatypes-string-body: Literal data field for a string 
of glyphs. Typical use are identifiers that have written forms which do not 
depend on the language of the reader.\n* value – explicit value for the 
language specific variant string,
wikibase-listdatatypes-time-head: Time,
-   wikibase-listdatatypes-time-body: Literal data field for a time 
value. Given as a time with some precision and boundaries. The time is always 
saved internally in the Proleptic Gregorian format, but can use other formats 
during parsing and formatting.(?)\n* time – explicit value for point in time, 
represented per ISO8601, the year always having 11 digits and the date always 
being signed, in the format +0002013-01-01T00:00:00Z\n* timezone – explicit 
value as a signed integer. Timezone information as an offset from UTC in 
minutes.\n* before – explicit integer value for how many units after the given 
time it could be. The unit is given by the precision.\n* after – explicit 
integer value for how many units before the given time it could be. The unit is 
given by the precision.\n* precision – explicit value encoded in a shortint. 
The numbers have the following meaning: 0 - billion years, 1 - hundred million 
years, ..., 6 - millennium, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - 
day, 12 - hour, 13 - minute, 14 - second.\n* calendarmodel – explicit value 
given as a URI. It will identify the calendar model that should be used to 
display this time value.,
+   wikibase-listdatatypes-time-body: Literal data field for a time 
value. Given as a time with some precision and boundaries. The time is always 
saved internally in the Proleptic Gregorian format, but can use other formats 
during parsing and formatting.\n* time – explicit value for point in time, 
represented as a timestamp resembling ISO 8601, e.g. +2013-01-01T00:00:00Z. The 
year is always signed and padded to have between 4 and 16 digits.\n* timezone – 
explicit value as a signed integer. Timezone information as an offset from UTC 
in minutes.\n* before – explicit integer value for how many units after the 
given time it could be. The unit is given by the precision.\n* after – explicit 
integer value for how many units before the given time it could be. The unit is 
given by the precision.\n* precision – explicit value encoded in a shortint. 
The numbers have the following meaning: 0 - billion years, 1 - hundred million 
years, ..., 6 - millennium, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - 
day, 12 - hour, 13 - minute, 14 - second.\n* calendarmodel – explicit value 
given as a URI. It will identify the calendar model that should be used to 
display this time value.,
wikibase-listdatatypes-url-head: URL,
wikibase-listdatatypes-url-body: Literal data field for a URL. URLs 
are restricted to the protocols also supported for external links in wikitext.,
wikibase-concept-uri: Concept URI,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieae8fad5cd819a61b2854919d4b34c945ed26d0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix undefined index warning - change (mediawiki...ContactPage)

2015-03-31 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Fix undefined index warning
..

Fix undefined index warning

Bug: T67063
Change-Id: I607229533f7c282e50a3383fc594e4d95ce5a586
---
M ContactPage_body.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/ContactPage_body.php b/ContactPage_body.php
index 492174a..0eec8c5 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -251,8 +251,7 @@
}
 
$includeIP = isset( $config['IncludeIP'] )  
$config['IncludeIP']
-( $formData['IncludeIP'] || $user-isAnon()
-   );
+( $user-isAnon() || $formData['IncludeIP'] );
$fromName = $formData['FromName'];
$subject = $formData['Subject'];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I607229533f7c282e50a3383fc594e4d95ce5a586
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com

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


[MediaWiki-commits] [Gerrit] Improve contributions page entry point by adding 3 ways to c... - change (mediawiki...ContentTranslation)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve contributions page entry point by adding 3 ways to 
contribute
..


Improve contributions page entry point by adding 3 ways to contribute

Also includes eventlogging tooling.

Bug: T92939
Change-Id: If6670eb05106516637221a24f0a64e084f27626b
---
M ContentTranslation.hooks.php
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/entrypoint/ext.cx.contributions.init.js
M modules/entrypoint/ext.cx.contributions.js
D modules/entrypoint/images/dropdown.png
D modules/entrypoint/images/dropdown.svg
A modules/entrypoint/images/editarticle.png
A modules/entrypoint/images/editarticle.svg
A modules/entrypoint/images/translation.png
A modules/entrypoint/images/translation.svg
A modules/entrypoint/images/upload.png
A modules/entrypoint/images/upload.svg
M modules/entrypoint/styles/ext.cx.contributions.less
15 files changed, 134 insertions(+), 95 deletions(-)

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



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 991bd46..ac18b64 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -116,9 +116,15 @@
 * @param SpecialPage $page
 */
public static function addNewContributionButton( $id, User $user, 
SpecialPage $page ) {
+   global $wgContentTranslationEventLogging;
+
if ( $user-getId() === $page-getUser()-getId() 
ContentTranslationHooks::isEnabledForUser( $user )
) {
+   // If EventLogging integration is enabled, load the 
event logging functions module
+   if ( $wgContentTranslationEventLogging ) {
+   $page-getOutput()-addModules( 
'ext.cx.eventlogging' );
+   }
$page-getOutput()-addModules( 
'ext.cx.contributions.init' );
}
}
diff --git a/Resources.php b/Resources.php
index 4304ade..8fb2841 100644
--- a/Resources.php
+++ b/Resources.php
@@ -26,9 +26,13 @@
'mediawiki.ui.button',
),
'messages' = array(
-   'cx-contributions',
+   'cx-contributions-new-contributions',
+   'cx-contributions-new-article',
'cx-contributions-translation',
-   'cx-contributions-media',
+   'cx-contributions-upload',
+   'cx-contributions-new-article-tooltip',
+   'cx-contributions-translation-tooltip',
+   'cx-contributions-upload-tooltip',
),
 ) + $resourcePaths;
 
diff --git a/i18n/en.json b/i18n/en.json
index aba65c9..b0206d9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -132,9 +132,13 @@
cx-save-draft-save-success: Saved {{PLURAL:$1|a minute ago|$1 
minutes ago|0=just now}},
cx-save-draft-saving: Saving...,
cx-save-draft-tooltip: Translation drafts are saved automatically,
-   cx-contributions: New contribution,
+   cx-contributions-new-contributions: New contribution,
+   cx-contributions-new-article: New page,
cx-contributions-translation: Translation,
-   cx-contributions-media: Upload media file,
+   cx-contributions-upload: Upload media,
+   cx-contributions-new-article-tooltip: Start writing a new page,
+   cx-contributions-translation-tooltip: Translate existing pages,
+   cx-contributions-upload-tooltip: Upload pictures, audio and video to 
use in pages,
cx-publishing-dialog-message: The page $1 already exists. The 
current content will be replaced by your translation. Do you want to publish 
anyway?,
cx-publishing-dialog-keep-button: Keep both versions,
cx-publishing-dialog-publish-anyway-button: Publish anyway,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a546ece..2f2e59c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -139,9 +139,13 @@
cx-save-draft-save-success: \Saved\ refers to a draft of a 
translated page that was saved recently.,
cx-save-draft-saving: Label of button to save the translation as 
draft while saving is in progress\n{{Identical|Saving}},
cx-save-draft-tooltip: Tooltip text shown for the save status 
indicator text in the header of [[Special:ContentTranslation]].\n\nParameters: 
\n* $1 - the number of minutes ago the translation was saved.,
-   cx-contributions: Text of a button which opens a dropdown,
-   cx-contributions-translation: Dropdown 
item\n{{Identical|Translation}},
-   cx-contributions-media: Dropdown item,
+   cx-contributions-new-contributions: Header text shown in 
[[Special:Contributions]],
+   cx-contributions-new-article: Button label,
+   cx-contributions-translation: Button label,
+   cx-contributions-upload: Button label,
+   cx-contributions-new-article: Button label tooltip,
+   

[MediaWiki-commits] [Gerrit] Make unknown value and no value snaks in diffs italic - change (mediawiki...Wikibase)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make unknown value and no value snaks in diffs italic
..


Make unknown value and no value snaks in diffs italic

This simply reuses the existing CSS class names.

Bug: T63662
Change-Id: I51618f059ed1529149de33ea482fa698212755b3
---
M lib/includes/formatters/MessageSnakFormatter.php
M lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
2 files changed, 21 insertions(+), 2 deletions(-)

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



diff --git a/lib/includes/formatters/MessageSnakFormatter.php 
b/lib/includes/formatters/MessageSnakFormatter.php
index a1ddbb4..52917c3 100644
--- a/lib/includes/formatters/MessageSnakFormatter.php
+++ b/lib/includes/formatters/MessageSnakFormatter.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lib;
 
+use Html;
 use InvalidArgumentException;
 use Message;
 use RuntimeException;
@@ -14,8 +15,17 @@
  *
  * @license GPL 2+
  * @author Daniel Kinzler
+ * @author Thiemo Mättig
  */
 class MessageSnakFormatter implements SnakFormatter {
+
+   /**
+* @var string[]
+*/
+   private static $snakTypeCssClasses = array(
+   'somevalue' = 'wikibase-snakview-variation-somevaluesnak',
+   'novalue' = 'wikibase-snakview-variation-novaluesnak',
+   );
 
/**
 * @var string One of the SnakFormatter::FORMAT_... constants.
@@ -83,6 +93,15 @@
return $this-message-text();
} elseif ( strpos( $this-format, SnakFormatter::FORMAT_HTML ) 
=== 0 ) {
$html = $this-message-parse();
+
+   if ( array_key_exists( $this-snakType, 
self::$snakTypeCssClasses ) ) {
+   $html = Html::rawElement(
+   'span',
+   array( 'class' = 
self::$snakTypeCssClasses[$this-snakType] ),
+   $html
+   );
+   }
+
return $html;
}
 
diff --git a/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php 
b/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
index d13fe01..225ee0d 100644
--- a/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
@@ -84,11 +84,11 @@
),
array(
new PropertySomeValueSnak( $id ),
-   'parse'
+   'span 
class=wikibase-snakview-variation-somevaluesnakparse/span'
),
array(
new PropertyNoValueSnak( $id ),
-   'parse'
+   'span 
class=wikibase-snakview-variation-novaluesnakparse/span'
),
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51618f059ed1529149de33ea482fa698212755b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
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 generate monthly Xenon graphs - change (operations/puppet)

2015-03-31 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Don't generate monthly Xenon graphs
..


Don't generate monthly Xenon graphs

They don't reveal anything that the weekly graphs don't.

Change-Id: Iad9ca5c1d48577d075d7567c7f7dc453fc66f82c
---
M modules/xenon/manifests/init.pp
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/xenon/manifests/init.pp b/modules/xenon/manifests/init.pp
index 87d3e7d..98e5f45 100644
--- a/modules/xenon/manifests/init.pp
+++ b/modules/xenon/manifests/init.pp
@@ -44,7 +44,6 @@
 { period = 'hourly',  format = '%Y-%m-%d_%H', retain = 24 },
 { period = 'daily',   format = '%Y-%m-%d',retain = 30 },
 { period = 'weekly',  format = '%Y-%W',   retain = 52 },
-{ period = 'monthly', format = '%Y-%m',   retain = 12 },
 ],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad9ca5c1d48577d075d7567c7f7dc453fc66f82c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-03-31T10:00:01+0000 - change (mediawiki...Wikidata)

2015-03-31 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 2015-03-31T10:00:01+
..

New Wikidata Build - 2015-03-31T10:00:01+

Change-Id: Ia70e72f1eb617f37a8c2cedaf5c83d18a5e441c8
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.lock
M extensions/PropertySuggester/build/travis/after_script.sh
M extensions/PropertySuggester/build/travis/before_script.sh
M extensions/PropertySuggester/build/travis/script.sh
M extensions/ValueView/README.md
M extensions/ValueView/ValueView.php
M extensions/ValueView/tests/lib/jquery.ui/jquery.ui.inputextender.tests.js
M extensions/ValueView/tests/lib/jquery/jquery.focusAt.tests.js
M extensions/ValueView/tests/src/ExpertExtender/ExpertExtender.tests.js
M extensions/Wikibase/.jscsrc
M extensions/Wikibase/README.md
M extensions/Wikibase/build/jenkins/mw-apply-wb-settings.sh
M extensions/Wikibase/build/travis/install.sh
M extensions/Wikibase/build/travis/mw-apply-wb-settings.sh
M extensions/Wikibase/build/travis/script.sh
M extensions/Wikibase/build/travis/update-db.sh
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
A extensions/Wikibase/client/i18n/ang.json
M extensions/Wikibase/client/i18n/arq.json
M extensions/Wikibase/client/i18n/as.json
A extensions/Wikibase/client/i18n/awa.json
M extensions/Wikibase/client/i18n/az.json
M extensions/Wikibase/client/i18n/be-tarask.json
A extensions/Wikibase/client/i18n/bho.json
M extensions/Wikibase/client/i18n/br.json
M extensions/Wikibase/client/i18n/da.json
M extensions/Wikibase/client/i18n/de.json
M extensions/Wikibase/client/i18n/fi.json
A extensions/Wikibase/client/i18n/gom-deva.json
M extensions/Wikibase/client/i18n/ka.json
M extensions/Wikibase/client/i18n/kk-cyrl.json
M extensions/Wikibase/client/i18n/krc.json
M extensions/Wikibase/client/i18n/lt.json
M extensions/Wikibase/client/i18n/lzh.json
M extensions/Wikibase/client/i18n/ne.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/i18n/ps.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/ru.json
M extensions/Wikibase/client/i18n/sr-el.json
A extensions/Wikibase/client/i18n/tcy.json
M extensions/Wikibase/client/i18n/tt-cyrl.json
M extensions/Wikibase/client/i18n/uk.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/Changes/ChangeHandler.php
M 
extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php
M extensions/Wikibase/client/includes/Hooks/BeforePageDisplayHandler.php
M extensions/Wikibase/client/includes/Hooks/OtherProjectsSidebarGenerator.php
M extensions/Wikibase/client/includes/Hooks/UpdateRepoHookHandlers.php
M extensions/Wikibase/client/includes/RepoItemLinkGenerator.php
M extensions/Wikibase/client/includes/UpdateRepo/UpdateRepo.php
M extensions/Wikibase/client/includes/Usage/HashUsageAccumulator.php
M extensions/Wikibase/client/includes/Usage/ParserOutputUsageAccumulator.php
M extensions/Wikibase/client/includes/Usage/Sql/EntityUsageTableBuilder.php
M extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
M extensions/Wikibase/client/includes/Usage/Sql/UsageTableUpdater.php
M extensions/Wikibase/client/includes/Usage/UsageAccumulator.php
M extensions/Wikibase/client/includes/scribunto/EntityAccessor.php
M extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M extensions/Wikibase/client/includes/scribunto/SnakSerializationRenderer.php
M extensions/Wikibase/client/includes/scribunto/mw.wikibase.lua
A extensions/Wikibase/client/includes/store/sql/BulkSubscriptionUpdater.php
A extensions/Wikibase/client/maintenance/updateSubscriptions.php
A extensions/Wikibase/client/sql/entity_usage-add-touched.sql
A extensions/Wikibase/client/sql/entity_usage-alter-aspect-varbinary-37.sql
A extensions/Wikibase/client/sql/entity_usage-drop-entity_type.sql
M extensions/Wikibase/client/sql/entity_usage.sql
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Usage/HashUsageAccumulatorTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php
M 
extensions/Wikibase/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryTests.lua
A 
extensions/Wikibase/client/tests/phpunit/includes/store/sql/BulkSubscriptionUpdaterTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/docs/json.wiki
M extensions/Wikibase/docs/lua.wiki
M extensions/Wikibase/docs/options.wiki
A extensions/Wikibase/docs/usagetracking-migration.wiki
M extensions/Wikibase/docs/usagetracking.wiki
A 

[MediaWiki-commits] [Gerrit] Prevent rubocop on legacy mw/core branches - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent rubocop on legacy mw/core branches
..


Prevent rubocop on legacy mw/core branches

The mediawiki-core-bundle-rubocop job assume to have /Gemfile at the
root of the repository with rubocop as a gem.  That is only the case in
master and will be in REL1_25. Moreover, rubocop is not in REL1_24
Gemfile.

Update the job branch filter to prevent it from running on legacy
branches.

Bug: T94549
Change-Id: Ia4c62089ad3ad27f3a258f36554792bda09c34be
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 8d2af53..62e735a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -527,7 +527,7 @@
   - name: mediawiki-core-bundle-rubocop
 files:
  - '^(\.rubocop.*|\.gemspec|.*\.rb|Gemfile$)'
-branch: ^(REL1_24|master)$
+branch: ^(?!REL1_19|REL1_23|REL1_24|fundraising/REL1_23)$
 
   - name: ^php-composer-validate$
 files:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4c62089ad3ad27f3a258f36554792bda09c34be
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable queue workers for sentry role - change (mediawiki/vagrant)

2015-03-31 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Enable queue workers for sentry role
..

Enable queue workers for sentry role

Bug: T94389
Change-Id: I5e23e93cbcba3d7b35dd065f3c2787536485e767
---
M puppet/modules/sentry/templates/sentry.conf.py.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/40/200840/1

diff --git a/puppet/modules/sentry/templates/sentry.conf.py.erb 
b/puppet/modules/sentry/templates/sentry.conf.py.erb
index 762b756..fe37d8f 100644
--- a/puppet/modules/sentry/templates/sentry.conf.py.erb
+++ b/puppet/modules/sentry/templates/sentry.conf.py.erb
@@ -36,6 +36,7 @@
 SENTRY_WEB_HOST = '0.0.0.0'
 SENTRY_WEB_PORT = 9002 # 9000 is PHP-FVM, 9001 is Xdebug proxy
 SENTRY_WEB_OPTIONS = {
+'workers': 3,  # the number of gunicorn workers
 'limit_request_line': 0,  # required for raven-js
 'secure_scheme_headers': {'X-FORWARDED-PROTO': 'https'},
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e23e93cbcba3d7b35dd065f3c2787536485e767
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add SENTRY_CACHE to sentry config - change (mediawiki/vagrant)

2015-03-31 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Add SENTRY_CACHE to sentry config
..

Add SENTRY_CACHE to sentry config

Upstream now requires this to be set explicitly.

Bug: T94375
Change-Id: I7ed2b509f747ce54c60fb8f2a2ef011a396f64b8
---
M puppet/modules/sentry/templates/sentry.conf.py.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/39/200839/1

diff --git a/puppet/modules/sentry/templates/sentry.conf.py.erb 
b/puppet/modules/sentry/templates/sentry.conf.py.erb
index f2dd3a8..762b756 100644
--- a/puppet/modules/sentry/templates/sentry.conf.py.erb
+++ b/puppet/modules/sentry/templates/sentry.conf.py.erb
@@ -40,6 +40,8 @@
 'secure_scheme_headers': {'X-FORWARDED-PROTO': 'https'},
 }
 
+SENTRY_CACHE = 'sentry.cache.django.DjangoCache'
+
 #
 ## Mail Server ##
 #

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ed2b509f747ce54c60fb8f2a2ef011a396f64b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't generate monthly Xenon graphs - change (operations/puppet)

2015-03-31 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Don't generate monthly Xenon graphs
..

Don't generate monthly Xenon graphs

They don't reveal anything that the weekly graphs don't.

Change-Id: Iad9ca5c1d48577d075d7567c7f7dc453fc66f82c
---
M modules/xenon/manifests/init.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/200830/1

diff --git a/modules/xenon/manifests/init.pp b/modules/xenon/manifests/init.pp
index 87d3e7d..98e5f45 100644
--- a/modules/xenon/manifests/init.pp
+++ b/modules/xenon/manifests/init.pp
@@ -44,7 +44,6 @@
 { period = 'hourly',  format = '%Y-%m-%d_%H', retain = 24 },
 { period = 'daily',   format = '%Y-%m-%d',retain = 30 },
 { period = 'weekly',  format = '%Y-%W',   retain = 52 },
-{ period = 'monthly', format = '%Y-%m',   retain = 12 },
 ],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad9ca5c1d48577d075d7567c7f7dc453fc66f82c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] QA: Browser test for edit workflow - change (mediawiki...Gather)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: QA: Browser test for edit workflow
..


QA: Browser test for edit workflow

This will ensure edit doesnt break again.

Bug: T93949
Change-Id: If7a83c73c109c7508086229c65325a10f7f6ae30
---
M tests/browser/features/edit_collection.feature
M tests/browser/features/step_definitions/edit_collection_steps.rb
M tests/browser/features/support/pages/gather_page.rb
3 files changed, 35 insertions(+), 0 deletions(-)

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



diff --git a/tests/browser/features/edit_collection.feature 
b/tests/browser/features/edit_collection.feature
index 702d27a..a7ef7ec 100644
--- a/tests/browser/features/edit_collection.feature
+++ b/tests/browser/features/edit_collection.feature
@@ -13,3 +13,19 @@
   Scenario: Clicking edit button
 When I click the edit collection button
 Then I see the collection editor overlay
+
+  Scenario: Changing description
+When I click the edit collection button
+Then I see the collection editor overlay
+And I enter All work and no play makes Jack a dull boy as the 
description
+And I click done
+And the page has reloaded
+Then the description of my collection is All work and no play makes 
Jack a dull boy
+
+  Scenario: Blank my description
+When I click the edit collection button
+Then I see the collection editor overlay
+And I enter  as the description
+And I click done
+And the page has reloaded
+Then the description of my collection is 
diff --git a/tests/browser/features/step_definitions/edit_collection_steps.rb 
b/tests/browser/features/step_definitions/edit_collection_steps.rb
index 7345829..bdcf5e8 100644
--- a/tests/browser/features/step_definitions/edit_collection_steps.rb
+++ b/tests/browser/features/step_definitions/edit_collection_steps.rb
@@ -9,3 +9,19 @@
 Then(/^I see the collection editor overlay$/) do
   expect(on(GatherPage).edit_overlay_element.when_present).to be_visible
 end
+
+Then(/^I enter (.*?) as the description$/) do |keys|
+  on(GatherPage).edit_overlay_description_element.when_present.send_keys(keys)
+end
+
+Then(/^I click done$/) do
+  on(GatherPage).edit_overlay_done_element.when_present.click
+end
+
+Then(/^the page has reloaded$/) do
+  sleep 2
+end
+
+Then(/^the description of my collection is (.*?)$/) do |text|
+  expect(on(GatherPage).collection_description_element.when_present.text).to 
match text
+end
diff --git a/tests/browser/features/support/pages/gather_page.rb 
b/tests/browser/features/support/pages/gather_page.rb
index 22eae11..c739103 100644
--- a/tests/browser/features/support/pages/gather_page.rb
+++ b/tests/browser/features/support/pages/gather_page.rb
@@ -6,5 +6,8 @@
   a(:my_first_public_collection, css: '.collection-card-title a', index:1)
   a(:edit, css: '.edit-collection')
   div(:edit_overlay, css: '.collection-editor-overlay')
+  text_field(:edit_overlay_description, css: '.collection-editor-overlay 
.description')
+  button(:edit_overlay_done, css: '.collection-editor-overlay .save')
   div(:collection_items, css: '.collection-items')
+  div(:collection_description, css: '.collection-description')
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7a83c73c109c7508086229c65325a10f7f6ae30
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make npm test work - change (mediawiki...UploadWizard)

2015-03-31 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Make npm test work
..

Make npm test work

Change-Id: If0e55a32539f4e2df6b8556033b5901e2ece0e94
---
M package.json
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/33/200833/1

diff --git a/package.json b/package.json
index 0c2ecf4..d25f80c 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
   ],
   devDependencies: {
 grunt: 0.4.2,
+grunt-cli: 0.1.13,
 grunt-contrib-csslint: 0.2.0,
 grunt-contrib-jshint: 0.10.0,
 grunt-contrib-watch: 0.6.1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0e55a32539f4e2df6b8556033b5901e2ece0e94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Prevent npm on 1.19 mw/core branch - change (integration/config)

2015-03-31 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Prevent npm on 1.19 mw/core branch
..

Prevent npm on 1.19 mw/core branch

The mediawiki-core-npm job should not run on mediawiki/core REL1_19
branch since it does not have a packages.json. The job fails and thus
prevent changes from being merged.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/37/200837/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 62e735a..9d2dee9 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -624,6 +624,8 @@
   - name: ^mediawiki-core-npm$
 files:
  - '^(\.js.*|.*\.(js|json)$)'
+# no packages.json in 1.19
+branch: (?!REL1_19)
 
   - name: jsduck
 files:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92f383a0bd1d97f5c2a398e0e25f3bbbcac2aedb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Move Wikibase\Template to view/src/Template/ - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Move Wikibase\Template to view/src/Template/
..

Move Wikibase\Template to view/src/Template/

Change-Id: I193fdd0f9e648bd343db090b669dd2da53be5e63
---
M composer.json
R view/resources/templates.php
R view/src/Template/Template.php
R view/src/Template/TemplateFactory.php
R view/src/Template/TemplateRegistry.php
R view/tests/phpunit/Template/TemplateRegistryTest.php
R view/tests/phpunit/Template/TemplateTest.php
7 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 7b02206..c012d89 100644
--- a/composer.json
+++ b/composer.json
@@ -66,7 +66,8 @@
repo/Wikibase.hooks.php
],
psr-4: {
-   Wikibase\\View\\: view/src
+   Wikibase\\View\\: view/src,
+   Wikibase\\Template\\: view/src/Template
}
}
 }
diff --git a/repo/resources/templates.php b/view/resources/templates.php
similarity index 100%
rename from repo/resources/templates.php
rename to view/resources/templates.php
diff --git a/repo/includes/Template/Template.php 
b/view/src/Template/Template.php
similarity index 100%
rename from repo/includes/Template/Template.php
rename to view/src/Template/Template.php
diff --git a/repo/includes/Template/TemplateFactory.php 
b/view/src/Template/TemplateFactory.php
similarity index 100%
rename from repo/includes/Template/TemplateFactory.php
rename to view/src/Template/TemplateFactory.php
diff --git a/repo/includes/Template/TemplateRegistry.php 
b/view/src/Template/TemplateRegistry.php
similarity index 100%
rename from repo/includes/Template/TemplateRegistry.php
rename to view/src/Template/TemplateRegistry.php
diff --git a/repo/tests/phpunit/includes/Template/TemplateRegistryTest.php 
b/view/tests/phpunit/Template/TemplateRegistryTest.php
similarity index 100%
rename from repo/tests/phpunit/includes/Template/TemplateRegistryTest.php
rename to view/tests/phpunit/Template/TemplateRegistryTest.php
diff --git a/repo/tests/phpunit/includes/Template/TemplateTest.php 
b/view/tests/phpunit/Template/TemplateTest.php
similarity index 100%
rename from repo/tests/phpunit/includes/Template/TemplateTest.php
rename to view/tests/phpunit/Template/TemplateTest.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I193fdd0f9e648bd343db090b669dd2da53be5e63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.he...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Move Wikibase\Template to Wikibase\View\Template - change (mediawiki...Wikibase)

2015-03-31 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Move Wikibase\Template to Wikibase\View\Template
..

Move Wikibase\Template to Wikibase\View\Template

Change-Id: Id694b9f530fb66bcea16ea4679a216456d246e85
---
M composer.json
M repo/Wikibase.hooks.php
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityParserOutputGeneratorFactory.php
M repo/includes/WikibaseRepo.php
M repo/includes/modules/TemplateModule.php
M repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
M view/src/ClaimHtmlGenerator.php
M view/src/EntityTermsView.php
M view/src/EntityView.php
M view/src/EntityViewFactory.php
M view/src/EntityViewPlaceholderExpander.php
M view/src/ItemView.php
M view/src/PropertyView.php
M view/src/SiteLinksView.php
M view/src/SnakHtmlGenerator.php
M view/src/StatementGroupListView.php
M view/src/Template/Template.php
M view/src/Template/TemplateFactory.php
M view/src/Template/TemplateRegistry.php
M view/src/ToolbarEditSectionGenerator.php
M view/tests/phpunit/ClaimHtmlGeneratorTest.php
M view/tests/phpunit/ClaimsViewTest.php
M view/tests/phpunit/EntityTermsViewTest.php
M view/tests/phpunit/EntityViewFactoryTest.php
M view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
M view/tests/phpunit/ItemViewTest.php
M view/tests/phpunit/PropertyViewTest.php
M view/tests/phpunit/SiteLinksViewTest.php
M view/tests/phpunit/SnakHtmlGeneratorTest.php
M view/tests/phpunit/Template/TemplateRegistryTest.php
M view/tests/phpunit/Template/TemplateTest.php
M view/tests/phpunit/ToolbarEditSectionGeneratorTest.php
33 files changed, 82 insertions(+), 82 deletions(-)


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

diff --git a/composer.json b/composer.json
index c012d89..7b02206 100644
--- a/composer.json
+++ b/composer.json
@@ -66,8 +66,7 @@
repo/Wikibase.hooks.php
],
psr-4: {
-   Wikibase\\View\\: view/src,
-   Wikibase\\Template\\: view/src/Template
+   Wikibase\\View\\: view/src
}
}
 }
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 1ef35f7..5563202 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -33,8 +33,8 @@
 use Wikibase\Repo\View\EntityViewPlaceholderExpander;
 use Wikibase\Repo\View\TextInjector;
 use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Template\TemplateFactory;
-use Wikibase\Template\TemplateRegistry;
+use Wikibase\View\Template\TemplateFactory;
+use Wikibase\View\Template\TemplateRegistry;
 use WikiPage;
 
 /**
diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 54858ee..2ca6043 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -21,9 +21,9 @@
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
 use Wikibase\Repo\View\RepoSpecialPageLinker;
-use Wikibase\Template\TemplateFactory;
 use Wikibase\View\EmptyEditSectionGenerator;
 use Wikibase\View\EntityViewFactory;
+use Wikibase\View\Template\TemplateFactory;
 use Wikibase\View\ToolbarEditSectionGenerator;
 
 /**
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index 1a8faa1..f0a5089 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -8,8 +8,8 @@
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
 use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\Template\TemplateFactory;
 use Wikibase\View\EntityViewFactory;
+use Wikibase\View\Template\TemplateFactory;
 
 /**
  * @since 0.5
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 0fd0c42..dc20e9a 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -80,14 +80,14 @@
 use Wikibase\Store\TermBuffer;
 use Wikibase\StringNormalizer;
 use Wikibase\SummaryFormatter;
-use Wikibase\Template\TemplateFactory;
-use Wikibase\Template\TemplateRegistry;
 use Wikibase\Validators\EntityConstraintProvider;
 use Wikibase\Validators\SnakValidator;
 use Wikibase\Validators\TermValidatorFactory;
 use Wikibase\Validators\ValidatorErrorLocalizer;
 use Wikibase\ValuesFinder;
 use Wikibase\View\EntityViewFactory;
+use Wikibase\View\Template\TemplateFactory;
+use Wikibase\View\Template\TemplateRegistry;
 
 /**
  * Top level factory for the WikibaseRepo extension.
diff --git a/repo/includes/modules/TemplateModule.php 
b/repo/includes/modules/TemplateModule.php
index eba92d5..8c89d8a 100644
--- a/repo/includes/modules/TemplateModule.php
+++ b/repo/includes/modules/TemplateModule.php
@@ -5,7 +5,7 @@
 use FormatJson;
 use 

[MediaWiki-commits] [Gerrit] Record javascript errors to funnel log stream - change (mediawiki...UploadWizard)

2015-03-31 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Record javascript errors to funnel log stream
..

Record javascript errors to funnel log stream

Records to UploadWizardExceptionFlowEvent schema.

Bug: T94428
Change-Id: I9f99763fec791b00957a3b217d83ee48bf21bb6d
---
M .jshintrc
M UploadWizard.php
M UploadWizardHooks.php
M resources/uw.EventFlowLogger.js
M tests/qunit/uw.EventFlowLogger.test.js
5 files changed, 72 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/34/200834/1

diff --git a/.jshintrc b/.jshintrc
index 4d3b65f..5747107 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -39,6 +39,7 @@
mw,
jQuery,
OO,
-   QUnit
+   QUnit,
+   sinon
]
 }
diff --git a/UploadWizard.php b/UploadWizard.php
index 3f3e8ef..8b02a40 100644
--- a/UploadWizard.php
+++ b/UploadWizard.php
@@ -153,6 +153,7 @@
 $wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8851805;
 $wgEventLoggingSchemas[ 'UploadWizardFlowEvent' ] = 11562780;
 $wgEventLoggingSchemas[ 'UploadWizardErrorFlowEvent' ] = 9924376;
+$wgEventLoggingSchemas[ 'UploadWizardExceptionFlowEvent' ] = 11717009;
 $wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9651951;
 
 // Campaign hook handlers
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 5fe44fc..b7c5bde 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -755,6 +755,7 @@
'schema.UploadWizardStep',
'schema.UploadWizardFlowEvent',
'schema.UploadWizardErrorFlowEvent',
+   'schema.UploadWizardExceptionFlowEvent',
'schema.UploadWizardUploadFlowEvent',
);
}
diff --git a/resources/uw.EventFlowLogger.js b/resources/uw.EventFlowLogger.js
index 18e5d4b..5915330 100644
--- a/resources/uw.EventFlowLogger.js
+++ b/resources/uw.EventFlowLogger.js
@@ -109,6 +109,31 @@
};
 
/**
+* Sets up logging for global javascript errors.
+*/
+   EFLP.installExceptionLogger = function () {
+   function toNumber( val ) {
+   var num = parseInt( val, 10 );
+   if ( isNaN( num ) ) {
+   return undefined;
+   }
+   return num;
+   }
+
+   var self = this;
+
+   mw.trackSubscribe( 'global.error', function ( topic, data ) {
+   self.log( 'UploadWizardExceptionFlowEvent', {
+   message: data.errorMessage,
+   url: data.url,
+   line: toNumber( data.lineNumber ),
+   column: toNumber( data.columnNumber ),
+   stack: undefined // T91347
+   } );
+   } );
+   };
+
+   /**
 * Logs an upload event.
 * @param {string} name Event name. Recognized names:
 *  - upload-started
@@ -138,4 +163,5 @@
 
// FIXME
uw.eventFlowLogger = new EventFlowLogger( mw.eventLog );
+   uw.eventFlowLogger.installExceptionLogger();
 }( mediaWiki, mediaWiki.uploadWizard ) );
diff --git a/tests/qunit/uw.EventFlowLogger.test.js 
b/tests/qunit/uw.EventFlowLogger.test.js
index 3ab1214..f5cface 100644
--- a/tests/qunit/uw.EventFlowLogger.test.js
+++ b/tests/qunit/uw.EventFlowLogger.test.js
@@ -27,4 +27,46 @@
logger.logEvent( 'baz' );
assert.ok( eventLog.logEvent.calledThrice, 'all steps were 
logged' );
} );
+
+   QUnit.test( 'installExceptionLogger', 3, function () {
+   var eventLog = { logEvent: this.sandbox.stub() },
+   logger = new uw.EventFlowLogger( eventLog );
+
+   this.sandbox.stub( mw, 'trackSubscribe' );
+
+   logger.installExceptionLogger();
+
+   sinon.assert.calledWith( mw.trackSubscribe, 'global.error', 
sinon.match.typeOf( 'function' ) );
+   mw.trackSubscribe.firstCall.args[1]( 'global.error', {
+   errorMessage: 'Foo',
+   url: 'http://example.com/bar.js',
+   lineNumber: 123,
+   columnNumber: '45',
+   errorObject: { stack: 'foo() at bar.js#123' }
+   } );
+   sinon.assert.calledWith( eventLog.logEvent, 
'UploadWizardExceptionFlowEvent', {
+   flowId: sinon.match.defined,
+   message: 'Foo',
+   url: 'http://example.com/bar.js',
+   line: 123,
+   column: 45,
+   

[MediaWiki-commits] [Gerrit] Prevent rubocop on legacy mw/core branches - change (integration/config)

2015-03-31 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Prevent rubocop on legacy mw/core branches
..

Prevent rubocop on legacy mw/core branches

The mediawiki-core-bundle-rubocop job assume to have /Gemfile at the
root of the repository with rubocop as a gem.  That is only the case in
master and will be in REL1_25. Moreover, rubocop is not in REL1_24
Gemfile.

Update the job branch filter to prevent it from running on legacy
branches.

Bug: T94549
Change-Id: Ia4c62089ad3ad27f3a258f36554792bda09c34be
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/35/200835/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 8d2af53..62e735a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -527,7 +527,7 @@
   - name: mediawiki-core-bundle-rubocop
 files:
  - '^(\.rubocop.*|\.gemspec|.*\.rb|Gemfile$)'
-branch: ^(REL1_24|master)$
+branch: ^(?!REL1_19|REL1_23|REL1_24|fundraising/REL1_23)$
 
   - name: ^php-composer-validate$
 files:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4c62089ad3ad27f3a258f36554792bda09c34be
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Prevent npm on 1.19 mw/core branch - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent npm on 1.19 mw/core branch
..


Prevent npm on 1.19 mw/core branch

The mediawiki-core-npm job should not run on mediawiki/core REL1_19
branch since it does not have a packages.json. The job fails and thus
prevent changes from being merged.

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 62e735a..9d2dee9 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -624,6 +624,8 @@
   - name: ^mediawiki-core-npm$
 files:
  - '^(\.js.*|.*\.(js|json)$)'
+# no packages.json in 1.19
+branch: (?!REL1_19)
 
   - name: jsduck
 files:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92f383a0bd1d97f5c2a398e0e25f3bbbcac2aedb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Collection::newFromApi Make user optional - change (mediawiki...Gather)

2015-03-31 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Collection::newFromApi Make user optional
..

Collection::newFromApi Make user optional

User passed in wasn't being used, so make it optional, and actually use it if
passed in for validating the collection.

For getting the collection the id is enough since they are globally unique.

Change-Id: Ic82604ea6b43fa8048fbb706303df9c6bbbddbf5
---
M includes/models/Collection.php
1 file changed, 16 insertions(+), 7 deletions(-)


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

diff --git a/includes/models/Collection.php b/includes/models/Collection.php
index 361fbf8..b688c68 100644
--- a/includes/models/Collection.php
+++ b/includes/models/Collection.php
@@ -118,18 +118,20 @@
}
 
/**
-* Generate UserPageCollectionsList from api result
+* Generate a Collection from api result
 * @param Integer $id the id of the collection
-* @param User $user collection list owner (currently unused)
+* @param User $user optional collection list owner (if present will be
+* included in the query and validated)
 * @return models\Collections a collection
 */
-   public static function newFromApi( $id, User $user ) {
+   public static function newFromApi( $id, User $user = null ) {
+
$collection = null;
-   $api = new ApiMain( new FauxRequest( array(
+   $params = array(
'action' = 'query',
'list' = 'lists',
'lstids' = $id,
-   'lstprop' = 'label|description|public|image',
+   'lstprop' = 'label|description|public|image|owner',
'prop' = 'pageimages|extracts',
'generator' = 'listpages',
'glspid' = $id,
@@ -141,7 +143,13 @@
'pilimit' = 50,
// TODO: Pagination
'continue' = '',
-   ) ) );
+   );
+   // If user is present, include it in the request. Api will 
return not found
+   // if the specified owner doesn't match the actual collection 
owner.
+   if ( $user ) {
+   $params['lstowner'] = $user-getName();
+   }
+   $api = new ApiMain( new FauxRequest( $params ) );
 
try {
$api-execute();
@@ -151,7 +159,8 @@
if ( count( $lists ) === 1 ) {
$list = $lists[0];
$image = $list['image'] ? wfFindFile( 
$list['image'] ) : null;
-   $collection = new Collection( $id, 
$user, $list['label'], $list['description'],
+   $owner = User::newFromName( 
$list['owner'] );
+   $collection = new Collection( $id, 
$owner, $list['label'], $list['description'],
$list['public'], $image );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic82604ea6b43fa8048fbb706303df9c6bbbddbf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez jhernan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Copy build-dependencies to hhvm-dev dependencies - change (operations...hhvm)

2015-03-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Copy build-dependencies to hhvm-dev dependencies
..

Copy build-dependencies to hhvm-dev dependencies

hhvm-dev is the -dev package for hhvm. Debian packages for extensions
like luasandbox require it but then fail to cleanly build due to
dependencies missing. Copy the Build-depends for the package in the
hhvm-dev Depends field. Bump the revision as well to reflect the change

Change-Id: I53999be826adafb39be1a2615d2c7fe875325ef5
---
M debian/changelog
M debian/control
2 files changed, 62 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/55/200855/1

diff --git a/debian/changelog b/debian/changelog
index 16d7bc0..ac6e2af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+hhvm (3.6.0+dfsg1-1+wm2) trusty-wikimedia; urgency=low
+
+  * Rebuild with hhvm-dev Depends field populated better
+
+ -- Alexandros Kosiaris akosia...@wikimedia.org  Tue, 31 Mar 2015 15:59:20 
+0300
+
 hhvm (3.6.0+dfsg1-1+wm1) trusty-wikimedia; urgency=medium
 
   * New upstream release
diff --git a/debian/control b/debian/control
index f15e740..e900530 100644
--- a/debian/control
+++ b/debian/control
@@ -99,7 +99,62 @@
 
 Package: hhvm-dev
 Architecture: amd64
-Depends: ${misc:Depends}, cmake
+Depends: ${misc:Depends}, cmake,
+  autotools-dev,
+  binutils-dev,
+  bison,
+  chrpath,
+  cmake,
+  flex,
+  libboost-dev,
+  libboost-context-dev,
+  libboost-filesystem-dev,
+  libboost-program-options-dev,
+  libboost-regex-dev,
+  libboost-system-dev,
+  libboost-thread-dev,
+  libbz2-dev,
+  libcap-dev,
+  libc-client2007e-dev,
+  libcurl4-openssl-dev,
+  libdouble-conversion-dev,
+  libdwarf-dev,
+  libedit-dev,
+  libelf-dev,
+  libevent-dev,
+  libexpat1-dev,
+  libfreetype6-dev,
+  libgmp-dev,
+  libgoogle-glog-dev,
+  libiberty-dev,
+  libiconv-hook-dev,
+  libicu-dev,
+  libinotifytools0-dev,
+  libjemalloc-dev,
+  libjpeg-dev,
+  libjson-c-dev,
+  libldap2-dev,
+  liblz4-dev,
+  libmagickcore-dev,
+  libmagickwand-dev,
+  libmcrypt-dev,
+  libmemcached-dev,
+  libmysqlclient-dev,
+  libonig-dev,
+  libpcre3-dev,
+  libpng12-dev,
+  libre2-dev,
+  libsqlite3-dev,
+  libssl-dev,
+  libtbb-dev,
+  libxml2-dev,
+  libxslt1-dev,
+  libyaml-dev,
+  libzip-dev (= 0.11),
+  ocaml-native-compilers,
+  pkg-config,
+  unixodbc-dev,
+  zlib1g-dev
 Section: libdevel
 Priority: extra
 Description: HipHop Virtual Machine, a JIT replacement for PHP - development 
files

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53999be826adafb39be1a2615d2c7fe875325ef5
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ganglia: unbreak the labs NFS cluster - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: ganglia: unbreak the labs NFS cluster
..

ganglia: unbreak the labs NFS cluster

Change-Id: If598b7d93267189486598f7b66d1020d01abce43
---
M manifests/role/labsnfs.pp
M manifests/site.pp
2 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/200856/1

diff --git a/manifests/role/labsnfs.pp b/manifests/role/labsnfs.pp
index 65483b9..4a98d99 100644
--- a/manifests/role/labsnfs.pp
+++ b/manifests/role/labsnfs.pp
@@ -8,9 +8,6 @@
 # must be set at the node level or via hiera.
 #
 class role::labs::nfs::dumps($dump_servers_ips) {
-
-$gangla_aggregator = true
-
 include standard
 include rsync::server
 
@@ -42,7 +39,7 @@
 #
 class role::labs::nfs::fileserver {
 
-$gangla_aggregator = true
+$ganglia_aggregator = true
 
 include standard
 
@@ -78,4 +75,3 @@
 }
 
 }
-
diff --git a/manifests/site.pp b/manifests/site.pp
index 9745cc2..0aa4aae 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1320,7 +1320,9 @@
 }
 
 node /labstore100[12]\.eqiad\.wmnet/ {
-
+if $::hostname == 'labstore1001' {
+$ganglia_aggregator = true
+}
 $site = 'eqiad'
 $cluster = 'labsnfs'
 
@@ -1329,7 +1331,7 @@
 }
 
 node 'labstore1003.eqiad.wmnet' {
-
+$ganglia_aggregator = true
 $site = 'eqiad'
 $cluster = 'labsnfs'
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If598b7d93267189486598f7b66d1020d01abce43
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Hygiene: Remove unused activateForm handler - change (mediawiki...Flow)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Remove unused activateForm handler
..


Hygiene: Remove unused activateForm handler

Change-Id: Ifa77ec2b51b484af276239c621f3ca55d98d83ca
---
M modules/engine/components/board/base/flow-board-interactive-events.js
1 file changed, 0 insertions(+), 50 deletions(-)

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



diff --git 
a/modules/engine/components/board/base/flow-board-interactive-events.js 
b/modules/engine/components/board/base/flow-board-interactive-events.js
index f06d05f..6e10caa 100644
--- a/modules/engine/components/board/base/flow-board-interactive-events.js
+++ b/modules/engine/components/board/base/flow-board-interactive-events.js
@@ -25,56 +25,6 @@
//
 
/**
-* The activateForm handler will expand, scroll to, and then focus onto 
a form (target = field).
-* @param {Event} event
-* @returns {$.Promise}
-*/
-   
FlowBoardComponentInteractiveEventsMixin.UI.events.interactiveHandlers.activateForm
 = function ( event ) {
-   var $el, $form,
-   href = $( this ).prop( 'href' ),
-   hash = href.match( /#.+$/ ),
-   $target = hash ? $( hash ) : false,
-   flowBoard,
-   $deferred = $.Deferred();
-
-   // Can't find target.
-   if ( !$target || !$target.length ) {
-   return $deferred.reject().promise();
-   }
-
-   $el = $( hash[0] );
-   $form = $el.closest( 'form' );
-
-   // Can't find form to activate
-   if ( !$el.length || !$form.length ) {
-   return $deferred.reject().promise();
-   }
-
-   flowBoard = mw.flow.getPrototypeMethod( 'board', 
'getInstanceByElement' )( $form );
-
-   // Is this a hidden form or invisible field? Make it visible.
-   flowBoard.emitWithReturn( 'showForm', $form );
-
-   // Is this a form field? Scroll to the form instead of jumping.
-   $form.conditionalScrollIntoView().queue( function ( next ) {
-   var $el = $( hash[0] );
-
-   // After scroll, focus onto the form field itself
-   if ( $el.is( 'textarea, :text' ) ) {
-   $el.focus();
-   }
-
-   // jQuery.dequeue
-   next();
-   });
-
-   // OK, we're done here. Don't use the hard link.
-   event.preventDefault();
-
-   return $deferred.resolve().promise();
-   };
-
-   /**
 * Toggles collapse state
 *
 * @param {Event} event

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa77ec2b51b484af276239c621f3ca55d98d83ca
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ganglia: unbreak the labs NFS cluster - change (operations/puppet)

2015-03-31 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ganglia: unbreak the labs NFS cluster
..


ganglia: unbreak the labs NFS cluster

Change-Id: If598b7d93267189486598f7b66d1020d01abce43
---
M manifests/role/labsnfs.pp
M manifests/site.pp
2 files changed, 4 insertions(+), 9 deletions(-)

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



diff --git a/manifests/role/labsnfs.pp b/manifests/role/labsnfs.pp
index 65483b9..9a67d69 100644
--- a/manifests/role/labsnfs.pp
+++ b/manifests/role/labsnfs.pp
@@ -8,9 +8,6 @@
 # must be set at the node level or via hiera.
 #
 class role::labs::nfs::dumps($dump_servers_ips) {
-
-$gangla_aggregator = true
-
 include standard
 include rsync::server
 
@@ -41,9 +38,6 @@
 # services to Labs.
 #
 class role::labs::nfs::fileserver {
-
-$gangla_aggregator = true
-
 include standard
 
 # eqiad still uses LDAP for now
@@ -78,4 +72,3 @@
 }
 
 }
-
diff --git a/manifests/site.pp b/manifests/site.pp
index 9745cc2..0aa4aae 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1320,7 +1320,9 @@
 }
 
 node /labstore100[12]\.eqiad\.wmnet/ {
-
+if $::hostname == 'labstore1001' {
+$ganglia_aggregator = true
+}
 $site = 'eqiad'
 $cluster = 'labsnfs'
 
@@ -1329,7 +1331,7 @@
 }
 
 node 'labstore1003.eqiad.wmnet' {
-
+$ganglia_aggregator = true
 $site = 'eqiad'
 $cluster = 'labsnfs'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If598b7d93267189486598f7b66d1020d01abce43
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
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_ip6_mapped: no-op refactor to make +token commit simpler - change (operations/puppet)

2015-03-31 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: add_ip6_mapped: no-op refactor to make +token commit simpler
..


add_ip6_mapped: no-op refactor to make +token commit simpler

Change-Id: I82b1fd15c7bc5d33b580d5897f9efdf9b65adccf
---
M modules/interface/manifests/add_ip6_mapped.pp
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/interface/manifests/add_ip6_mapped.pp 
b/modules/interface/manifests/add_ip6_mapped.pp
index 9a35c76..f0dbd2f 100644
--- a/modules/interface/manifests/add_ip6_mapped.pp
+++ b/modules/interface/manifests/add_ip6_mapped.pp
@@ -18,8 +18,10 @@
 $ip4_address = ::${ipv4_address}
 }
 
-$ipv6_address = inline_template(%= require 'ipaddr'; 
(IPAddr.new(scope.lookupvar(\::ipaddress6_${intf}\)).mask(64) | 
IPAddr.new(ip4_address.gsub('.', ':'))).to_s() %)
+# $v6_mapped_lower64 looks like '::10:0:2:1' for a v4 of '10.0.2.1'
+$v6_mapped_lower64 = regsubst($ip4_address, '\.', ':', 'G')
 
+$ipv6_address = inline_template(%= require 'ipaddr'; 
(IPAddr.new(scope.lookupvar(\::ipaddress6_${intf}\)).mask(64) | 
IPAddr.new(v6_mapped_lower64)).to_s() %)
 interface::ip { $title:
 interface = $intf,
 address   = $ipv6_address,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82b1fd15c7bc5d33b580d5897f9efdf9b65adccf
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] watchlist bug fixed where i18n was not loaded properly - change (mediawiki...BlueSpiceExtensions)

2015-03-31 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

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

Change subject: watchlist bug fixed where i18n was not loaded properly
..

watchlist bug fixed where i18n was not loaded properly

Change-Id: I592fc6007304a0a05355d5f5e167699b5d975a22
---
M WatchList/WatchList.setup.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/WatchList/WatchList.setup.php b/WatchList/WatchList.setup.php
index 3e25827..2ac2894 100644
--- a/WatchList/WatchList.setup.php
+++ b/WatchList/WatchList.setup.php
@@ -4,6 +4,6 @@
 
 $GLOBALS['wgAutoloadClasses']['WatchList'] = __DIR__ . '/WatchList.class.php';
 
-$wgMessagesDirs['WatchList'] = __DIR__ . '/i18n';
+$wgMessagesDirs['BSWatchList'] = __DIR__ . '/i18n'; //TODO: Must not be 
WatchList, somehting's overriding here otherwise
 
 $wgExtensionMessagesFiles['WatchList'] = __DIR__ . 
'/languages/WatchList.i18n.php';
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I592fc6007304a0a05355d5f5e167699b5d975a22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Tweichart weich...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Fix mising phab/ dir introduced in 55deca3 - change (mediawiki/vagrant)

2015-03-31 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Fix mising phab/ dir introduced in 55deca3
..

Fix mising phab/ dir introduced in 55deca3

55deca3 added phab/ to .gitignore, while at the same time requiring the
directory to be present in order to install arcanist (put as a
dependency of mediawiki). Consequently, the provisioning would fail for
fresh clones. This patch aims at quick-fixing this by forcing Puppet to
ensure the parent directory exists when either arcanist of phabricator
modules are being applied. Because they share a common parent directory,
the /phab directory is required to be created before any git clone is to
be executed.

Note that this is only a quick fix, we should find a better way to
organise things (as in general one does not need arcanist to be
installed in order to run mediawiki).

Bug: T94469
Bug: T94553
Change-Id: Icf333d03f2c7d0673c74a9ef01de72744ae6bb57
---
M puppet/modules/arcanist/manifests/init.pp
M puppet/modules/phabricator/manifests/init.pp
2 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/50/200850/1

diff --git a/puppet/modules/arcanist/manifests/init.pp 
b/puppet/modules/arcanist/manifests/init.pp
index 6f62b7c..721a4b8 100644
--- a/puppet/modules/arcanist/manifests/init.pp
+++ b/puppet/modules/arcanist/manifests/init.pp
@@ -12,6 +12,15 @@
 ){
 include ::php
 
+if (!defined(File[$deploy_dir])) {
+file { $deploy_dir:
+ensure = 'directory',
+owner  = $::share_owner,
+group  = $::share_group,
+}
+File[$deploy_dir] - Git::Clone | |
+}
+
 git::clone { 'https://github.com/phacility/libphutil':
 directory = ${deploy_dir}/libphutil,
 remote= 'https://github.com/phacility/libphutil',
diff --git a/puppet/modules/phabricator/manifests/init.pp 
b/puppet/modules/phabricator/manifests/init.pp
index a7079ad..277017e 100644
--- a/puppet/modules/phabricator/manifests/init.pp
+++ b/puppet/modules/phabricator/manifests/init.pp
@@ -24,6 +24,15 @@
 ensure = present,
 }
 
+if (!defined(File[$deploy_dir])) {
+file { $deploy_dir:
+ensure = 'directory',
+owner  = $::share_owner,
+group  = $::share_group,
+}
+File[$deploy_dir] - Git::Clone | |
+}
+
 git::clone { 'https://github.com/phacility/phabricator':
 directory = ${deploy_dir}/phabricator,
 remote= 'https://github.com/phacility/phabricator',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf333d03f2c7d0673c74a9ef01de72744ae6bb57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mobrovac mobro...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix missing var $type - change (mediawiki...Flow)

2015-03-31 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Fix missing var $type
..

Fix missing var $type

It was declared only after it could already be used.
Also, AbstractRevision::getType doesn't exist, changed to
getRevisionType

Change-Id: Ie2c59ceab89a34801475e2b714377f225837dcbf
---
M includes/Block/Topic.php
1 file changed, 14 insertions(+), 13 deletions(-)


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

diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 0c02290..5f60708 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -820,6 +820,20 @@
 
$state = $revision-getModerationState();
 
+   // display simple message
+   // i18n messages:
+   //  flow-error-not-allowed-hide,
+   //  flow-error-not-allowed-reply-to-hide-topic
+   //  flow-error-not-allowed-delete
+   //  flow-error-not-allowed-reply-to-delete-topic
+   //  flow-error-not-allowed-suppress
+   //  flow-error-not-allowed-reply-to-suppress-topic
+   if ( $revision instanceof PostRevision ) {
+   $type = $revision-isTopicTitle() ? 'topic' : 'post';
+   } else {
+   $type = $revision-getRevisionType();
+   }
+
// Show a snippet of the relevant log entry if available.
if ( \LogPage::isLogType( $state ) ) {
// check if user has sufficient permissions to see log
@@ -860,19 +874,6 @@
}
}
 
-   // display simple message
-   // i18n messages:
-   //  flow-error-not-allowed-hide,
-   //  flow-error-not-allowed-reply-to-hide-topic
-   //  flow-error-not-allowed-delete
-   //  flow-error-not-allowed-reply-to-delete-topic
-   //  flow-error-not-allowed-suppress
-   //  flow-error-not-allowed-reply-to-suppress-topic
-   if ( $revision instanceof PostRevision ) {
-   $type = $revision-isTopicTitle() ? 'topic' : 'post';
-   } else {
-   $type = $revision-getType();
-   }
return $this-context-msg( array(
// set of keys to try in order

flow-error-not-allowed-{$this-action}-to-$state-$type,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2c59ceab89a34801475e2b714377f225837dcbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Show revisions from deleted boards in DeletedContribtions in... - change (mediawiki...Flow)

2015-03-31 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Show revisions from deleted boards in DeletedContribtions 
instead of Contributions
..

Show revisions from deleted boards in DeletedContribtions instead of 
Contributions

Change-Id: Ifee23aca889e53cc369e64a59614536d21a86667
---
M includes/Formatter/ContributionsQuery.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/Formatter/ContributionsQuery.php 
b/includes/Formatter/ContributionsQuery.php
index efe5092..c73acc5 100644
--- a/includes/Formatter/ContributionsQuery.php
+++ b/includes/Formatter/ContributionsQuery.php
@@ -73,16 +73,16 @@
try {
$result = $pager instanceof 
ContribsPager ? new ContributionsRow : new DeletedContributionsRow;
$result = $this-buildResult( 
$revision, $pager-getIndexField(), $result );
+   $deleted = 
$result-currentRevision-isDeleted() || 
$result-workflow-getOwnerTitle()-isDeleted();
 
-   // @todo: below code should also check 
status of board: if that's been deleted, it's posts should also be considered 
deleted
if (
$result instanceof 
ContributionsRow 
-   ( 
$result-currentRevision-isDeleted() || 
$result-currentRevision-isSuppressed() )
+   ( $deleted || 
$result-currentRevision-isSuppressed() )
) {
// don't show deleted or 
suppressed entries in Special:Contributions
continue;
}
-   if ( $result instanceof 
DeletedContributionsRow  !$result-currentRevision-isDeleted() ) {
+   if ( $result instanceof 
DeletedContributionsRow  !$deleted ) {
// only show deleted entries in 
Special:DeletedContributions
continue;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifee23aca889e53cc369e64a59614536d21a86667
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove 'index' from most-used list - change (translatewiki)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'index' from most-used list
..


Remove 'index' from most-used list

The message got here by mistake, it is just a customization message used
on sidebar of various Wikipedias. See T65416#1046553

Bug: T65416
Change-Id: Iac813a1fc7101a7de6b40231c3bced843067ef2a
---
M groups/MediaWiki/wikimedia-mostused-2015.txt
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/groups/MediaWiki/wikimedia-mostused-2015.txt 
b/groups/MediaWiki/wikimedia-mostused-2015.txt
index b897b38..b283aa9 100644
--- a/groups/MediaWiki/wikimedia-mostused-2015.txt
+++ b/groups/MediaWiki/wikimedia-mostused-2015.txt
@@ -247,7 +247,6 @@
 linkstoimage
 tooltip-ca-addsection
 vector-action-addsection
-index
 translate-documentation-language
 globalusage-of-file
 noarticletext

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac813a1fc7101a7de6b40231c3bced843067ef2a
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Mormegil morme...@centrum.cz
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Toolbar should appear to be within text area - change (mediawiki...Flow)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Toolbar should appear to be within text area
..


Toolbar should appear to be within text area

Note that this completely fails when the debugBar is also present, havn't
thought of how to fix that yet.

Bug: T94112
Change-Id: I63613e96f3116745726326a254f5ac3f220f5f61
---
M modules/editor/editors/visualeditor/mw.flow.ve.Target.less
1 file changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
index 736fafe..6076edf 100644
--- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
@@ -23,11 +23,27 @@
// this border comes from .mw-ui-input on the same div, but i 
dont think
// we want to remove this for all inputs just the documentNode
border: none;
+   // This creates a space for the toolbar, a matching negative 
margin-top
+   // shifts the toolbar into this location.
+   // @todo where did this 40 come from, could it be calculated?
+   padding-bottom: 40px;
}
 
-   // The default border is only appropriate in the default ve, with
-   // the toolbar above the editing surface.
+   .oo-ui-toolbar {
+   // The -40 matches the padding-bottom on .ve-ce-documentNode to 
put the toolbar inside
+   // the editing area. The 2px of positive margin gives room for 
the blue border of the
+   // documentNode (via .mw-ui-input)
+   margin: -40px 2px 0 2px;
+   }
+
+   // Due to this being floated, it needs a matching top margin to still 
display inside the bar
+   .oo-ui-toolbar-actions {
+   margin-top: 38px;
+   }
+
.oo-ui-toolbar-bar {
+   // The default border is only appropriate in the default ve, 
with
+   // the toolbar above the editing surface.
border: none;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63613e96f3116745726326a254f5ac3f220f5f61
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make afterPaste operations optional again - change (VisualEditor/VisualEditor)

2015-03-31 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Make afterPaste operations optional again
..

Make afterPaste operations optional again

If the user wants to assert no operations, have them
expect an empty array.

Change-Id: I2afc5b8e588e15a56f33060412de1d08602024c4
---
M tests/ce/ve.ce.Surface.test.js
1 file changed, 19 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/51/200851/1

diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js
index 049741a..9066188 100644
--- a/tests/ce/ve.ce.Surface.test.js
+++ b/tests/ce/ve.ce.Surface.test.js
@@ -1053,13 +1053,16 @@
range: new ve.Range( 1 ),
documentHtml: 'p/p',
pasteHtml: 'blockquotediv 
rel=ve:AlienpFoo/pdivbr/div/div/blockquote',
+   expectedOps: [],
expectedRange: new ve.Range( 1 ),
-   msg: 'Pasting block content that is fully 
stripped does not crash'
+   msg: 'Pasting block content that is fully 
stripped does nothing'
}
];
 
for ( i = 0; i  cases.length; i++ ) {
-   expected++;
+   if ( cases[i].expectedOps ) {
+   expected++;
+   }
if ( cases[i].expectedRange ) {
expected++;
}
@@ -1091,26 +1094,25 @@
view.afterPaste();
 
if ( expectedOps ) {
-   txs = model.getHistory()[0].transactions;
ops = [];
-   for ( i = 0; i  txs.length; i++ ) {
-   txops = txs[i].getOperations();
-   for ( j = 0; j  txops.length; j++ ) {
-   if ( txops[j].remove ) {
-   
ve.dm.example.postprocessAnnotations( txops[j].remove, doc.getStore() );
-   
ve.dm.example.removeOriginalDomElements( txops[j].remove );
+   if ( model.getHistory().length ) {
+   txs = model.getHistory()[0].transactions;
+   for ( i = 0; i  txs.length; i++ ) {
+   txops = txs[i].getOperations();
+   for ( j = 0; j  txops.length; j++ ) {
+   if ( txops[j].remove ) {
+   
ve.dm.example.postprocessAnnotations( txops[j].remove, doc.getStore() );
+   
ve.dm.example.removeOriginalDomElements( txops[j].remove );
+   }
+   if ( txops[j].insert ) {
+   
ve.dm.example.postprocessAnnotations( txops[j].insert, doc.getStore() );
+   
ve.dm.example.removeOriginalDomElements( txops[j].insert );
+   }
}
-   if ( txops[j].insert ) {
-   
ve.dm.example.postprocessAnnotations( txops[j].insert, doc.getStore() );
-   
ve.dm.example.removeOriginalDomElements( txops[j].insert );
-   }
+   ops.push( txops );
}
-   ops.push( txops );
-
}
assert.deepEqual( ops, expectedOps, msg + ': 
operations' );
-   } else {
-   assert.strictEqual( model.getHistory().length, 0, msg + 
': no operations' );
}
if ( expectedRange ) {
assert.equalRange( model.getSelection().getRange(), 
expectedRange, msg +  ': range' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2afc5b8e588e15a56f33060412de1d08602024c4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Disallow revisions in deleted boards - change (mediawiki...Flow)

2015-03-31 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Disallow revisions in deleted boards
..

Disallow revisions in deleted boards

Unless user has deletedhistory permissions

This could have a performance impact: now every check will
require workflow to be loaded.
However, on regular pages, the workflow should've already
been loaded anyway. In listings (contribs, RC, history, ...),
these should be batchloaded  buffered cache will take care
of this.

Even though the performance hit should be negligable, if any,
I originally wanted to do this differenty: I wanted to hook
into WikiPageDeletionUpdates  delete every topic (and post?)
in that board. However:
* I don't want to create a bogus delete revision
* If board gets restored, it could get weird to figure out if
  a topic was auto-deleted along with board (and should also
  be restored), or was previously genuinly deleted
* Perhaps workflow could be deleted instead, but that's going
  to require some refactoring  we'd still need it to render
  the revisions in lists
* Haven't even looked if there's a hook after restoring a
  board (though there probably is, or we could add one)
Either way, that idea didn't look promising, but I'm open to
other wild suggestions.

Bug: T90969
Change-Id: I60b34868871ab17455cb2e03f6a44ac42e1c896e
---
M includes/RevisionActionPermissions.php
1 file changed, 14 insertions(+), 5 deletions(-)


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

diff --git a/includes/RevisionActionPermissions.php 
b/includes/RevisionActionPermissions.php
index a52784a..29b3a46 100644
--- a/includes/RevisionActionPermissions.php
+++ b/includes/RevisionActionPermissions.php
@@ -64,12 +64,12 @@
 
// if there was no revision object, it's pointless to find last 
revision
// if we already fail, no need in checking most recent revision 
status
-   if ( $allowed  $revision !== null  ) {
+   if ( $allowed  $revision !== null ) {
try {
-   // Also check if the user would be allowed to 
perform this against
+   // Also check if the user would be allowed to 
perform this
// against the most recent revision - the last 
revision is the
-   // current state of an object, so checking 
against a revision at one
-   // point in time alone isn't enough.
+   // current state of an object, so checking 
against a revision at
+   // one point in time alone isn't enough.
/** @var CollectionCache $cache */
$cache = Container::get( 'collection.cache' );
$last = $cache-getLastRevisionFor( $revision );
@@ -79,6 +79,15 @@
// If data is not in storage, just return that 
revision's status
}
}
+
+   if ( $allowed  $revision !== null ) {
+   $workflow = $revision-getCollection()-getWorkflow();
+   $title = $workflow-getOwnerTitle();
+
+   // if the board is deleted, nothing is allowed
+   $allowed = !$title-isDeleted() || 
$this-user-isAllowed( 'deletedhistory' );
+   }
+
return $allowed;
}
 
@@ -110,7 +119,7 @@
/**
 * Check if a user is allowed to perform a certain action, against the 
latest
 * root(topic) post related to the provided revision.  This is required 
for
-* things like preventing replys to locked topics.
+* things like preventing replies to locked topics.
 *
 * @param PostRevision $revision
 * @param string $action

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60b34868871ab17455cb2e03f6a44ac42e1c896e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: aabd6a6..15e214f - change (mediawiki/extensions)

2015-03-31 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: aabd6a6..15e214f
..

Syncronize VisualEditor: aabd6a6..15e214f

Change-Id: I66ac2356e88236799ee27cfe71a4b2fac70d8b44
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/99/201099/1

diff --git a/VisualEditor b/VisualEditor
index aabd6a6..15e214f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit aabd6a6274895d2316906d8b07e67ceb7c14212f
+Subproject commit 15e214f76473263a32edd4e4e02e8f6862698388

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66ac2356e88236799ee27cfe71a4b2fac70d8b44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: aabd6a6..15e214f - change (mediawiki/extensions)

2015-03-31 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: aabd6a6..15e214f
..


Syncronize VisualEditor: aabd6a6..15e214f

Change-Id: I66ac2356e88236799ee27cfe71a4b2fac70d8b44
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index aabd6a6..15e214f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit aabd6a6274895d2316906d8b07e67ceb7c14212f
+Subproject commit 15e214f76473263a32edd4e4e02e8f6862698388

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66ac2356e88236799ee27cfe71a4b2fac70d8b44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Disable pointer events on dimmed elements - change (mediawiki...VisualEditor)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mw.ViewPageTarget: Disable pointer events on dimmed elements
..


mw.ViewPageTarget: Disable pointer events on dimmed elements

Reduces event overhead and prevents accidental interaction with
content while loading, and with content sub while editing.

Change-Id: Ief997cd4d5cf444fb2ee0d28c709301d26e814f9
---
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
index 8ce00f0..3160763 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
@@ -42,6 +42,7 @@
 .ve-activated #siteSub,
 .ve-activated #contentSub {
opacity: 0.6;
+   pointer-events: none;
 }
 
 .ve-activated #firstHeading {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief997cd4d5cf444fb2ee0d28c709301d26e814f9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Overhaul AbuseFilter internal profiling system - change (mediawiki...AbuseFilter)

2015-03-31 Thread Dragons flight (Code Review)
Dragons flight has uploaded a new change for review.

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

Change subject: Overhaul AbuseFilter internal profiling system
..

Overhaul AbuseFilter internal profiling system

The AbuseFilter internal stats collection has been plagued by several bugs
for its entire history.  The most prominent bug is caused by a race
condition where competing Apache instances can corrupt the data in
memcache.  This is due to distributing stat data across multiple memcache
entries.  Other stat corruption is associated with editing filters or
filter runs that abort due to reaching the condition limit.

The modifications here overhaul the stats system to solve these problems.
In particular, all per filter profile data is now hosted in an array
that is stored in memcache as a block so that the different stats
remain consistent.  The restructuring also lays the groundwork for future
enhancements to the internal AbuseFilter profiling.

Bug: T53294
Change-Id: Ib12e072a245fcad93c6c6bd452041f3441f68bb7
---
M AbuseFilter.class.php
M Views/AbuseFilterViewEdit.php
M Views/AbuseFilterViewList.php
3 files changed, 154 insertions(+), 108 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/04/201104/1

diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index e8df9d9..93cc29e 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -7,6 +7,7 @@
  */
 class AbuseFilter {
public static $statsStoragePeriod = 86400;
+   public static $statsMaxObservations = 1;
public static $tokenCache = array();
public static $modifyCache = array();
public static $condLimitEnabled = true;
@@ -435,7 +436,7 @@
 */
public static function checkAllFilters( $vars, $group = 'default' ) {
// Fetch from the database.
-   $filter_matched = array();
+   $filterMatched = array();
 
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr-select(
@@ -449,8 +450,10 @@
__METHOD__
);
 
+   $startTime = microtime( true );
+
foreach( $res as $row ) {
-   $filter_matched[$row-af_id] = self::checkFilter( $row, 
$vars, true );
+   $filterMatched[$row-af_id] = self::checkFilter( $row, 
$vars, true );
}
 
global $wgAbuseFilterCentralDB, $wgAbuseFilterIsCentral, 
$wgMemc;
@@ -483,30 +486,33 @@
}
 
foreach( $res as $row ) {
-   $filter_matched['global-' . $row-af_id] =
+   $filterMatched['global-' . $row-af_id] =
self::checkFilter( $row, $vars, true, 
'global-' );
}
}
 
-   // Update statistics, and disable filters which are 
over-blocking.
-   self::recordStats( $filter_matched, $group );
+   $endTime = microtime( true );
+   $totalTime = $endTime - $startTime;
 
-   return $filter_matched;
+   // Update statistics, and disable filters which are 
over-blocking.
+   self::recordStats( $filterMatched, $totalTime, $group );
+
+   return $filterMatched;
}
 
/**
 * @static
 * @param $row
 * @param $vars
-* @param $profile bool
+* @param $recordStats bool
 * @param $prefix string
 * @return bool
 */
-   public static function checkFilter( $row, $vars, $profile = false, 
$prefix = '' ) {
+   public static function checkFilter( $row, $vars, $recordStats = false, 
$prefix = '' ) {
$filterID = $prefix . $row-af_id;
 
$startConds = $startTime = null;
-   if ( $profile ) {
+   if ( $recordStats ) {
$startConds = self::$condCount;
$startTime = microtime( true );
}
@@ -528,84 +534,106 @@
$result = false;
}
 
-   if ( $profile ) {
+   if ( $recordStats ) {
$endTime = microtime( true );
$endConds = self::$condCount;
 
$timeTaken = $endTime - $startTime;
$condsUsed = $endConds - $startConds;
 
-   self::recordProfilingResult( $row-af_id, $timeTaken, 
$condsUsed );
+   self::recordProfilingResult( $row-af_id, $timeTaken, 
$condsUsed, $result );
}
 
return $result;
}
 
/**
+* Clear the statistics profiler for specified filter.
+*
 * @param $filter
 */
public static function resetFilterProfile( $filter ) {

[MediaWiki-commits] [Gerrit] Add a Horizon-specific nova policy file. - change (operations/puppet)

2015-03-31 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Add a Horizon-specific nova policy file.
..

Add a Horizon-specific nova policy file.

This should allow us to disable features that don't work
right in Horizon yet.

Change-Id: I08c7f395d6bf218c07e751af4f7bf9a6071b1a61
---
A modules/openstack/files/icehouse/horizon/nova_policy.json
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/templates/icehouse/horizon/local_settings.py.erb
3 files changed, 140 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/201088/1

diff --git a/modules/openstack/files/icehouse/horizon/nova_policy.json 
b/modules/openstack/files/icehouse/horizon/nova_policy.json
new file mode 100644
index 000..7cc5c6b
--- /dev/null
+++ b/modules/openstack/files/icehouse/horizon/nova_policy.json
@@ -0,0 +1,125 @@
+{
+context_is_admin:  [[role:admin]],
+admin_or_owner:  [[is_admin:True], [project_id:%(project_id)s]],
+default: [[rule:admin_or_owner]],
+
+
+# Only admins (that is, Ops) should be able to create instances, since 
it's broken
+#  and only useful for test and development.
+compute:create: role:admin,
+compute:delete: role:admin,
+compute:create:attach_network: role:admin,
+compute:create:attach_volume: role:admin,
+compute:start: rule:admin,
+compute:stop: rule:admin,
+compute:get_all: [],
+
+
+admin_api: [[is_admin:True]],
+compute_extension:accounts: [[rule:admin_api]],
+compute_extension:admin_actions: [[rule:admin_api]],
+compute_extension:admin_actions:pause: [[rule:admin_or_owner]],
+compute_extension:admin_actions:unpause: [[rule:admin_or_owner]],
+compute_extension:admin_actions:suspend: [[rule:admin_or_owner]],
+compute_extension:admin_actions:resume: [[rule:admin_or_owner]],
+compute_extension:admin_actions:lock: [[rule:admin_api]],
+compute_extension:admin_actions:unlock: [[rule:admin_api]],
+compute_extension:admin_actions:resetNetwork: [[rule:admin_api]],
+compute_extension:admin_actions:injectNetworkInfo: [[rule:admin_api]],
+compute_extension:admin_actions:createBackup: [[rule:admin_or_owner]],
+compute_extension:admin_actions:migrateLive: [[rule:admin_api]],
+compute_extension:admin_actions:resetState: [[rule:admin_api]],
+compute_extension:admin_actions:migrate: [[rule:admin_api]],
+compute_extension:aggregates: [[rule:admin_api]],
+compute_extension:certificates: [],
+compute_extension:cloudpipe: [[rule:admin_api]],
+compute_extension:console_output: [[role:projectadmin]],
+compute_extension:consoles: [[role:projectadmin]],
+compute_extension:createserverext: [[role:projectadmin]],
+compute_extension:deferred_delete: [[role:projectadmin]],
+compute_extension:disk_config: [[role:projectadmin]],
+compute_extension:extended_server_attributes: [],
+compute_extension:extended_status: [],
+compute_extension:flavor_access: [],
+compute_extension:flavor_disabled: [],
+compute_extension:flavor_rxtx: [],
+compute_extension:flavor_swap: [],
+compute_extension:flavorextradata: [],
+compute_extension:flavorextraspecs: [],
+compute_extension:flavormanage: [[rule:admin_api]],
+compute_extension:floating_ip_dns: [[role:projectadmin]],
+compute_extension:floating_ip_pools: [[role:projectadmin]],
+compute_extension:floating_ips: [[role:projectadmin]],
+compute_extension:hosts: [[rule:admin_api]],
+compute_extension:hypervisors: [[rule:admin_api]],
+compute_extension:instance_usage_audit_log: [[rule:admin_api]],
+compute_extension:keypairs: [[role:projectadmin]],
+compute_extension:multinic: [[role:projectadmin]],
+compute_extension:networks: [],
+compute_extension:networks:view: [],
+compute_extension:quotas:show: [[role:projectadmin]],
+compute_extension:quotas:update: [[rule:admin_api]],
+compute_extension:quota_classes: [[role:projectadmin]],
+compute_extension:rescue: [[role:projectadmin]],
+compute_extension:security_groups: [[role:projectadmin]],
+compute_extension:server_diagnostics: [[rule:admin_api]],
+compute_extension:simple_tenant_usage:show: [[rule:admin_or_owner]],
+compute_extension:simple_tenant_usage:list: [[rule:admin_api]],
+compute_extension:users: [[rule:admin_api]],
+compute_extension:virtual_interfaces: [[role:projectadmin]],
+compute_extension:virtual_storage_arrays: [[role:projectadmin]],
+compute_extension:volumes: [[role:projectadmin]],
+compute_extension:volumetypes: [[role:projectadmin]],
+
+
+volume:create: [[role:projectadmin]],
+volume:get_all: [],
+volume:get_volume_metadata: [],
+volume:get_snapshot: [],
+volume:get_all_snapshots: [],
+
+
+volume_extension:types_manage: [[rule:admin_api]],
+

[MediaWiki-commits] [Gerrit] Separate request and timeout ids - change (mediawiki...parsoid)

2015-03-31 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Separate request and timeout ids
..

Separate request and timeout ids

 * Closes the DOS vector described at,
   https://gerrit.wikimedia.org/r/#/c/200829/

 * Also, passes the request id to bunyan for loggin.

Change-Id: I6239686588659f500a6a6a6dc702d742f2ef6cea
---
M api/ParsoidService.js
M api/routes.js
M api/server.js
M lib/ParsoidLogger.js
M lib/mediawiki.parser.environment.js
5 files changed, 24 insertions(+), 21 deletions(-)


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

diff --git a/api/ParsoidService.js b/api/ParsoidService.js
index 1138291..967eead 100644
--- a/api/ParsoidService.js
+++ b/api/ParsoidService.js
@@ -48,15 +48,11 @@
// limit upload file size
app.use(express.limit('15mb'));
 
-   // request ids
+   // timeout ids, used internally to track runaway processes
var buf = new Buffer(16);
app.use(function(req, res, next) {
-   if(req.headers  req.headers['x-request-id']) {
-   res.local('reqId', req.headers['x-request-id']);
-   } else {
-   uuid(null, buf);
-   res.local('reqId', buf.toString('hex'));
-   }
+   uuid(null, buf);
+   res.local('timeoutId', buf.toString('hex'));
next();
});
 
diff --git a/api/routes.js b/api/routes.js
index 3ff6e73..7533bb7 100644
--- a/api/routes.js
+++ b/api/routes.js
@@ -61,11 +61,11 @@
 }
 
 var CPU_TIMEOUT = 5 * 60 * 1000;  // 5 minutes
-var makeDone = function( reqId ) {
+var makeDone = function( timeoutId ) {
// Create this function in an outer scope so that we don't inadvertently
// keep a reference to the promise here.
return function() {
-   process.send({ type: timeout, done: true, reqId: reqId });
+   process.send({ type: timeout, done: true, timeoutId: 
timeoutId });
};
 };
 
@@ -73,7 +73,7 @@
 var sufficientNodeVersion = !/^v0\.[0-8]\./.test( process.version );
 
 var cpuTimeout = function( p, res ) {
-   var reqId = res.local(reqId);
+   var timeoutId = res.local(timeoutId);
var location = util.format(
[%s/%s%s], res.local(iwp), res.local(pageName),
(res.local(oldid) ? ?oldid= + res.local(oldid) : )
@@ -87,10 +87,10 @@
process.send({
type: timeout,
timeout: CPU_TIMEOUT,
-   reqId: reqId,
+   timeoutId: timeoutId,
location: location
});
-   var done = makeDone( reqId );
+   var done = makeDone( timeoutId );
p.then( done, done );
p.then( resolve, reject );
});
@@ -551,11 +551,13 @@
}
return Promise.resolve().nodify(callback);
}
-   MWParserEnv.getParserEnv(parsoidConfig, null, {
+   var options = {
prefix: res.local('iwp'),
pageName: res.local('pageName'),
-   cookie: req.headers.cookie
-   }).then(function( env ) {
+   cookie: req.headers.cookie,
+   reqId: req.headers['x-request-id']
+   };
+   MWParserEnv.getParserEnv(parsoidConfig, null, options).then(function( 
env ) {
env.logger.registerBackend(/fatal(\/.*)?/, errBack.bind(this, 
env));
if ( res.local('v2')  res.local('v2').format === pagebundle 
) {
env.storeDataParsoid = true;
diff --git a/api/server.js b/api/server.js
index 247d87b..263350d 100755
--- a/api/server.js
+++ b/api/server.js
@@ -116,12 +116,12 @@
}
if ( msg.type !== timeout ) { return; }
if ( msg.done ) {
-   clearTimeout( timeouts.get( msg.reqId ) );
-   timeouts.delete( msg.reqId );
+   clearTimeout( timeouts.get( msg.timeoutId ) );
+   timeouts.delete( msg.timeoutId );
} else if ( msg.timeout ) {
var pid = worker.process.pid;
-   timeouts.set(msg.reqId, setTimeout(function() {
-   timeouts.delete( msg.reqId );
+   timeouts.set(msg.timeoutId, setTimeout(function() {
+   timeouts.delete( msg.timeoutId );
if ( worker.id in cluster.workers ) {
logger.log( warning, util.format(
Cpu timeout fetching: %s; 
killing worker %s.,
diff --git a/lib/ParsoidLogger.js b/lib/ParsoidLogger.js
index e835e58..b3ce1a5 100644
--- a/lib/ParsoidLogger.js
+++ b/lib/ParsoidLogger.js

[MediaWiki-commits] [Gerrit] Switch wikidata qunit jobs from qunit to qunit-karma - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Switch wikidata qunit jobs from qunit to qunit-karma
..


Switch wikidata qunit jobs from qunit to qunit-karma

Bug: T94393
Change-Id: I7ce8f21f1bca63d35b2c2056ef06695c23462764
---
M jjb/wikidata.yaml
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/jjb/wikidata.yaml b/jjb/wikidata.yaml
index 8e29637..17b43a2 100644
--- a/jjb/wikidata.yaml
+++ b/jjb/wikidata.yaml
@@ -54,7 +54,7 @@
 
 - job-template:
 name: 'mwext-Wikibase-qunit'
-node: contintLabsSlave  UbuntuPrecise
+node: contintLabsSlave  UbuntuTrusty
 concurrent: true
 triggers:
  - zuul
@@ -71,7 +71,7 @@
  - shell: cp deps.txt src/extensions_load.txt
  - mw-apply-settings
  - mw-run-update-script
- - qunit
+ - qunit-karma
 publishers:
  - archive-log-dir
  - qunit-cleanup
@@ -118,7 +118,7 @@
  - shell: cp deps.txt src/extensions_load.txt
  - mw-apply-settings
  - mw-run-update-script
- - qunit
+ - qunit-karma
 publishers:
  - archive-log-dir
  - qunit-cleanup

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ce8f21f1bca63d35b2c2056ef06695c23462764
Gerrit-PatchSet: 6
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.he...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make phpcs voting by default (inverse existing opt-in/opt-out) - change (integration/config)

2015-03-31 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Make phpcs voting by default (inverse existing opt-in/opt-out)
..

Make phpcs voting by default (inverse existing opt-in/opt-out)

All jobs:
 extension-phpcs
   cldr
   AutomaticBoardWelcome
   JSBreadCrumbs
   Mantle
   OnlineStatus
   Sentry
   Translate
   TranslationNotifications
   TwnMainPage
   UniversalLanguageSelector
   UploadWizard
   WhitelistPages
   WikiGrok

 phpcs-HEAD
   Interwiki
   SyntaxHighlight_GeSHi
   Vector
   WebFonts

Change-Id: I890d79825a77fabf5bf08c364daa24ed00a872f6
---
M zuul/layout.yaml
1 file changed, 22 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/97/201097/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4d5a735..bcacbbc 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -542,7 +542,6 @@
  - '^.*\.(php|php5|phtml|inc)$'
 
   - name: ^.*-phpcs(-HEAD)?$
-voting: false
 files:
  - '^.*\.(php|php5|phtml|inc)$'
 
@@ -603,18 +602,28 @@
   - name: ^mwext-ZeroPortal-testextension-zend$
 branch: (REL1_19|REL1_23|REL1_24|fundraising/REL1_23)
 
-  - name: mwext-cldr-phpcs-HEAD
-voting: true
-  - name: mwext-Interwiki-phpcs-HEAD
-voting: true
-  - name: mwext-Translate-phpcs-HEAD
-voting: true
-  - name: mwext-TranslationNotifications-phpcs-HEAD
-voting: true
-  - name: mwext-TwnMainPage-phpcs-HEAD
-voting: true
-  - name: mwext-UniversalLanguageSelector-phpcs-HEAD
-voting: true
+  - name: mwext-AutomaticBoardWelcome-phpcs-HEAD
+voting: false
+  - name: mwext-JSBreadCrumbs-phpcs-HEAD
+voting: false
+  - name: mwext-Mantle-phpcs-HEAD
+voting: false
+  - name: mwext-OnlineStatus-phpcs-HEAD
+voting: false
+  - name: mwext-Sentry-phpcs-HEAD
+voting: false
+  - name: mwext-SyntaxHighlight_GeSHi-phpcs-HEAD
+voting: false
+  - name: mwext-UploadWizard-phpcs-HEAD
+voting: false
+  - name: mwext-Vector-phpcs-HEAD
+voting: false
+  - name: mwext-WebFonts-phpcs-HEAD
+voting: false
+  - name: mwext-WhitelistPages-phpcs-HEAD
+voting: false
+  - name: mwext-WikiGrok-phpcs-HEAD
+voting: false
 
   - name: ^mediawiki-core-npm$
 files:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I890d79825a77fabf5bf08c364daa24ed00a872f6
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add an option to skip site links - change (wikidata...rdf)

2015-03-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add an option to skip site links
..

Add an option to skip site links

Site links take up a ton of space so it might be worth skipping them.
IDs 1-200 (including the missing IDs) is ~60,000 triple without site links
and ~150,000 with them.

Also fix an error encountered loading string with \ in them.  This would
be an isolated commit but its test overlaps with the above and it isn't
worth it to break it out.

Change-Id: Icc8a3b4c327e4719c0eb221060218448ebcdd877
---
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/UpdateBuilder.java
M tools/src/test/java/org/wikidata/query/rdf/tool/StatementHelper.java
M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/rdf/RdfRepositoryIntegrationTest.java
6 files changed, 146 insertions(+), 35 deletions(-)


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

diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index e249f4e..87400a9 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -73,7 +73,11 @@
 @Option(shortName = u, description = URL to post updates and 
queries.)
 String sparqlUrl();
 
-// TODO need option to limit the load to certain languages or sites
+// TODO need option to limit the load to certain languages or to only
+// import a single label fallback style
+@Option(description = Skip site links)
+boolean skipSiteLinks();
+
 @Option(helpRequest = true)
 boolean help();
 }
@@ -126,7 +130,12 @@
 ExecutorService executor = new ThreadPoolExecutor(10, 10, 0, 
TimeUnit.SECONDS,
 new LinkedBlockingQueueRunnable(), threadFactory.build());
 
-new Update(changeSource, wikibaseRepository, rdfRepository, 
entityUris, entityDataUris, executor).run();
+Munger munger = new Munger(entityDataUris, entityUris);
+if (options.skipSiteLinks()) {
+munger = munger.removeSiteLinks();
+}
+
+new Update(changeSource, wikibaseRepository, rdfRepository, munger, 
executor).run();
 }
 
 /**
@@ -198,17 +207,15 @@
 private Change.SourceB changeSource;
 private final WikibaseRepository wikibase;
 private final RdfRepository rdfRepository;
-private final Entity entityUris;
-private final EntityData entityDataUris;
+private final Munger munger;
 private final ExecutorService executor;
 
 public Update(Change.SourceB changeSource, WikibaseRepository wikibase, 
RdfRepository rdfRepository,
-Entity entityUris, EntityData entityDataUris, ExecutorService 
executor) {
+Munger munger, ExecutorService executor) {
 this.changeSource = changeSource;
 this.wikibase = wikibase;
 this.rdfRepository = rdfRepository;
-this.entityUris = entityUris;
-this.entityDataUris = entityDataUris;
+this.munger = munger;
 this.executor = executor;
 }
 
@@ -282,7 +289,6 @@
 log.debug(RDF repostiroy already has this revision, skipping.);
 return;
 }
-Munger munger = new Munger(entityDataUris, entityUris);
 rdfRepository.sync(change.entityId(),
 munger.munge(change.entityId(), 
wikibase.fetchRdfForEntity(change.entityId(;
 updateMeter.mark();
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
index 858c7c2..32f3f8a 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
@@ -1,8 +1,10 @@
 package org.wikidata.query.rdf.tool.rdf;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 
@@ -18,6 +20,9 @@
 import org.wikidata.query.rdf.common.uri.SKOS;
 import org.wikidata.query.rdf.common.uri.SchemaDotOrg;
 
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ListMultimap;
+
 /**
  * Munges RDF from Wikibase into a more queryable format. Note that this is
  * tightly coupled with Wikibase's export format.
@@ -25,10 +30,23 @@
 public class Munger {
 private final EntityData entityDataUris;
 private final Entity entityUris;
+private final boolean removeSiteLinks;
 
 public Munger(EntityData entityDataUris, Entity entityUris) {
+

[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Disable pointer events on dimmed elements... - change (mediawiki...VisualEditor)

2015-03-31 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: mw.ViewPageTarget: Disable pointer events on dimmed elements 
while loading
..

mw.ViewPageTarget: Disable pointer events on dimmed elements while loading

Reduces event overhead and prevents accidental interaction with
content while dimmed.

Change-Id: Ief997cd4d5cf444fb2ee0d28c709301d26e814f9
---
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
index 8ce00f0..3160763 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
@@ -42,6 +42,7 @@
 .ve-activated #siteSub,
 .ve-activated #contentSub {
opacity: 0.6;
+   pointer-events: none;
 }
 
 .ve-activated #firstHeading {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief997cd4d5cf444fb2ee0d28c709301d26e814f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove duplicate phpcs-HEAD config - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove duplicate phpcs-HEAD config
..


Remove duplicate phpcs-HEAD config

* '^.*-phpcs-HEAD$' is already covered by '^.*-phpcs(-HEAD)?$'
* TwnMainPage uses exactly what the template provides.

Change-Id: I8216fbc53e086e510bf95cc3ae5f72b49d1bb225
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 11 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index efdc506..4d5a735 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -546,11 +546,6 @@
 files:
  - '^.*\.(php|php5|phtml|inc)$'
 
-  - name: ^.*-phpcs-HEAD$
-voting: false
-files:
- - '^.*\.(php|php5|phtml|inc)$'
-
   - name: ^mediawiki.*-hhvm$
 # Release branches do not support hhvm. Hopefully REL1_25 will.
 branch: (?!REL1_19|REL1_23|REL1_24|fundraising/REL1_23)
@@ -6758,12 +6753,7 @@
   - name: extension-rubylint
   - name: extension-jslint
   - name: extension-unittests
-check:
-  - mwext-TwnMainPage-phpcs-HEAD
-test:
-  - mwext-TwnMainPage-phpcs-HEAD
-gate-and-submit:
-  - mwext-TwnMainPage-phpcs-HEAD
+  - name: extension-phpcs
 experimental:
   - php-composer-test
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8216fbc53e086e510bf95cc3ae5f72b49d1bb225
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Stats: Move the graph under published translations section - change (mediawiki...ContentTranslation)

2015-03-31 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Stats: Move the graph under published translations section
..

Stats: Move the graph under published translations section

Change-Id: Ie2c5606d5543b814807a75cc67a9a7ee9c9f3fc4
---
M modules/stats/ext.cx.stats.js
1 file changed, 9 insertions(+), 8 deletions(-)


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

diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js
index 09b685d..723deec 100644
--- a/modules/stats/ext.cx.stats.js
+++ b/modules/stats/ext.cx.stats.js
@@ -219,11 +219,19 @@
var $canvas, ctx, cxTrendGraph,
$container = $( '#bodyContent' );
 
+   $canvas = $( 'canvas' ).attr( {
+   id: 'cxtrend',
+   width: $container.width(),
+   height: 400
+   } );
+
+   $container.append(
+   $( 'h2' ).text( mw.msg( 
'cx-stats-published-translations-title' ) ),
+   $( 'div' ).addClass( 'cx-stats-trend' ).append( 
$canvas ) );
mw.cx.siteMapper = new mw.cx.SiteMapper( mw.config.get( 
'wgContentTranslationSiteTemplates' ) );
 
getCXStats().then( function ( data ) {
$container.append(
-   $( 'h2' ).text( mw.msg( 
'cx-stats-published-translations-title' ) ),
prepareTranslationsTable( 
data.query.contenttranslationstats, 'published' ),
$( 'h2' ).text( mw.msg( 
'cx-stats-draft-translations-title' ) ),
prepareTranslationsTable( 
data.query.contenttranslationstats, 'draft' ),
@@ -232,13 +240,6 @@
);
} );
 
-   $canvas = $( 'canvas' ).attr( {
-   id: 'cxtrend',
-   width: $container.width(),
-   height: 400
-   } );
-
-   $container.append( $( 'div' ).addClass( 'cx-stats-trend' 
).append( $canvas ) );
ctx = $canvas[ 0 ].getContext( '2d' );
 
// TODO: Add a language selector to choose any language

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2c5606d5543b814807a75cc67a9a7ee9c9f3fc4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Reuse of NSRegularExpression objects in string formatting me... - change (apps...wikipedia)

2015-03-31 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: Reuse of NSRegularExpression objects in string formatting 
method.
..

Reuse of NSRegularExpression objects in string formatting method.

Had been re-instancing regex objects in a loop.

Added tests. ~65% performance increase.

Change-Id: I30ddc7bd59b163b1300dbe6b0c2587337d8581b7
---
M Wikipedia.xcodeproj/project.pbxproj
A WikipediaUnitTests/NSString+FormattedAttributedStringTests.m
M wikipedia/Categories/NSString+FormattedAttributedString.m
3 files changed, 126 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/92/201092/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index b3dbec8..c9f89a3 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -207,6 +207,8 @@
04EDEE311A21CB4100798076 /* UIScreen+Extras.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04EDEE301A21CB4100798076 /* UIScreen+Extras.m 
*/; };
04F0E2EA186EDC1A00468738 /* UIWebView+ElementLocation.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04F0E2E9186EDC1A00468738 /* 
UIWebView+ElementLocation.m */; };
04F0E2EE186FB2D100468738 /* TOCSectionCellView.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 04F0E2ED186FB2D100468738 /* 
TOCSectionCellView.m */; };
+   04F122671ACB818F002FC3B5 /* 
NSString+FormattedAttributedString.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 04B91AAA18E3D9E200FFAA1C /* NSString+FormattedAttributedString.m */; 
};
+   04F1226A1ACB822D002FC3B5 /* 
NSString+FormattedAttributedStringTests.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 04F122691ACB822D002FC3B5 /* NSString+FormattedAttributedStringTests.m 
*/; };
04F27B7518FE0F2E00EDD838 /* PageHistoryResultCell.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04F27B6F18FE0F2E00EDD838 /* 
PageHistoryResultCell.m */; };
04F27B7618FE0F2E00EDD838 /* PageHistoryResultPrototypeView.xib 
in Resources */ = {isa = PBXBuildFile; fileRef = 04F27B7018FE0F2E00EDD838 /* 
PageHistoryResultPrototypeView.xib */; };
04F27B7818FE0F2E00EDD838 /* PageHistoryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04F27B7418FE0F2E00EDD838 /* 
PageHistoryViewController.m */; };
@@ -731,6 +733,7 @@
04F0E2E9186EDC1A00468738 /* UIWebView+ElementLocation.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = UIWebView+ElementLocation.m; sourceTree = 
group; };
04F0E2EC186FB2D000468738 /* TOCSectionCellView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
TOCSectionCellView.h; sourceTree = group; };
04F0E2ED186FB2D100468738 /* TOCSectionCellView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TOCSectionCellView.m; sourceTree = group; };
+   04F122691ACB822D002FC3B5 /* 
NSString+FormattedAttributedStringTests.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
NSString+FormattedAttributedStringTests.m; sourceTree = group; };
04F27B6E18FE0F2E00EDD838 /* PageHistoryResultCell.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
PageHistoryResultCell.h; sourceTree = group; };
04F27B6F18FE0F2E00EDD838 /* PageHistoryResultCell.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; 
lineEnding = 0; path = PageHistoryResultCell.m; sourceTree = group; 
xcLanguageSpecificationIdentifier = xcode.lang.objc; };
04F27B7018FE0F2E00EDD838 /* PageHistoryResultPrototypeView.xib 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; 
path = PageHistoryResultPrototypeView.xib; sourceTree = group; };
@@ -2045,6 +2048,7 @@
BCB669FC1A84158200C7B1FE /* 
CircularBitwiseRotationTests.m */,
BCB58F7B1A8D0C8E00465627 /* 
NSArray+BKIndexTests.m */,
C983151B1AA5205700E25EE1 /* 
NSString+WMFHTMLParsingTests.m */,
+   04F122691ACB822D002FC3B5 /* 
NSString+FormattedAttributedStringTests.m */,
BCBDE0AB1AA76EAC006BD29A /* 
WMFImageURLParsingTests.m */,
BCB8487A1DF90077EC24 /* 
WMFRoundingUtilitiesTests.m */,
BCDB75C31AB0E835593F /* 
WMFSubstringUtilsTests.m */,
@@ -2912,6 +2916,7 @@
04D686F51AB2949C0009B44A /* MenuButton.m in 
Sources */,
04D686F91AB2949C0009B44A /* PaddedLabel.m in 
Sources */,

[MediaWiki-commits] [Gerrit] Add CSS normal style - change (mediawiki...mobileapps)

2015-03-31 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Add CSS normal style
..

Add CSS normal style

(not night mode yet)

Change-Id: I2badde3134848d66dd1e7a77716f9a80be04bca5
---
M routes/mobileapp-page.js
A static/night.css
A static/preview.css
A static/styles.css
4 files changed, 1,929 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/03/201103/1

diff --git a/routes/mobileapp-page.js b/routes/mobileapp-page.js
index 5a9c0ec..7253535 100644
--- a/routes/mobileapp-page.js
+++ b/routes/mobileapp-page.js
@@ -222,6 +222,16 @@
 elem.appendChild(child);
 }
 
+// from www/js/loader.js
+function addStyleLink(doc, href) {
+var link = doc.createElement(link);
+link.setAttribute(rel, stylesheet);
+link.setAttribute(type, text/css);
+link.setAttribute(charset, UTF-8);
+link.setAttribute(href, href);
+doc.querySelector(head).appendChild(link);
+}
+
 /**
  * Compiles the final HTML string output.
  * All sections are combined, plus two JavaScript blocks for the metadata.
@@ -242,6 +252,7 @@
 var doc = domino.createDocument();
 var body = doc.querySelector('body');
 
+addStyleLink(doc, /static/styles.css); // Light mode hard-coded for now
 body.appendChild(embedJsScriptInHtml(doc, app_meta1, meta1));
 
 for (var idx = 0; idx  sections.length; idx++) {
diff --git a/static/night.css b/static/night.css
new file mode 100644
index 000..095c9e8
--- /dev/null
+++ b/static/night.css
@@ -0,0 +1,46 @@
+/* Same specificity as in MFE/less/content/hacks.less */
+/* Same specificity as in MFE/less/content/hacks.less */
+body {
+  color: #999;
+  background: #000;
+}
+a {
+  color: #2B6FB2;
+}
+a.external {
+  background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9AXNSR0IArs4c6QRnQU1BAACxjwv8YQUJcEhZcwAADsMAAA7DAcdvqGQadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAGJJREFUKFN1jdENgCAMBYmJn47Bak7DZrhTpc/XIm34OAjXA4qIgHI/dSBbLGTcOKjBryFlinGmjDQGiOF0MQkxI3v5wq6L38qR7SnsAx8ul37igPjAd+o5Oz2MRA+xY4ZSXuaW6wYouOLpAElFTkSuQmCC);
+  background-image: 
url(http://127.0.0.1:8080/w/extensions/MobileApp/styles/../images/external-link-ltr.png?2015-02-03T18:38:20Z)!ie;
+}
+img {
+  background: #fff;
+}
+.stable .content table.infobox {
+  background: #000;
+}
+.content table td,
+.content table th,
+.content table.infobox th,
+.content table.infobox td {
+  border-color: rgba(128,128,128,0.12);
+}
+.app_table_container {
+  box-shadow: none;
+  border: 1px solid #202020;
+  background-color: #202020;
+}
+.app_table_collapsed_container {
+  background-color: #202020;
+}
+.app_table_collapsed_open {
+  border-radius: 0;
+}
+.app_table_collapse_close {
+  border-radius: 0;
+}
+.app_span_collapse_text {
+  color: #808080;
+}
+.app_table_collapsed_bottom {
+  background-color: #202020;
+  border-radius: 0;
+}
\ No newline at end of file
diff --git a/static/preview.css b/static/preview.css
new file mode 100644
index 000..5d190c8
--- /dev/null
+++ b/static/preview.css
@@ -0,0 +1,862 @@
+/* Fork of http://meyerweb.com/eric/tools/css/reset/
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+/* use -webkit prefix for older android browsers eg. nexus 1 */
+html,
+body,
+div,
+span,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+ins,
+em,
+img,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+input,
+textarea,
+button,
+select,
+audio,
+video {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+  background: none;
+}
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td {
+  font-size: 100%;
+}
+.beta *,
+.stable * {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+button {
+  border: none;
+  background-color: transparent;
+}
+body {
+  line-height: 1;
+  -webkit-tap-highlight-color: transparent;
+}
+input {
+  line-height: normal;
+}
+ol,
+ul {
+  list-style: none;
+}
+table {
+  border-collapse: collapse;
+}
+
+/* use -webkit prefix for older android browsers eg. nexus 1 */
+html {
+  -webkit-text-size-adjust: none;
+  font-size: 100%;
+}
+body {
+  font-family: Helvetica Neue, Helvetica, Nimbus Sans L, Arial, 
Liberation Sans, sans-serif;
+  line-height: 1.4;
+  color: #252525;
+  background: #fff;
+}
+.content {
+  line-height: 1.65;
+  margin: .8em 16px 0;
+  word-wrap: break-word;
+}
+@media all and (max-width: 280px) {
+  body {
+font-size: .8em;
+  }
+  .content {
+margin: 0 12px;
+  }
+}
+.nomobile {
+  display: none !important;
+}
+
+/* use -webkit prefix for older 

[MediaWiki-commits] [Gerrit] Add CSS normal style - change (mediawiki...mobileapps)

2015-03-31 Thread BearND (Code Review)
BearND has submitted this change and it was merged.

Change subject: Add CSS normal style
..


Add CSS normal style

(not night mode yet)

Change-Id: I2badde3134848d66dd1e7a77716f9a80be04bca5
---
M routes/mobileapp-page.js
A static/night.css
A static/preview.css
A static/styles.css
4 files changed, 1,929 insertions(+), 0 deletions(-)

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



diff --git a/routes/mobileapp-page.js b/routes/mobileapp-page.js
index 5a9c0ec..7253535 100644
--- a/routes/mobileapp-page.js
+++ b/routes/mobileapp-page.js
@@ -222,6 +222,16 @@
 elem.appendChild(child);
 }
 
+// from www/js/loader.js
+function addStyleLink(doc, href) {
+var link = doc.createElement(link);
+link.setAttribute(rel, stylesheet);
+link.setAttribute(type, text/css);
+link.setAttribute(charset, UTF-8);
+link.setAttribute(href, href);
+doc.querySelector(head).appendChild(link);
+}
+
 /**
  * Compiles the final HTML string output.
  * All sections are combined, plus two JavaScript blocks for the metadata.
@@ -242,6 +252,7 @@
 var doc = domino.createDocument();
 var body = doc.querySelector('body');
 
+addStyleLink(doc, /static/styles.css); // Light mode hard-coded for now
 body.appendChild(embedJsScriptInHtml(doc, app_meta1, meta1));
 
 for (var idx = 0; idx  sections.length; idx++) {
diff --git a/static/night.css b/static/night.css
new file mode 100644
index 000..095c9e8
--- /dev/null
+++ b/static/night.css
@@ -0,0 +1,46 @@
+/* Same specificity as in MFE/less/content/hacks.less */
+/* Same specificity as in MFE/less/content/hacks.less */
+body {
+  color: #999;
+  background: #000;
+}
+a {
+  color: #2B6FB2;
+}
+a.external {
+  background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9AXNSR0IArs4c6QRnQU1BAACxjwv8YQUJcEhZcwAADsMAAA7DAcdvqGQadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAGJJREFUKFN1jdENgCAMBYmJn47Bak7DZrhTpc/XIm34OAjXA4qIgHI/dSBbLGTcOKjBryFlinGmjDQGiOF0MQkxI3v5wq6L38qR7SnsAx8ul37igPjAd+o5Oz2MRA+xY4ZSXuaW6wYouOLpAElFTkSuQmCC);
+  background-image: 
url(http://127.0.0.1:8080/w/extensions/MobileApp/styles/../images/external-link-ltr.png?2015-02-03T18:38:20Z)!ie;
+}
+img {
+  background: #fff;
+}
+.stable .content table.infobox {
+  background: #000;
+}
+.content table td,
+.content table th,
+.content table.infobox th,
+.content table.infobox td {
+  border-color: rgba(128,128,128,0.12);
+}
+.app_table_container {
+  box-shadow: none;
+  border: 1px solid #202020;
+  background-color: #202020;
+}
+.app_table_collapsed_container {
+  background-color: #202020;
+}
+.app_table_collapsed_open {
+  border-radius: 0;
+}
+.app_table_collapse_close {
+  border-radius: 0;
+}
+.app_span_collapse_text {
+  color: #808080;
+}
+.app_table_collapsed_bottom {
+  background-color: #202020;
+  border-radius: 0;
+}
\ No newline at end of file
diff --git a/static/preview.css b/static/preview.css
new file mode 100644
index 000..5d190c8
--- /dev/null
+++ b/static/preview.css
@@ -0,0 +1,862 @@
+/* Fork of http://meyerweb.com/eric/tools/css/reset/
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+/* use -webkit prefix for older android browsers eg. nexus 1 */
+html,
+body,
+div,
+span,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+ins,
+em,
+img,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+input,
+textarea,
+button,
+select,
+audio,
+video {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+  background: none;
+}
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td {
+  font-size: 100%;
+}
+.beta *,
+.stable * {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+div#centralNotice {
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+button {
+  border: none;
+  background-color: transparent;
+}
+body {
+  line-height: 1;
+  -webkit-tap-highlight-color: transparent;
+}
+input {
+  line-height: normal;
+}
+ol,
+ul {
+  list-style: none;
+}
+table {
+  border-collapse: collapse;
+}
+
+/* use -webkit prefix for older android browsers eg. nexus 1 */
+html {
+  -webkit-text-size-adjust: none;
+  font-size: 100%;
+}
+body {
+  font-family: Helvetica Neue, Helvetica, Nimbus Sans L, Arial, 
Liberation Sans, sans-serif;
+  line-height: 1.4;
+  color: #252525;
+  background: #fff;
+}
+.content {
+  line-height: 1.65;
+  margin: .8em 16px 0;
+  word-wrap: break-word;
+}
+@media all and (max-width: 280px) {
+  body {
+font-size: .8em;
+  }
+  .content {
+margin: 0 12px;
+  }
+}
+.nomobile {
+  display: none !important;
+}
+
+/* use -webkit prefix for older android browsers eg. nexus 1 */
+.content .thumb {
+  margin: .6em 0;
+  /* 

[MediaWiki-commits] [Gerrit] Improve automatic adding of reference list - change (mediawiki...ContentTranslation)

2015-03-31 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Improve automatic adding of reference list
..

Improve automatic adding of reference list

* Handle the case of multiple reference lists in the page.
  For example, Notes and References
Example: enwiki:Hydrogen

* The reference list itself may not be the CX translation section
  if wrapped inside a section tag like divs

Example: enwiki:Emily+Warren+Roebling has reference list as section
while enwiki:Hydrogen has it wrapped

Change-Id: I807ba3510a76b7c186a1738f0b78d3cdd8eaa7e2
---
M modules/tools/ext.cx.tools.reference.js
1 file changed, 20 insertions(+), 6 deletions(-)


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

diff --git a/modules/tools/ext.cx.tools.reference.js 
b/modules/tools/ext.cx.tools.reference.js
index 13b34fc..3360de5 100644
--- a/modules/tools/ext.cx.tools.reference.js
+++ b/modules/tools/ext.cx.tools.reference.js
@@ -109,18 +109,32 @@
};
 
/**
-* Add the reference list, usually at the end of translation
+* Add the reference list(s), usually at the end of translation
 */
ReferenceCard.prototype.addReferenceList = function () {
-   var $referenceList;
+   var $referenceLists, $parentSection;
 
-   $referenceList = $( '[typeof*=mw:Extension/references]' );
+   // There can be multiple reference lists grouped for notes and 
references
+   // For example see enwiki:Hydrogen
+   $referenceLists = $( '[typeof*=mw:Extension/references]' );
 
-   if ( $referenceList.length === 1 ) {
-   // Only one reference list - means the target reference 
list not added yet.
-   mw.hook( 'mw.cx.translation.add' ).fire( 
$referenceList.parent().attr( 'id' ), 'click' );
+   if ( !$( '.cx-column--translation 
[typeof*=mw:Extension/references]' ).length ) {
+   // Target reference list not added yet.
+   $referenceLists.each( function ( key, referenceList ) {
+   var $referenceList = $( referenceList );
+
+   if ( $referenceList.parent().is( 
'.cx-column__content' ) ) {
+   // Reference list is the section,
+   $parentSection = $referenceList;
+   } else {
+   // Reference list not the section, it 
is wrapped inside.
+   $parentSection = 
$referenceList.parent();
+   }
+   mw.hook( 'mw.cx.translation.add' ).fire( 
$parentSection.attr( 'id' ), 'click' );
+   } );
}
};
+
/**
 * Start presenting the reference card
 * @param {string} referenceId The reference element Identifier.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I807ba3510a76b7c186a1738f0b78d3cdd8eaa7e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Combine the cleanup and template cleanup passes - change (mediawiki...parsoid)

2015-03-31 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Combine the cleanup and template cleanup passes
..

Combine the cleanup and template cleanup passes

 * The template cleanup pass wasn't having a affect on v2 output.

 * The blacklist changes are a little unclear. Not if it was a bug to
   stop processing the entire template when encountering a
   mw-reference-text class, or was the intention just that node, or all
   its children? Hopefully review can shed some light.

Change-Id: I4c6452e49563cf3923a5bb69485f1ea7d0c13e33
---
D lib/dom.cleanUpTemplates.js
M lib/dom.cleanup.js
M lib/dom.linter.js
M lib/mediawiki.DOMPostProcessor.js
M lib/mediawiki.DOMUtils.js
M tests/parserTests-blacklist.js
6 files changed, 223 insertions(+), 256 deletions(-)


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

diff --git a/lib/dom.cleanUpTemplates.js b/lib/dom.cleanUpTemplates.js
deleted file mode 100644
index e6d372d..000
--- a/lib/dom.cleanUpTemplates.js
+++ /dev/null
@@ -1,44 +0,0 @@
-use strict;
-
-var DU = require('./mediawiki.DOMUtils.js').DOMUtils;
-
-function stripEmptyElements(node, tplInfo, options) {
-   // Cannot delete if:
-   // * it is the first node since that carries the transclusion
-   //   information (typeof, data-mw). We could delete and migrate
-   //   the info over, but more pain than worth it. We can reconsider if
-   //   this ever becomes an issue.
-   // * it has any attributes.
-   if (!node.firstChild  node !== tplInfo.first 
-   node.nodeName in {'TR':1, 'LI':1}  node.attributes.length === 
0)
-   {
-   DU.deleteNode(node);
-   }
-}
-
-function removeDataParsoid(node, tplInfo, options) {
-   if (node !== tplInfo.first) {
-   var dp = DU.getDataParsoid(node);
-   // We can't remove data-parsoid from inside references text, 
as that's
-   // the only HTML representation we have left for it.
-   if (node.getAttribute('class') === mw-reference-text) {
-   tplInfo.done = true;
-   return;
-   }
-   // TODO: We can't remove dp from nodes with stx information
-   // right now, as the serializer needs that information to know 
which
-   // content model the text came from to emit the right newline 
separators.
-   // For example, both a\n\nb and pa/ppb/p both 
generate
-   // identical html but serialize to different wikitext.
-   if (!dp.stx) {
-   node.removeAttribute('data-parsoid');
-   }
-   }
-}
-
-if (typeof module === object) {
-   module.exports.stripEmptyElements =
-   DU.traverseTplOrExtNodes.bind(DU, stripEmptyElements);
-   module.exports.removeDataParsoid =
-   DU.traverseTplOrExtNodes.bind(DU, removeDataParsoid);
-}
diff --git a/lib/dom.cleanup.js b/lib/dom.cleanup.js
index 38f35fe..5d5bc4c 100644
--- a/lib/dom.cleanup.js
+++ b/lib/dom.cleanup.js
@@ -33,74 +33,115 @@
}
 }
 
-/**
- * Perform some final cleaup and save data-parsoid attributes on each node.
- */
-function cleanupAndSaveDataParsoid( env, node, atTopLevel ) {
-   if ( DU.isElt(node) ) {
-   var dp = DU.getDataParsoid( node );
-   if (dp) {
-   // Delete empty auto-inserted elements
-   var next = node.nextSibling;
-   if (dp.autoInsertedStart  dp.autoInsertedEnd 
-   !DU.isTplOrExtToplevelNode(node) 
-   (node.childNodes.length === 0 ||
-   node.childNodes.length === 1  
!DU.isElt(node.firstChild)  /^\s*$/.test(node.textContent)))
-   {
-   if (node.firstChild) {
-   // migrate the ws out
-   
node.parentNode.insertBefore(node.firstChild, node);
-   }
-   DU.deleteNode(node);
-   return next;
-   }
-
-   dp.tagId = undefined;
-
-   var validDataMW = 
!!Object.keys(DU.getDataMw(node)).length;
-   if ( !validDataMW ) {
-   // strip it
-   DU.setDataMw(node, undefined);
-   }
-
-   // Remove dp.src from elements that have valid data-mw 
and dsr. This
-   // should reduce data-parsoid bloat.
-   if (validDataMW  Util.isValidDSR(dp.dsr)) {
-   dp.src = undefined;
-   } else if 

[MediaWiki-commits] [Gerrit] Disable preferences save spam - change (mediawiki...hierator)

2015-03-31 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Disable preferences save spam
..

Disable preferences save spam

Change-Id: I53292cb13df942b833d6bc2fbf220fa79361f618
---
A src/hierator/DisabledPreferences.java
A src/hierator/DisabledPreferencesFactory.java
M src/hierator/HieratorServlet.java
3 files changed, 118 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/hierator 
refs/changes/91/201091/1

diff --git a/src/hierator/DisabledPreferences.java 
b/src/hierator/DisabledPreferences.java
new file mode 100644
index 000..0a5a66c
--- /dev/null
+++ b/src/hierator/DisabledPreferences.java
@@ -0,0 +1,75 @@
+package hierator;
+
+import java.util.prefs.AbstractPreferences;
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
+
+/**
+ * Copyright 2003-2011 Robert Slifka
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * A do-nothing Preferences implementation so that we can avoid the hassles
+ * of the JVM Preference implementations.
+ *
+ * @author Robert Slifka (robert.sli...@gmail.com)
+ */
+public class DisabledPreferences extends AbstractPreferences {
+
+public DisabledPreferences() {
+super(null, );
+}
+
+protected void putSpi(String key, String value) {
+
+}
+
+protected String getSpi(String key) {
+return null;
+}
+
+protected void removeSpi(String key) {
+
+}
+
+protected void removeNodeSpi() throws BackingStoreException {
+
+}
+
+protected String[] keysSpi() throws BackingStoreException {
+return new String[0];
+}
+
+protected String[] childrenNamesSpi()
+throws BackingStoreException {
+return new String[0];
+}
+
+protected AbstractPreferences childSpi(String name) {
+return null;
+}
+
+protected void syncSpi() throws BackingStoreException {
+
+}
+
+protected void flushSpi() throws BackingStoreException {
+
+}
+
+public Preferences node(String path) {
+return new DisabledPreferences();
+}
+}
+
+
diff --git a/src/hierator/DisabledPreferencesFactory.java 
b/src/hierator/DisabledPreferencesFactory.java
new file mode 100644
index 000..d7b8bf2
--- /dev/null
+++ b/src/hierator/DisabledPreferencesFactory.java
@@ -0,0 +1,36 @@
+package hierator;
+
+import java.util.prefs.PreferencesFactory;
+import java.util.prefs.Preferences;
+
+/**
+ * Copyright 2003-2011 Robert Slifka
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Returns do-nothing Preferences implementation.  We don't use this
+ * facility, so we want to avoid the hassles that come with the JVM's
+ * implementation.
+ *
+ * @author Robert Slifka (robert.sli...@gmail.com)
+ */
+public class DisabledPreferencesFactory implements PreferencesFactory {
+
+public Preferences systemRoot() {
+return new DisabledPreferences();
+}
+
+public Preferences userRoot() {
+return new DisabledPreferences();
+}
+}
diff --git a/src/hierator/HieratorServlet.java 
b/src/hierator/HieratorServlet.java
index 3cb0a06..a8be6f6 100644
--- a/src/hierator/HieratorServlet.java
+++ b/src/hierator/HieratorServlet.java
@@ -24,6 +24,13 @@
  */
 public HieratorServlet() {
 super();
+
+/**
+ * JSesh attempts to periodically save empty preferences. Disable 
their loading/saving using
+ * the code from http://allaboutbalance.com/articles/disableprefs/
+ */
+System.setProperty(java.util.prefs.PreferencesFactory, 
hierator.DisabledPreferencesFactory);
+
 routing.put(png, new PngRenderer());
 routing.put(svg, new SvgRenderer());
 routing.put(list, new HieroglyphLister());

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] tests: Remove mention of phpcs-lenient/phpcs-strict - change (integration/config)

2015-03-31 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: tests: Remove mention of phpcs-lenient/phpcs-strict
..


tests: Remove mention of phpcs-lenient/phpcs-strict

No longer exist as of a477214.

Change-Id: I58aadff980312e22fc10fbb444711c831ca97486
---
M tests/test_zuul_layout.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py
index 1500edf..be6c7bd 100644
--- a/tests/test_zuul_layout.py
+++ b/tests/test_zuul_layout.py
@@ -177,7 +177,7 @@
 '(pp|erb)lint-HEAD',
 '.*-(tabs|typos)',
 '.*-pep8',
-'.*-phpcs(-lenient|-strict|)-HEAD',
+'.*-phpcs-HEAD',
 '.*-puppet-validate',
 '.*-puppetlint-(strict|lenient)',
 '.*-pyflakes',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58aadff980312e22fc10fbb444711c831ca97486
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Allow gather-hidelist to be used in global user groups - change (operations/mediawiki-config)

2015-03-31 Thread Jalexander (Code Review)
Jalexander has uploaded a new change for review.

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

Change subject: Allow gather-hidelist to be used in global user groups
..

Allow gather-hidelist to be used in global user groups

Bug: T94652
Change-Id: I77ec5a14ff317d14f27c8fbe9fb23019197961cb
---
M wmf-config/CommonSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 59a33c7..637a459 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3028,6 +3028,9 @@
 
 $wgImgAuthDetails = true;
 
+// Enable gather-hidelist for global user groups - JRA 4-1-2015 T94652
+$wgAvailableRights[] = 'gather-hidelist';
+
 if ( file_exists( $wmfConfigDir/extension-list-$wmfVersionNumber ) ) {
// Version specific extension-list files
//

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77ec5a14ff317d14f27c8fbe9fb23019197961cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jalexander jalexan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] tests: Remove mention of phpcs-lenient/phpcs-strict - change (integration/config)

2015-03-31 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: tests: Remove mention of phpcs-lenient/phpcs-strict
..

tests: Remove mention of phpcs-lenient/phpcs-strict

No longer exist as of a477214.

Change-Id: I58aadff980312e22fc10fbb444711c831ca97486
---
M tests/test_zuul_layout.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/94/201094/1

diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py
index 1500edf..be6c7bd 100644
--- a/tests/test_zuul_layout.py
+++ b/tests/test_zuul_layout.py
@@ -177,7 +177,7 @@
 '(pp|erb)lint-HEAD',
 '.*-(tabs|typos)',
 '.*-pep8',
-'.*-phpcs(-lenient|-strict|)-HEAD',
+'.*-phpcs-HEAD',
 '.*-puppet-validate',
 '.*-puppetlint-(strict|lenient)',
 '.*-pyflakes',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58aadff980312e22fc10fbb444711c831ca97486
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] tools: Make webservice2 block for start / stop - change (operations/puppet)

2015-03-31 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Make webservice2 block for start / stop
..

tools: Make webservice2 block for start / stop

This matches the old webservice behavior, of waiting printing
...s while your webservice is stopped or started.

Bug: T93334
Change-Id: I729b979dead8a07ff78eddf08d96f0aea8679161
---
M modules/toollabs/files/webservice2
1 file changed, 86 insertions(+), 83 deletions(-)


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

diff --git a/modules/toollabs/files/webservice2 
b/modules/toollabs/files/webservice2
index 4f3ae0a..640fbcf 100644
--- a/modules/toollabs/files/webservice2
+++ b/modules/toollabs/files/webservice2
@@ -1,7 +1,9 @@
 #!/usr/bin/python
 import os
+import sys
 import pwd
 import re
+import time
 import subprocess
 import argparse
 import xml.etree.ElementTree as ET
@@ -51,49 +53,25 @@
 subprocess.check_call(command, stdout=open(os.devnull, 'wb'))
 
 
-def stop_job(job_id):
+def stop_job(job):
 
 Deletes a job with given job id from the grid
 
 :param job_id: Job id to delete
 
+job_id = job.findtext('.//JB_job_number')
 command = ['qdel', job_id]
 subprocess.check_call(command, stdout=open(os.devnull, 'wb'))
 
 
-def qstat_xml(*args):
+def get_job_xml(job_name):
 
-Executes a qstat call and returns the output in XML format
+Gets job status xml of a particular job with a particular name in a 
particular queue
 
-:param args: Arguments to the qstat call
-:return: String response in XML form of the qstat output
-
-qstat_args = ['qstat'] + list(args) + ['-xml']
-output = subprocess.check_output(qstat_args)
-return output
-
-
-def xpath_string(string, xpath):
-
-Parses given string as XML, returns single string value
-produced by the given xpath query
-
-:param string: String to parse as XML
-:param xpath: XPath query to run over the parsed XML
-:return: Single string that is the result of the XPath query
-
-xml = ET.fromstring(string)
-return xml.findtext(xpath)
-
-def get_job_id(queue_name, job_name):
-
-Gets job id of a particular job with a particular name in a particular 
queue
-
-:param queue_name: Queue name to look in
 :param job_name:  Job name to look for
-:return: Job id if the job is found, None otherwise
+:return: ET xml object if the job is found, None otherwise
 
-output = qstat_xml('-q', queue_name, '-j', job_name)
+output = subprocess.check_output(['qstat', '-xml'])
 
 # Fix XML.
 output = re.sub('JATASK:[^]*', 'jatask', output)
@@ -104,23 +82,42 @@
 # If the job is not found.
 if 'unknown_jobs' in output and '' in output:
 return None
-return xpath_string(output, './/JB_job_number')
+xml = ET.fromstring(output)
+job_name_node = xml.find('.//job_list[JB_name=%s]' % job_name)
+return job_name_node
 
-def wait_for_job(queue_name, job_name, up=True):
+
+def wait_for_job_running(job_name):
 
-Waits for a job to be either up (or down), printing .s while waiting
+Waits for a job to be either up, printing .s while waiting
 
-:param queue_name: Queue name to look for the job in
 :param job_name: Name of job to look for
-:param up: True if we want to wait for the job to be up, false for down
-:return returns the job id, if up=True
 
 while True:
-jid = get_job_id(queue_name, job_name)
-if jid is None == up:
-print '.',
+job = get_job_xml(job_name)
+state = job.findtext('.//state') if job is not None else None
+if job is None or state != 'r':
+sys.stdout.write('.')
+sys.stdout.flush()
+time.sleep(1)
 else:
-return jid
+break
+
+
+def wait_for_job_stopped(job_name):
+
+Waits for a job to be either down, printing .s while waiting
+
+:param job_name: Name of job to look for
+
+while True:
+job = get_job_xml(job_name)
+if job is not None:
+sys.stdout.write('.')
+sys.stdout.flush()
+time.sleep(1)
+else:
+break
 
 # Setup constants that we would need later on
 PREFIX = read_file('/etc/wmflabs-project', 'tools').strip() # project name
@@ -139,51 +136,57 @@
 ), '4g'
 ).strip()
 
-parser = argparse.ArgumentParser()
-parser.add_argument('server', help='Type of server to start',
-choices=['lighttpd', 'tomcat', 'uwsgi-python', 'nodejs'], 
default='lighttpd', nargs='?')
-parser.add_argument('action', help='Action to perform',
-choices=['stop', 'start', 'restart', 'status'])
-parser.add_argument('--release', help='Which Ubuntu release the node running 
the webservice sould be on',
-choices=['precise', 'trusty'], 

  1   2   3   4   5   6   >