[MediaWiki-commits] [Gerrit] Add Page.isFlowPage to check whether Flow is enabled on a gi... - change (pywikibot/core)

2014-05-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add Page.isFlowPage to check whether Flow is enabled on a given 
page
..

Add Page.isFlowPage to check whether Flow is enabled on a given page

Also adds Site.loadflowinfo to query the API

Bug: 65119
Change-Id: If830e022841918afe7866509380daddaafd036a4
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/site.py
3 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/132767/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 1a85255..ea462e2 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1055,6 +1055,9 @@
 if pageprops in pagedict:
 page._pageprops = pagedict['pageprops']
 
+if flowinfo in pagedict:
+page._flowinfo = pagedict['flowinfo']['flow']
+
 
 if __name__ == __main__:
 from pywikibot import Site, logging
diff --git a/pywikibot/page.py b/pywikibot/page.py
index fe54ef6..c0ad9fb 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1579,6 +1579,15 @@
  % (self.title(asLink=True), error.message))
 return False
 
+def isFlowPage(self):
+Whether the given title is a Flow page
+if not self.site.hasExtension('Flow', False):
+return False
+if not hasattr(self, '_flowinfo'):
+self.site.loadflowinfo(self)
+return 'enabled' in self._flowinfo
+
+
 # ### DEPRECATED METHODS 
 
 @deprecated(Site.encoding())
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 5e54f9f..583df32 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1299,6 +1299,24 @@
 return (pageitem['imageinfo']
 if history else pageitem['imageinfo'][0])
 
+def loadflowinfo(self, page):
+
+Loads Flow-related information about a given page
+Assumes that the Flow extension is installed
+
+title = page.title(withSection=False)
+query = self._generator(api.PropertyGenerator,
+type_arg=flowinfo,
+titles=title.encode(self.encoding()),
+)
+for pageitem in query:
+if not self.sametitle(pageitem['title'], title):
+pywikibot.warning(
+uloadflowinfo: Query on %s returned data on '%s'
+% (page, pageitem['title']))
+continue
+api.update_page(page, pageitem)
+
 def page_exists(self, page):
 Return True if and only if page is an existing page on site.
 if not hasattr(page, _pageid):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If830e022841918afe7866509380daddaafd036a4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Follow-up Id401d973: mw.Target: Make the Cite label in the... - change (mediawiki...VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Follow-up Id401d973: mw.Target: Make the Cite label in the 
toolbar translatable
..

Follow-up Id401d973: mw.Target: Make the Cite label in the toolbar 
translatable

Also, re-alpha-sort the ve-mw i18n files.

Change-Id: Id3fc7894b3774042c5eda877c9edf55ef4941ebf
---
M VisualEditor.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/ve.init.mw.Target.js
4 files changed, 18 insertions(+), 15 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 626aa2e..74d6ec3 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -697,6 +697,7 @@
'visualeditor-toolbar-insert',
'visualeditor-toolbar-savedialog',
'visualeditor-toolbar-style-tooltip',
+   'visualeditor-toolbar-cite-label',
'visualeditor-viewpage-savewarning',
'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 57647e4..3d562a0 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -26,19 +26,19 @@
 visualeditor-beta-label: beta,
 visualeditor-beta-warning: VisualEditor is in 'beta'. You may encounter 
software issues, and you may not be able to edit parts of the page. Click 
\{{int:visualeditor-ca-editsource}}\ to switch to wikitext mode – unsaved 
changes will be lost.,
 visualeditor-browserwarning: You are using a browser which is not 
officially supported by VisualEditor.,
+visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-createsource: Create source,
+visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
 visualeditor-ca-editsource: Edit source,
 visualeditor-ca-editsource-section: edit source,
-visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
-visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-ve-create: VisualEditor,
 visualeditor-ca-ve-edit: VisualEditor,
 visualeditor-ca-ve-edit-section: VisualEditor,
 visualeditor-categories-tool: Categories,
-visualeditor-cite-tool-name-web: Website,
 visualeditor-cite-tool-name-book: Book,
-visualeditor-cite-tool-name-news: Newspaper,
 visualeditor-cite-tool-name-journal: Journal,
+visualeditor-cite-tool-name-news: Newspaper,
+visualeditor-cite-tool-name-web: Website,
 visualeditor-desc: Visual editor for MediaWiki,
 visualeditor-descriptionpagelink: Project:VisualEditor,
 visualeditor-dialog-beta-welcome-action-continue: Continue,
@@ -75,8 +75,8 @@
 visualeditor-dialog-meta-categories-data-label: Categories,
 visualeditor-dialog-meta-categories-defaultsort-label: Sort this page 
by default as,
 visualeditor-dialog-meta-categories-hidden: This category is set not to 
show on pages to which it is added.,
-visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-hiddencategorieslabel: Hidden 
categories,
+visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-movecategorylabel: Move this 
category here,
 visualeditor-dialog-meta-categories-input-newcategorylabel: New 
category,
 visualeditor-dialog-meta-categories-input-placeholder: Add a category,
@@ -100,8 +100,8 @@
 visualeditor-dialog-meta-settings-newsectioneditlink-force: Yes,
 visualeditor-dialog-meta-settings-newsectioneditlink-label: Show a tab 
on this page to add a new section,
 visualeditor-dialog-meta-settings-nocontentconvert-label: Don't convert 
content between language variants,
-visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-noeditsection-label: Disable the edit 
links next to each heading on this page.,
+visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-notitleconvert-label: Don't convert 
title between language variants,
 visualeditor-dialog-meta-settings-redirect-label: Redirect this page 
to,
 visualeditor-dialog-meta-settings-redirect-placeholder: Target page for 
redirection,
@@ -173,7 +173,6 @@
 visualeditor-linkinspector-suggest-redirect-page: {{PLURAL:$1|Redirect 
page|Redirect pages}},
 visualeditor-loadwarning: Error loading data from server: $1. Would you 
like to retry?,
 visualeditor-loadwarning-token: Error loading edit token from server: 
$1. Would you like to retry?,
-

[MediaWiki-commits] [Gerrit] Follow-up Id401d973: mw.Target: Make the Cite label in the... - change (mediawiki...VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Follow-up Id401d973: mw.Target: Make the Cite label in the 
toolbar translatable
..

Follow-up Id401d973: mw.Target: Make the Cite label in the toolbar 
translatable

Also, re-alpha-sort the ve-mw i18n files.

Change-Id: Id3fc7894b3774042c5eda877c9edf55ef4941ebf
---
M VisualEditor.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/ve.init.mw.Target.js
4 files changed, 18 insertions(+), 15 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 37bb426..dfda8a0 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -696,6 +696,7 @@
'visualeditor-toolbar-insert',
'visualeditor-toolbar-savedialog',
'visualeditor-toolbar-style-tooltip',
+   'visualeditor-toolbar-cite-label',
'visualeditor-viewpage-savewarning',
'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index f9a1787..c5ae225 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -26,19 +26,19 @@
 visualeditor-beta-label: beta,
 visualeditor-beta-warning: VisualEditor is in 'beta'. You may encounter 
software issues, and you may not be able to edit parts of the page. Click 
\{{int:visualeditor-ca-editsource}}\ to switch to wikitext mode – unsaved 
changes will be lost.,
 visualeditor-browserwarning: You are using a browser which is not 
officially supported by VisualEditor.,
+visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-createsource: Create source,
+visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
 visualeditor-ca-editsource: Edit source,
 visualeditor-ca-editsource-section: edit source,
-visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
-visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-ve-create: VisualEditor,
 visualeditor-ca-ve-edit: VisualEditor,
 visualeditor-ca-ve-edit-section: VisualEditor,
 visualeditor-categories-tool: Categories,
-visualeditor-cite-tool-name-web: Website,
 visualeditor-cite-tool-name-book: Book,
-visualeditor-cite-tool-name-news: Newspaper,
 visualeditor-cite-tool-name-journal: Journal,
+visualeditor-cite-tool-name-news: Newspaper,
+visualeditor-cite-tool-name-web: Website,
 visualeditor-desc: Visual editor for MediaWiki,
 visualeditor-descriptionpagelink: Project:VisualEditor,
 visualeditor-dialog-beta-welcome-action-continue: Continue,
@@ -75,8 +75,8 @@
 visualeditor-dialog-meta-categories-data-label: Categories,
 visualeditor-dialog-meta-categories-defaultsort-label: Sort this page 
by default as,
 visualeditor-dialog-meta-categories-hidden: This category is set not to 
show on pages to which it is added.,
-visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-hiddencategorieslabel: Hidden 
categories,
+visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-movecategorylabel: Move this 
category here,
 visualeditor-dialog-meta-categories-input-newcategorylabel: New 
category,
 visualeditor-dialog-meta-categories-input-placeholder: Add a category,
@@ -100,8 +100,8 @@
 visualeditor-dialog-meta-settings-newsectioneditlink-force: Yes,
 visualeditor-dialog-meta-settings-newsectioneditlink-label: Show a tab 
on this page to add a new section,
 visualeditor-dialog-meta-settings-nocontentconvert-label: Don't convert 
content between language variants,
-visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-noeditsection-label: Disable the edit 
links next to each heading on this page.,
+visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-notitleconvert-label: Don't convert 
title between language variants,
 visualeditor-dialog-meta-settings-redirect-label: Redirect this page 
to,
 visualeditor-dialog-meta-settings-redirect-placeholder: Target page for 
redirection,
@@ -173,7 +173,6 @@
 visualeditor-linkinspector-suggest-redirect-page: {{PLURAL:$1|Redirect 
page|Redirect pages}},
 visualeditor-loadwarning: Error loading data from server: $1. Would you 
like to retry?,
 visualeditor-loadwarning-token: Error loading edit token from server: 
$1. Would you like to retry?,
-

[MediaWiki-commits] [Gerrit] Fix missing i18n for 'auto' language label - change (VisualEditor/VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Fix missing i18n for 'auto' language label
..

Fix missing i18n for 'auto' language label

Tsk.

Change-Id: I48ff51af9325203f72462dc77358e6e303508fc9
---
M modules/ve/i18n/en.json
M modules/ve/i18n/qqq.json
M modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
3 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/68/132768/1

diff --git a/modules/ve/i18n/en.json b/modules/ve/i18n/en.json
index 3932946..73e447d 100644
--- a/modules/ve/i18n/en.json
+++ b/modules/ve/i18n/en.json
@@ -38,6 +38,7 @@
 visualeditor-dialog-error: Something went wrong…,
 visualeditor-dialog-error-dismiss: Go back,
 visualeditor-dialog-command-help-title: Keyboard shortcuts,
+visualeditor-dialog-language-auto-direction: Auto,
 visualeditor-dialog-language-search-title: Select language,
 visualeditor-dimensionswidget-px: px,
 visualeditor-dimensionswidget-times: ×,
diff --git a/modules/ve/i18n/qqq.json b/modules/ve/i18n/qqq.json
index 6fbbd85..2e03d51 100644
--- a/modules/ve/i18n/qqq.json
+++ b/modules/ve/i18n/qqq.json
@@ -41,6 +41,7 @@
visualeditor-dialog-error: Title text in a dialog error screen,
visualeditor-dialog-error-dismiss: Label text for button to dismiss 
an error message in a dialog.\n{{Identical|Go back}},
visualeditor-dialog-command-help-title: Title for keyboard shortcuts 
help dialog.\n{{Identical|Keyboard shortcut}},
+visualeditor-dialog-language-auto-direction: Label text for button to 
make language direction automatic.,
visualeditor-dialog-language-search-title: Title for language search 
dialog,
visualeditor-dimensionswidget-px: {{optional}}\nLabel for the 
dimensions properties denoting pixel units.,
visualeditor-dimensionswidget-times: {{optional}}\nLabel for the 
dimensions properties denoting 'by', as in width x height.,
diff --git a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
index df40e48..818cd26 100644
--- a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
@@ -36,7 +36,7 @@
'classes': [ 've-ui-languageInputWidget-directionSelect' ],
} ).addItems( [
new OO.ui.ButtonOptionWidget( 'rtl', { '$': this.$, 'icon': 
'text-dir-rtl' } ),
-   new OO.ui.ButtonOptionWidget( null, { '$': this.$, 'label': 
'Auto' } ),
+   new OO.ui.ButtonOptionWidget( null, { '$': this.$, 'label': 
'text-dir-auto' } ),
new OO.ui.ButtonOptionWidget( 'ltr', { '$': this.$, 'icon': 
'text-dir-ltr' } )
] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48ff51af9325203f72462dc77358e6e303508fc9
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 80fc16a..b84bced - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 80fc16a..b84bced
..

Syncronize VisualEditor: 80fc16a..b84bced

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


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

diff --git a/VisualEditor b/VisualEditor
index 80fc16a..b84bced 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 80fc16a57e3ce48b2fdae5b375c86346808edcf6
+Subproject commit b84bceda7ae8148713105754400eb8d718f87eaa

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfb4ead4afbb1ccb8a2ecbf5a2a0aa4a87078987
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] Follow-up Id401d973: mw.Target: Make the Cite label in the... - change (mediawiki...VisualEditor)

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

Change subject: Follow-up Id401d973: mw.Target: Make the Cite label in the 
toolbar translatable
..


Follow-up Id401d973: mw.Target: Make the Cite label in the toolbar 
translatable

Also, re-alpha-sort the ve-mw i18n files.

Change-Id: Id3fc7894b3774042c5eda877c9edf55ef4941ebf
---
M VisualEditor.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/ve.init.mw.Target.js
4 files changed, 18 insertions(+), 15 deletions(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index 626aa2e..74d6ec3 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -697,6 +697,7 @@
'visualeditor-toolbar-insert',
'visualeditor-toolbar-savedialog',
'visualeditor-toolbar-style-tooltip',
+   'visualeditor-toolbar-cite-label',
'visualeditor-viewpage-savewarning',
'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 57647e4..3d562a0 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -26,19 +26,19 @@
 visualeditor-beta-label: beta,
 visualeditor-beta-warning: VisualEditor is in 'beta'. You may encounter 
software issues, and you may not be able to edit parts of the page. Click 
\{{int:visualeditor-ca-editsource}}\ to switch to wikitext mode – unsaved 
changes will be lost.,
 visualeditor-browserwarning: You are using a browser which is not 
officially supported by VisualEditor.,
+visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-createsource: Create source,
+visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
 visualeditor-ca-editsource: Edit source,
 visualeditor-ca-editsource-section: edit source,
-visualeditor-ca-editlocaldescriptionsource: Edit local description 
source,
-visualeditor-ca-createlocaldescriptionsource: Add local description 
source,
 visualeditor-ca-ve-create: VisualEditor,
 visualeditor-ca-ve-edit: VisualEditor,
 visualeditor-ca-ve-edit-section: VisualEditor,
 visualeditor-categories-tool: Categories,
-visualeditor-cite-tool-name-web: Website,
 visualeditor-cite-tool-name-book: Book,
-visualeditor-cite-tool-name-news: Newspaper,
 visualeditor-cite-tool-name-journal: Journal,
+visualeditor-cite-tool-name-news: Newspaper,
+visualeditor-cite-tool-name-web: Website,
 visualeditor-desc: Visual editor for MediaWiki,
 visualeditor-descriptionpagelink: Project:VisualEditor,
 visualeditor-dialog-beta-welcome-action-continue: Continue,
@@ -75,8 +75,8 @@
 visualeditor-dialog-meta-categories-data-label: Categories,
 visualeditor-dialog-meta-categories-defaultsort-label: Sort this page 
by default as,
 visualeditor-dialog-meta-categories-hidden: This category is set not to 
show on pages to which it is added.,
-visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-hiddencategorieslabel: Hidden 
categories,
+visualeditor-dialog-meta-categories-input-matchingcategorieslabel: 
Matching categories,
 visualeditor-dialog-meta-categories-input-movecategorylabel: Move this 
category here,
 visualeditor-dialog-meta-categories-input-newcategorylabel: New 
category,
 visualeditor-dialog-meta-categories-input-placeholder: Add a category,
@@ -100,8 +100,8 @@
 visualeditor-dialog-meta-settings-newsectioneditlink-force: Yes,
 visualeditor-dialog-meta-settings-newsectioneditlink-label: Show a tab 
on this page to add a new section,
 visualeditor-dialog-meta-settings-nocontentconvert-label: Don't convert 
content between language variants,
-visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-noeditsection-label: Disable the edit 
links next to each heading on this page.,
+visualeditor-dialog-meta-settings-nogallery-label: Disable gallery,
 visualeditor-dialog-meta-settings-notitleconvert-label: Don't convert 
title between language variants,
 visualeditor-dialog-meta-settings-redirect-label: Redirect this page 
to,
 visualeditor-dialog-meta-settings-redirect-placeholder: Target page for 
redirection,
@@ -173,7 +173,6 @@
 visualeditor-linkinspector-suggest-redirect-page: {{PLURAL:$1|Redirect 
page|Redirect pages}},
 visualeditor-loadwarning: Error loading data from server: $1. Would you 
like to retry?,
 visualeditor-loadwarning-token: Error loading edit token from server: 
$1. Would you like to retry?,
-visualeditor-timeout:It looks like full editing is currently 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 80fc16a..b84bced - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 80fc16a..b84bced
..


Syncronize VisualEditor: 80fc16a..b84bced

Change-Id: Icfb4ead4afbb1ccb8a2ecbf5a2a0aa4a87078987
---
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 80fc16a..b84bced 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 80fc16a57e3ce48b2fdae5b375c86346808edcf6
+Subproject commit b84bceda7ae8148713105754400eb8d718f87eaa

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfb4ead4afbb1ccb8a2ecbf5a2a0aa4a87078987
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] Make citation tools' compatibility check use normalized titles - change (mediawiki...VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Make citation tools' compatibility check use normalized titles
..

Make citation tools' compatibility check use normalized titles

Greatly enhance the functionality of ve.dm.MWTransclusionNode#isSingleTemplate
and actually use it places.

Use mw.Title to normalize titles, accounting for case differences and
spaces vs underscores. Also allow an array of template names to
be specified.

Use isSingleTemplate() in the transclusion and citation dialog tools,
which were duplicating this logic. Also document the .static.template
properties.

Without this, the citation tool will appear for a reference using
{{Cite news}}, but not for one using {{cite news}} or {{Cite_news}}.

Change-Id: I18d2bb1b22a5ab269694ad0818b1bb326ef8d1fd
(cherry picked from commit a15fa5a17cb9c44fca25dfda5a84783c159215d0)
---
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
M modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
M modules/ve-mw/ui/tools/ve.ui.MWTransclusionDialogTool.js
3 files changed, 48 insertions(+), 17 deletions(-)


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

diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
index 746113a..7e52d0b 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
@@ -5,6 +5,8 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+/*global mw*/
+
 /**
  * DataModel MediaWiki transclusion node.
  *
@@ -230,13 +232,31 @@
 /**
  * Check if transclusion contains only a single template.
  *
- * @param {string} [template] Name of single template, omit to allow any 
template name
- * @return {boolean} Transclusion only contains a single template
+ * @param {string|string[]} [templates] Names of templates to allow, omit to 
allow any template name
+ * @return {boolean} Transclusion only contains a single template, which is 
one of the ones in templates
  */
-ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( template ) {
-   var partsList = this.getPartsList();
-   return partsList.length === 1 
-   ( template === undefined || partsList[0].template === template 
);
+ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( templates ) {
+   function normalizeTitle( name ) {
+   var title = mw.Title.newFromText( name );
+   return title ? title.getPrefixedText() : name;
+   }
+
+   var i, len, partsList = this.getPartsList();
+   if ( partsList.length !== 1 ) {
+   return false;
+   }
+   if ( templates === undefined ) {
+   return true;
+   }
+   if ( typeof templates === 'string' ) {
+   templates = [ templates ];
+   }
+   for ( i = 0, len = templates.length; i  len; i++ ) {
+   if ( normalizeTitle( partsList[0].template ) === 
normalizeTitle( templates[i] ) ) {
+   return true;
+   }
+   }
+   return false;
 };
 
 /**
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
index f0ae1e4..03cd6af 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
@@ -28,11 +28,18 @@
 
 ve.ui.MWCitationDialogTool.static.group = 'cite';
 
-ve.ui.MWCitationDialogTool.static.template = null;
-
 ve.ui.MWCitationDialogTool.static.modelClasses = [ ve.dm.MWReferenceNode ];
 
 ve.ui.MWCitationDialogTool.static.requiresRange = true;
+
+/**
+ * Only display tool for single-template transclusions of these templates.
+ *
+ * @property {string|string[]|null}
+ * @static
+ * @inheritable
+ */
+ve.ui.MWCitationDialogTool.static.template = null;
 
 /* Methods */
 
@@ -40,7 +47,7 @@
  * @inheritdoc
  */
 ve.ui.MWCitationDialogTool.static.isCompatibleWith = function ( model ) {
-   var internalItem, branches, leaves, partsList,
+   var internalItem, branches, leaves,
compatible = 
ve.ui.MWCitationDialogTool.super.static.isCompatibleWith.call( this, model );
 
if ( compatible  this.template ) {
@@ -51,9 +58,7 @@
if ( branches.length === 1  branches[0].canContainContent() ) 
{
leaves = branches[0].getChildren();
if ( leaves.length === 1  leaves[0] instanceof 
ve.dm.MWTransclusionNode ) {
-   partsList = leaves[0].getPartsList();
-   return partsList.length === 1 
-   partsList[0].template === this.template;
+   return leaves[0].isSingleTemplate( 
this.template );
}
}

[MediaWiki-commits] [Gerrit] Make citation tools' compatibility check use normalized titles - change (mediawiki...VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Make citation tools' compatibility check use normalized titles
..

Make citation tools' compatibility check use normalized titles

Greatly enhance the functionality of ve.dm.MWTransclusionNode#isSingleTemplate
and actually use it places.

Use mw.Title to normalize titles, accounting for case differences and
spaces vs underscores. Also allow an array of template names to
be specified.

Use isSingleTemplate() in the transclusion and citation dialog tools,
which were duplicating this logic. Also document the .static.template
properties.

Without this, the citation tool will appear for a reference using
{{Cite news}}, but not for one using {{cite news}} or {{Cite_news}}.

Change-Id: I18d2bb1b22a5ab269694ad0818b1bb326ef8d1fd
(cherry picked from commit a15fa5a17cb9c44fca25dfda5a84783c159215d0)
---
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
M modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
M modules/ve-mw/ui/tools/ve.ui.MWTransclusionDialogTool.js
3 files changed, 48 insertions(+), 17 deletions(-)


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

diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
index 746113a..7e52d0b 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
@@ -5,6 +5,8 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+/*global mw*/
+
 /**
  * DataModel MediaWiki transclusion node.
  *
@@ -230,13 +232,31 @@
 /**
  * Check if transclusion contains only a single template.
  *
- * @param {string} [template] Name of single template, omit to allow any 
template name
- * @return {boolean} Transclusion only contains a single template
+ * @param {string|string[]} [templates] Names of templates to allow, omit to 
allow any template name
+ * @return {boolean} Transclusion only contains a single template, which is 
one of the ones in templates
  */
-ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( template ) {
-   var partsList = this.getPartsList();
-   return partsList.length === 1 
-   ( template === undefined || partsList[0].template === template 
);
+ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( templates ) {
+   function normalizeTitle( name ) {
+   var title = mw.Title.newFromText( name );
+   return title ? title.getPrefixedText() : name;
+   }
+
+   var i, len, partsList = this.getPartsList();
+   if ( partsList.length !== 1 ) {
+   return false;
+   }
+   if ( templates === undefined ) {
+   return true;
+   }
+   if ( typeof templates === 'string' ) {
+   templates = [ templates ];
+   }
+   for ( i = 0, len = templates.length; i  len; i++ ) {
+   if ( normalizeTitle( partsList[0].template ) === 
normalizeTitle( templates[i] ) ) {
+   return true;
+   }
+   }
+   return false;
 };
 
 /**
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
index f0ae1e4..03cd6af 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
@@ -28,11 +28,18 @@
 
 ve.ui.MWCitationDialogTool.static.group = 'cite';
 
-ve.ui.MWCitationDialogTool.static.template = null;
-
 ve.ui.MWCitationDialogTool.static.modelClasses = [ ve.dm.MWReferenceNode ];
 
 ve.ui.MWCitationDialogTool.static.requiresRange = true;
+
+/**
+ * Only display tool for single-template transclusions of these templates.
+ *
+ * @property {string|string[]|null}
+ * @static
+ * @inheritable
+ */
+ve.ui.MWCitationDialogTool.static.template = null;
 
 /* Methods */
 
@@ -40,7 +47,7 @@
  * @inheritdoc
  */
 ve.ui.MWCitationDialogTool.static.isCompatibleWith = function ( model ) {
-   var internalItem, branches, leaves, partsList,
+   var internalItem, branches, leaves,
compatible = 
ve.ui.MWCitationDialogTool.super.static.isCompatibleWith.call( this, model );
 
if ( compatible  this.template ) {
@@ -51,9 +58,7 @@
if ( branches.length === 1  branches[0].canContainContent() ) 
{
leaves = branches[0].getChildren();
if ( leaves.length === 1  leaves[0] instanceof 
ve.dm.MWTransclusionNode ) {
-   partsList = leaves[0].getPartsList();
-   return partsList.length === 1 
-   partsList[0].template === this.template;
+   return leaves[0].isSingleTemplate( 
this.template );
}
}

[MediaWiki-commits] [Gerrit] Link to www.mediawiki.org - change (pywikibot/core)

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

Change subject: Link to www.mediawiki.org
..


Link to www.mediawiki.org

Not including the www has some weird issues like bug 31369.

Change-Id: I3c981256e58b11f663b79d532f25b1ce1272b309
---
M setup.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/setup.py b/setup.py
index ffefc78..207fa25 100644
--- a/setup.py
+++ b/setup.py
@@ -72,7 +72,7 @@
 dependency_links=[
 
'https://git.wikimedia.org/zip/?r=pywikibot/externals/httplib2.gitformat=gz#egg=httplib2-0.8-pywikibot1'
 ],
-url='https://mediawiki.org/wiki/Pywikibot',
+url='https://www.mediawiki.org/wiki/Pywikibot',
 
download_url='https://github.com/wikimedia/pywikibot-core/archive/master.zip#egg=pywikibot-2.0b1',
 test_suite=testcollector,
 tests_require=test_deps,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c981256e58b11f663b79d532f25b1ce1272b309
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix missing i18n for 'auto' language label - change (VisualEditor/VisualEditor)

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

Change subject: Fix missing i18n for 'auto' language label
..


Fix missing i18n for 'auto' language label

Tsk.

Change-Id: I48ff51af9325203f72462dc77358e6e303508fc9
---
M modules/ve/i18n/en.json
M modules/ve/i18n/qqq.json
M modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
3 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/i18n/en.json b/modules/ve/i18n/en.json
index 3932946..73e447d 100644
--- a/modules/ve/i18n/en.json
+++ b/modules/ve/i18n/en.json
@@ -38,6 +38,7 @@
 visualeditor-dialog-error: Something went wrong…,
 visualeditor-dialog-error-dismiss: Go back,
 visualeditor-dialog-command-help-title: Keyboard shortcuts,
+visualeditor-dialog-language-auto-direction: Auto,
 visualeditor-dialog-language-search-title: Select language,
 visualeditor-dimensionswidget-px: px,
 visualeditor-dimensionswidget-times: ×,
diff --git a/modules/ve/i18n/qqq.json b/modules/ve/i18n/qqq.json
index 6fbbd85..2e03d51 100644
--- a/modules/ve/i18n/qqq.json
+++ b/modules/ve/i18n/qqq.json
@@ -41,6 +41,7 @@
visualeditor-dialog-error: Title text in a dialog error screen,
visualeditor-dialog-error-dismiss: Label text for button to dismiss 
an error message in a dialog.\n{{Identical|Go back}},
visualeditor-dialog-command-help-title: Title for keyboard shortcuts 
help dialog.\n{{Identical|Keyboard shortcut}},
+visualeditor-dialog-language-auto-direction: Label text for button to 
make language direction automatic.,
visualeditor-dialog-language-search-title: Title for language search 
dialog,
visualeditor-dimensionswidget-px: {{optional}}\nLabel for the 
dimensions properties denoting pixel units.,
visualeditor-dimensionswidget-times: {{optional}}\nLabel for the 
dimensions properties denoting 'by', as in width x height.,
diff --git a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
index df40e48..818cd26 100644
--- a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
@@ -36,7 +36,7 @@
'classes': [ 've-ui-languageInputWidget-directionSelect' ],
} ).addItems( [
new OO.ui.ButtonOptionWidget( 'rtl', { '$': this.$, 'icon': 
'text-dir-rtl' } ),
-   new OO.ui.ButtonOptionWidget( null, { '$': this.$, 'label': 
'Auto' } ),
+   new OO.ui.ButtonOptionWidget( null, { '$': this.$, 'label': 
'text-dir-auto' } ),
new OO.ui.ButtonOptionWidget( 'ltr', { '$': this.$, 'icon': 
'text-dir-ltr' } )
] );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48ff51af9325203f72462dc77358e6e303508fc9
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Code-base cleanup - change (mediawiki...OATHAuth)

2014-05-11 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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

Change subject: Code-base cleanup
..

Code-base cleanup

* Removed use of deprecated core features
* Made code style fixes
* Made pass phpcs-strict
* Fixed special page aliases

Change-Id: Iae2a0a7d6f0fb2ea5080795a06ae257af96dfaf6
---
M OATHAuth.alias.php
M OATHAuth.i18n.php
M OATHAuth.php
M OATHUser.php
M lib/base32.php
M lib/hotp.php
M special/SpecialOATH.php
7 files changed, 412 insertions(+), 262 deletions(-)


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

diff --git a/OATHAuth.alias.php b/OATHAuth.alias.php
index 7945eb7..3069bb2 100644
--- a/OATHAuth.alias.php
+++ b/OATHAuth.alias.php
@@ -11,8 +11,7 @@
 
 /** English (English) */
 $specialPageAliases['en'] = array(
-   'OATHAuth' = array( 'OATHAuth' ),
-   'OATHAuthDisplay' = array( 'Display Token OATH Information' ),
+   'OATH' = array( 'OATH', 'OATHAuth' ),
 );
 
 /** Arabic (العربية) */
diff --git a/OATHAuth.i18n.php b/OATHAuth.i18n.php
index d7579e6..a78d608 100644
--- a/OATHAuth.i18n.php
+++ b/OATHAuth.i18n.php
@@ -12,6 +12,7 @@
  */
 $messages = array();
 if ( !function_exists( 'wfJsonI18nShim886e5f466d60' ) ) {
+   /** @noinspection PhpMissingDocCommentInspection */
function wfJsonI18nShim886e5f466d60( $cache, $code, $cachedData ) {
$codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
diff --git a/OATHAuth.php b/OATHAuth.php
index 5e7d7f4..e7e1c1b 100644
--- a/OATHAuth.php
+++ b/OATHAuth.php
@@ -13,7 +13,7 @@
  */
 
 if ( !defined( 'MEDIAWIKI' ) ) {
-   echo( This file is an extension to the MediaWiki software and cannot 
be used standalone.\n );
+   echo This file is an extension to the MediaWiki software and cannot be 
used standalone.\n;
die( 1 );
 }
 
diff --git a/OATHUser.php b/OATHUser.php
index dc8f665..a172eba 100644
--- a/OATHUser.php
+++ b/OATHUser.php
@@ -8,8 +8,29 @@
  */
 
 class OATHUser {
+   /** @var int User ID */
+   private $id;
 
-   private $id, $secret, $secretReset, $scratchTokens, 
$scratchTokensReset, $account, $isEnabled, $isValidated;
+   /** @var string Two factor binary secret */
+   private $secret;
+
+   /** @var string New two factor secret when resetting */
+   private $secretReset;
+
+   /** @var string[] List of scratch tokens */
+   private $scratchTokens;
+
+   /** @var string[] New scratch tokens when resetting */
+   private $scratchTokensReset;
+
+   /** @var string Name for the two-factor account */
+   private $account;
+
+   /** @var bool Whether two-factor is enabled */
+   private $isEnabled;
+
+   /** @var bool Whether two-factor is validated */
+   private $isValidated;
 
/**
 * Constructor. Can't be called directly. Call one of the static 
NewFrom* methods
@@ -20,8 +41,11 @@
 * @param $scratchTokens
 * @param $scratchTokensReset
 * @param bool $isValidated bool
+* @todo Get rid of telescoping constructor anti-pattern
 */
-   public function __construct( $id, $account, $secret = null, 
$secretReset = null, $scratchTokens = null, $scratchTokensReset = null, 
$isValidated = false ) {
+   public function __construct( $id, $account, $secret = null, 
$secretReset = null,
+   $scratchTokens = null, $scratchTokensReset = null, $isValidated 
= false
+   ) {
$this-id = $id;
$this-account = $account;
$this-isEnabled = true;
@@ -120,7 +144,7 @@
 * @return Boolean
 */
public function verifyToken( $token, $reset = false ) {
-   if ( $reset ) {
+   if ( $reset ) {
$secret = $this-secretReset;
} else {
$secret = $this-secret;
@@ -134,7 +158,8 @@
}
}
# See if the user is using a scratch token
-   for ( $i = 0; $i  count( $this-scratchTokens ); $i++ ) {
+   $length = count( $this-scratchTokens );
+   for ( $i = 0; $i  $length; $i++ ) {
if ( $token === $this-scratchTokens[$i] ) {
# If there is a scratch token, remove it from 
the scratch token list
unset( $this-scratchTokens[$i] );
@@ -219,8 +244,10 @@
$dbw = wfGetDB( DB_MASTER );
return $dbw-update(
'oathauth_users',
-   array(  'secret_reset' = $this-secretReset,
-   'scratch_tokens_reset' = base64_encode( 
serialize( $this-scratchTokensReset ) ) ),
+   array(
+   

[MediaWiki-commits] [Gerrit] Update VE core submodule to master (4745b44) - change (mediawiki...VisualEditor)

2014-05-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VE core submodule to master (4745b44)
..

Update VE core submodule to master (4745b44)

New changes:
3fb1060 Remove ve.ce.Surface#getClickCount
fc52c6c Remove IE nbsp hack
cd2e2c8 Add HTML conversion button to SA demo
e04df70 Fix missing i18n for 'auto' language label

Local change:
* Add auto message to i18n.

Change-Id: I534e27d3578cf9b42b755c91aa1b17122835fb83
---
M VisualEditor.php
M lib/ve
2 files changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 626aa2e..7f79832 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -1102,6 +1102,7 @@
),
'messages' = array(
'visualeditor-annotationbutton-language-tooltip',
+   'visualeditor-dialog-language-auto-direction',
'visualeditor-dialog-language-search-title',
'visualeditor-languageinspector-title',
'visualeditor-languageinspector-block-tooltip',
diff --git a/lib/ve b/lib/ve
index 1fa7b5f..4745b44 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 1fa7b5fda5a25dfd48d5f1b7819674c3d08624d1
+Subproject commit 4745b44a18328f38bdd89e5a526c2ecbdeff37fa

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I534e27d3578cf9b42b755c91aa1b17122835fb83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make OAUTHAuth more friendly with other authnz extensions - change (mediawiki...OATHAuth)

2014-05-11 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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

Change subject: Make OAUTHAuth more friendly with other authnz extensions
..

Make OAUTHAuth more friendly with other authnz extensions

When setting QuickTemplate fields, query to see what is already
there, and append to it. That way if another extension adds more
fields, it won't be overridden.

Bug: 53198
Change-Id: Ib0d67e450e8de372f875536abf82653ede2cdfda
---
M OATHAuth.hooks.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php
index c12432c..b85ddcd 100644
--- a/OATHAuth.hooks.php
+++ b/OATHAuth.hooks.php
@@ -15,7 +15,8 @@
. Html::input( 'wpOATHToken', null, 'text', array(
'class' = 'loginText', 'id' = 
'wpOATHToken', 'tabindex' = '3', 'size' = '20'
) ) . '/div';
-   $template-set( 'extrafields', $input );
+
+   $template-set( 'extrafields', $template-get( 'extrafields', 
'' ) . $input );
 
return true;
}
@@ -27,6 +28,7 @@
static function ChangePasswordForm( $extraFields ) {
$tokenField = array( 'wpOATHToken', 'oathauth-token', 
'password', '' );
array_push( $extraFields, $tokenField );
+
return true;
}
 
@@ -43,6 +45,7 @@
return true;
} else {
$errorMsg = 'oathauth-abortlogin';
+
return false;
}
}
@@ -71,6 +74,7 @@
 */
static function authenticate( $user ) {
global $wgRequest;
+
$token = $wgRequest-getText( 'wpOATHToken' );
$oathuser = OATHUser::newFromUser( $user );
# Though it's weird to default to true, we only want to deny

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0d67e450e8de372f875536abf82653ede2cdfda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 tylerro...@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] Code-base cleanup - change (mediawiki...OATHAuth)

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

Change subject: Code-base cleanup
..


Code-base cleanup

* Removed use of deprecated core features
* Made code style fixes
* Made pass phpcs-strict
* Fixed special page aliases

Change-Id: Iae2a0a7d6f0fb2ea5080795a06ae257af96dfaf6
---
M OATHAuth.alias.php
A OATHAuth.hooks.php
M OATHAuth.i18n.php
M OATHAuth.php
M OATHUser.php
M lib/base32.php
M lib/hotp.php
M special/SpecialOATH.php
8 files changed, 565 insertions(+), 408 deletions(-)

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



diff --git a/OATHAuth.alias.php b/OATHAuth.alias.php
index 7945eb7..3069bb2 100644
--- a/OATHAuth.alias.php
+++ b/OATHAuth.alias.php
@@ -11,8 +11,7 @@
 
 /** English (English) */
 $specialPageAliases['en'] = array(
-   'OATHAuth' = array( 'OATHAuth' ),
-   'OATHAuthDisplay' = array( 'Display Token OATH Information' ),
+   'OATH' = array( 'OATH', 'OATHAuth' ),
 );
 
 /** Arabic (العربية) */
diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php
new file mode 100644
index 000..c52a2b2
--- /dev/null
+++ b/OATHAuth.hooks.php
@@ -0,0 +1,186 @@
+?php
+
+/**
+ * Hooks for Extension:OATHAuth
+ */
+class OATHAuthHooks {
+   /**
+* @param $template UserloginTemplate
+* @return bool
+*/
+   static function ModifyUITemplate( $template ) {
+   $input = 'divlabel for=wpOATHToken'
+   . wfMessage( 'oathauth-token' )-escaped()
+   . '/label'
+   . Html::input( 'wpOATHToken', null, 'text', array(
+   'class' = 'loginText', 'id' = 
'wpOATHToken', 'tabindex' = '3', 'size' = '20'
+   ) ) . '/div';
+   $template-set( 'extrafields', $input );
+
+   return true;
+   }
+
+   /**
+* @param $extraFields array
+* @return bool
+*/
+   static function ChangePasswordForm( $extraFields ) {
+   $tokenField = array( 'wpOATHToken', 'oathauth-token', 
'password', '' );
+   array_push( $extraFields, $tokenField );
+   return true;
+   }
+
+   /**
+* @param $user User
+* @param $password string
+* @param $newpassword string
+* @param $errorMsg string
+* @return bool
+*/
+   static function AbortChangePassword( $user, $password, $newpassword, 
$errorMsg ) {
+   $result = self::authenticate( $user );
+   if ( $result ) {
+   return true;
+   } else {
+   $errorMsg = 'oathauth-abortlogin';
+   return false;
+   }
+   }
+
+   /**
+* @param $user User
+* @param $password string
+* @param $abort int
+* @param $errorMsg string
+* @return bool
+*/
+   static function AbortLogin( $user, $password, $abort, $errorMsg ) {
+   $result = self::authenticate( $user );
+   if ( $result ) {
+   return true;
+   } else {
+   $abort = LoginForm::ABORTED;
+   $errorMsg = 'oathauth-abortlogin';
+   return false;
+   }
+   }
+
+   /**
+* @param $user User
+* @return bool
+*/
+   static function authenticate( $user ) {
+   global $wgRequest;
+   $token = $wgRequest-getText( 'wpOATHToken' );
+   $oathuser = OATHUser::newFromUser( $user );
+   # Though it's weird to default to true, we only want to deny
+   # users who have two-factor enabled and have validated their
+   # token.
+   $result = true;
+   if ( $oathuser  $oathuser-isEnabled()  
$oathuser-isValidated() ) {
+   $result = $oathuser-verifyToken( $token );
+   }
+   return $result;
+   }
+
+   /**
+* Determine if two-factor authentication is enabled for $wgUser
+*
+* @param bool $isEnabled Will be set to true if enabled, false 
otherwise
+*
+* @return bool False if enabled, true otherwise
+*/
+   static function TwoFactorIsEnabled( $isEnabled ) {
+   global $wgUser;
+
+   $user = OATHUser::newFromUser( $wgUser );
+   if ( $user  $user-isEnabled()  $user-isValidated() ) {
+   $isEnabled = true;
+   # This two-factor extension is enabled by the user,
+   # we don't need to check others.
+   return false;
+   } else {
+   $isEnabled = false;
+   # This two-factor extension isn't enabled by the user,
+   # but others may be.
+  

[MediaWiki-commits] [Gerrit] Replace deprecated mw.util.wikiGetlink by mw.util.getUrl - change (mediawiki...UIFeedback)

2014-05-11 Thread TheDJ (Code Review)
TheDJ has submitted this change and it was merged.

Change subject: Replace deprecated mw.util.wikiGetlink by mw.util.getUrl
..


Replace deprecated mw.util.wikiGetlink by mw.util.getUrl

Simplify URL generation by using mw.util.getUrl instead of the mw.Uri.

mw.Uri is buggy because it does not support IPv6 URIs (bug 64884).

Bug: 64886
Change-Id: Icf87f3ce7a8e046d34629594cce4d75e6936bf25
---
M UiFeedback.php
M resources/ext.uiFeedback.js
2 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/UiFeedback.php b/UiFeedback.php
index 38a14c6..23d1659 100644
--- a/UiFeedback.php
+++ b/UiFeedback.php
@@ -59,7 +59,6 @@
'mediawiki.api',
'mediawiki.user',
'mediawiki.util',
-   'mediawiki.Uri',
),
'messages'  = array(
'ui-feedback-headline',
diff --git a/resources/ext.uiFeedback.js b/resources/ext.uiFeedback.js
index 3bb6c36..ed5e63b 100644
--- a/resources/ext.uiFeedback.js
+++ b/resources/ext.uiFeedback.js
@@ -119,7 +119,7 @@
} else {
/* the 'screenshot' form */
screenshotform = document.createElement( 'div' );
-   screenshotform.innerHTML = 'div class=ui-feedback noselect 
purple' + 'div class=ui-feedback-head' + 'div 
class=ui-feedback-help-button/div' + 'h2 class=h_purple' + mw.message( 
'ui-feedback-scr-headline' ).escaped() + '/h2' + 'div 
class=ui-feedback-collapse/div' + 'div class=ui-feedback-expand/div' 
+ 'div class=ui-feedback-close/div' + '/div' + 'form 
id=ui-feedback-form method=post action=' + mw.util.wikiGetlink( 
'Special:UiFeedback' ) + ' target=ui-feedback-iframe 
enctype=multipart/form-data' + 'ul' +
+   screenshotform.innerHTML = 'div class=ui-feedback noselect 
purple' + 'div class=ui-feedback-head' + 'div 
class=ui-feedback-help-button/div' + 'h2 class=h_purple' + mw.message( 
'ui-feedback-scr-headline' ).escaped() + '/h2' + 'div 
class=ui-feedback-collapse/div' + 'div class=ui-feedback-expand/div' 
+ 'div class=ui-feedback-close/div' + '/div' + 'form 
id=ui-feedback-form method=post action=' + mw.util.getUrl( 
'Special:UiFeedback' ) + ' target=ui-feedback-iframe 
enctype=multipart/form-data' + 'ul' +
 
/* i wanted to */
'li id=ui-feedback-task-li' + 'label 
class=headline' + mw.message( 'ui-feedback-task-label' ).escaped() + 
'/label' + 'select name=ui-feedback-task id=ui-feedback-task' + ' 
option value=' + mw.message( 'ui-feedback-task-0' ).escaped() + '/option' 
+ ' option value=add/edit item' + mw.message( 'ui-feedback-task-1' 
).escaped() + '/option' + ' option value=add/edit label' + mw.message( 
'ui-feedback-task-2' ).escaped() + '/option' + ' option value=add/edit 
description' + mw.message( 'ui-feedback-task-3' ).escaped() + '/option' + ' 
option value=add/edit alias' + mw.message( 'ui-feedback-task-4' ).escaped() 
+ '/option' + ' option value=add/edit links' + mw.message( 
'ui-feedback-task-5' ).escaped() + '/option' + ' option value=search' + 
mw.message( 'ui-feedback-task-6' ).escaped() + '/option' + ' option 
value=other' + mw.message( 'ui-feedback-task-7' ).escaped() + '/option' + 
'/select' + '/li' +
@@ -385,7 +385,7 @@
 
resetForm();
toggleForm();
-   show_notification( mw.message( 'ui-feedback-notify-sent', 
mw.util.wikiGetlink( 'Special:UiFeedback' ) ), 5000, 'green' );
+   show_notification( mw.message( 'ui-feedback-notify-sent', 
mw.util.getUrl( 'Special:UiFeedback' ) ), 5000, 'green' );
}
 
/**
@@ -513,7 +513,7 @@
} ).done( function ( data ) {
/* reload the page */
window.location.href = window.location.href;
-   // window.location = mw.util.wikiGetlink( 
'Special:UiFeedback' );
+   // window.location = mw.util.getUrl( 
'Special:UiFeedback' );
} ).fail( function ( error ) {
mw.log( 'API failed :(', error );
} );
@@ -521,7 +521,7 @@
 
/* this function sets the filter for the specialpage */
function set_uifeedback_filter() {
-   var uri = new mw.Uri( mw.util.wikiGetlink( 'Special:UiFeedback' 
) );
+   var uri;
var filter_status = [];
var filter_importance = [];
var filter_type = [];
@@ -537,12 +537,13 @@
filter_type.push( $( this ).val() );
} );
/* create a url */
-   uri.extend( { 'filter_status[]': filter_status } );
-   uri.extend( { 'filter_importance[]': filter_importance } );
-   uri.extend( { 'filter_type[]': filter_type } );
+   uri = mw.util.getUrl( 'Special:UiFeedback', {
+   

[MediaWiki-commits] [Gerrit] Declare visibility on class properties of includes/parser/ - change (mediawiki/core)

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

Change subject: Declare visibility on class properties of includes/parser/
..


Declare visibility on class properties of includes/parser/

Change-Id: If03a9bd5eb83be4d15f54e73f49f42540fb7d5fc
---
M includes/parser/CacheTime.php
M includes/parser/DateFormatter.php
M includes/parser/LinkHolderArray.php
M includes/parser/Parser.php
M includes/parser/ParserOptions.php
M includes/parser/ParserOutput.php
M includes/parser/Parser_DiffTest.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
9 files changed, 576 insertions(+), 373 deletions(-)

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



diff --git a/includes/parser/CacheTime.php b/includes/parser/CacheTime.php
index 464bacd..b44a20f 100644
--- a/includes/parser/CacheTime.php
+++ b/includes/parser/CacheTime.php
@@ -32,11 +32,23 @@
 */
public $mUsedOptions;
 
-   var $mVersion = Parser::VERSION,  # Compatibility check
-   $mCacheTime = '', # Time when this object was 
generated, or -1 for uncacheable. Used in ParserCache.
-   $mCacheExpiry = null, # Seconds after which the object 
should expire, use 0 for uncachable. Used in ParserCache.
-   $mContainsOldMagic,   # Boolean variable indicating if 
the input contained variables like {{CURRENTDAY}}
-   $mCacheRevisionId = null; # Revision ID that was parsed
+   /** @var string Compatibility check */
+   protected $mVersion = Parser::VERSION;
+
+   /** @var string Time when this object was generated, or -1 for 
uncacheable. Used in ParserCache. */
+   protected $mCacheTime = '';
+
+   /**
+* @var int Seconds after which the object should expire, use 0 for 
uncachable.
+*   Used in ParserCache.
+*/
+   protected $mCacheExpiry = null;
+
+   /** @var bool Boolean variable indicating if the input contained 
variables like {{CURRENTDAY}} */
+   protected $mContainsOldMagic;
+
+   /** @var int Revision ID that was parsed */
+   protected $mCacheRevisionId = null;
 
/**
 * @return string TS_MW timestamp
diff --git a/includes/parser/DateFormatter.php 
b/includes/parser/DateFormatter.php
index 3ddc9d4..a6092a3 100644
--- a/includes/parser/DateFormatter.php
+++ b/includes/parser/DateFormatter.php
@@ -27,11 +27,40 @@
  * @ingroup Parser
  */
 class DateFormatter {
-   var $mSource, $mTarget;
-   var $monthNames = '', $rxDM, $rxMD, $rxDMY, $rxYDM, $rxMDY, $rxYMD;
+   protected $mSource;
 
-   var $regexes, $pDays, $pMonths, $pYears;
-   var $rules, $xMonths, $preferences;
+   protected $mTarget;
+
+   /** @var string */
+   protected $monthNames = '';
+
+   /** @todo Are these unused? */
+   private $rxDM;
+   private $rxMD;
+   private $rxDMY;
+   private $rxYDM;
+   private $rxMDY;
+   private $rxYMD;
+
+   /** @var array */
+   protected $regexes;
+
+   /** @todo Are these unused? */
+   private $pDays;
+   private $pMonths;
+   private $pYears;
+
+   /** @var array */
+   protected $rules;
+
+   /** @var array */
+   protected $xMonths;
+
+   /** @var array */
+   protected $preferences;
+
+   /** @var bool */
+   protected $mLinked;
 
protected $lang;
 
diff --git a/includes/parser/LinkHolderArray.php 
b/includes/parser/LinkHolderArray.php
index 2f95af2..00c5a6c 100644
--- a/includes/parser/LinkHolderArray.php
+++ b/includes/parser/LinkHolderArray.php
@@ -25,9 +25,19 @@
  * @ingroup Parser
  */
 class LinkHolderArray {
-   var $internals = array(), $interwikis = array();
-   var $size = 0;
-   var $parent;
+   /** @var array */
+   public $internals = array();
+
+   /** @var array */
+   public $interwikis = array();
+
+   /** @var int */
+   protected $size = 0;
+
+   /** @var Parser */
+   protected $parent;
+
+   /** @var int */
protected $tempIdOffset;
 
function __construct( $parent ) {
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 227937a..9866008 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -119,97 +119,166 @@
const TOC_START = 'mw:toc';
const TOC_END = '/mw:toc';
 
-   # Persistent:
-   var $mTagHooks = array();
-   var $mTransparentTagHooks = array();
-   var $mFunctionHooks = array();
-   var $mFunctionSynonyms = array( 0 = array(), 1 = array() );
-   var $mFunctionTagHooks = array();
-   var $mStripList = array();
-   var $mDefaultStripList = array();
-   var $mVarCache = array();
-   var $mImageParams = array();
-   var $mImageParamsMagicArray = array();
-   var $mMarkerIndex = 0;
-   var $mFirstCall = true;
+   # Persistent
+
+   

[MediaWiki-commits] [Gerrit] Apply coding conventions - change (mediawiki...UIFeedback)

2014-05-11 Thread TheDJ (Code Review)
TheDJ has submitted this change and it was merged.

Change subject: Apply coding conventions
..


Apply coding conventions

* Encode U+1F4F7 as \1f4f7 in CSS

Change-Id: I2d4f808065fc1a2bbba7c4dca0c08fd290d084ab
---
M ApiUiFeedback.php
M UiFeedback.php
M resources/ext.uiFeedback.css
3 files changed, 481 insertions(+), 462 deletions(-)

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



diff --git a/ApiUiFeedback.php b/ApiUiFeedback.php
index 20b8f9f..9cfba2b 100644
--- a/ApiUiFeedback.php
+++ b/ApiUiFeedback.php
@@ -107,9 +107,9 @@
/* update table */
$dbw = wfGetDB( DB_MASTER );
$dbw-update( 'uifeedback_stats',
- $value,
- array( 'uifs_type' = $type ),
- __METHOD__
+   $value,
+   array( 'uifs_type' = $type ),
+   __METHOD__
);
 
$this-getResult()-addValue( null, 
$this-getModuleName(), array( 'status' = 'ok' ) );
@@ -131,9 +131,9 @@
$dbw-update( 'uifeedback', $values, $conds, 
__METHOD__, array() );
 
$values = array( 'uifr_feedback_id' = $id,
-'uifr_reviewer'= 
$reviewer,
-'uifr_status'  = 
$new_status,
-'uifr_comment' = 
$comment
+   'uifr_reviewer'= $reviewer,
+   'uifr_status'  = $new_status,
+   'uifr_comment' = $comment
);
$dbw-insert( 'uifeedback_reviews', $values, 
__METHOD__, array() );
 
@@ -159,33 +159,48 @@
public function getAllowedParams() {
return array(
'mode'   = array(),
-   'ui-feedback-anonymous'  = array( ApiBase::PARAM_TYPE 
= 'boolean',
-   
   ApiBase::PARAM_DFLT = false ),
+   'ui-feedback-anonymous'  = array(
+   ApiBase::PARAM_TYPE = 'boolean',
+   ApiBase::PARAM_DFLT = false ),
'ui-feedback-username'   = array(),
'ui-feedback-notify' = array(),
'ui-feedback-task'   = array(),
-   'ui-feedback-task-other' = array( ApiBase::PARAM_TYPE 
= 'string',
-   
   ApiBase::PARAM_DFLT = null ),
-   'ui-feedback-done'   = array( ApiBase::PARAM_TYPE 
= 'string', /* i took string here because boolean defaults to false when not 
set */
-   
   ApiBase::PARAM_DFLT = null ),
-   'ui-feedback-type'   = array( ApiBase::PARAM_TYPE 
= array( '0', '1' ) ),
+   'ui-feedback-task-other' = array(
+   ApiBase::PARAM_TYPE = 'string',
+   ApiBase::PARAM_DFLT = null ),
+   'ui-feedback-done'   = array(
+   ApiBase::PARAM_TYPE = 'string', /* i took 
string here because boolean defaults to false when not set */
+   ApiBase::PARAM_DFLT = null ),
+   'ui-feedback-type'   = array(
+   ApiBase::PARAM_TYPE = array( '0', '1' ) ),
'ui-feedback-url'= array(),
-   'ui-feedback-importance' = array( ApiBase::PARAM_TYPE 
= array( '0', '1', '2', '3', '4', '5' ),
-   
   ApiBase::PARAM_DFLT = '0' ),
+   'ui-feedback-importance' = array(
+   ApiBase::PARAM_TYPE = array( '0', '1', '2', 
'3', '4', '5' ),
+   ApiBase::PARAM_DFLT = '0' ),
'ui-feedback-url'= array(),
-   'ui-feedback-happened'   = array( ApiBase::PARAM_TYPE 
= array( '0', '1', '2', '3', '4' ),
-   
   ApiBase::PARAM_DFLT = '0' ),
-   'ui-feedback-text1'  = array( ApiBase::PARAM_TYPE 
= 'string' ),
-   'ui-feedback-useragent'  = array( ApiBase::PARAM_TYPE 
= 'string' ),
+   'ui-feedback-happened'   = array(
+

[MediaWiki-commits] [Gerrit] Update VE core submodule to master (4745b44) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (4745b44)
..


Update VE core submodule to master (4745b44)

New changes:
3fb1060 Remove ve.ce.Surface#getClickCount
fc52c6c Remove IE nbsp hack
cd2e2c8 Add HTML conversion button to SA demo
e04df70 Fix missing i18n for 'auto' language label

Local change:
* Add auto message to i18n.

Change-Id: I534e27d3578cf9b42b755c91aa1b17122835fb83
---
M VisualEditor.php
M lib/ve
2 files changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index 626aa2e..7f79832 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -1102,6 +1102,7 @@
),
'messages' = array(
'visualeditor-annotationbutton-language-tooltip',
+   'visualeditor-dialog-language-auto-direction',
'visualeditor-dialog-language-search-title',
'visualeditor-languageinspector-title',
'visualeditor-languageinspector-block-tooltip',
diff --git a/lib/ve b/lib/ve
index 1fa7b5f..4745b44 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 1fa7b5fda5a25dfd48d5f1b7819674c3d08624d1
+Subproject commit 4745b44a18328f38bdd89e5a526c2ecbdeff37fa

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I534e27d3578cf9b42b755c91aa1b17122835fb83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@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] Syncronize VisualEditor: b84bced..79e6957 - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: b84bced..79e6957
..

Syncronize VisualEditor: b84bced..79e6957

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


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

diff --git a/VisualEditor b/VisualEditor
index b84bced..79e6957 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit b84bceda7ae8148713105754400eb8d718f87eaa
+Subproject commit 79e6957b3b9e0557123a1c57c8ed4543cf8df7d0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d6bf2f90f9493c6d43ceba62db806b56e3a4724
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] Update VE core submodule to master (1fa7b5f) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (1fa7b5f)
..


Update VE core submodule to master (1fa7b5f)

New changes:
c79a46e Updating scalable default in MediaSizeWidget
7bf9c7e Cache references in handleDelete
e5f74b7 unicodejs: Update moveBreakOffset to include 'HebrewLetter' category
a5b21b6 Fix watch list
6508e88 Directionality fixes in SA demo
dd71c16 Localisation updates from https://translatewiki.net.
4ed85b9 Localisation updates from https://translatewiki.net.
b6fc28a Special case for deleting the entire document
ddd6372 DebugBar tidy up
6160868 unicodejs: Add tests for hebrew letters in moveBreakOffset
1fa7b5f Update OOjs UI to v0.1.0-pre (7b3672591f)

Change-Id: I2dbcf1d7a9829e165bbd0b14da526638d9a7efd5
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index f855dbb..1fa7b5f 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit f855dbb1c490cf880878b655ab1cccdbc7a4f8fa
+Subproject commit 1fa7b5fda5a25dfd48d5f1b7819674c3d08624d1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dbcf1d7a9829e165bbd0b14da526638d9a7efd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@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] Syncronize VisualEditor: b84bced..79e6957 - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: b84bced..79e6957
..


Syncronize VisualEditor: b84bced..79e6957

Change-Id: I8d6bf2f90f9493c6d43ceba62db806b56e3a4724
---
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 b84bced..79e6957 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit b84bceda7ae8148713105754400eb8d718f87eaa
+Subproject commit 79e6957b3b9e0557123a1c57c8ed4543cf8df7d0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d6bf2f90f9493c6d43ceba62db806b56e3a4724
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] Syncronize VisualEditor: 79e6957..e698c55 - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 79e6957..e698c55
..

Syncronize VisualEditor: 79e6957..e698c55

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


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

diff --git a/VisualEditor b/VisualEditor
index 79e6957..e698c55 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 79e6957b3b9e0557123a1c57c8ed4543cf8df7d0
+Subproject commit e698c5558ed9e0268df75761d60f39caa0751b0d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ccbfa3c24ffc0a5e39963495f748af059331699
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: 79e6957..e698c55 - change (mediawiki/extensions)

2014-05-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 79e6957..e698c55
..


Syncronize VisualEditor: 79e6957..e698c55

Change-Id: I8ccbfa3c24ffc0a5e39963495f748af059331699
---
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 79e6957..e698c55 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 79e6957b3b9e0557123a1c57c8ed4543cf8df7d0
+Subproject commit e698c5558ed9e0268df75761d60f39caa0751b0d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ccbfa3c24ffc0a5e39963495f748af059331699
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] Fixed doc typo - change (mediawiki/core)

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

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

Change subject: Fixed doc typo
..

Fixed doc typo

Change-Id: I4c81dc62c241e1c32cbda996323d082c8b2d48a3
---
M includes/poolcounter/PoolCounterRedis.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/poolcounter/PoolCounterRedis.php 
b/includes/poolcounter/PoolCounterRedis.php
index 4f6b795..093fe49 100644
--- a/includes/poolcounter/PoolCounterRedis.php
+++ b/includes/poolcounter/PoolCounterRedis.php
@@ -45,7 +45,7 @@
  * Also this should be on a server plenty of RAM for the working set to avoid 
evictions.
  * Evictions could temporarily allow wait queues to double in size or 
temporarily cause
  * pools to appear as full when they are not. Using volatile-ttl and bumping 
memory-samples
- * and redis.conf can be helpful otherwise.
+ * in redis.conf can be helpful otherwise.
  *
  * @ingroup Redis
  * @since 1.23

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c81dc62c241e1c32cbda996323d082c8b2d48a3
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] Several tweaks to the install.php script - change (mediawiki/core)

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

Change subject: Several tweaks to the install.php script
..


Several tweaks to the install.php script

- Fix description of the admin option, which says there's a default,
  WikiSysop, when this isn't the case.
- Use MediaWiki instead of Don't care as the default value
  for the name argument
- make the name argument optional, so that its default value
  can actually work as such
- test for getOption's default parameter value (null)
  rather than providing one (false) and testing for it
- fix indication of default value for --dbpath
  and document where it comes from
- format the default for --confpath
  the same way as other defaults are displayed
- add description
- use trim() for --passfile, as is done for --dbpassfile
- use single quotes where possible
- mention in the documentation where the default values come from
- various minor text adjustments
- bonus: typo fix in a comment in Maintenance.php

Change-Id: Icbc0b02cfbf09b3f97ed86f4a68c3b35a9c839c8
---
M maintenance/Maintenance.php
M maintenance/install.php
2 files changed, 33 insertions(+), 29 deletions(-)

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



diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 479030f..e316d9e 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -731,7 +731,7 @@
return;
}
 
-   $screenWidth = 80; // TODO: Caculate this!
+   $screenWidth = 80; // TODO: Calculate this!
$tab = ;
$descWidth = $screenWidth - ( 2 * strlen( $tab ) );
 
diff --git a/maintenance/install.php b/maintenance/install.php
index 20d6ad5..5a3e00c 100644
--- a/maintenance/install.php
+++ b/maintenance/install.php
@@ -29,10 +29,13 @@
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 define( 'MEDIAWIKI_INSTALL', true );
 
-require_once dirname( __DIR__ ) . /maintenance/Maintenance.php;
+require_once dirname( __DIR__ ) . '/maintenance/Maintenance.php';
 
 /**
  * Maintenance script to install and configure MediaWiki
+ *
+ * Default values for the options are defined in DefaultSettings.php (see the 
mapping in CliInstaller.php)
+ * Default for --dbpath (SQLite-specific) is defined in 
SqliteInstaller::getGlobalDefaults
  *
  * @ingroup Maintenance
  */
@@ -41,9 +44,12 @@
parent::__construct();
global $IP;
 
-   $this-addArg( 'name', 'The name of the wiki', true );
+   $this-addDescription( CLI-based MediaWiki installation and 
configuration.\n .
+   Defaut options are indicated in parenthesis. );
 
-   $this-addArg( 'admin', 'The username of the wiki administrator 
(WikiSysop)', true );
+   $this-addArg( 'name', 'The name of the wiki (MediaWiki)', 
false );
+
+   $this-addArg( 'admin', 'The username of the wiki 
administrator.' );
$this-addOption( 'pass', 'The password for the wiki 
administrator.', false, true );
$this-addOption(
'passfile',
@@ -66,22 +72,22 @@
$this-addOption( 'dbserver', 'The database host (localhost)', 
false, true );
$this-addOption( 'dbport', 'The database port; only for 
PostgreSQL (5432)', false, true );
$this-addOption( 'dbname', 'The database name (my_wiki)', 
false, true );
-   $this-addOption( 'dbpath', 'The path for the SQLite DB 
(/var/data)', false, true );
+   $this-addOption( 'dbpath', 'The path for the SQLite DB 
($IP/data)', false, true );
$this-addOption( 'dbprefix', 'Optional database table name 
prefix', false, true );
$this-addOption( 'installdbuser', 'The user to use for 
installing (root)', false, true );
-   $this-addOption( 'installdbpass', 'The pasword for the DB user 
to install as.', false, true );
+   $this-addOption( 'installdbpass', 'The password for the DB 
user to install as.', false, true );
$this-addOption( 'dbuser', 'The user to use for normal 
operations (wikiuser)', false, true );
-   $this-addOption( 'dbpass', 'The pasword for the DB user for 
normal operations', false, true );
+   $this-addOption( 'dbpass', 'The password for the DB user for 
normal operations', false, true );
$this-addOption(
'dbpassfile',
'An alternative way to provide dbpass option, as the 
contents of this file',
false,
true
);
-   $this-addOption( 'confpath', Path to write LocalSettings.php 
to, default $IP, false, true );
+   $this-addOption( 'confpath', Path to write LocalSettings.php 
to ($IP), false, true );

[MediaWiki-commits] [Gerrit] Pass phpcs-strict on includes/objectcache/ - change (mediawiki/core)

2014-05-11 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Pass phpcs-strict on includes/objectcache/
..

Pass phpcs-strict on includes/objectcache/

Change-Id: Ib99f2e34255df0cc846727b134d1788aec48529d
---
M includes/objectcache/HashBagOStuff.php
M includes/objectcache/MemcachedClient.php
M includes/objectcache/MultiWriteBagOStuff.php
M includes/objectcache/ObjectCache.php
M includes/objectcache/SqlBagOStuff.php
5 files changed, 42 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/132780/1

diff --git a/includes/objectcache/HashBagOStuff.php 
b/includes/objectcache/HashBagOStuff.php
index db0e579..6e50a8c 100644
--- a/includes/objectcache/HashBagOStuff.php
+++ b/includes/objectcache/HashBagOStuff.php
@@ -28,7 +28,8 @@
  * @ingroup Cache
  */
 class HashBagOStuff extends BagOStuff {
-   var $bag;
+   /** @var array */
+   protected $bag;
 
function __construct() {
$this-bag = array();
diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index bc59c6f..9de840b 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -1,4 +1,5 @@
 ?php
+// @codingStandardsIgnoreFile It's an external lib and it isn't. Let's not 
bother.
 /**
  * Memcached client for PHP.
  *
diff --git a/includes/objectcache/MultiWriteBagOStuff.php 
b/includes/objectcache/MultiWriteBagOStuff.php
index c656bdd..497f75d 100644
--- a/includes/objectcache/MultiWriteBagOStuff.php
+++ b/includes/objectcache/MultiWriteBagOStuff.php
@@ -29,7 +29,8 @@
  * @ingroup Cache
  */
 class MultiWriteBagOStuff extends BagOStuff {
-   var $caches;
+   /** @var array BagOStuff[] */
+   protected $caches;
 
/**
 * Constructor. Parameters are:
diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 3be251c..000 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -27,7 +27,7 @@
  * @ingroup Cache
  */
 class ObjectCache {
-   static $instances = array();
+   public static $instances = array();
 
/**
 * Get a cached instance of the specified type of cache object.
@@ -87,8 +87,9 @@
$class = $params['class'];
return new $class( $params );
} else {
-   throw new MWException( The definition of cache type 
\ . print_r( $params, true ) . \ lacks both  .
-   factory and class parameters. );
+   throw new MWException( The definition of cache type \
+   . print_r( $params, true ) . \ lacks both 
+   . factory and class parameters. );
}
}
 
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index e6a8c45..bcd5942 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -27,22 +27,37 @@
  * @ingroup Cache
  */
 class SqlBagOStuff extends BagOStuff {
-   /**
-* @var LoadBalancer
-*/
-   var $lb;
+   /** @var LoadBalancer */
+   protected $lb;
 
-   var $serverInfos;
-   var $serverNames;
-   var $numServers;
-   var $conns;
-   var $lastExpireAll = 0;
-   var $purgePeriod = 100;
-   var $shards = 1;
-   var $tableName = 'objectcache';
+   protected $serverInfos;
 
-   protected $connFailureTimes = array(); // UNIX timestamps
-   protected $connFailureErrors = array(); // exceptions
+   /** @var array */
+   protected $serverNames;
+
+   /** @var int */
+   protected $numServers;
+
+   /** @var array */
+   protected $conns;
+
+   /** @var int */
+   protected $lastExpireAll = 0;
+
+   /** @var int */
+   protected $purgePeriod = 100;
+
+   /** @var int */
+   protected $shards = 1;
+
+   /** @var string */
+   protected $tableName = 'objectcache';
+
+   /** @var array UNIX timestamps */
+   protected $connFailureTimes = array();
+
+   /** @var array Exceptions */
+   protected $connFailureErrors = array();
 
/**
 * Constructor. Parameters are:
@@ -721,7 +736,8 @@
if ( $exception-db  $exception-db-wasReadOnlyError() ) {
try {
$exception-db-rollback( __METHOD__ );
-   } catch ( DBError $e ) {}
+   } catch ( DBError $e ) {
+   }
}
wfDebugLog( 'SQLBagOStuff', DBError: 
{$exception-getMessage()} );
if ( $exception instanceof DBConnectionError ) {
@@ -780,4 +796,5 @@
 /**
  * Backwards compatibility alias
  */
-class 

[MediaWiki-commits] [Gerrit] Fixed doc typo - change (mediawiki/core)

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

Change subject: Fixed doc typo
..


Fixed doc typo

Change-Id: I4c81dc62c241e1c32cbda996323d082c8b2d48a3
---
M includes/poolcounter/PoolCounterRedis.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/poolcounter/PoolCounterRedis.php 
b/includes/poolcounter/PoolCounterRedis.php
index 4f6b795..093fe49 100644
--- a/includes/poolcounter/PoolCounterRedis.php
+++ b/includes/poolcounter/PoolCounterRedis.php
@@ -45,7 +45,7 @@
  * Also this should be on a server plenty of RAM for the working set to avoid 
evictions.
  * Evictions could temporarily allow wait queues to double in size or 
temporarily cause
  * pools to appear as full when they are not. Using volatile-ttl and bumping 
memory-samples
- * and redis.conf can be helpful otherwise.
+ * in redis.conf can be helpful otherwise.
  *
  * @ingroup Redis
  * @since 1.23

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c81dc62c241e1c32cbda996323d082c8b2d48a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Parent5446 tylerro...@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] jquery.suggestions: Hide the suggestions list asynchronously - change (mediawiki/core)

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

Change subject: jquery.suggestions: Hide the suggestions list asynchronously
..


jquery.suggestions: Hide the suggestions list asynchronously

Hiding the link we're just clicking on causes problems when done
synchronously in at least Firefox 3.6 (bug 62858) – the link is not
followed.

Also update incorrect and misformatted comments.

Bug: 62858
Change-Id: I52ed745e66c477527b6af031c222f8f221e0328b
---
M resources/src/jquery/jquery.suggestions.js
1 file changed, 16 insertions(+), 6 deletions(-)

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



diff --git a/resources/src/jquery/jquery.suggestions.js 
b/resources/src/jquery/jquery.suggestions.js
index 22e8652..7d200ff 100644
--- a/resources/src/jquery/jquery.suggestions.js
+++ b/resources/src/jquery/jquery.suggestions.js
@@ -535,15 +535,20 @@
if ( $result.get( 0 ) 
!== $other.get( 0 ) ) {
return;
}
-   // do not interfere 
with non-left clicks or if modifier keys are pressed (e.g. ctrl-click)
+   // Do not interfere 
with non-left clicks or if modifier keys are pressed (e.g. ctrl-click).
if ( !( e.which !== 1 
|| e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {

$.suggestions.highlight( context, $result, true );
-   
$.suggestions.hide( context );
if ( typeof 
context.config.result.select === 'function' ) {

context.config.result.select.call( $result, context.data.$textbox );
}
+   // This will 
hide the link we're just clicking on, which causes problems
+   // when done 
synchronously in at least Firefox 3.6 (bug 62858).
+   setTimeout( 
function () {
+   
$.suggestions.hide( context );
+   }, 0 );
}
-   // but still restore 
focus to the textbox, so that the suggestions will be hidden properly
+   // Always bring focus 
to the textbox, as that's probably where the user expects it
+   // if they were just 
typing.

context.data.$textbox.focus();
} )
)
@@ -563,14 +568,19 @@
if ( $special.get( 0 ) 
!== $other.get( 0 ) ) {
return;
}
-   // do not interfere 
with non-left clicks or if modifier keys are pressed (e.g. ctrl-click)
+   // Do not interfere 
with non-left clicks or if modifier keys are pressed (e.g. ctrl-click).
if ( !( e.which !== 1 
|| e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {
-   
$.suggestions.hide( context );
if ( typeof 
context.config.special.select === 'function' ) {

context.config.special.select.call( $special, context.data.$textbox );
}
+   // This will 
hide the link we're just clicking on, which causes problems
+   // when done 
synchronously in at least Firefox 3.6 (bug 62858).
+   setTimeout( 
function () {
+   
$.suggestions.hide( context );
+   }, 0 );
  

[MediaWiki-commits] [Gerrit] Remove $wgSessionStarted - change (mediawiki/core)

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

Change subject: Remove $wgSessionStarted
..


Remove $wgSessionStarted

This variable is useless since there is the check session_id() !== ''
to do the same, that works correctly if the session has been started
during the request.

Change-Id: I5081e79e30e01c97aa0e59b106cc75e9d1ba951a
---
M includes/Setup.php
1 file changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/includes/Setup.php b/includes/Setup.php
index 18d1e33..391bc13 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -551,13 +551,10 @@
session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . 
'_session' );
 }
 
-if ( !defined( 'MW_NO_SESSION' )  !$wgCommandLineMode ) {
-   if ( $wgRequest-checkSessionCookie() || isset( 
$_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
-   wfSetupSession();
-   $wgSessionStarted = true;
-   } else {
-   $wgSessionStarted = false;
-   }
+if ( !defined( 'MW_NO_SESSION' )  !$wgCommandLineMode 
+   ( $wgRequest-checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 
'Token'] ) )
+) {
+   wfSetupSession();
 }
 
 wfProfileOut( $fname . '-session' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5081e79e30e01c97aa0e59b106cc75e9d1ba951a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: PleaseStand pleasest...@live.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] PostgreSQL: decode image.img_metadata - change (mediawiki/core)

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

Change subject: PostgreSQL: decode image.img_metadata
..


PostgreSQL: decode image.img_metadata

The img_metadata field was not being decoded from bytea into text.

This change to core fixes the reported problem with PdfHandler against
1.22.6, origin/REL1_23 and git head.

Bug: 59147
Change-Id: I285a317a57a29713af1f7f630b340278bd5400da
(cherry picked from commit 8c62609dc877b6ed687e9a3835cfc24fb87e5be2)
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index eb55e82..635aa0e 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -465,6 +465,8 @@
 
$decoded['timestamp'] = wfTimestamp( TS_MW, 
$decoded['timestamp'] );
 
+   $decoded['metadata'] = $this-repo-getSlaveDB()-decodeBlob( 
$decoded['metadata'] );
+
if ( empty( $decoded['major_mime'] ) ) {
$decoded['mime'] = 'unknown/unknown';
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I285a317a57a29713af1f7f630b340278bd5400da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Jjanes jeff.ja...@gmail.com
Gerrit-Reviewer: Aaron Schulz asch...@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] Fix bug 55265 and bug 55174 - change (pywikibot/compat)

2014-05-11 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Fix bug 55265 and bug 55174
..

Fix bug 55265 and bug 55174

Just adding Category: prefix in order to avoid any misinterpretation between 
namespace and il prefix
and using cat.title() instead of catTitle in order to avoid the bug

Change-Id: I072ebf11b2360fe9c04c23fa423bb44b4169db58
---
M category.py
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/81/132781/1

diff --git a/category.py b/category.py
index 59ffddc..9d16590 100644
--- a/category.py
+++ b/category.py
@@ -400,7 +400,7 @@
  useSummaryForDeletion=True, withHistory=False):
 site = pywikibot.getSite()
 self.editSummary = editSummary
-self.oldCat = catlib.Category(site, oldCatTitle)
+self.oldCat = catlib.Category(site, Category: + oldCatTitle)
 self.newCatTitle = newCatTitle
 self.inPlace = inPlace
 self.moveCatPage = moveCatPage
@@ -413,7 +413,7 @@
 def run(self):
 The main bot function that does all the work.
 site = pywikibot.getSite()
-newCat = catlib.Category(site, self.newCatTitle)
+newCat = catlib.Category(site, Category: + self.newCatTitle)
 # set edit summary message
 
 if self.useSummaryForDeletion and self.editSummary:
@@ -422,7 +422,6 @@
 reason = i18n.twtranslate(site, 'category-was-moved',
   {'newcat': self.newCatTitle,
'title': self.newCatTitle})
-
 if not self.editSummary:
 self.editSummary = i18n.twtranslate(site, 'category-changing',
 {'oldcat': self.oldCat.title(),
@@ -433,7 +432,7 @@
 oldMovedTalk = None
 if self.oldCat.exists() and self.moveCatPage:
 copied = self.oldCat.copyAndKeep(
-self.newCatTitle, pywikibot.translate(site, cfd_templates))
+newCat.title(), pywikibot.translate(site, cfd_templates))
 # Also move the talk page
 if copied:
 oldTalk = self.oldCat.toggleTalkPage()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I072ebf11b2360fe9c04c23fa423bb44b4169db58
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@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] Add various missing password classes - change (labs/private)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Add  various missing password classes
..

Add  various missing password classes

Adding various password classes that are used in production to private
labs repo to facilitate compilation of catalogs and usage of the puppet
tree. Also remove some no longer used ones

Change-Id: I54b2629e2953495f241d5e3c3046471fae1f60c5
---
M modules/passwords/manifests/init.pp
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/82/132782/1

diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index 39df054..b9f27ac 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -178,10 +178,6 @@
 $router_pass = ''
 }
 
-class passwords::puppetmaster::dashboard {
-$db_pass = 'Cggn4AU'
-}
-
 class passwords::racktables {
 $racktables_db_user = 'racktables'
 $racktables_db_pass = 'fakebrokenpassword'
@@ -227,6 +223,8 @@
 class passwords::logstash {
 $redis = '73HaA7xh2ZEq'
 }
+
+class passwords::librenms { }
 
 class passwords::bugzilla {
 $bugzilla_db_pass = 'snakeoil'
@@ -285,6 +283,7 @@
 $tata_hyd_ussd_pw = 'FuzzBuz'
 }
 
+class passwords::mysql::globaldev { }
 class passwords::mysql::research {
 $user = 'getup'
 $pass = 'standup'
@@ -304,3 +303,6 @@
 class passwords::udpmxircecho {
 $udpmxircecho_pass = surfin'bird
 }
+
+class passwords::geowiki { }
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54b2629e2953495f241d5e3c3046471fae1f60c5
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
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] Make the toolbar and dialogs enabled by default. - change (mediawiki...WikiEditor)

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

Change subject: Make the toolbar and dialogs enabled by default.
..


Make the toolbar and dialogs enabled by default.

I think that after 3 years we can assume that people who install
WikiEditor, want at least the toolbar and the dialogs enabled by
default on Wikipedia.

Bug: 34410
Change-Id: Ia13e6879c8633fc916ee9fb8e2495f89c2098fdb
---
M WikiEditor.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/WikiEditor.php b/WikiEditor.php
index 884e361..53c9957 100644
--- a/WikiEditor.php
+++ b/WikiEditor.php
@@ -20,9 +20,9 @@
 
/* Textarea / i-frame compatible (OK to deploy) */
 
-   'toolbar' = array( 'global' = false, 'user' = true ),
+   'toolbar' = array( 'global' = true, 'user' = true ),
// Provides interactive tools
-   'dialogs' = array( 'global' = false, 'user' = true ),
+   'dialogs' = array( 'global' = true, 'user' = true ),
// Hide signature button from main namespace
'hidesig' = array( 'global' = true, 'user' = false ),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia13e6879c8633fc916ee9fb8e2495f89c2098fdb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Helder.wiki helder.w...@gmail.com
Gerrit-Reviewer: TheDJ hartman.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] Cache OATH tokens to avoid replay - change (mediawiki...OATHAuth)

2014-05-11 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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

Change subject: Cache OATH tokens to avoid replay
..

Cache OATH tokens to avoid replay

Once a token is used, cache it in memcached
for a brief amount of time (specifically, until
the window in which it is valid ends). That way
once a token is used it cannot be re-used in
a replay attack.

Bug: 53196
Change-Id: I7b8e92875a573f3ac95e13c881ef85464bcecf85
---
M OATHUser.php
1 file changed, 30 insertions(+), 18 deletions(-)


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

diff --git a/OATHUser.php b/OATHUser.php
index 355df2f..3606639 100644
--- a/OATHUser.php
+++ b/OATHUser.php
@@ -143,31 +143,43 @@
 * @return Boolean
 */
public function verifyToken( $token, $reset = false ) {
-   if ( $reset ) {
-   $secret = $this-secretReset;
-   } else {
-   $secret = $this-secret;
+   global $wgMemc;
+
+   // Prevent replay attacks
+   $memcKey = wfMemcKey( 'oauthauth', 'usedtokens', $reset ? 
'reset' : null, $token );
+   if ( $wgMemc-get( $memcKey ) ) {
+   return false;
}
+
+   $retval = false;
+   $secret = $reset ? $this-secretReset : $this-secret;
$results = HOTP::generateByTimeWindow( Base32::decode( $secret 
), 30, -4, 4 );
-   # Check to see if the user's given token is in the list of 
tokens generated
-   # for the time window.
+   // Check to see if the user's given token is in the list of 
tokens generated
+   // for the time window.
foreach ( $results as $result ) {
if ( $result-toHOTP( 6 ) === $token ) {
-   return true;
-   }
-   }
-   # See if the user is using a scratch token
-   $length = count( $this-scratchTokens );
-   for ( $i = 0; $i  $length; $i++ ) {
-   if ( $token === $this-scratchTokens[$i] ) {
-   # If there is a scratch token, remove it from 
the scratch token list
-   unset( $this-scratchTokens[$i] );
-   # Only return true if we removed it from the 
database
-   return $this-updateScratchTokens();
+   $retval = true;
+   break;
}
}
 
-   return false;
+   // See if the user is using a scratch token
+   $length = count( $this-scratchTokens );
+   for ( $i = 0; $i  $length; $i++ ) {
+   if ( $token === $this-scratchTokens[$i] ) {
+   // If there is a scratch token, remove it from 
the scratch token list
+   unset( $this-scratchTokens[$i] );
+   // Only return true if we removed it from the 
database
+   $retval = $this-updateScratchTokens();
+   break;
+   }
+   }
+
+   if ( $retval ) {
+   $wgMemc-set( $memcKey, true, 30 * 8 );
+   }
+
+   return $retval;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b8e92875a573f3ac95e13c881ef85464bcecf85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 tylerro...@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] Add various missing password classes - change (labs/private)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Add  various missing password classes
..


Add  various missing password classes

Adding various password classes that are used in production to private
labs repo to facilitate compilation of catalogs and usage of the puppet
tree. Also remove some no longer used ones

Change-Id: I54b2629e2953495f241d5e3c3046471fae1f60c5
---
M modules/passwords/manifests/init.pp
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index 39df054..b9f27ac 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -178,10 +178,6 @@
 $router_pass = ''
 }
 
-class passwords::puppetmaster::dashboard {
-$db_pass = 'Cggn4AU'
-}
-
 class passwords::racktables {
 $racktables_db_user = 'racktables'
 $racktables_db_pass = 'fakebrokenpassword'
@@ -227,6 +223,8 @@
 class passwords::logstash {
 $redis = '73HaA7xh2ZEq'
 }
+
+class passwords::librenms { }
 
 class passwords::bugzilla {
 $bugzilla_db_pass = 'snakeoil'
@@ -285,6 +283,7 @@
 $tata_hyd_ussd_pw = 'FuzzBuz'
 }
 
+class passwords::mysql::globaldev { }
 class passwords::mysql::research {
 $user = 'getup'
 $pass = 'standup'
@@ -304,3 +303,6 @@
 class passwords::udpmxircecho {
 $udpmxircecho_pass = surfin'bird
 }
+
+class passwords::geowiki { }
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54b2629e2953495f241d5e3c3046471fae1f60c5
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: 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] Add Page.isFlowPage to check whether Flow is enabled on a gi... - change (pywikibot/core)

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

Change subject: Add Page.isFlowPage to check whether Flow is enabled on a given 
page
..


Add Page.isFlowPage to check whether Flow is enabled on a given page

Also adds Site.loadflowinfo to query the API

Bug: 65119
Change-Id: If830e022841918afe7866509380daddaafd036a4
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/site.py
3 files changed, 29 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 1a85255..ea462e2 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1055,6 +1055,9 @@
 if pageprops in pagedict:
 page._pageprops = pagedict['pageprops']
 
+if flowinfo in pagedict:
+page._flowinfo = pagedict['flowinfo']['flow']
+
 
 if __name__ == __main__:
 from pywikibot import Site, logging
diff --git a/pywikibot/page.py b/pywikibot/page.py
index fe54ef6..848f748 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1579,6 +1579,14 @@
  % (self.title(asLink=True), error.message))
 return False
 
+def isFlowPage(self):
+Whether the given title is a Flow page
+if not self.site.hasExtension('Flow', False):
+return False
+if not hasattr(self, '_flowinfo'):
+self.site.loadflowinfo(self)
+return 'enabled' in self._flowinfo
+
 # ### DEPRECATED METHODS 
 
 @deprecated(Site.encoding())
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 5e54f9f..583df32 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1299,6 +1299,24 @@
 return (pageitem['imageinfo']
 if history else pageitem['imageinfo'][0])
 
+def loadflowinfo(self, page):
+
+Loads Flow-related information about a given page
+Assumes that the Flow extension is installed
+
+title = page.title(withSection=False)
+query = self._generator(api.PropertyGenerator,
+type_arg=flowinfo,
+titles=title.encode(self.encoding()),
+)
+for pageitem in query:
+if not self.sametitle(pageitem['title'], title):
+pywikibot.warning(
+uloadflowinfo: Query on %s returned data on '%s'
+% (page, pageitem['title']))
+continue
+api.update_page(page, pageitem)
+
 def page_exists(self, page):
 Return True if and only if page is an existing page on site.
 if not hasattr(page, _pageid):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If830e022841918afe7866509380daddaafd036a4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Multichill maar...@mdammers.nl
Gerrit-Reviewer: Xqt i...@gno.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] Make authentication window size and leniency configurable - change (mediawiki...OATHAuth)

2014-05-11 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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

Change subject: Make authentication window size and leniency configurable
..

Make authentication window size and leniency configurable

Make window size and radius configurable by the system
administrator, rather than hardcoded.

Bug: 53194
Change-Id: I7fe1bfdfa1e7bfc07646a9704084977e17c65313
---
M OATHAuth.php
M OATHUser.php
2 files changed, 31 insertions(+), 3 deletions(-)


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

diff --git a/OATHAuth.php b/OATHAuth.php
index d5c8c61..fa79c7f 100644
--- a/OATHAuth.php
+++ b/OATHAuth.php
@@ -26,6 +26,32 @@
'descriptionmsg' = 'oathauth-desc',
 );
 
+/**
+ * The size of a window to which a token belongs, in seconds
+ *
+ * In OATHAuth, every number of seconds, a new token is generated.
+ * The number of tokens that are valid at a given time is determined
+ * by $wgOATHAuthWindowRange
+ *
+ * @var int
+ */
+$wgOAUTHAuthWindowSize = 30;
+
+/**
+ * The number of token windows in each direction that should be valid
+ *
+ * This tells OATH to accept tokens for a range of $wgOAUTHAuthWindowRadius * 
2 windows
+ * (which is effectively ((1 + 2 * $wgOAUTHAuthWindowRadius) * 
$wgOATHAuthWindowSize) seconds).
+ * This range of valid windows is centered around the current time.
+ *
+ * The purpose of this configuration variable is to account for differences 
between
+ * the user's clock and the server's clock. However, it is recommended to keep 
it as
+ * low as possible.
+ *
+ * @var int
+ */
+$wgOAUTHAuthWindowRadius = 4;
+
 $dir = __DIR__ . '/';
 
 $wgMessagesDirs['OATHAuth'] = __DIR__ . '/i18n';
diff --git a/OATHUser.php b/OATHUser.php
index 3606639..7eeeaa6 100644
--- a/OATHUser.php
+++ b/OATHUser.php
@@ -143,7 +143,7 @@
 * @return Boolean
 */
public function verifyToken( $token, $reset = false ) {
-   global $wgMemc;
+   global $wgMemc, $wgOATHAuthWindowSize, $wgOAUTHAuthWindowRadius;
 
// Prevent replay attacks
$memcKey = wfMemcKey( 'oauthauth', 'usedtokens', $reset ? 
'reset' : null, $token );
@@ -153,7 +153,9 @@
 
$retval = false;
$secret = $reset ? $this-secretReset : $this-secret;
-   $results = HOTP::generateByTimeWindow( Base32::decode( $secret 
), 30, -4, 4 );
+   $results = HOTP::generateByTimeWindow(
+   Base32::decode( $secret ),
+   $wgOATHAuthWindowSize, -$wgOAUTHAuthWindowRadius, 
$wgOAUTHAuthWindowRadius );
// Check to see if the user's given token is in the list of 
tokens generated
// for the time window.
foreach ( $results as $result ) {
@@ -176,7 +178,7 @@
}
 
if ( $retval ) {
-   $wgMemc-set( $memcKey, true, 30 * 8 );
+   $wgMemc-set( $memcKey, true, $wgOATHAuthWindowSize * 
(1 + 2 * $wgOAUTHAuthWindowRadius) );
}
 
return $retval;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fe1bfdfa1e7bfc07646a9704084977e17c65313
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 tylerro...@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] Add method for auto-building forms from TemplateData - change (mediawiki...UploadWizard)

2014-05-11 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Add method for auto-building forms from TemplateData
..

Add method for auto-building forms from TemplateData

This won't be a perfect form build, and we'll need to style it for UW, but
it's a start.

Change-Id: Ice23a0bac32fbd380d750daa8ed2535a1df1180b
---
M resources/mw.uw.MediaTemplate.js
1 file changed, 74 insertions(+), 0 deletions(-)


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

diff --git a/resources/mw.uw.MediaTemplate.js b/resources/mw.uw.MediaTemplate.js
index 1b590e1..3a2ca7e 100644
--- a/resources/mw.uw.MediaTemplate.js
+++ b/resources/mw.uw.MediaTemplate.js
@@ -166,4 +166,78 @@
 
return valueStrings.join( '|' ) + '}}';
};
+
+   /**
+* Builds a form for this template.
+* @returns {jQuery}
+*/
+   mw.uw.MediaTemplate.prototype.buildForm = function () {
+   var i, param, type, $input, $label,
+   paramNames = Object.keys( this.params ),
+   $form = $( 'form' )
+   .prop( 'action', 'javascript:void(0)' )
+   .addClass( 'templatedata-auto-built-form' );
+
+   function canUseInputType( itype ) {
+   var testInput = document.createElement( 'input' );
+   testInput.setAttribute( 'type', 'range' );
+
+   return testInput.type !== 'text';
+   }
+
+   for ( i = 0; i  paramNames.length; i++ ) {
+   param = this.params[paramNames[i]];
+
+   $label = $( 'label' )
+   .addClass( 'templatedata-label' )
+   .text( param.label )
+   .appendTo( $form );
+
+   switch ( param.type ) {
+   case 'boolean':
+   type = 'check';
+   break;
+
+   case 'date':
+   if ( canUseInputType( 'date' ) ) {
+   type = 'date';
+   } else {
+   type = 'text';
+   }
+
+   break;
+
+   case 'content':
+   case 'unbalanced-wikitext':
+   case 'string':
+   type = 'textarea';
+   break;
+
+   case 'wiki-page-name':
+   case 'wiki-file-name':
+   case 'wiki-user-name':
+   case 'number':
+   case 'line':
+   default:
+   type = 'text';
+   break;
+   }
+
+   if ( type === 'textarea' ) {
+   $input = $( 'textarea' );
+   } else {
+   $input = $( 'input type=' + type + ' /' );
+   }
+
+   $input
+   .prop( 'name', paramNames[i] )
+   .addClass( 'templatedata-type-' + param.type )
+   .toggleClass( 'templatedata-required', 
param.required )
+   .toggleClass( 'templatedata-suggested', 
param.suggested )
+   .toggleClass( 'templatedata-deprecated', 
param.deprecated )
+   .appendTo( $label );
+   }
+
+   return $form;
+   };
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice23a0bac32fbd380d750daa8ed2535a1df1180b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org

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


[MediaWiki-commits] [Gerrit] code cleanup: return silently from methods - change (pywikibot/core)

2014-05-11 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: code cleanup: return silently from methods
..

code cleanup: return silently from methods

Page.put() and Page.put_async() aren't functions in core. We can
return from these methods silently.

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/86/132786/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 848f748..0c765ce 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -932,9 +932,9 @@
 
 
 self.text = newtext
-return self.save(comment=comment, watch=watchArticle,
- minor=minorEdit, botflag=botflag, force=force,
- async=async, callback=callback, **kwargs)
+self.save(comment=comment, watch=watchArticle, minor=minorEdit,
+  botflag=botflag, force=force, async=async, callback=callback,
+  **kwargs)
 
 def put_async(self, newtext, comment=u'', watchArticle=None,
   minorEdit=True, botflag=None, force=False, callback=None,
@@ -947,9 +947,9 @@
 backwards-compatibility.
 
 
-return self.put(newtext, comment=comment, watchArticle=watchArticle,
-minorEdit=minorEdit, botflag=botflag, force=force,
-async=True, callback=callback, **kwargs)
+self.put(newtext, comment=comment, watchArticle=watchArticle,
+ minorEdit=minorEdit, botflag=botflag, force=force, async=True,
+ callback=callback, **kwargs)
 
 def watch(self, unwatch=False):
 Add or remove this page to/from bot account's watchlist.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I916940e4e92334741fc87102bc102461c4e8fba4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Extend AbortEmailNotification hook to access log type etc. - change (mediawiki/core)

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

Change subject: Extend AbortEmailNotification hook to access log type etc.
..


Extend AbortEmailNotification hook to access log type etc.

Bug: 42458
Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1
---
M docs/hooks.txt
M includes/changes/RecentChange.php
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index d455fd2..626ca5e 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -250,6 +250,7 @@
 'AbortEmailNotification': Can be used to cancel email notifications for an 
edit.
 $editor: The User who made the change.
 $title: The Title of the page that was edited.
+$rc: The current RecentChange object.
 
 'AbortLogin': Return false to cancel account login.
 $user: the User object being authenticated against
diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index bbf4ab6..f7beb0c 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -279,7 +279,7 @@
$editor = $this-getPerformer();
$title = $this-getTitle();
 
-   if ( wfRunHooks( 'AbortEmailNotification', array( 
$editor, $title ) ) ) {
+   if ( wfRunHooks( 'AbortEmailNotification', array( 
$editor, $title, $this ) ) ) {
# @todo FIXME: This would be better as an 
extension hook
$enotif = new EmailNotification();
$enotif-notifyOnPageChange( $editor, $title,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Revert Make it possible to install extensions using Composer - change (mediawiki/core)

2014-05-11 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Revert Make it possible to install extensions using Composer
..

Revert Make it possible to install extensions using Composer

This reverts commit d6e69d774.

MediaWiki extensions are by definition part of the MediaWiki software
ecosystem, and could therefore be managed using a specialized solution;
The same is not true of PHP packages at large: we're not in a position to
change how the PHP community at large manages dependencies. To the extent
that we have a choice, we should use interfaces like composer.json to
solve for the problem of integration with the outside world.

Change Ib125bea00 made the opposite choice, compromising our ability to
express how MediaWiki relates to external software components in exchange
for superficial gains in convenience of managing MediaWiki extensions.
(I consider the gains superficial because they do not leverage the fact
that extensions share MediaWiki's code -- a property that should be
exploited to provide an extension management solution that is
MediaWiki-aware, providing, for example, a uniform configuration
management interface.)

The cost of that change are manifest in bug 64597: we lost the ability to
express a dependency on PHPUnit in the way that the PHPUnit upstream
recommends.

The problem that change I8df66a929 set out to solve is that modifying
composer.json to express dependencies on extensions means having a local
diff that conflicts with the code in version control. This issue is
actually discussed by the Composer documentation. In short, Composer's
developers recommend that if your production environment uses a cvs to
version code, you should maintain your own clone of the upstream
repository and version your composer.json that way. More detailed
discussion of these issues can be found at
https://getcomposer.org/doc/05-repositories.md#vcs and
https://getcomposer.org/doc/faqs/why-can't-composer-load-repositories-recursively.md.

Change-Id: I3e7c668ee32401e731120cfa9f96986fd8fde8f4
---
D composer-example.json
A composer.json
2 files changed, 30 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/132788/1

diff --git a/composer-example.json b/composer-example.json
deleted file mode 100644
index 6c4d37f..000
--- a/composer-example.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-   require: {
-   php: =5.3.2
-   },
-   suggest: {
-   ext-fileinfo: *,
-   ext-mbstring: *,
-   ext-wikidiff2: *,
-   ext-apc: *
-   }
-}
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..ded3365
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,30 @@
+{
+   name: mediawiki/core,
+   description: Free software wiki application developed by the 
Wikimedia Foundation and others,
+   keywords: [mediawiki, wiki],
+   homepage: https://www.mediawiki.org/;,
+   authors: [
+   {
+   name: MediaWiki Community,
+   homepage: 
https://www.mediawiki.org/wiki/Special:Version/Credits;
+   }
+   ],
+   license: GPL-2.0,
+   support: {
+   issues: https://bugzilla.wikimedia.org/;,
+   irc: irc://irc.freenode.net/mediawiki,
+   wiki: https://www.mediawiki.org/;
+   },
+   require: {
+   php: =5.3.2
+   },
+   require-dev: {
+   phpunit/phpunit: *
+   },
+   suggest: {
+   ext-fileinfo: *,
+   ext-mbstring: *,
+   ext-wikidiff2: *,
+   ext-apc: *
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e7c668ee32401e731120cfa9f96986fd8fde8f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
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] New Wikidata Build - 11/05/2014 10:00 - change (mediawiki...Wikidata)

2014-05-11 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 11/05/2014 10:00
..

New Wikidata Build - 11/05/2014 10:00

Change-Id: Icec5762829fd130d09786e9c8874876c43f161d3
---
M composer.lock
M extensions/Wikibase/repo/Wikibase.hooks.php
M extensions/Wikibase/repo/Wikibase.php
M extensions/Wikibase/repo/includes/store/sql/EntityPerPageTable.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php
M vendor/autoload.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
8 files changed, 78 insertions(+), 20 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index c59bef1..764a0bf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -869,12 +869,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: 0bde25d160b68ae8e9ec2611ed666e220916
+reference: 6d9387ea98e3de2c13961482e067d30593d62980
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/0bde25d160b68ae8e9ec2611ed666e220916;,
-reference: 0bde25d160b68ae8e9ec2611ed666e220916,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/6d9387ea98e3de2c13961482e067d30593d62980;,
+reference: 6d9387ea98e3de2c13961482e067d30593d62980,
 shasum: 
 },
 require: {
@@ -937,7 +937,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2014-05-09 22:24:08
+time: 2014-05-10 20:02:04
 }
 ],
 packages-dev: [
diff --git a/extensions/Wikibase/repo/Wikibase.hooks.php 
b/extensions/Wikibase/repo/Wikibase.hooks.php
index 3c78015..6082c32 100644
--- a/extensions/Wikibase/repo/Wikibase.hooks.php
+++ b/extensions/Wikibase/repo/Wikibase.hooks.php
@@ -1277,4 +1277,55 @@
return new PropertyHandler( $validators );
}
 
+   /**
+* Helper for onAPIQuerySiteInfoStatisticsInfo
+* @param object $row
+* @return array
+*/
+   private static function formatDispatchRow( $row ) {
+   $data = array(
+   'pending' = $row-chd_pending,
+   'lag' = $row-chd_lag,
+   );
+   if ( isset( $row-chd_site ) ) {
+   $data['site'] = $row-chd_site;
+   }
+   if ( isset( $row-chd_seen ) ) {
+   $data['position'] = $row-chd_seen;
+   }
+   if ( isset( $row-chd_touched ) ) {
+   $data['touched'] = $row-chd_touched;
+   }
+
+   return $data;
+   }
+
+   /**
+* Adds DispatchStats info to the API
+* @param array $data
+* @return bool
+*/
+   public static function onAPIQuerySiteInfoStatisticsInfo( array $data ) 
{
+   $stats = new DispatchStats();
+   $stats-load();
+   if ( $stats-hasStats() ) {
+   $data['dispatch'] = array(
+   'oldest' = array(
+   'id' = $stats-getMinChangeId(),
+   'timestamp' = 
$stats-getMinChangeTimestamp(),
+   ),
+   'newest' = array(
+   'id' = $stats-getMaxChangeId(),
+   'timestamp' = 
$stats-getMaxChangeTimestamp(),
+   ),
+   'freshest' = self::formatDispatchRow( 
$stats-getFreshest() ),
+   'median' = self::formatDispatchRow( 
$stats-getMedian() ),
+   'stalest' = self::formatDispatchRow( 
$stats-getStalest() ),
+   'average' = self::formatDispatchRow( 
$stats-getAverage() ),
+   );
+   }
+
+   return true;
+   }
+
 }
diff --git a/extensions/Wikibase/repo/Wikibase.php 
b/extensions/Wikibase/repo/Wikibase.php
index b83aeb9..10fd985 100644
--- a/extensions/Wikibase/repo/Wikibase.php
+++ b/extensions/Wikibase/repo/Wikibase.php
@@ -180,6 +180,7 @@
$wgHooks['OutputPageBeforeHTML'][]  = 
'Wikibase\RepoHooks::onOutputPageBeforeHtmlRegisterConfig';
$wgHooks['MakeGlobalVariablesScript'][] = 
'Wikibase\RepoHooks::onMakeGlobalVariablesScript';
$wgHooks['ContentHandlerForModelID'][]  = 

[MediaWiki-commits] [Gerrit] Don't use $this for docuementing hook parameters - change (mediawiki/core)

2014-05-11 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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

Change subject: Don't use $this for docuementing hook parameters
..

Don't use $this for docuementing hook parameters

It is a reserved keyword, so this only confuses people.

Change-Id: I6553bd93ac6f72be42493a0c3ca59c63d4a97e18
---
M docs/hooks.txt
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/132789/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 626ca5e..966afd8 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -281,7 +281,7 @@
 'SendWatchlistEmailNotification': Return true to send watchlist email 
notification
 $targetUser: the user whom to send watchlist email notification
 $title: the page title
-$this: EmailNotification object
+$enotif: EmailNotification object
 
 'AbortChangePassword': Return false to cancel password change.
 $user: the User object to which the password change is occuring
@@ -2616,7 +2616,7 @@
 $whitelisted: Boolean value of whether this title is whitelisted
 
 'TitleSquidURLs': Called to determine which URLs to purge from HTTP caches.
-$this: Title object to purge
+$title: Title object to purge
 $urls: An array of URLs to purge from the caches, to be manipulated.
 
 'UndeleteForm::showHistory': Called in UndeleteForm::showHistory, after a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6553bd93ac6f72be42493a0c3ca59c63d4a97e18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch

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


[MediaWiki-commits] [Gerrit] Don't use $this for docuementing hook parameters - change (mediawiki/core)

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

Change subject: Don't use $this for docuementing hook parameters
..


Don't use $this for docuementing hook parameters

It is a reserved keyword, so this only confuses people.

Change-Id: I6553bd93ac6f72be42493a0c3ca59c63d4a97e18
---
M docs/hooks.txt
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 626ca5e..966afd8 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -281,7 +281,7 @@
 'SendWatchlistEmailNotification': Return true to send watchlist email 
notification
 $targetUser: the user whom to send watchlist email notification
 $title: the page title
-$this: EmailNotification object
+$enotif: EmailNotification object
 
 'AbortChangePassword': Return false to cancel password change.
 $user: the User object to which the password change is occuring
@@ -2616,7 +2616,7 @@
 $whitelisted: Boolean value of whether this title is whitelisted
 
 'TitleSquidURLs': Called to determine which URLs to purge from HTTP caches.
-$this: Title object to purge
+$title: Title object to purge
 $urls: An array of URLs to purge from the caches, to be manipulated.
 
 'UndeleteForm::showHistory': Called in UndeleteForm::showHistory, after a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6553bd93ac6f72be42493a0c3ca59c63d4a97e18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Waldir wal...@email.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] Transactions query() and some corrections - change (mediawiki...WikiLexicalData)

2014-05-11 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Transactions query() and some corrections
..


Transactions query() and some corrections

Partial fix for bug 56220 and some documentation corrections and
additions.

Patch 2: Added comments and documentation regarding SpecialTransaction.php
plus added int to a defined meaning comment.

Patch 3: Forgot to add Patch 2 corrections. Added the files as Patch 3.
Sorry.

Kindly commit if there are no errors or suggestions. Thanks!

Bug: 56220
Change-Id: I6732c607f0a4e22e59491fe177cfec022a87c1b1
---
M OmegaWiki.md
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/OmegaWikiDatabaseAPI.php
M OmegaWiki/SpecialTransaction.php
M OmegaWiki/Transaction.php
5 files changed, 123 insertions(+), 36 deletions(-)

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



diff --git a/OmegaWiki.md b/OmegaWiki.md
index ca054cd..9865f63 100644
--- a/OmegaWiki.md
+++ b/OmegaWiki.md
@@ -109,6 +109,8 @@
* SpecialExportTSV
* SpecialImportTSV
* SpecialLanguages
+   * Unused
+   * Classes
* SpecialTransaction
 * Web API
* Obtaining Data
diff --git a/OmegaWiki/DefinedMeaning.php b/OmegaWiki/DefinedMeaning.php
index 3fbfc98..616df69 100644
--- a/OmegaWiki/DefinedMeaning.php
+++ b/OmegaWiki/DefinedMeaning.php
@@ -330,7 +330,7 @@
 * * option['test'] = true used to test the function
 * @param $dc opt'l str The WikiLexicalData dataset
 *
-* @return array( meaning1_id, relationtype_mid, meaning2_mid)
+* @return array( int defined_meaning_id )
 * @return if not exists, array()
 *
 * @note options parameter can be used to extend this function.
diff --git a/OmegaWiki/OmegaWikiDatabaseAPI.php 
b/OmegaWiki/OmegaWikiDatabaseAPI.php
index c27ff1a..d282055 100644
--- a/OmegaWiki/OmegaWikiDatabaseAPI.php
+++ b/OmegaWiki/OmegaWikiDatabaseAPI.php
@@ -54,7 +54,7 @@
 * @param options  opt'l arr An optional parameters
 * @param dc   opt'l str The WikiLexicalData dataset
 *
-* @return array( meaning1_id, relationtype_mid, meaning2_mid)
+* @return array( int defined_meaning_id )
 * @return if not exists, array()
 *
 * @see Attributes::getRelationIdRelation, for a list of options.
@@ -89,6 +89,44 @@
 
/*! @} group OwDbAPIsyntFn ends here.*/
 
+   /** @addtogroup OwDbAPItransactFn OwDatabaseAPI's Transactions functions
+*  @{
+*/
+
+   /**
+* @param transactionId req'd int The transaction id
+* @param options   opt'l arr Optional parameters
+* @param dcopt'l str The WikiLexicalData dataset
+*
+* @return array( int user_id, str user_ip, str timestamp, str comment )
+* @return if not exists, array()
+*
+* @see Transactions::getIdDetails, for a list of options.
+*/
+   public static function getTransactionIdDetails( $transactionId, 
$options = array(), $dc = null ) {
+   $api = new OwDatabaseAPI;
+   $api-settings( 'transaction', $dc );
+   return $api-Transaction-getIdDetails( $transactionId, 
$options, $api-dc );
+   }
+
+   /**
+* @param languageId req'd int The language id
+* @param optionsopt'l arr Optional parameters
+* @param dc opt'l str The WikiLexicalData dataset
+*
+* @return array( int user_id, str user_ip, str timestamp, str comment )
+* @return if not exists, array()
+*
+* @see Transactions::getLanguageIdLatestTransactionId, for a list of 
options.
+*/
+   public static function getLanguageIdLatestTransactionId( $languageId, 
$options = array(), $dc = null ) {
+   $api = new OwDatabaseAPI;
+   $api-settings( 'transaction', $dc );
+   return $api-Transaction-getLanguageIdLatestTransactionId( 
$languageId, $options, $api-dc );
+   }
+
+   /*! @} group OwDbAPItransactFn ends here.*/
+
/**
 * @brief sets the initial settings for static functions
 *
@@ -101,6 +139,7 @@
if ( $class == 'attributes' ) { $this-Attributes = new 
Attributes; }
if ( $class == 'syntrans' ) { $this-Syntrans = new Syntrans; }
if ( $class == 'definedMeaning' ) { $this-DefinedMeaning = new 
DefinedMeanings; }
+   if ( $class == 'transaction' ) { $this-Transaction = new 
Transactions; }
}
 
/**
diff --git a/OmegaWiki/SpecialTransaction.php b/OmegaWiki/SpecialTransaction.php
index d4c55c0..b354b3c 100644
--- a/OmegaWiki/SpecialTransaction.php
+++ b/OmegaWiki/SpecialTransaction.php
@@ -5,6 +5,13 @@
 require_once( Wikidata.php );
 require_once( Utilities.php );
 
+/** @file
+ *
+ * This 

[MediaWiki-commits] [Gerrit] CSS style to make HTML5 wbr work on IE 8-11 - change (mediawiki/core)

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

Change subject: CSS style to make HTML5 wbr work on IE 8-11
..


CSS style to make HTML5 wbr work on IE 8-11

(Note that using the zero-width space directly is roughly equivalent;
see https://en.wikipedia.org/wiki/Zero-width_space )

Bug: 65155
Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13
---
M skins/common/shared.css
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/skins/common/shared.css b/skins/common/shared.css
index ac7f407..a5612e2 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -39,6 +39,12 @@
color: black;
 }
 
+/* Helper for wbr element on IE 8+; in HTML5, but not supported by default as 
of IE 11. */
+/* Note canonical HTML5 styles recommend content: \u200B, but this doesn't 
work as of IE 11. */
+wbr {
+   display: inline-block;
+}
+
 /* Input types that should follow user direction, like buttons */
 /* TODO: What about buttons in wikipage content ? */
 input[type=submit],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Waldir wal...@email.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] Various db query function fix - change (mediawiki...WikiLexicalData)

2014-05-11 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Various db query function fix
..


Various db query function fix

converter's query adds the MySQL prefix and need not be fixed. Search.php
seems not used, if it is, I do not know how to test it.

Patch 2: language.php's query function need not be changed since the SQL
it uses was created using selectSQLText.

Query functions not yet checked are contained in
SpecialNeedTranslation.php, SpecialSuggest.php and WikiDataAPI.php.

There are PHP mysql_query functions at SpecialNeedsTranslation.php and
copytest.php and Copy.php which if I am correct, might need to be checked
for prefixed database. I am not sure, kindly check.

Kindly merge this if there are no more issues. Thanks.

Bug: 56220
Change-Id: Ia43d86734b2f59c39497946a236185c431c88700
---
M OmegaWiki/RecordSetQueries.php
M OmegaWiki/Search.php
M OmegaWiki/converter.php
M OmegaWiki/languages.php
4 files changed, 82 insertions(+), 61 deletions(-)

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



diff --git a/OmegaWiki/RecordSetQueries.php b/OmegaWiki/RecordSetQueries.php
index 5dcd476..82fbc24 100644
--- a/OmegaWiki/RecordSetQueries.php
+++ b/OmegaWiki/RecordSetQueries.php
@@ -6,16 +6,16 @@
 class TableColumnsToAttribute {
protected $tableColumns;
protected $attribute;
-   
+
public function __construct( array $tableColumns, Attribute $attribute 
) {
$this-tableColumns = $tableColumns;
$this-attribute = $attribute;
}
-   
+
public function getTableColumns() {
return $this-tableColumns;
}
-   
+
public function getAttribute() {
return $this-attribute;
}
@@ -23,7 +23,7 @@
 
 class TableColumnsToAttributesMapping {
protected $tableColumnsToAttributes;
-   
+
public function __construct( $tableColumnsToAttributes ) {
if ( is_array( $tableColumnsToAttributes ) ) {
$this-tableColumnsToAttributes = 
$tableColumnsToAttributes;
@@ -31,10 +31,10 @@
$this-tableColumnsToAttributes = func_get_args();
}
}
-   
+
public function getSelectColumns() {
$result = array();
-   
+
foreach ( $this-tableColumnsToAttributes as 
$tableColumnToAttribute ) {
foreach ( $tableColumnToAttribute-getTableColumns() as 
$tableColumn ) {
$result[] = $tableColumn;
@@ -45,17 +45,17 @@
 
public function getAttributes() {
$result = array();
-   
+
foreach ( $this-tableColumnsToAttributes as 
$tableColumnToAttribute ) {
$result[] = $tableColumnToAttribute-getAttribute();
}
return $result;
}
-   
+
public function getCount() {
return count( $this-tableColumnsToAttributes );
}
-   
+
public function getMapping( $index ) {
return $this-tableColumnsToAttributes[$index];
}
@@ -78,7 +78,7 @@
else {
$groupBy = array();
}
-   
+
$query =
SELECT  . implode( , , $selectFields ) .
 FROM  . implode( , , $tableNames );
@@ -101,18 +101,18 @@
 
 function getRecordFromRow( $row, $columnIndex, Structure $structure ) {
$result = new ArrayRecord( $structure );
-   
+
foreach ( $structure-getAttributes() as $attribute ) {
$result-setAttributeValue( $attribute, $row[$columnIndex] );
$columnIndex++;
}
-   
+
return $result;
 }
 
 function queryRecordSet( $recordSetStructureId, QueryTransactionInformation 
$transactionInformation, Attribute $keyAttribute, 
TableColumnsToAttributesMapping $tableColumnsToAttributeMapping, Table $table, 
array $restrictions, array $orderBy = array(), $count = - 1, $offset = 0 ) {
$dbr = wfGetDB( DB_SLAVE );
-   
+
$selectFields =  $tableColumnsToAttributeMapping-getSelectColumns();
$attributes = $tableColumnsToAttributeMapping-getAttributes();
 
@@ -121,11 +121,13 @@
} else {
$allAttributes = $attributes;
}
-   
+
// create and run the sql query to get the $selectFields fields from 
the $table table
$query = getTransactedSQL( $transactionInformation, $selectFields, 
$table, $restrictions, $orderBy, $count, $offset );
$queryResult = $dbr-query( $query );
-   
+   // @note Even though the above uses the query function, we need not 
convert this
+   // to select function, since the generated SQL adds the mySQL prefix 
automatically. ~he
+
if ( !is_null( $recordSetStructureId ) ) {
$structure = new Structure( $recordSetStructureId, 

[MediaWiki-commits] [Gerrit] Use FancyCaptcha in ConfirmEdit - change (mediawiki/vagrant)

2014-05-11 Thread Awjrichards (Code Review)
Awjrichards has submitted this change and it was merged.

Change subject: Use FancyCaptcha in ConfirmEdit
..


Use FancyCaptcha in ConfirmEdit

That's what we currently use in production.

Change-Id: I8544c32871da73d6199a75a0ba70a0e3a6543ebe
---
M puppet/manifests/roles/confirmedit.pp
M puppet/modules/python/manifests/pil.pp
2 files changed, 29 insertions(+), 3 deletions(-)

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



diff --git a/puppet/manifests/roles/confirmedit.pp 
b/puppet/manifests/roles/confirmedit.pp
index 0ac7128..8a2604d 100644
--- a/puppet/manifests/roles/confirmedit.pp
+++ b/puppet/manifests/roles/confirmedit.pp
@@ -5,8 +5,24 @@
 # to guess passwords.
 class role::confirmedit {
 include role::mediawiki
+include python::pil
 
 mediawiki::extension { 'ConfirmEdit':
-settings = { wgCaptchaClass = 'SimpleCaptcha' },
+   before = Exec['generate FancyCaptcha images']
+   }
+
+mediawiki::settings { 'ConfirmEdit FancyCaptcha':
+values = {
+wgCaptchaClass = 'FancyCaptcha',
+wgCaptchaDirectory = '$IP/images/temp/captcha',
+wgCaptchaDirectoryLevels = 0,
+wgCaptchaSecret = 'FOO',
+},
+header = 'require_once 
$IP/extensions/ConfirmEdit/FancyCaptcha.php;',
+}
+
+exec { 'generate FancyCaptcha images':
+command = 'echo hello\nworld\n  /tmp/words; mkdir -p 
../../images/temp/captcha; python captcha.py 
--font=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 
--wordlist=/tmp/words --key=FOO --output=../../images/temp/captcha --count=2',
+cwd = '/vagrant/mediawiki/extensions/ConfirmEdit',
 }
 }
diff --git a/puppet/modules/python/manifests/pil.pp 
b/puppet/modules/python/manifests/pil.pp
index 3c787eb..04aa2da 100644
--- a/puppet/modules/python/manifests/pil.pp
+++ b/puppet/modules/python/manifests/pil.pp
@@ -8,6 +8,8 @@
 include ::python::dev
 
 package { 'zlib1g-dev': }
+# needed for ConfirmEdit's FancyCaptcha
+package { 'libfreetype6-dev': }
 
 # Workaround for 'pip install pil' failing to find libz.so and thus
 # installing without zlib support. See http://goo.gl/eWJc24.
@@ -17,12 +19,20 @@
 require = Package['zlib1g-dev'],
 }
 
+# Workaround for 'pip install pil' failing to find libfreetype.so and
+# thus installing without freetype support. See http://goo.gl/eWJc24.
+file { '/usr/lib/libfreetype.so':
+ensure  = link,
+target  = /usr/lib/${::hardwaremodel}-linux-gnu/libfreetype.so,
+require = Package['libfreetype6-dev'],
+}
+
 package { 'PIL':
 ensure   = '1.1.7',
 provider = 'pip',
 require  = [
-Package['python-dev', 'zlib1g-dev'],
-File['/usr/lib/libz.so'],
+Package['python-dev', 'zlib1g-dev', 'libfreetype6-dev'],
+File['/usr/lib/libz.so', '/usr/lib/libfreetype.so'],
 ],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8544c32871da73d6199a75a0ba70a0e3a6543ebe
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Awjrichards aricha...@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] Defined Meaning Namespace + lang/user global fixes - change (mediawiki...WikiLexicalData)

2014-05-11 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Defined Meaning Namespace + lang/user global fixes
..


Defined Meaning Namespace + lang/user global fixes

When a preferred language is not found in wgLang, the preferred language
is searched at wgUser first, before defaulting to English, and then any
other language.

Patch 2:
Restructured two database API functions to display both the expression and
definition to the user language preference, if available. removed a @todo.

Patch 3:
Special page Suggest now outputs in the preferred language in some languages
like Min Nan and German. Using $wgUser global instead of $wgLang seems to
be preferred, since this fixed the Min Nan and German problem of always
seeing English.

Patch 4:
created more lang/user global safety net, so more data will be displayed
under the user's language preference.

Patch 5:
an error at WikiDataAPI, fixed.

Patch 6:
additional note on the lang/user global issue.

Patch 7:
additional lang/user safety nets created.

I think I have covered most of them. Kindly check and merge when there are
no more issues and/or suggestions. Thanks!

Change-Id: Id7e6d73eab24285797569dbefd904e5424543452
---
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/Editor.php
M OmegaWiki/OmegaWikiRecordSets.php
M OmegaWiki/SpecialSelect.php
M OmegaWiki/SpecialSuggest.php
M OmegaWiki/WikiDataAPI.php
M OmegaWiki/Wikidata.php
M OmegaWiki/forms.php
M OmegaWiki/languages.php
M Wikidata.hooks.php
10 files changed, 116 insertions(+), 57 deletions(-)

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



diff --git a/OmegaWiki/DefinedMeaning.php b/OmegaWiki/DefinedMeaning.php
index 3fbfc98..dfd1da1 100644
--- a/OmegaWiki/DefinedMeaning.php
+++ b/OmegaWiki/DefinedMeaning.php
@@ -91,8 +91,6 @@
// @note Since the defined meaning expression can be misleading 
and
// the software is now able to redirect using the dm id only, 
it seems logical
// to replace the full dm title and replace it with the id. ~he
-   // @todo Maybe in the future, $expressionTranslated will 
default to the user
-   // language or preferred language. ~he
$wgOut-setPageTitle( DefinedMeaning:{$dmInfo['id']} - 
$expressionTranslated ) ;
 
$editor = getDefinedMeaningEditor( $this-viewInformation );
diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index e22911c..0503ea9 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1150,7 +1150,7 @@
}
 
public function getViewHTML( IdStack $idPath, $definedMeaningId ) {
-   global $wgOut, $wgLang, $wgUser;
+   global $wgOut, $wgUser;
 
/**
 * the first definition will be used as a meta descriptor for 
search engines
@@ -1160,7 +1160,10 @@
 
$output = ;
 
-   $userLanguageId = getLanguageIdForCode( $wgLang-getCode() ) ;
+   if ( !$userLanguageId = getLanguageIdForCode( 
$wgUser-mOptionOverrides['language'] ) ) {
+   global $wgLang;
+   $userLanguageId = getLanguageIdForCode( 
$wgLang-getCode() ) ;
+   }
$definition = getDefinedMeaningDefinition( $definedMeaningId );
$definingExpression = definingExpression( $definedMeaningId );
 
diff --git a/OmegaWiki/OmegaWikiRecordSets.php 
b/OmegaWiki/OmegaWikiRecordSets.php
index 388f6eb..38950e9 100644
--- a/OmegaWiki/OmegaWikiRecordSets.php
+++ b/OmegaWiki/OmegaWikiRecordSets.php
@@ -169,8 +169,11 @@
 }
 
 function getDefinedMeaningReferenceRecords( array $definedMeaningIds, $usedAs 
) {
-   global $wgLang ;
-   $userLanguageId = getLanguageIdForCode( $wgLang-getCode() ) ;
+   global $wgUser;
+   if ( !$userLanguageId = getLanguageIdForCode( 
$wgUser-mOptionOverrides['language'] ) ) {
+   global $wgLang;
+   $userLanguageId = getLanguageIdForCode( $wgLang-getCode() );
+   }
 
 // $startTime = microtime(true);
 
@@ -486,7 +489,7 @@
  */
 function getExpressionsRecordSet( $spelling, ViewInformation $viewInformation, 
$dc = null ) {
wfProfileIn( __METHOD__ );
-   global $wgLang;
+   global $wgUser;
$o = OmegaWikiAttributes::getInstance();
 
$queryResult = null;
@@ -501,7 +504,10 @@
 
} else {
// default: is there an expression in the user language?
-   $userLanguageId = getLanguageIdForCode( $wgLang-getCode() ) ;
+   if ( !$userLanguageId = getLanguageIdForCode( 
$wgUser-mOptionOverrides['language'] ) ) {
+   global $wgLang;
+   $userLanguageId = getLanguageIdForCode( 
$wgLang-getCode() );
+   }
if ( $userLanguageId ) {
$expressionLang = $userLanguageId;
}
diff --git a/OmegaWiki/SpecialSelect.php 

[MediaWiki-commits] [Gerrit] Add nocreate parameter to Site.editpage - change (pywikibot/core)

2014-05-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add nocreate parameter to Site.editpage
..

Add nocreate parameter to Site.editpage

Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
---
M pywikibot/site.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/90/132790/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 583df32..cf48768 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2660,7 +2660,8 @@
 
 @must_be(group='user')
 def editpage(self, page, summary, minor=True, notminor=False,
- bot=True, recreate=True, createonly=False, watch=None):
+ bot=True, recreate=True, createonly=False, nocreate=False,
+ watch=None):
 Submit an edited Page object to be saved to the wiki.
 
 @param page: The Page to be saved; its .text property will be used
@@ -2673,6 +2674,7 @@
 title has previously been deleted
 @param createonly: if True, raise an error if this title already
 exists on the wiki
+@param nocreate: if True, raise an error if the page does not exist
 @param watch: Specify how the watchlist is affected by this edit, set
 to one of watch, unwatch, preferences, nochange:
 * watch: add the page to the watchlist
@@ -2720,6 +2722,8 @@
 params['recreate'] = 
 if createonly:
 params['createonly'] = 
+if nocreate:
+params['nocreate'] = 
 if watch in [watch, unwatch, preferences, nochange]:
 params['watchlist'] = watch
 elif watch:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add config message in ignored list - change (translatewiki)

2014-05-11 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Add config message in ignored list
..

Add config message in ignored list

Change-Id: Ib95cbb859b2d9dedc2203ff4e619c1a7b9c6a91f
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/91/132791/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 426f0f9..0e95596 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1683,7 +1683,7 @@
 aliasfile = UploadWizard/UploadWizard.alias.php
 optional = group-upwizcampeditors.css, group-upwizcampeditors.js
 optional = mwe-upwiz-license-custom-url
-ignored = accesskey-save-upload-campaign, accesskey-cancel-upload-campaign, 
mwe-upwiz-flickr-source-template, mwe-upwiz-flickr-author-template
+ignored = accesskey-save-upload-campaign, accesskey-cancel-upload-campaign, 
mwe-upwiz-flickr-source-template, mwe-upwiz-flickr-author-template, 
mwe-upwiz-config-allowed-templates
 
 Unicode Converter
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib95cbb859b2d9dedc2203ff4e619c1a7b9c6a91f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org

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


[MediaWiki-commits] [Gerrit] Add nocreate parameter to Site.editpage - change (pywikibot/core)

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

Change subject: Add nocreate parameter to Site.editpage
..


Add nocreate parameter to Site.editpage

Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
---
M pywikibot/site.py
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 583df32..cf48768 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2660,7 +2660,8 @@
 
 @must_be(group='user')
 def editpage(self, page, summary, minor=True, notminor=False,
- bot=True, recreate=True, createonly=False, watch=None):
+ bot=True, recreate=True, createonly=False, nocreate=False,
+ watch=None):
 Submit an edited Page object to be saved to the wiki.
 
 @param page: The Page to be saved; its .text property will be used
@@ -2673,6 +2674,7 @@
 title has previously been deleted
 @param createonly: if True, raise an error if this title already
 exists on the wiki
+@param nocreate: if True, raise an error if the page does not exist
 @param watch: Specify how the watchlist is affected by this edit, set
 to one of watch, unwatch, preferences, nochange:
 * watch: add the page to the watchlist
@@ -2720,6 +2722,8 @@
 params['recreate'] = 
 if createonly:
 params['createonly'] = 
+if nocreate:
+params['nocreate'] = 
 if watch in [watch, unwatch, preferences, nochange]:
 params['watchlist'] = watch
 elif watch:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Xqt i...@gno.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 config message for allowed templates - change (mediawiki...UploadWizard)

2014-05-11 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Add config message for allowed templates
..

Add config message for allowed templates

This still doesn't really change functionality, but it does add a message that
goes out with the UW modules.

Change-Id: I9e574b8ea17df4a878c4ff23aceff238ba12e45b
---
M UploadWizardHooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 619c782..97cd60e 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -453,6 +453,7 @@
'prefs-uploads',
'prefs-upwiz-interface',
'colon-separator',
+   'mwe-upwiz-config-allowed-templates',
),
'group' = 'ext.uploadWizard'
),
diff --git a/i18n/en.json b/i18n/en.json
index 0cb0c8d..ff836dd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -373,5 +373,6 @@
 mwe-upwiz-prefs-maxsimultaneous-upload: Maximum number of concurrent 
uploads,
 campaigns: Upload Wizard campaigns,
 mwe-upload-campaigns-pagination-next: Next page,
-mwe-upload-campaigns-list-title: List of upload campaigns
-}
\ No newline at end of file
+mwe-upload-campaigns-list-title: List of upload campaigns,
+mwe-upwiz-config-allowed-templates: Information
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 0a51d3e..4ebf491 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -311,5 +311,6 @@
mwe-upwiz-prefs-maxsimultaneous-upload: Preference which sets the 
maximum number of concurrent upload requests,
campaigns: {{doc-special|Campaigns}}\nThe UploadWizard campaign page 
provides a list of Upload Wizard campaigns.\nFor more information, see 
[[:mw:Extension:UploadWizard/Campaigns]].,
mwe-upload-campaigns-pagination-next: Link to next page of upload 
campaigns.\n{{Identical|Next page}},
-   mwe-upload-campaigns-list-title: Title of page that has list of 
upload campaigns
+   mwe-upload-campaigns-list-title: Title of page that has list of 
upload campaigns,
+mwe-upwiz-config-allowed-templates: List of allowed templates to use 
for describing files and building forms. {{notranslate}}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e574b8ea17df4a878c4ff23aceff238ba12e45b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org

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


[MediaWiki-commits] [Gerrit] Remove old WikiEditor settings - change (operations/mediawiki-config)

2014-05-11 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Remove old WikiEditor settings
..

Remove old WikiEditor settings

The NTOC, template editor and highlight modules of WikiEditor have
been removed in the change sets:
I0f53a68e50fc950d7f407ee81b2bf0d81ef4948d
I47119d6cfdde4b40ff5b07be0c7d327b80598142
I9740a1197209f177217b034e8b94a90b3905a560

Change-Id: I0865cb61eb9f926282fe6efbfd6e7bb363219094
---
M wmf-config/CommonSettings.php
1 file changed, 3 insertions(+), 16 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 8b1a4ea..f99b13f 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1623,31 +1623,18 @@
include ( $IP/extensions/PdfHandler/PdfHandler.php );
 }
 
-$wgNavigableTOCCollapseEnable = true;
-$wgNavigableTOCResizable = true;
-
 require( $IP/extensions/WikiEditor/WikiEditor.php );
 
 // Disable experimental things
-$wgWikiEditorFeatures['templateEditor'] =
-   $wgWikiEditorFeatures['preview'] =
+$wgWikiEditorFeatures['preview'] =
$wgWikiEditorFeatures['previewDialog'] =
-   $wgWikiEditorFeatures['publish'] =
-   $wgWikiEditorFeatures['templates'] =
-   $wgWikiEditorFeatures['highlight'] = array( 'global' = false, 'user' 
= true ); // Hidden from prefs view
-$wgHiddenPrefs[] = 'usenavigabletoc';
-$wgHiddenPrefs[] = 'wikieditor-templates';
-$wgHiddenPrefs[] = 'wikieditor-template-editor';
+   $wgWikiEditorFeatures['publish'] = array( 'global' = false, 'user' = 
true ); // Hidden from prefs view
 $wgHiddenPrefs[] = 'wikieditor-preview';
 $wgHiddenPrefs[] = 'wikieditor-previewDialog';
 $wgHiddenPrefs[] = 'wikieditor-publish';
-$wgHiddenPrefs[] = 'wikieditor-highlight';
+
 $wgDefaultUserOptions['usebetatoolbar'] = 1;
 $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
-
-// For Babaco... these are still experimental, won't be on by default
-$wgNavigableTOCUserEnable = true;
-$wgEditToolbarCGDUserEnable = true;
 
 if ( $wmgUserDailyContribs ) {
require $IP/extensions/UserDailyContribs/UserDailyContribs.php;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0865cb61eb9f926282fe6efbfd6e7bb363219094
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove long absent Wikidata crons from puppet - change (operations/puppet)

2014-05-11 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Remove long absent Wikidata crons from puppet
..

Remove long absent Wikidata crons from puppet

Change-Id: Id5c67c87fb7ba100ecf8acd3a5f2e95f7468323d
---
M manifests/misc/maintenance.pp
1 file changed, 0 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/132794/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index f9b97ec..ec4010d 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -228,10 +228,6 @@
 ensure  = $wbenabled,
 }
 
-cron { 'wikibase-repo-prune':
-ensure = 'absent',
-}
-
 # Run the dispatcher script every 5 minutes
 # This handles inserting jobs into client job queue, which then process 
the changes
 # not enabled yet until wikidata gets switched to new build of Wikibase
@@ -249,24 +245,6 @@
 user= 'mwdeploy',
 minute  = '*/5',
 ensure  = $wbenabled,
-}
-
-cron { 'wikibase-dispatch-changes':
-ensure = 'absent',
-}
-
-cron { 'wikibase-dispatch-changes2':
-ensure = 'absent',
-}
-
-cron {
-'wikibase-poll-test2':
-ensure = absent;
-}
-
-cron {
-'wikibase-poll-huwiki':
-ensure = absent;
 }
 
 file {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5c67c87fb7ba100ecf8acd3a5f2e95f7468323d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Run Wikidata maint. scripts as apache instead of mwdeploy - change (operations/puppet)

2014-05-11 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Run Wikidata maint. scripts as apache instead of mwdeploy
..

Run Wikidata maint. scripts as apache instead of mwdeploy

Change-Id: Ic949507706b187d2a8b1882175d12a05d9cf3343
---
M manifests/misc/maintenance.pp
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/132795/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index ec4010d..9bc5bb3 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -223,7 +223,7 @@
 cron { 'wikibase-repo-prune2':
 # prunes the wb_changes table in wikidatawiki db
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/pruneChanges.php 
--wiki wikidatawiki --number-of-days=3 21  /var/log/wikidata/prune2.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = [0,15,30,45],
 ensure  = $wbenabled,
 }
@@ -234,7 +234,7 @@
 cron { 'wikibase-dispatch-changes3':
 # dispatches changes data to wikibase clients (e.g. wikipedia) to be 
processed as jobs there
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/lib/maintenance/dispatchChanges.php 
--wiki wikidatawiki --max-time 900 --batch-size 200 --dispatch-interval 30 21 
 /var/log/wikidata/dispatcher3.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = '*/5',
 ensure  = $wbenabled,
 }
@@ -242,15 +242,15 @@
 cron { 'wikibase-dispatch-changes4':
 # second dispatcher to inject wikidata changes  wikibase clients (e.g. 
wikipedia) to be processed as jobs there
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/lib/maintenance/dispatchChanges.php 
--wiki wikidatawiki --max-time 900 --batch-size 200 --dispatch-interval 30 21 
 /var/log/wikidata/dispatcher4.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = '*/5',
 ensure  = $wbenabled,
 }
 
 file {
 '/var/log/wikidata':
-owner  = mwdeploy,
-group  = mwdeploy,
+owner  = 'apache',
+group  = 'apache',
 mode   = '0664',
 ensure = directory;
 '/etc/logrotate.d/wikidata':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic949507706b187d2a8b1882175d12a05d9cf3343
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Remove long absent Wikidata crons from puppet - change (operations/puppet)

2014-05-11 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Remove long absent Wikidata crons from puppet
..


Remove long absent Wikidata crons from puppet

Change-Id: Id5c67c87fb7ba100ecf8acd3a5f2e95f7468323d
---
M manifests/misc/maintenance.pp
1 file changed, 0 insertions(+), 22 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index f9b97ec..ec4010d 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -228,10 +228,6 @@
 ensure  = $wbenabled,
 }
 
-cron { 'wikibase-repo-prune':
-ensure = 'absent',
-}
-
 # Run the dispatcher script every 5 minutes
 # This handles inserting jobs into client job queue, which then process 
the changes
 # not enabled yet until wikidata gets switched to new build of Wikibase
@@ -249,24 +245,6 @@
 user= 'mwdeploy',
 minute  = '*/5',
 ensure  = $wbenabled,
-}
-
-cron { 'wikibase-dispatch-changes':
-ensure = 'absent',
-}
-
-cron { 'wikibase-dispatch-changes2':
-ensure = 'absent',
-}
-
-cron {
-'wikibase-poll-test2':
-ensure = absent;
-}
-
-cron {
-'wikibase-poll-huwiki':
-ensure = absent;
 }
 
 file {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5c67c87fb7ba100ecf8acd3a5f2e95f7468323d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Ottomata 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] Run Wikidata maint. scripts as apache instead of mwdeploy - change (operations/puppet)

2014-05-11 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Run Wikidata maint. scripts as apache instead of mwdeploy
..


Run Wikidata maint. scripts as apache instead of mwdeploy

Change-Id: Ic949507706b187d2a8b1882175d12a05d9cf3343
---
M manifests/misc/maintenance.pp
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index ec4010d..9bc5bb3 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -223,7 +223,7 @@
 cron { 'wikibase-repo-prune2':
 # prunes the wb_changes table in wikidatawiki db
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/pruneChanges.php 
--wiki wikidatawiki --number-of-days=3 21  /var/log/wikidata/prune2.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = [0,15,30,45],
 ensure  = $wbenabled,
 }
@@ -234,7 +234,7 @@
 cron { 'wikibase-dispatch-changes3':
 # dispatches changes data to wikibase clients (e.g. wikipedia) to be 
processed as jobs there
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/lib/maintenance/dispatchChanges.php 
--wiki wikidatawiki --max-time 900 --batch-size 200 --dispatch-interval 30 21 
 /var/log/wikidata/dispatcher3.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = '*/5',
 ensure  = $wbenabled,
 }
@@ -242,15 +242,15 @@
 cron { 'wikibase-dispatch-changes4':
 # second dispatcher to inject wikidata changes  wikibase clients (e.g. 
wikipedia) to be processed as jobs there
 command = '/usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/lib/maintenance/dispatchChanges.php 
--wiki wikidatawiki --max-time 900 --batch-size 200 --dispatch-interval 30 21 
 /var/log/wikidata/dispatcher4.log',
-user= 'mwdeploy',
+user= 'apache',
 minute  = '*/5',
 ensure  = $wbenabled,
 }
 
 file {
 '/var/log/wikidata':
-owner  = mwdeploy,
-group  = mwdeploy,
+owner  = 'apache',
+group  = 'apache',
 mode   = '0664',
 ensure = directory;
 '/etc/logrotate.d/wikidata':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic949507706b187d2a8b1882175d12a05d9cf3343
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Ottomata 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] Add some further setup clarifications for the USB distro. - change (mediawiki/vagrant)

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

Change subject: Add some further setup clarifications for the USB distro.
..


Add some further setup clarifications for the USB distro.

Change-Id: I81c98ab7aa5db1ef773acfa2af64160db17fd14e
---
M support/packager/template/README
1 file changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/support/packager/template/README b/support/packager/template/README
index 6ce5ba4..e9aa3c6 100644
--- a/support/packager/template/README
+++ b/support/packager/template/README
@@ -1,12 +1,15 @@
 NOTE: You can replace ~/Code/Vagrant with your choice of directory, but 
mediawiki must be directly underneath.
 
+Replace /thumb with the location of the USB drive, or the location where you 
copied the files from the drive.
+
 1. From the directory for your OS, install VirtualBox.
 2. From the directory for your OS, install Vagrant.  If you use Linux, use DEB 
for Debian or Ubuntu and RPM for Red Hat, Centos, Fedora, etc.
 
 3. If you don't have a Gerrit username yet, signup at 
https://wikitech.wikimedia.org/wiki/Special:UserLogin/signup .  The username 
you choose will be referred to below as gerrit_username .
 
-3. Clone MediaWiki-Vagrant, a Vagrant development environment for MediaWiki 
work:
+4. Clone MediaWiki-Vagrant, a Vagrant development environment for MediaWiki 
work:
 
+cd /thumb
 git clone -b master mediawiki_vagrant.bundle ~/Code/Vagrant
 
 5. Clone MediaWiki core, the main repository for MediaWiki:
@@ -23,6 +26,7 @@
 
 7. Install the virtual machine Vagrant uses as a base:
 
+cd /thumb
 vagrant box add precise-cloud precise-server-cloudimg-amd64-vagrant-disk1.box
 
 8. Start MediaWiki-Vagrant:
@@ -30,4 +34,6 @@
 cd ~/Code/Vagrant
 vagrant up
 
-9. For further information, see ~/Code/Vagrant/README, 
https://www.mediawiki.org/wiki/Gerrit/Tutorial and 
https://www.mediawiki.org/wiki/MediaWiki-Vagrant .  You should follow the steps 
above, rather than the Quick start on the wiki page.
+9. After 'vagrant up' is complete, you can test in your browser at 
http://127.0.0.1:8080/ .
+
+For further information, see ~/Code/Vagrant/README, 
https://www.mediawiki.org/wiki/Gerrit/Tutorial and 
https://www.mediawiki.org/wiki/MediaWiki-Vagrant .  You should follow the steps 
above, rather than the installation instructions from the other README or the 
Quick start on the wiki page.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I81c98ab7aa5db1ef773acfa2af64160db17fd14e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@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] Basic bunding of apt-cache - change (mediawiki/vagrant)

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

Change subject: Basic bunding of apt-cache
..


Basic bunding of apt-cache

There is no selectivity in which packages are included.

Bug: 64928
Change-Id: I3bd1c9d07663780f3af7b772dfe8afb5cfd134b1
---
M support/packager/template/README
1 file changed, 9 insertions(+), 5 deletions(-)

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



diff --git a/support/packager/template/README b/support/packager/template/README
index e9aa3c6..5e97be5 100644
--- a/support/packager/template/README
+++ b/support/packager/template/README
@@ -12,11 +12,15 @@
 cd /thumb
 git clone -b master mediawiki_vagrant.bundle ~/Code/Vagrant
 
-5. Clone MediaWiki core, the main repository for MediaWiki:
+5. Copy the Ubuntu packages to the apt-cache:
+
+cp apt-cache/*.deb ~/Code/Vagrant/apt-cache/
+
+6. Clone MediaWiki core, the main repository for MediaWiki:
 
 git clone -b master mediawiki_core.bundle ~/Code/Vagrant/mediawiki
 
-6. Configure your remotes:
+7. Configure your remotes:
 
 cd ~/Code/Vagrant
 git remote set-url origin 
ssh://gerrit_usern...@gerrit.wikimedia.org:29418/mediawiki/vagrant.git
@@ -24,16 +28,16 @@
 cd ~/Code/Vagrant/mediawiki
 git remote set-url origin 
ssh://gerrit_usern...@gerrit.wikimedia.org:29418/mediawiki/core.git
 
-7. Install the virtual machine Vagrant uses as a base:
+8. Install the virtual machine Vagrant uses as a base:
 
 cd /thumb
 vagrant box add precise-cloud precise-server-cloudimg-amd64-vagrant-disk1.box
 
-8. Start MediaWiki-Vagrant:
+9. Start MediaWiki-Vagrant:
 
 cd ~/Code/Vagrant
 vagrant up
 
-9. After 'vagrant up' is complete, you can test in your browser at 
http://127.0.0.1:8080/ .
+10. After 'vagrant up' is complete, you can test in your browser at 
http://127.0.0.1:8080/ .
 
 For further information, see ~/Code/Vagrant/README, 
https://www.mediawiki.org/wiki/Gerrit/Tutorial and 
https://www.mediawiki.org/wiki/MediaWiki-Vagrant .  You should follow the steps 
above, rather than the installation instructions from the other README or the 
Quick start on the wiki page.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bd1c9d07663780f3af7b772dfe8afb5cfd134b1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@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] Forgot autoload for hooks class - change (mediawiki...OATHAuth)

2014-05-11 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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

Change subject: Forgot autoload for hooks class
..

Forgot autoload for hooks class

Minor fix

Change-Id: I0193877f1c691d4fbe7afd4440ab462e5667268b
---
M OATHAuth.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth 
refs/changes/96/132796/1

diff --git a/OATHAuth.php b/OATHAuth.php
index d5c8c61..fbb9738 100644
--- a/OATHAuth.php
+++ b/OATHAuth.php
@@ -31,6 +31,7 @@
 $wgMessagesDirs['OATHAuth'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['OATHAuth'] = $dir . 'OATHAuth.i18n.php';
 $wgExtensionMessagesFiles['OATHAuthAlias'] = $dir . 'OATHAuth.alias.php';
+$wgAutoloadClasses['OATHAuthHooks] = $dir . 'OATHAuth.hooks.php';
 $wgAutoloadClasses['HOTP'] = $dir . 'lib/hotp.php';
 $wgAutoloadClasses['HOTPResult'] = $dir . 'lib/hotp.php';
 $wgAutoloadClasses['Base32'] = $dir . 'lib/base32.php';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0193877f1c691d4fbe7afd4440ab462e5667268b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 tylerro...@gmail.com

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


[MediaWiki-commits] [Gerrit] [ExtraLangLink] Register extension - change (translatewiki)

2014-05-11 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [ExtraLangLink] Register extension
..

[ExtraLangLink] Register extension

* sort

Change-Id: I3cbfdfe8aa8ab256e491d669bc6d8297f9e07d0a
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/97/132797/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 426f0f9..e94a334 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -535,6 +535,9 @@
 
 #Expand Templates / Added to core
 
+Ext Tab
+file = ExtTab/languages/i18n/%CODE%.json
+
 Extension Distributor
 
 External Articles
@@ -542,8 +545,7 @@
 External Data
 magicfile = ExternalData/ExternalData.i18n.magic.php
 
-Ext Tab
-file = ExtTab/languages/i18n/%CODE%.json
+Extra Language Link
 
 #Fan Boxes / Missing message documentation, inconsistently prefixed - 
2014-01-28 RS
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cbfdfe8aa8ab256e491d669bc6d8297f9e07d0a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] [ExtraLangLink] Register extension - change (translatewiki)

2014-05-11 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [ExtraLangLink] Register extension
..


[ExtraLangLink] Register extension

* sort

Change-Id: I3cbfdfe8aa8ab256e491d669bc6d8297f9e07d0a
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 426f0f9..e94a334 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -535,6 +535,9 @@
 
 #Expand Templates / Added to core
 
+Ext Tab
+file = ExtTab/languages/i18n/%CODE%.json
+
 Extension Distributor
 
 External Articles
@@ -542,8 +545,7 @@
 External Data
 magicfile = ExternalData/ExternalData.i18n.magic.php
 
-Ext Tab
-file = ExtTab/languages/i18n/%CODE%.json
+Extra Language Link
 
 #Fan Boxes / Missing message documentation, inconsistently prefixed - 
2014-01-28 RS
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cbfdfe8aa8ab256e491d669bc6d8297f9e07d0a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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 other extensions/modules to tweak the editor - change (mediawiki...MobileFrontend)

2014-05-11 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Allow other extensions/modules to tweak the editor
..

Allow other extensions/modules to tweak the editor

Change-Id: I26efe50af621d136b854f7efe3bb98c380164405
---
M javascripts/modules/editor/EditorOverlay.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 6ffb1a8..5d96e51 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -110,6 +110,8 @@
action: 'page-edit-impression'
} );
}
+   // Emit a global event here so that other extensions 
e.g. ProofReadPage can tweak the editor overlay
+   M.emit( 'editor.postRender', this );
},
 
_shouldShowKeepGoingOverlay: function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26efe50af621d136b854f7efe3bb98c380164405
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove unused image - change (mediawiki...MobileFrontend)

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

Change subject: Remove unused image
..


Remove unused image

Change-Id: I2bedb225b892ef61dc0335ed53ae1b0b551a9a49
---
D less/common/images/buttonbg.gif
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/less/common/images/buttonbg.gif b/less/common/images/buttonbg.gif
deleted file mode 100644
index 75545ba..000
--- a/less/common/images/buttonbg.gif
+++ /dev/null
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bedb225b892ef61dc0335ed53ae1b0b551a9a49
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@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] Forgot autoload for hooks class - change (mediawiki...OATHAuth)

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

Change subject: Forgot autoload for hooks class
..


Forgot autoload for hooks class

Minor fix

Change-Id: I0193877f1c691d4fbe7afd4440ab462e5667268b
---
M OATHAuth.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/OATHAuth.php b/OATHAuth.php
index d5c8c61..af129cb 100644
--- a/OATHAuth.php
+++ b/OATHAuth.php
@@ -31,6 +31,7 @@
 $wgMessagesDirs['OATHAuth'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['OATHAuth'] = $dir . 'OATHAuth.i18n.php';
 $wgExtensionMessagesFiles['OATHAuthAlias'] = $dir . 'OATHAuth.alias.php';
+$wgAutoloadClasses['OATHAuthHooks'] = $dir . 'OATHAuth.hooks.php';
 $wgAutoloadClasses['HOTP'] = $dir . 'lib/hotp.php';
 $wgAutoloadClasses['HOTPResult'] = $dir . 'lib/hotp.php';
 $wgAutoloadClasses['Base32'] = $dir . 'lib/base32.php';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0193877f1c691d4fbe7afd4440ab462e5667268b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
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 HTTPS port configurable - change (mediawiki/core)

2014-05-11 Thread Awjrichards (Code Review)
Awjrichards has uploaded a new change for review.

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

Change subject: Make HTTPS port configurable
..

Make HTTPS port configurable

Introduces wgHttpsPort configuration variable and makes use of it when
appropriate in wfExpandUrl()

Bug: 65184
Change-Id: I325ee0ff7be16de2a964fb7d8654b88cbd5fe239
---
M includes/DefaultSettings.php
M includes/GlobalFunctions.php
2 files changed, 15 insertions(+), 1 deletion(-)


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

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5d35c42..58bbc43 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4113,6 +4113,12 @@
  */
 $wgSecureLogin = false;
 
+/**
+ * Port where you have HTTPS running
+ * https://gerrit.wikimedia.org/r/#/c/132702/
+ */
+$wgHttpsPort = 443;
+
 /** @} */ # end user accounts }
 
 ///**
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index d94d2f1..3b7c511 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -497,7 +497,8 @@
  *no valid URL can be constructed
  */
 function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) {
-   global $wgServer, $wgCanonicalServer, $wgInternalServer, $wgRequest;
+   global $wgServer, $wgCanonicalServer, $wgInternalServer, $wgRequest,
+   $wgHttpsPort;
if ( $defaultProto === PROTO_CANONICAL ) {
$serverUrl = $wgCanonicalServer;
} elseif ( $defaultProto === PROTO_INTERNAL  $wgInternalServer !== 
false ) {
@@ -536,6 +537,13 @@
}
 
$bits = wfParseUrl( $url );
+
+   // ensure proper port for HTTPS arrives in URL
+   // https://bugzilla.wikimedia.org/show_bug.cgi?id=65184
+   if ( $defaultProto === PROTO_HTTPS ) {
+   $bits['port'] = $wgHttpsPort;
+   }
+
if ( $bits  isset( $bits['path'] ) ) {
$bits['path'] = wfRemoveDotSegments( $bits['path'] );
return wfAssembleUrl( $bits );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I325ee0ff7be16de2a964fb7d8654b88cbd5fe239
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Awjrichards aricha...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make sure that the scan image is displayed in a nice way in ... - change (mediawiki...ProofreadPage)

2014-05-11 Thread Tpt (Code Review)
Tpt has uploaded a new change for review.

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

Change subject: Make sure that the scan image is displayed in a nice way in 
mobile skin
..

Make sure that the scan image is displayed in a nice way in mobile skin

Depends on I26efe50af621d136b854f7efe3bb98c380164405 in MobileFrontend

bug 65165

Change-Id: I0f9c9caeada27dddfc4fa0565fa814e19c6fbbf5
---
M ProofreadPage.body.php
M ProofreadPage.php
M includes/page/ProofreadPageViewAction.php
A modules/page/ext.proofreadpage.page.edit.mobile.js
A modules/page/ext.proofreadpage.page.mobile.css
5 files changed, 46 insertions(+), 4 deletions(-)


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

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index b819fc2..1d307c3 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -929,4 +929,10 @@
return $title-getLinkUrl( 'action=editredlink=1' );
}
}
+
+   public static function onSkinMinervaDefaultModules( Skin $skin, array 
$modules ) {
+   $modules['editor'] = array( 
'ext.proofreadpage.page.mobile.edit' );
+
+   return true;
+   }
 }
diff --git a/ProofreadPage.php b/ProofreadPage.php
index ee108c3..b5cf251 100644
--- a/ProofreadPage.php
+++ b/ProofreadPage.php
@@ -135,6 +135,11 @@
'styles'  = 'page/ext.proofreadpage.page.css',
'dependencies' = array( 'ext.proofreadpage.base' )
),
+   'ext.proofreadpage.page.mobile' = $prpResourceTemplate + array(
+   'styles'  = 'page/ext.proofreadpage.page.mobile.css',
+   'dependencies' = array( 'ext.proofreadpage.base' ),
+   'targets' = array ( 'mobile' )
+   ),
'ext.proofreadpage.page.edit' = $prpResourceTemplate + array(
'styles'  = 'page/ext.proofreadpage.page.edit.css',
'scripts' = 'page/ext.proofreadpage.page.edit.js',
@@ -155,6 +160,11 @@
'proofreadpage-button-toggle-layout-label',
'proofreadpage-preferences-showheaders-label',
)
+   ),
+   'ext.proofreadpage.page.mobile.edit' = $prpResourceTemplate + array(
+   'scripts' = array( 
'page/ext.proofreadpage.page.edit.mobile.js', ),
+   'dependencies' = array( 'mobile.editor' ),
+   'targets' = array ( 'mobile' )
),
'ext.proofreadpage.page.navigation' = $prpResourceTemplate + array(
'scripts' = 'page/ext.proofreadpage.page.navigation.js',
@@ -196,6 +206,7 @@
 $wgHooks['EditFormPreloadText'][] = 'ProofreadPage::onEditFormPreloadText';
 $wgHooks['ParserTestTables'][] = 'ProofreadPage::onParserTestTables';
 $wgHooks['InfoAction'][] = 'ProofreadPage::onInfoAction';
+$wgHooks['SkinMinervaDefaultModules'][] = 
'ProofreadPage::onSkinMinervaDefaultModules';
 
 
 
diff --git a/includes/page/ProofreadPageViewAction.php 
b/includes/page/ProofreadPageViewAction.php
index efb5aba..e9f67f4 100644
--- a/includes/page/ProofreadPageViewAction.php
+++ b/includes/page/ProofreadPageViewAction.php
@@ -59,11 +59,10 @@
$out-addModules( 'ext.proofreadpage.page' );
$out-addModuleStyles( array(
'ext.proofreadpage.base',
-   'ext.proofreadpage.page'
+   'ext.proofreadpage.page',
+   'ext.proofreadpage.page.mobile'
) );
-   $out-addJsConfigVars( array(
-   'prpPageQuality' = $content-getLevel()-getLevel()
-   ) );
+   $out-addJsConfigVars( 'prpPageQuality', 
$content-getLevel()-getLevel() );
 
//custom CSS
$css = $page-getCustomCss();
diff --git a/modules/page/ext.proofreadpage.page.edit.mobile.js 
b/modules/page/ext.proofreadpage.page.edit.mobile.js
new file mode 100644
index 000..6b46cb5
--- /dev/null
+++ b/modules/page/ext.proofreadpage.page.edit.mobile.js
@@ -0,0 +1,17 @@
+( function( M, $ ) {
+   use strict;
+
+   function toggleImage( overlay ) {
+   overlay.$( 'textarea' ).toggle();
+   }
+
+   M.on( 'editor.postRender', function( overlay ) {
+   var $container = $( 'li' ).appendTo( overlay.$( 
'.overlay-header ul' ).eq( 0 ) );
+   $( 'button' ).text( 'View' ).on( 'click', function() {
+   toggleImage( overlay );
+   } ).appendTo( $container );
+
+   var $scanImage = $('.prp-page-image').clone();
+   $scanImage.insertAfter( overlay.$( '.content' ) );
+   } );
+} ( mw.mobileFrontend, jQuery ) );
\ No newline at end of file
diff --git a/modules/page/ext.proofreadpage.page.mobile.css 
b/modules/page/ext.proofreadpage.page.mobile.css
new file mode 100644
index 000..45c23c9
--- /dev/null
+++ 

[MediaWiki-commits] [Gerrit] Enable wgSecureLogin with HTTPS role - change (mediawiki/vagrant)

2014-05-11 Thread Awjrichards (Code Review)
Awjrichards has uploaded a new change for review.

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

Change subject: Enable wgSecureLogin with HTTPS role
..

Enable wgSecureLogin with HTTPS role

Change-Id: Id7e0b9fc6bec6983576f5dcc8e88231c5ab4e0d3
---
M puppet/manifests/roles/https.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/01/132801/1

diff --git a/puppet/manifests/roles/https.pp b/puppet/manifests/roles/https.pp
index e2a2826..43fbb13 100644
--- a/puppet/manifests/roles/https.pp
+++ b/puppet/manifests/roles/https.pp
@@ -12,4 +12,11 @@
source = 'puppet:///modules/nginx/nginx.conf',
notify = Service['nginx'],
}
+
+   # enable secure login
+   mediawiki::settings { 'SSL-related settings':
+   values = {
+   'wgSecureLogin' = true,
+   }
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7e0b9fc6bec6983576f5dcc8e88231c5ab4e0d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awjrichards aricha...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] remvoing unused re module - change (pywikibot/core)

2014-05-11 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: remvoing unused re module
..

remvoing unused re module

Change-Id: Ia2d52f2ab05f7a8b1a55a404755bbc72f5765274
---
M scripts/replicate_wiki.py
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/02/132802/1

diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py
index bdd6171..18b34fe 100644
--- a/scripts/replicate_wiki.py
+++ b/scripts/replicate_wiki.py
@@ -27,7 +27,6 @@
 #
 
 import sys
-import re
 from pywikibot import *
 from itertools import imap
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2d52f2ab05f7a8b1a55a404755bbc72f5765274
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] toollabs: Add gdal-bin to the exec environment - change (operations/puppet)

2014-05-11 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: toollabs: Add gdal-bin to the exec environment
..

toollabs: Add gdal-bin to the exec environment

Change-Id: Id7abcd18ee9fc8c4e43aab28d817501f2f3220d3
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/132803/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 43a7696..46bfd74 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -207,6 +207,7 @@
 'doxygen-latex',   # Bug 56326
 'expect',
 'fabric',  # Bug #54135.
+'gdal-bin',
 'git',
 'git-review',  # Bug 62871.
 'gnuplot-nox',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7abcd18ee9fc8c4e43aab28d817501f2f3220d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] toollabs: Add gdal-bin to the exec environment - change (operations/puppet)

2014-05-11 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: toollabs: Add gdal-bin to the exec environment
..


toollabs: Add gdal-bin to the exec environment

Bug: 65123
Change-Id: Id7abcd18ee9fc8c4e43aab28d817501f2f3220d3
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 43a7696..46bfd74 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -207,6 +207,7 @@
 'doxygen-latex',   # Bug 56326
 'expect',
 'fabric',  # Bug #54135.
+'gdal-bin',
 'git',
 'git-review',  # Bug 62871.
 'gnuplot-nox',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7abcd18ee9fc8c4e43aab28d817501f2f3220d3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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] code cleanup: return silently from methods - change (pywikibot/core)

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

Change subject: code cleanup: return silently from methods
..


code cleanup: return silently from methods

Page.put() and Page.put_async() aren't functions in core. We can
return from these methods silently.

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

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 848f748..0c765ce 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -932,9 +932,9 @@
 
 
 self.text = newtext
-return self.save(comment=comment, watch=watchArticle,
- minor=minorEdit, botflag=botflag, force=force,
- async=async, callback=callback, **kwargs)
+self.save(comment=comment, watch=watchArticle, minor=minorEdit,
+  botflag=botflag, force=force, async=async, callback=callback,
+  **kwargs)
 
 def put_async(self, newtext, comment=u'', watchArticle=None,
   minorEdit=True, botflag=None, force=False, callback=None,
@@ -947,9 +947,9 @@
 backwards-compatibility.
 
 
-return self.put(newtext, comment=comment, watchArticle=watchArticle,
-minorEdit=minorEdit, botflag=botflag, force=force,
-async=True, callback=callback, **kwargs)
+self.put(newtext, comment=comment, watchArticle=watchArticle,
+ minorEdit=minorEdit, botflag=botflag, force=force, async=True,
+ callback=callback, **kwargs)
 
 def watch(self, unwatch=False):
 Add or remove this page to/from bot account's watchlist.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I916940e4e92334741fc87102bc102461c4e8fba4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] (bug 65156) use LooseVersion to compare mw versions - change (pywikibot/core)

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

Change subject: (bug 65156) use LooseVersion to compare mw versions
..


(bug 65156) use LooseVersion to compare mw versions

LooseVersion from distutils.version enables a more sensible way to
compare mw version directly e.g.

 from distutils.version import LooseVersion as LV
 LV(1.23wmf1)  LV(1.23wmf2)  LV(1.24)  LV(1.24wmf1)  
 LV(1.24wmf10)  LV(2.1)
True

Change-Id: I98c280bc1d89789475a30df31d0644807e6acdd6
---
M pywikibot/site.py
1 file changed, 10 insertions(+), 9 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 5e54f9f..d16c3c5 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -21,6 +21,7 @@
 import os
 import re
 import sys
+from distutils.version import LooseVersion as LV
 import threading
 import time
 import urllib
@@ -574,7 +575,7 @@
 return decorator
 
 
-def need_version(number):
+def need_version(version):
  Decorator to require a certain mediawiki version number.
 
 @param number: the mw version number required
@@ -583,11 +584,11 @@
 
 def decorator(fn):
 def callee(self, *args, **kwargs):
-if self.versionnumber()  number:
+if LV(self.version())  LV(version):
 raise NotImplementedError(
 u'Method or function %s\n'
-uisn't implemented in mediawiki version  %d
-% (fn.__name__, number))
+uisn't implemented in mediawiki version  %s
+% (fn.__name__, version))
 return fn(self, *args, **kwargs)
 callee.__name__ = fn.__name__
 callee.__doc__ = fn.__doc__
@@ -649,7 +650,7 @@
 14: [uCategory],
 15: [uCategory talk],
 }
-if self.family.versionnumber(self.code) = 14:
+if LV(self.family.version(self.code)) = LV(1.14):
 self._namespaces[6] = [uFile]
 self._namespaces[7] = [uFile talk]
 self._msgcache = {}
@@ -2329,7 +2330,7 @@
 if reverse:
 rcgen.request[rcdir] = newer
 if pagelist:
-if self.versionnumber()  14:
+if LV(self.version())  LV(1.14):
 pywikibot.warning(
 urecentchanges: pagelist option is disabled; ignoring.)
 else:
@@ -3482,7 +3483,7 @@
 step=step, total=total)
 return wigen
 
-@need_version(18)
+@need_version(1.18)
 def broken_redirects(self, step=None, total=None):
 Yield Pages without language links from Special:BrokenRedirects.
 brgen = self._generator(api.PageGenerator,
@@ -3491,7 +3492,7 @@
 step=step, total=total)
 return brgen
 
-@need_version(18)
+@need_version(1.18)
 def double_redirects(self, step=None, total=None):
 Yield Pages without language links from Special:BrokenRedirects.
 drgen = self._generator(api.PageGenerator,
@@ -3500,7 +3501,7 @@
 step=step, total=total)
 return drgen
 
-@need_version(18)
+@need_version(1.18)
 def redirectpages(self, step=None, total=None):
 Yield redirect pages from Special:ListRedirects.
 lrgen = self._generator(api.PageGenerator,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98c280bc1d89789475a30df31d0644807e6acdd6
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Bug 65135: Fix the yesterday generator - change (pywikibot/core)

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

Change subject: Bug 65135: Fix the yesterday generator
..


Bug 65135: Fix the yesterday generator

Change-Id: I04ae2f6a4cef6e4904999492f081a7466b441c0b
---
M scripts/imageuncat.py
1 file changed, 7 insertions(+), 27 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py
index decbdca..d1af10a 100755
--- a/scripts/imageuncat.py
+++ b/scripts/imageuncat.py
@@ -18,7 +18,6 @@
 from datetime import timedelta
 import pywikibot
 from pywikibot import pagegenerators
-import query
 
 #Probably unneeded because these are hidden categories. Have to figure it out.
 ignoreCategories = [u'[[Category:CC-BY-SA-3.0]]',
@@ -1235,37 +1234,18 @@
 putcomment = u'Please add categories to this image'
 
 
-def uploadedYesterday(site=None):
+def uploadedYesterday(site):
 '''
 Return a pagegenerator containing all the pictures uploaded yesterday.
 Should probably copied to somewhere else
+
 '''
-result = []
-dateformat = %Y-%m-%dT00:00:00Z
-today = datetime.utcnow()
+
+today = pywikibot.Timestamp.utcnow()
 yesterday = today + timedelta(days=-1)
 
-params = {
-'action':  'query',
-'list':'logevents',
-'leprop':  'title',
-'letype':  'upload',
-'ledir':   'newer',
-'lelimit': '5000',
-'lestart': yesterday.strftime(dateformat),
-'leend':   today.strftime(dateformat)
-}
-
-data = query.GetData(params, site)
-try:
-for item in data['query']['logevents']:
-result.append(item['title'])
-except IndexError:
-raise NoPage(u'API Error, nothing found in the APIs')
-except KeyError:
-raise NoPage(u'API Error, nothing found in the APIs')
-
-return pagegenerators.PagesFromTitlesGenerator(result, site)
+for logentry in site.logevents(logtype='upload', start=yesterday, 
end=today, reverse=True):
+yield logentry.title()
 
 
 def recentChanges(site=None, delay=0, block=70):
@@ -1357,7 +1337,7 @@
 pywikibot.output(
 u'You have to specify the generator you want to use for the 
program!')
 else:
-pregenerator = site.preloadpages(generator)
+pregenerator = pagegenerators.PreloadingGenerator(generator)
 for page in pregenerator:
 pywikibot.output(page.title())
 if page.exists() and (page.namespace() == 6) \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04ae2f6a4cef6e4904999492f081a7466b441c0b
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill maar...@mdammers.nl
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Mpaa mpaa.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] Misc typofixes - change (mediawiki...UniversalLanguageSelector)

2014-05-11 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Misc typofixes
..

Misc typofixes

Change-Id: I0da399382082ad0d197f48641050b6813e3bdc6e
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index a4e8f57..104a5d6 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -176,7 +176,7 @@
 
// Add previously selected languages.
// Previous languages are always the better suggestion
-   // because user had explicitly chosen them.
+   // because the user has explicitly chosen them.
compactLanguages = compactLanguages.concat( 
this.filterByPreviousLanguages() );
 
// Add all common languages to the beginning of array.
@@ -184,13 +184,13 @@
compactLanguages = compactLanguages.concat( 
this.filterByCommonLanguages( languages ) );
 
// Finally add the whole languages array too.
-   // We will remove duplicate and cut down to required 
size.
+   // We will remove duplicates and cut down to required 
size.
compactLanguages = compactLanguages.concat( languages );
 
// Remove duplicates
compactLanguages = unique( compactLanguages );
 
-   // Cut to compact size and  sort
+   // Cut to compact size and sort
compactLanguages = compactLanguages.slice( 0, 
this.compactSize ).sort();
 
return compactLanguages;
@@ -200,7 +200,7 @@
 * Filter the language list by previous languages.
 * Not all previous languages will be present in interlanguage 
links,
 * so we are filtering them.
-* @return {Array} List of those language codes which are 
supported by article
+* @return {Array} List of language codes supported by the 
article
 */
filterByPreviousLanguages: function ( languages ) {
var previousLanguages = mw.uls.getPreviousLanguages();
@@ -213,7 +213,7 @@
/**
 * Filter the language list by common languages.
 * Common languages are the most probable languages predicted 
by ULS.
-* @return {Array} List of those language codes which are 
supported by article
+* @return {Array} List of language codes supported by the 
article
 */
filterByCommonLanguages: function ( languages ) {
var commonLanguages = mw.uls.getFrequentLanguageList();
@@ -225,7 +225,7 @@
 
/**
 * Find out the existing languages supported
-* by article and fetch their href.
+* by the article and fetch their href.
 * @return {Object} List of existing language codes and their 
hrefs
 */
getInterlanguageList: function getInterlanguageList() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0da399382082ad0d197f48641050b6813e3bdc6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] WIP: Add other properties to PreloadingPageGenerator (bug 65... - change (pywikibot/core)

2014-05-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: WIP: Add other properties to PreloadingPageGenerator (bug 65161)
..

WIP: Add other properties to PreloadingPageGenerator (bug 65161)

Change-Id: I8f5217236da033daf5140c17b5b8f3dbb7f2d1a5
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/pagegenerators.py
M pywikibot/site.py
4 files changed, 24 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/132805/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 1a85255..3e2cbf3 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1039,6 +1039,18 @@
 else:
 page._langlinks = links
 
+if links in pagedict:
+pages = []
+for l in pagedict[links]:
+pg = pywikibot.Page(page.site, l['title'], ns=l['ns'])
+pages.append(pg)
+
+if hasattr(page, _links):
+page._links.extend(pages)
+else:
+page._links = pages
+
+
 if coordinates in pagedict:
 coords = []
 for co in pagedict['coordinates']:
diff --git a/pywikibot/page.py b/pywikibot/page.py
index fe54ef6..e3b0b48 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -983,9 +983,12 @@
 @return: a generator that yields Page objects.
 
 
-return self.site.pagelinks(self, namespaces=namespaces, step=step,
+if not hasattr(self, '_links'):
+self._links = self.site.pagelinks(self, namespaces=namespaces, 
step=step,
total=total, content=content)
 
+return self._links
+
 def interwiki(self, expand=True):
 Iterate interwiki links in the page text, excluding language links.
 
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index d0a64b8..f42a9db 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -205,7 +205,7 @@
 if self.site is None:
 self.site = pywikibot.Site()
 
-def getCombinedGenerator(self):
+def getCombinedGenerator(self, preload=False):
 Return the combination of all accumulated generators.
 
 Only call this after all arguments have been parsed.
@@ -237,6 +237,8 @@
 if self.articlefilter:
 return 
RegexBodyFilterPageGenerator(PreloadingGenerator(dupfiltergen),
 self.articlefilter)
+elif preload:
+return PreloadingGenerator(dupfiltergen)
 else:
 return dupfiltergen
 
diff --git a/pywikibot/site.py b/pywikibot/site.py
index ef20492..dd605e1 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1353,7 +1353,7 @@
 return page._redirtarget
 
 def preloadpages(self, pagelist, groupsize=50, templates=False,
- langlinks=False):
+ langlinks=False, links=False):
 Return a generator to a list of preloaded pages.
 
 Note that [at least in current implementation] pages may be iterated
@@ -1377,6 +1377,10 @@
 props += '|templates'
 if langlinks:
 props += '|langlinks'
+if links:
+props += '|links'
+for page in cache.values():
+page._links = []
 rvgen = api.PropertyGenerator(props, site=self)
 rvgen.set_maximum_items(-1)  # suppress use of rvlimit parameter
 if len(pageids) == len(sublist):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f5217236da033daf5140c17b5b8f3dbb7f2d1a5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] replicate_wiki: fix check_sysops - change (pywikibot/core)

2014-05-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: replicate_wiki: fix check_sysops
..

replicate_wiki: fix check_sysops

Change-Id: Id8b1655a6c0cec63b1b5e7f3a8b8169647224eee
---
M scripts/replicate_wiki.py
1 file changed, 15 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/132806/1

diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py
index bdd6171..f8d2c30 100644
--- a/scripts/replicate_wiki.py
+++ b/scripts/replicate_wiki.py
@@ -27,7 +27,6 @@
 #
 
 import sys
-import re
 from pywikibot import *
 from itertools import imap
 
@@ -65,6 +64,7 @@
 sites = options.destination_wiki
 
 self.original = Site(original_wiki, family)
+self.original.login()
 
 if options.namespace and 'help' in options.namespace:
 nsd = namespaces(self.original)
@@ -78,28 +78,24 @@
 self.user_diff = {}
 pywikibot.output('Syncing to', newline=False)
 for s in self.sites:
+s.login()
 self.differences[s] = []
 self.user_diff[s] = []
 pywikibot.output(str(s), newline=False)
 pywikibot.output('')
 
 def check_sysops(self):
-'''Check if sysops are the same
+'''Check if sysops are the same on all wikis '''
+def get_users(site):
+userlist = [ul['name'] for ul in site.allusers(group='sysop')]
+return set(userlist)
 
-TODO: implement for API and make optional
-'''
-#def get_users(site):
-#userlist = 
site.getUrl(site.get_address('Special:Userlistgroup=sysop'))
-## Hackery but working. At least on MW 1.15.0
-## User namespace is number 2
-#return set(re.findall(site.namespace(2) + ':(\w+)[\]',  
userlist))
-#
-#ref_users = get_users(self.original)
-#for site in self.sites:
-#users = get_users(site)
-#diff = list(ref_users.difference(users))
-#diff.sort()
-#self.user_diff[site] = diff
+ref_users = get_users(self.original)
+for site in self.sites:
+users = get_users(site)
+diff = list(ref_users.difference(users))
+diff.sort()
+self.user_diff[site] = diff
 
 def check_namespaces(self):
 '''Check all namespaces, to be ditched for clarity'''
@@ -142,7 +138,7 @@
 def generate_overviews(self):
 '''Create page on wikis with overview of bot results'''
 for site in self.sites:
-sync_overview_page = Page(site, 'User:' + site.loggedInAs() + 
'/sync.py overview')
+sync_overview_page = Page(site, 'User:' + site.user() + '/sync.py 
overview')
 output = == Pages that differ from original ==\n\n
 if self.differences[site]:
 output += .join(map(lambda l: '* [[:' + l + ]]\n, 
self.differences[site]))
@@ -159,7 +155,7 @@
 sync_overview_page.put(output, self.put_message(site))
 
 def put_message(self, site):
-return site.loggedInAs() + ' sync.py synchronization from ' + 
str(self.original)
+return site.user() + ' replicate_wiki.py synchronization from ' + 
str(self.original)
 
 def check_page(self, pagename):
 '''Check one page'''
@@ -215,7 +211,7 @@
 help=actually replace pages (without this option you 
will only get an overview page))
 parser.add_argument(-o, --original, dest=original_wiki,
 help=original wiki)
-parser.add_argument('destination_wiki', metavar='N', type=str, nargs='+',
+parser.add_argument('destination_wiki', metavar='destination', type=str, 
nargs='+',
 help='destination wiki(s)')
 parser.add_argument(-ns, --namespace, dest=namespace,
 help=specify namespace)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b1655a6c0cec63b1b5e7f3a8b8169647224eee
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] Misc typofixes - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Misc typofixes
..


Misc typofixes

Change-Id: I0da399382082ad0d197f48641050b6813e3bdc6e
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index a4e8f57..104a5d6 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -176,7 +176,7 @@
 
// Add previously selected languages.
// Previous languages are always the better suggestion
-   // because user had explicitly chosen them.
+   // because the user has explicitly chosen them.
compactLanguages = compactLanguages.concat( 
this.filterByPreviousLanguages() );
 
// Add all common languages to the beginning of array.
@@ -184,13 +184,13 @@
compactLanguages = compactLanguages.concat( 
this.filterByCommonLanguages( languages ) );
 
// Finally add the whole languages array too.
-   // We will remove duplicate and cut down to required 
size.
+   // We will remove duplicates and cut down to required 
size.
compactLanguages = compactLanguages.concat( languages );
 
// Remove duplicates
compactLanguages = unique( compactLanguages );
 
-   // Cut to compact size and  sort
+   // Cut to compact size and sort
compactLanguages = compactLanguages.slice( 0, 
this.compactSize ).sort();
 
return compactLanguages;
@@ -200,7 +200,7 @@
 * Filter the language list by previous languages.
 * Not all previous languages will be present in interlanguage 
links,
 * so we are filtering them.
-* @return {Array} List of those language codes which are 
supported by article
+* @return {Array} List of language codes supported by the 
article
 */
filterByPreviousLanguages: function ( languages ) {
var previousLanguages = mw.uls.getPreviousLanguages();
@@ -213,7 +213,7 @@
/**
 * Filter the language list by common languages.
 * Common languages are the most probable languages predicted 
by ULS.
-* @return {Array} List of those language codes which are 
supported by article
+* @return {Array} List of language codes supported by the 
article
 */
filterByCommonLanguages: function ( languages ) {
var commonLanguages = mw.uls.getFrequentLanguageList();
@@ -225,7 +225,7 @@
 
/**
 * Find out the existing languages supported
-* by article and fetch their href.
+* by the article and fetch their href.
 * @return {Object} List of existing language codes and their 
hrefs
 */
getInterlanguageList: function getInterlanguageList() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0da399382082ad0d197f48641050b6813e3bdc6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: KartikMistry kartik.mis...@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] Add the mediawiki::import_dump resource, add a role for labs... - change (mediawiki/vagrant)

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

Change subject: Add the mediawiki::import_dump resource, add a role for labs 
that uses it.
..


Add the mediawiki::import_dump resource, add a role for labs that uses it.

Change-Id: I6dfac2060ab96d41d26dc765f6267ec2cd684084
---
A puppet/manifests/roles/labs_initial_content.pp
A puppet/modules/labs/files/labs_mediawiki_logo.png
A puppet/modules/labs/files/labs_privacy_policy.xml
A puppet/modules/labs/files/robots.txt
A puppet/modules/mediawiki/manifests/import_dump.pp
5 files changed, 161 insertions(+), 0 deletions(-)

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



diff --git a/puppet/manifests/roles/labs_initial_content.pp 
b/puppet/manifests/roles/labs_initial_content.pp
new file mode 100644
index 000..eaf5144
--- /dev/null
+++ b/puppet/manifests/roles/labs_initial_content.pp
@@ -0,0 +1,32 @@
+# == Class: role::labs_initial_wiki
+#
+#  For labs:  loads a ready-made logo and privacy policy into the
+#  initial wiki.
+#
+class role::labs_initial_content {
+mediawiki::import_dump { 'labs_privacy':
+require= Class['::role::mediawiki'],
+xml_dump   = 
'/vagrant/puppet/modules/labs/files/labs_privacy_policy.xml',
+dump_sentinel_page = 'Testwiki:Privacy_policy',
+}
+
+file { '/var/www/labs_mediawiki_logo.png':
+require  = Class['::role::mediawiki'],
+ensure   = present,
+source   = 
'/vagrant/puppet/modules/labs/files/labs_mediawiki_logo.png'
+}
+
+file { '/var/www/robots.txt':
+require  = Class['::role::mediawiki'],
+ensure   = present,
+source   = '/vagrant/puppet/modules/labs/files/robots.txt'
+}
+
+mediawiki::settings { 'labs-vagrant logo':
+values = {
+wgLogo  = '/labs_mediawiki_logo.png',
+wgMetaNamespace = 'Testwiki',
+},
+}
+
+}
diff --git a/puppet/modules/labs/files/labs_mediawiki_logo.png 
b/puppet/modules/labs/files/labs_mediawiki_logo.png
new file mode 100644
index 000..60a0760
--- /dev/null
+++ b/puppet/modules/labs/files/labs_mediawiki_logo.png
Binary files differ
diff --git a/puppet/modules/labs/files/labs_privacy_policy.xml 
b/puppet/modules/labs/files/labs_privacy_policy.xml
new file mode 100644
index 000..0930989
--- /dev/null
+++ b/puppet/modules/labs/files/labs_privacy_policy.xml
@@ -0,0 +1,103 @@
+mediawiki xmlns=http://www.mediawiki.org/xml/export-0.8/; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://www.mediawiki.org/xml/export-0.8/ 
http://www.mediawiki.org/xml/export-0.8.xsd; version=0.8 xml:lang=en
+  siteinfo
+sitenametestwiki/sitename
+basehttp://mwreview-dev9.instance-proxy.wmflabs.org/wiki/Main_Page/base
+generatorMediaWiki 1.22alpha/generator
+casefirst-letter/case
+namespaces
+  namespace key=-2 case=first-letterMedia/namespace
+  namespace key=-1 case=first-letterSpecial/namespace
+  namespace key=0 case=first-letter /
+  namespace key=1 case=first-letterTalk/namespace
+  namespace key=2 case=first-letterUser/namespace
+  namespace key=3 case=first-letterUser talk/namespace
+  namespace key=4 case=first-letterTestwiki/namespace
+  namespace key=5 case=first-letterTestwiki talk/namespace
+  namespace key=6 case=first-letterFile/namespace
+  namespace key=7 case=first-letterFile talk/namespace
+  namespace key=8 case=first-letterMediaWiki/namespace
+  namespace key=9 case=first-letterMediaWiki talk/namespace
+  namespace key=10 case=first-letterTemplate/namespace
+  namespace key=11 case=first-letterTemplate talk/namespace
+  namespace key=12 case=first-letterHelp/namespace
+  namespace key=13 case=first-letterHelp talk/namespace
+  namespace key=14 case=first-letterCategory/namespace
+  namespace key=15 case=first-letterCategory talk/namespace
+/namespaces
+  /siteinfo
+  page
+titlePrivacy policy/title
+ns0/ns
+id2/id
+revision
+  id3/id
+  timestamp2013-04-26T16:10:46Z/timestamp
+  contributor
+usernameAdmin/username
+id1/id
+  /contributor
+  text xml:space=preserve bytes=128This is a testing wiki governed 
by the [https://www.mediawiki.org/wiki/Wikimedia_Labs/Terms_of_use Wikimedia 
Labs terms of Use]./text
+  sha1afk29g4tw638nh1oanuo064ncsh397g/sha1
+  modelwikitext/model
+  formattext/x-wiki/format
+/revision
+  /page
+  page
+titleTestwiki:Privacy policy/title
+ns4/ns
+id3/id
+revision
+  id4/id
+  timestamp2013-04-26T16:10:23Z/timestamp
+  contributor
+usernameAdmin/username
+id1/id
+  /contributor
+  text xml:space=preserve bytes=128This is a testing wiki governed 
by the [https://www.mediawiki.org/wiki/Wikimedia_Labs/Terms_of_use Wikimedia 
Labs terms of Use]./text
+  

[MediaWiki-commits] [Gerrit] [WIP] Make cached requests depend on logged in user - change (pywikibot/core)

2014-05-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: [WIP] Make cached requests depend on logged in user
..

[WIP] Make cached requests depend on logged in user

Need to fix
https://travis-ci.org/wikimedia/pywikibot-core/builds/24551222

Probably because the cached request tries to use .user() which causes a request 
- recursion. Maybe use cookies instead?

Change-Id: I5e480be86a0b7b6a5907cf71690ba9ebed0b04b6
---
M pywikibot/data/api.py
M tests/dry_api_tests.py
2 files changed, 30 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/07/132807/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index a12764a..9293def 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -457,7 +457,7 @@
 pass
 
 def _uniquedescriptionstr(self):
-return (repr(self.site) + repr(sorted(self.iteritems(
+return (repr(self.site) + repr(self.site.user()) + 
repr(sorted(self.iteritems(
 
 def _create_file_name(self):
 self.http_params()  # normalize self.iteritems()
diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py
index 0e16a17..99d7757 100644
--- a/tests/dry_api_tests.py
+++ b/tests/dry_api_tests.py
@@ -44,6 +44,35 @@
 self.assertNotEqual(self.req._cachefile_path(), 
self.diffreq._cachefile_path())
 self.assertNotEqual(self.req._cachefile_path(), 
self.diffsite._cachefile_path())
 
+def test_cachefile_path_different_users(self):
+# Mock basesite object to test this.
+class MockSite(pywikibot.site.BaseSite):
+def __init__(self):
+self._user = 'user'
+
+def user(self):
+return self._user
+
+def encoding(self):
+return 'utf-8'
+
+def __repr__(self):
+return MockSite()
+
+def __getattr__(self, attr):
+raise Exception(Attribute %r not defined % attr)
+
+site = MockSite()
+req = CachedRequest(expiry=1, site=site, action='query', 
meta='siteinfo')
+userpath = req._cachefile_path()
+
+site._user = 'sysop'
+
+req = CachedRequest(expiry=1, site=site, action='query', 
meta='siteinfo')
+sysoppath = req._cachefile_path()
+
+self.assertNotEqual(userpath, sysoppath)
+
 def test_expired(self):
 self.assertFalse(self.req._expired(datetime.datetime.now()))
 self.assertTrue(self.req._expired(datetime.datetime.now() - 
datetime.timedelta(days=2)))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e480be86a0b7b6a5907cf71690ba9ebed0b04b6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] Include the labs_initial_content role in labs_vagrant. - change (operations/puppet)

2014-05-11 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Include the labs_initial_content role in labs_vagrant.
..


Include the labs_initial_content role in labs_vagrant.

Change-Id: I8650c90aacfd46dc149c94e8b89846024aa5949e
---
M modules/labs_vagrant/manifests/init.pp
A modules/labs_vagrant/templates/vagrant-managed.pp.erb
2 files changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/modules/labs_vagrant/manifests/init.pp 
b/modules/labs_vagrant/manifests/init.pp
index 94833fb..11cc8a8 100644
--- a/modules/labs_vagrant/manifests/init.pp
+++ b/modules/labs_vagrant/manifests/init.pp
@@ -2,7 +2,11 @@
 #
 # Configure a labs host to use MediaWiki-Vagrant to manage local wikis
 #
-class labs_vagrant {
+# $inital_roles:  list of roles to include in labs vagrant before its first 
provision.
+#
+class labs_vagrant(
+$initial_roles = ['labs_initial_content']
+) {
 
 file { '/home/vagrant':
 ensure = 'directory',
@@ -56,4 +60,12 @@
 mode= '0555',
 require = File['/vagrant'],
 }
+
+file { '/vagrant/puppet/manifests/manifests.d/vagrant-managed.pp':
+ensure  = present,
+replace = false,
+content = template('labs_vagrant/vagrant-managed.pp.erb'),
+owner   = 'vagrant',
+require = Exec['git_clone_vagrant'],
+}
 }
diff --git a/modules/labs_vagrant/templates/vagrant-managed.pp.erb 
b/modules/labs_vagrant/templates/vagrant-managed.pp.erb
new file mode 100644
index 000..1032fe8
--- /dev/null
+++ b/modules/labs_vagrant/templates/vagrant-managed.pp.erb
@@ -0,0 +1,6 @@
+# This file is managed by Vagrant. Do not edit.
+# Use vagrant list-roles / enable-role / disable-role instead.
+
+% initial_roles.each do | role | -%
+include role::%=role%
+% end -%

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8650c90aacfd46dc149c94e8b89846024aa5949e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@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] thumb.php: support an optional px width suffix - change (mediawiki/core)

2014-05-11 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: thumb.php: support an optional px width suffix
..

thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] thumb.php: support an optional px width suffix - change (mediawiki/core)

2014-05-11 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: thumb.php: support an optional px width suffix
..

thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf3
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] thumb.php: support an optional px width suffix - change (mediawiki/core)

2014-05-11 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: thumb.php: support an optional px width suffix
..

thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/132810/1

diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf4
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Always display assistant languages where available - change (mediawiki...UniversalLanguageSelector)

2014-05-11 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Always display assistant languages where available
..

Always display assistant languages where available

Bug: 62342
Change-Id: I25f42f3802e80baf5d4724ba6e42e00b8be2349e
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index a4e8f57..e1f6e21 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -174,6 +174,9 @@
compact: function ( languages ) {
var compactLanguages = [];
 
+   // Add user-defined assistant languages on wikis with 
Translate extension.
+   compactLanguages = compactLanguages.concat( 
this.filterByAssistantLanguages() );
+
// Add previously selected languages.
// Previous languages are always the better suggestion
// because user had explicitly chosen them.
@@ -224,6 +227,23 @@
},
 
/**
+* Filter the language list by Translate's assistant languages.
+* Where available, they're languages deemed useful by the user.
+* @return {Array} List of those language codes which are 
supported by article
+*/
+   filterByAssistantLanguages: function ( languages ) {
+   var assistantLanguages = mw.user.options.get( 
'translate-editlangs' );
+   
+   if ( assistantLanguages  assistantLanguages !== 
'default' ) {
+   return $.grep( assistantLanguages, function ( 
language ) {
+   return $.inArray( language, languages ) 
= 0;
+   } );
+   }
+
+   return [];
+   },
+
+   /**
 * Find out the existing languages supported
 * by article and fetch their href.
 * @return {Object} List of existing language codes and their 
hrefs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25f42f3802e80baf5d4724ba6e42e00b8be2349e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Remove Vector from the default LESS import path - change (mediawiki/core)

2014-05-11 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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

Change subject: Remove Vector from the default LESS import path
..

Remove Vector from the default LESS import path

When Ia193571a added vector to core for VectorBeta's benefit it introduced a
regression that broke all skins that used imports like 'variables.less' which
happen to match a filename used by Vector.

This is a short-term fix that allows us to release 1.23 without this regression
by moving the bug from core to the VectorBeta extension.
It needs to be be backported to 1.23.
And we will still need one or two long-term fixes for the bug.

Bug: 60368
Bug: 64595
Dependency: I8ee928a8f60751f72f2a37250d274cf55bce6ee7
Change-Id: Iee47bdc23630e02ccfcbd28496ec5268892eb629
---
M includes/DefaultSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/132812/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index f3a95e3..7d5c63f 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3363,7 +3363,6 @@
  */
 $wgResourceLoaderLESSImportPaths = array(
$IP/resources/src/mediawiki.less/,
-   $IP/skins/vector/,
 );
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee47bdc23630e02ccfcbd28496ec5268892eb629
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: MarkAHershberger m...@nichework.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com

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


[MediaWiki-commits] [Gerrit] Make custom Vagrant settings less shouty - change (mediawiki/vagrant)

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

Change subject: Make custom Vagrant settings less shouty
..


Make custom Vagrant settings less shouty

An early patchset of I689f7c129 used a bash script to declare these variables,
which informed the decision to name them using all-capital letters. But it's
a bit shouty and obnoxious, so switch to lowercase letters instead.

Change-Id: I40942283aa2a774e4d8a9fde280b2700719c633d
---
M Vagrantfile
M lib/settings.rb
M puppet/modules/vagrant/templates/settings.yaml.erb
3 files changed, 41 insertions(+), 38 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Vagrantfile b/Vagrantfile
index 528440b..48293a8 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -35,45 +35,45 @@
 # --
 # These can be changed by making a `.settings.yaml` file that contains YAML
 # replacements. Example:
-#   GIT_USER: username
-#   BOX_NAME: foo
-#   VAGRANT_RAM: 2048
-#   FORWARD_PORTS:
+#   git_user: username
+#   box_name: foo
+#   vagrant_ram: 2048
+#   forward_ports:
 # 27017: 31337
 #
 # Some roles may also provide new settings values. When applied these roles
 # will require a `vagrant reload` call for their changes to take effect.
 settings = Settings.new({
 # Gerrit username, as used at gerrit.wikimedia.org, or '' if anonymous
-'GIT_USER' = '',
+'git_user' = '',
 
 # The vagrant box to load on the VM
-'BOX_NAME' = 'precise-cloud',
+'box_name' = 'precise-cloud',
 
 # Download URL for vagrant box.  If you change this, also update 
support/packager/urls.yaml .
-'BOX_URI' = 
'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box',
+'box_uri' = 
'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box',
 
 # Amount of RAM to allocate to virtual machine in MB; must be numeric
-'VAGRANT_RAM' = 768,
+'vagrant_ram' = 768,
 
 # Number of virtual CPUs to allocate to virtual machine; must be numeric
 # If you are on a single-core system, change the following default to 1:
-'VAGRANT_CORES' = 2,
+'vagrant_cores' = 2,
 
 # Static IP address for virtual machine
-'STATIC_IP' = '10.11.12.13',
+'static_ip' = '10.11.12.13',
 
 # The port on the host that should be forwarded to the guest's HTTP server.
 # Must be numeric.
-'HTTP_PORT' = 8080,
+'http_port' = 8080,
 
 # You may provide a map of vm:host port pairs for Vagrant to forward.
 # Keys and values must be numeric.
-'FORWARD_PORTS' = {},
+'forward_ports' = {},
 
 # Enable puppet debug output?
 # Must be boolean
-'PUPPET_DEBUG' = false,
+'puppet_debug' = false,
 })
 
 # Load role provided settings
@@ -91,7 +91,7 @@
 print(If VM has already been created, run 'vagrant provision' to fix all 
remote git URLs.\n)
 print(You can always set it later by editing .settings.yaml file\n)
 print(' == ')
-s = Settings.new({'GIT_USER' = STDIN.gets.chomp})
+s = Settings.new({'git_user' = STDIN.gets.chomp})
 s.save(root_settings_file)
 end
 
@@ -107,8 +107,8 @@
 # the file using another tool that implements SSL properly, and then
 # point Vagrant to the downloaded file:
 #   $ vagrant box add precise-cloud /path/to/file/precise.box
-config.vm.box = settings['BOX_NAME']
-config.vm.box_url = settings['BOX_URI']
+config.vm.box = settings['box_name']
+config.vm.box_url = settings['box_uri']
 if config.vm.respond_to? 'box_download_insecure'  # Vagrant 1.2.6+
 config.vm.box_download_insecure = true
 end
@@ -117,14 +117,14 @@
 # See https://github.com/mitchellh/vagrant/issues/1673
 config.ssh.shell = bash -c 'BASH_ENV=/etc/profile exec bash'
 
-config.vm.network :private_network, ip: settings['STATIC_IP']
+config.vm.network :private_network, ip: settings['static_ip']
 
 config.vm.network :forwarded_port,
-guest: 80, host: settings['HTTP_PORT'].to_i, id: 'http'
+guest: 80, host: settings['http_port'].to_i, id: 'http'
 
 # Forward additional ports
-if settings['FORWARD_PORTS']
-settings['FORWARD_PORTS'].each do |guest_port,host_port|
+if settings['forward_ports']
+settings['forward_ports'].each do |guest_port,host_port|
 config.vm.network :forwarded_port,
 :host = host_port.to_i, :guest = guest_port.to_i,
 auto_correct: true
@@ -145,8 +145,8 @@
 
 config.vm.provider :virtualbox do |vb|
 # See http://www.virtualbox.org/manual/ch08.html for additional 
options.
-vb.customize ['modifyvm', :id, '--memory', 
settings['VAGRANT_RAM'].to_i]
-vb.customize ['modifyvm', :id, '--cpus', 
settings['VAGRANT_CORES'].to_i]
+vb.customize ['modifyvm', :id, '--memory', 
settings['vagrant_ram'].to_i]
+

[MediaWiki-commits] [Gerrit] thumb.php: support an optional px width suffix - change (mediawiki/core)

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

Change subject: thumb.php: support an optional px width suffix
..


thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Reedy re...@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] Simplify thumbnail styling to have consistency with mobile i... - change (mediawiki/core)

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

Change subject: Simplify thumbnail styling to have consistency with mobile 
implementation
..


Simplify thumbnail styling to have consistency with mobile implementation

Remove undocumented !important rule - !important is bad.

Bug: 65160
Change-Id: I21d6856d51478395cbe59e86e2f3aec495a74a38
---
M skins/common/commonContent.css
A skins/vector/components/thumbnails.less
M skins/vector/screen.less
3 files changed, 34 insertions(+), 1 deletion(-)

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



diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css
index 4157b55..6bf01ae 100644
--- a/skins/common/commonContent.css
+++ b/skins/common/commonContent.css
@@ -143,7 +143,7 @@
 html .thumbcaption {
border: none;
line-height: 1.4em;
-   padding: 3px !important;
+   padding: 3px;
font-size: 94%;
 }
 
diff --git a/skins/vector/components/thumbnails.less 
b/skins/vector/components/thumbnails.less
new file mode 100644
index 000..afb5f2a
--- /dev/null
+++ b/skins/vector/components/thumbnails.less
@@ -0,0 +1,32 @@
+// FIXME: Due to commonContent.css we have to use html tag to make sure these 
are more specific
+html .thumb {
+   .tright {
+   padding: 1px 0 0 15px;
+   }
+
+   .tleft {
+   padding: 1px 15px 0 0;
+   }
+
+   // these resets should be unnecessary
+   div.thumbinner {
+   border: none;
+   background: none;
+   font-size: 100%;
+   }
+
+   .thumbcaption {
+   line-height: @content-line-height;
+   font-size: .85em;
+   padding: 3px 0 0 0;
+   color: #333;
+   }
+
+   .magnify {
+   display: none;
+   }
+
+   .thumbimage {
+   border: none;
+   }
+}
diff --git a/skins/vector/screen.less b/skins/vector/screen.less
index f7b374f..3e824f33 100644
--- a/skins/vector/screen.less
+++ b/skins/vector/screen.less
@@ -8,3 +8,4 @@
 @import components/footer.less;
 @import 'components/notifications.less';
 @import components/externalLinks.less;
+@import components/thumbnails.less;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I21d6856d51478395cbe59e86e2f3aec495a74a38
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Edokter er...@darcoury.nl
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jaredzimmerman jared.zimmer...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Quiddity pandiculat...@gmail.com
Gerrit-Reviewer: Swalling swall...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Waldir wal...@email.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] Remove Vector from the default LESS import path - change (mediawiki/core)

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

Change subject: Remove Vector from the default LESS import path
..


Remove Vector from the default LESS import path

When Ia193571a added vector to core for VectorBeta's benefit it introduced a
regression that broke all skins that used imports like 'variables.less' which
happen to match a filename used by Vector.

This is a short-term fix that allows us to release 1.23 without this regression
by moving the bug from core to the VectorBeta extension.
It needs to be be backported to 1.23.
And we will still need one or two long-term fixes for the bug.

Bug: 60368
Bug: 64595
Dependency: I8ee928a8f60751f72f2a37250d274cf55bce6ee7
Change-Id: Iee47bdc23630e02ccfcbd28496ec5268892eb629
---
M includes/DefaultSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index f3a95e3..7d5c63f 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3363,7 +3363,6 @@
  */
 $wgResourceLoaderLESSImportPaths = array(
$IP/resources/src/mediawiki.less/,
-   $IP/skins/vector/,
 );
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee47bdc23630e02ccfcbd28496ec5268892eb629
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: MarkAHershberger m...@nichework.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: MarkAHershberger m...@nichework.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] thumb.php: support an optional px width suffix - change (mediawiki/core)

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

Change subject: thumb.php: support an optional px width suffix
..


thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf3
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Reedy re...@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] Create a wikimaps_atlas postgis database - change (operations/puppet)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Create a wikimaps_atlas postgis database
..

Create a wikimaps_atlas postgis database

Also add the planemad user with access to that db

Bug: 63382
Change-Id: I2ef78b9cb139ab1812cc57ac20b9d6ca0d012d10
---
M manifests/role/osm.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/132813/1

diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index 9a2f8d1..b1f86e9 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -113,6 +113,16 @@
 method   = 'md5',
 database = 'u_aude',
 }
+postgresql::spatialdb { 'wikimaps_atlas': }
+postgresql::user { 'planemad@labs':
+ensure   = 'present',
+user = 'planembad',
+password = $passwords::osm::planemad_password,
+cidr = '10.68.16.0/21',
+type = 'host',
+method   = 'md5',
+database = 'wikimaps_atlas',
+}
 }
 
 class role::osm::slave {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ef78b9cb139ab1812cc57ac20b9d6ca0d012d10
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] thumb.php: support an optional px width suffix - change (mediawiki/core)

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

Change subject: thumb.php: support an optional px width suffix
..


thumb.php: support an optional px width suffix

A large percentage (40-50%) of the 500s that are emitted in production
are for a single URL,
https://commons.wikimedia.org/w/thumb.php?f=Crystal_Clear_action_viewmag.pngwidth=21px

The reason this fails is because thumb.php expects width to be 21, not
21px, and it currently tries to fetch (and generate) the 21pxpx
thumb size, which is obviously an invalid size. (an invalid size
shouldn't result in a 5xx but rather to a 4xx. though; that's a separate
bug that needs to be fixed).

This URL is embedded by a gadget, Gadget-searchbox-js, that is copied in
a lot of our wikis, including a big one, frwiki. mwgrep reveals that
there are a bunch of other URLs in various Gadgets that have width
values with px in them, so this presumably worked at some point in the
past.

While we could in theory fix all those URLs in these dozens of gadgets
across wikis to not suffix width with px, this sounds like a herculean
effort and we're probably better off adding this compatibility branch to
thumb.php that strips the px suffix, if existent.

Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
---
M thumb.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/thumb.php b/thumb.php
index 59bf8dc..d7bf453 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@
$params['width'] = $params['w'];
unset( $params['w'] );
}
+   if ( isset( $params['width'] )  substr( $params['width'], -2 ) == 
'px' ) {
+   // strip the px (pixel) suffix, if found
+   $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+   }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a00c9634b1c6af49fb8503cc3ff4cafdaff6b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf4
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Reedy re...@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] Create a wikimaps_atlas postgis database - change (operations/puppet)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Create a wikimaps_atlas postgis database
..


Create a wikimaps_atlas postgis database

Also add the planemad user with access to that db

Bug: 63382
Change-Id: I2ef78b9cb139ab1812cc57ac20b9d6ca0d012d10
---
M manifests/role/osm.pp
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index 9a2f8d1..b1f86e9 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -113,6 +113,16 @@
 method   = 'md5',
 database = 'u_aude',
 }
+postgresql::spatialdb { 'wikimaps_atlas': }
+postgresql::user { 'planemad@labs':
+ensure   = 'present',
+user = 'planembad',
+password = $passwords::osm::planemad_password,
+cidr = '10.68.16.0/21',
+type = 'host',
+method   = 'md5',
+database = 'wikimaps_atlas',
+}
 }
 
 class role::osm::slave {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ef78b9cb139ab1812cc57ac20b9d6ca0d012d10
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Fix wikiset primary key - change (mediawiki...CentralAuth)

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

Change subject: Fix wikiset primary key
..


Fix wikiset primary key

Change-Id: I25e083f2ff369319fa7624f557323c5e19d6492a
---
M central-auth.sql
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/central-auth.sql b/central-auth.sql
index 690c110..f1ded9e 100644
--- a/central-auth.sql
+++ b/central-auth.sql
@@ -156,7 +156,7 @@
   -- 2048 wikis. More than we need
   ws_wikis blob not null,
 
-  PRIMARY KEY ws_id (ws_id),
+  PRIMARY KEY (ws_id),
   UNIQUE ws_name (ws_name)
 ) /*$wgDBTableOptions*/;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25e083f2ff369319fa7624f557323c5e19d6492a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Hoo man h...@online.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] Fix a typo (planembad=planemad) - change (operations/puppet)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Fix a typo (planembad=planemad)
..

Fix a typo (planembad=planemad)

Change-Id: I5eb09000eedfde153d6c46a5c5482e876e71234a
---
M manifests/role/osm.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/132814/1

diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index b1f86e9..805d1f2 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -116,7 +116,7 @@
 postgresql::spatialdb { 'wikimaps_atlas': }
 postgresql::user { 'planemad@labs':
 ensure   = 'present',
-user = 'planembad',
+user = 'planemad',
 password = $passwords::osm::planemad_password,
 cidr = '10.68.16.0/21',
 type = 'host',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5eb09000eedfde153d6c46a5c5482e876e71234a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Fix a typo (planembad=planemad) - change (operations/puppet)

2014-05-11 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Fix a typo (planembad=planemad)
..


Fix a typo (planembad=planemad)

Change-Id: I5eb09000eedfde153d6c46a5c5482e876e71234a
---
M manifests/role/osm.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index b1f86e9..805d1f2 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -116,7 +116,7 @@
 postgresql::spatialdb { 'wikimaps_atlas': }
 postgresql::user { 'planemad@labs':
 ensure   = 'present',
-user = 'planembad',
+user = 'planemad',
 password = $passwords::osm::planemad_password,
 cidr = '10.68.16.0/21',
 type = 'host',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5eb09000eedfde153d6c46a5c5482e876e71234a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: 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] Make message generic - change (mediawiki...SemanticMediaWiki)

2014-05-11 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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

Change subject: Make message generic
..

Make message generic

This is made in order for other to make use of the same message key.

Change-Id: I2c10709ecf919826c18f502be6a514d71a6569b2
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index ade6473..05ddba1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -277,7 +277,7 @@
smw-concept-cache-text: The concept has a total of $1 
{{PLURAL:$1|page|pages}}, and was last updated $2.,
smw_concept_header: Pages of concept \$1\,
smw_conceptarticlecount: Showing below $1 {{PLURAL:$1|page|pages}}.,
-   smw-qp-aggregatable-empty-data: Requested aggregatable data could 
not be displayed due to some insufficient selection criteria.,
+   smw-qp-empty-data: Requested data could not be displayed due to some 
insufficient selection criteria.,
right-smw-admin: Access administration tasks (Semantic MediaWiki),
group-smwadministrator: Semantic MediaWiki administrators,
group-smwadministrator-member: {{GENDER:$1|administrator (SMW)}},
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 61fac5d..ae58573 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -292,7 +292,7 @@
smw-concept-cache-text: This is the message displays information 
about the cache status.\n\nParameters:\n* $1 - number of pages\n* $2 - date 
(localized, without time),
smw_concept_header: This is the header on a page in namespace 
\Concept\. Parameters:\n* $1 holds the name of the respective concept.,
smw_conceptarticlecount: This is the introductory message below the 
header on pages in namespace \Concept\. Parameters:\n* $1 holds the number of 
pages displayed in the current view.,
-   smw-qp-aggregatable-empty-data: An error message shown for 
insufficient data.,
+   smw-qp-empty-data: An error message shown for insufficient data.,
right-smw-admin: {{doc-right|smw-admin}},
group-smwadministrator: {{doc-group|smwadministrator|group}},
group-smwadministrator-member: 
{{doc-group|smwadministrator|member}},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c10709ecf919826c18f502be6a514d71a6569b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com

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


  1   2   >