[MediaWiki-commits] [Gerrit] Remove file usage - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158586 Change subject: Remove file usage .. Remove file usage Change-Id: I538f7734e1c06a179ee98a5cd843ccee4d91349f Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835 --- M MultimediaViewer.php M MultimediaViewerHooks.php M i18n/en.json M i18n/qqq.json M resources/mmv/mmv.js D resources/mmv/model/mmv.model.FileUsage.js D resources/mmv/provider/mmv.provider.GlobalUsage.js D resources/mmv/provider/mmv.provider.ImageUsage.js D resources/mmv/ui/mmv.ui.fileUsage.js D resources/mmv/ui/mmv.ui.fileUsage.less M resources/mmv/ui/mmv.ui.metadataPanel.js M tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb M tests/browser/features/support/pages/e2e_test_page.rb D tests/qunit/mmv/globalUsage.test.js M tests/qunit/mmv/mmv.test.js M tests/qunit/mmv/model/mmv.model.test.js D tests/qunit/mmv/provider/mmv.provider.GlobalUsage.test.js D tests/qunit/mmv/provider/mmv.provider.ImageUsage.test.js D tests/qunit/mmv/ui/mmv.ui.fileUsage.test.js M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js 20 files changed, 12 insertions(+), 1,227 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/86/158586/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index e0fbfad..31b2f3f 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -119,7 +119,6 @@ 'mmv.ui.canvasButtons', 'mmv.ui.categories', 'mmv.ui.description', - 'mmv.ui.fileUsage', 'mmv.ui.metadataPanel', ), @@ -194,16 +193,6 @@ ), ), - 'mmv.model.FileUsage' = $wgMediaViewerResourceTemplate + array( - 'scripts' = array( - 'mmv/model/mmv.model.FileUsage.js', - ), - - 'dependencies' = array( - 'mmv.model', - ), - ), - 'mmv.model.Image' = $wgMediaViewerResourceTemplate + array( 'scripts' = array( 'mmv/model/mmv.model.Image.js', @@ -269,8 +258,6 @@ 'mmv.provider' = $wgMediaViewerResourceTemplate + array( 'scripts' = array( 'mmv/provider/mmv.provider.Api.js', - 'mmv/provider/mmv.provider.ImageUsage.js', - 'mmv/provider/mmv.provider.GlobalUsage.js', 'mmv/provider/mmv.provider.ImageInfo.js', 'mmv/provider/mmv.provider.FileRepoInfo.js', 'mmv/provider/mmv.provider.ThumbnailInfo.js', @@ -283,7 +270,6 @@ 'mediawiki.Title', 'mmv.model', 'mmv.model.IwTitle', - 'mmv.model.FileUsage', 'mmv.model.Image', 'mmv.model.Repo', 'mmv.model.Thumbnail', @@ -400,33 +386,6 @@ ), ), - 'mmv.ui.fileUsage' = $wgMediaViewerResourceTemplate + array( - 'scripts' = array( - 'mmv/ui/mmv.ui.fileUsage.js', - ), - - 'styles' = array( - 'mmv/ui/mmv.ui.fileUsage.less', - ), - - 'dependencies' = array( - 'mediawiki.language', - 'mediawiki.Uri', - 'mediawiki.jqueryMsg', - 'mmv.ui', - 'mmv.model.IwTitle', - 'oojs', - ), - - 'messages' = array( - 'multimediaviewer-fileusage-count', - 'multimediaviewer-fileusage-count-more', - 'multimediaviewer-fileusage-link', - 'multimediaviewer-fileusage-local-section', - 'multimediaviewer-fileusage-global-section', - ), - ), - 'mmv.ui.permission' = $wgMediaViewerResourceTemplate + array( 'scripts' = array( 'mmv/ui/mmv.ui.permission.js', @@ -502,7 +461,6 @@ 'mmv.ui.stripeButtons', 'mmv.ui.categories', 'mmv.ui.description', - 'mmv.ui.fileUsage', 'mmv.ui.permission', 'mmv.ui.reuse.dialog', 'mmv.ui.truncatableTextField', diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index 399044d..c709b04 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -145,7 +145,6 @@ 'infoLink' = self::$infoLink, 'discussionLink' = self::$discussionLink, 'helpLink' =
[MediaWiki-commits] [Gerrit] Remove categories - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158587 Change subject: Remove categories .. Remove categories Change-Id: I309b01592e874579d50bf5fc0810c238d47748f5 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835 --- M MultimediaViewer.php M MultimediaViewerHooks.php M resources/mmv/model/mmv.model.Image.js M resources/mmv/provider/mmv.provider.ImageInfo.js D resources/mmv/ui/img/tag.svg D resources/mmv/ui/mmv.ui.categories.js D resources/mmv/ui/mmv.ui.categories.less M resources/mmv/ui/mmv.ui.metadataPanel.js M tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb M tests/browser/features/support/pages/e2e_test_page.rb M tests/qunit/mmv/model/mmv.model.Image.test.js M tests/qunit/mmv/provider/mmv.provider.ImageInfo.test.js D tests/qunit/mmv/ui/mmv.ui.categories.test.js 13 files changed, 6 insertions(+), 273 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/87/158587/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 31b2f3f..62f8b30 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -117,7 +117,6 @@ 'mmv.ui', 'mmv.ui.canvas', 'mmv.ui.canvasButtons', - 'mmv.ui.categories', 'mmv.ui.description', 'mmv.ui.metadataPanel', ), @@ -330,25 +329,6 @@ ), ), - 'mmv.ui.categories' = $wgMediaViewerResourceTemplate + array( - 'scripts' = array( - 'mmv/ui/mmv.ui.categories.js', - ), - - 'styles' = array( - 'mmv/ui/mmv.ui.categories.less', - ), - - 'dependencies' = array( - 'mmv.ui', - 'oojs', - ), - - 'messages' = array( - 'comma-separator', - ), - ), - 'mmv.ui.stripeButtons' = $wgMediaViewerResourceTemplate + array( 'scripts' = array( 'mmv/ui/mmv.ui.stripeButtons.js', @@ -459,7 +439,6 @@ 'mmv.ui', 'mmv.ui.progressBar', 'mmv.ui.stripeButtons', - 'mmv.ui.categories', 'mmv.ui.description', 'mmv.ui.permission', 'mmv.ui.reuse.dialog', diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index c709b04..e0e27d2 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -211,7 +211,6 @@ 'tests/qunit/mmv/ui/mmv.ui.test.js', 'tests/qunit/mmv/ui/mmv.ui.canvas.test.js', 'tests/qunit/mmv/ui/mmv.ui.canvasButtons.test.js', - 'tests/qunit/mmv/ui/mmv.ui.categories.test.js', 'tests/qunit/mmv/ui/mmv.ui.description.test.js', 'tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js', 'tests/qunit/mmv/ui/mmv.ui.metadataPanelScroller.test.js', diff --git a/resources/mmv/model/mmv.model.Image.js b/resources/mmv/model/mmv.model.Image.js index 32ffa08..e8d7696 100644 --- a/resources/mmv/model/mmv.model.Image.js +++ b/resources/mmv/model/mmv.model.Image.js @@ -40,7 +40,6 @@ * @param {string} permission * @param {number} latitude * @param {number} longitude -* @param {string[]} categories */ function Image( title, @@ -60,8 +59,7 @@ license, permission, latitude, - longitude, - categories + longitude ) { /** @property {mw.Title} title The title of the image file */ this.title = title; @@ -123,12 +121,6 @@ * with URLs to appropriately sized thumbnails */ this.thumbUrls = {}; - - /** - * @property {string[]} categories - * The categories this image is a member of. - */ - this.categories = categories; } IP = Image.prototype; @@ -143,7 +135,7 @@ Image.newFromImageInfo = function ( title, imageInfo ) { var uploadDateTime, creationDateTime, imageData, description, source, author, license, permission, - latitude, longitude, categories, + latitude, longitude, innerInfo = imageInfo.imageinfo[0], extmeta = innerInfo.extmetadata; @@ -176,8
[MediaWiki-commits] [Gerrit] depool es1007 while cloning - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/158588 Change subject: depool es1007 while cloning .. depool es1007 while cloning Change-Id: I996f4c3f0d1b717402b9d411e4f33ebd0606cf34 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/88/158588/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4b822fa..90e3083 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -455,7 +455,7 @@ 'cluster24' = array( '10.64.16.153' = 1, # es1005 '10.64.16.154' = 3, # es1006 - '10.64.32.17' = 1, # es1007 snapshot host + # cloning '10.64.32.17' = 1, # es1007 snapshot host ), # es3 'cluster25' = array( -- To view, visit https://gerrit.wikimedia.org/r/158588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I996f4c3f0d1b717402b9d411e4f33ebd0606cf34 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool es1007 while cloning - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: depool es1007 while cloning .. depool es1007 while cloning Change-Id: I996f4c3f0d1b717402b9d411e4f33ebd0606cf34 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4b822fa..90e3083 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -455,7 +455,7 @@ 'cluster24' = array( '10.64.16.153' = 1, # es1005 '10.64.16.154' = 3, # es1006 - '10.64.32.17' = 1, # es1007 snapshot host + # cloning '10.64.32.17' = 1, # es1007 snapshot host ), # es3 'cluster25' = array( -- To view, visit https://gerrit.wikimedia.org/r/158588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I996f4c3f0d1b717402b9d411e4f33ebd0606cf34 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@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] Remove expensive synchronous template validation - change (mediawiki...UploadWizard)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158589 Change subject: Remove expensive synchronous template validation .. Remove expensive synchronous template validation In 1.25 the async parameter gets deprecated. This very advanced feature requires such deep knowledge of how Commons works that I believe the users who know about it don't really need the validation. Furthermore, the worst case scenario is just that junk gets added to a section of the file page's wikitext by a user not knowing what they're doing. Which doesn't seem like a big deal, since it can always be fixed after publication. Change-Id: I6fd8972e9dd9c578d437245598f2d837bd62085d Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/854 --- M UploadWizardHooks.php M i18n/en.json M resources/mw.UploadWizardLicenseInput.js 3 files changed, 0 insertions(+), 91 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/89/158589/1 diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 0f92db4..220a6fa 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -349,7 +349,6 @@ 'mwe-upwiz-error-license-wikitext-missing', 'mwe-upwiz-error-license-wikitext-too-short', 'mwe-upwiz-error-license-wikitext-too-long', - 'mwe-upwiz-error-license-wikitext-invalid', 'mwe-upwiz-details-error-count', 'mwe-upwiz-license-cc-by-sa-4.0', 'mwe-upwiz-license-cc-by-sa-3.0', diff --git a/i18n/en.json b/i18n/en.json index 21e587a..930396f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -221,7 +221,6 @@ mwe-upwiz-error-license-wikitext-missing: You selected an option which requires you to enter wikitext., mwe-upwiz-error-license-wikitext-too-short: The wikitext here is too short to be a license, mwe-upwiz-error-license-wikitext-too-long: The wikitext you entered is too long., - mwe-upwiz-error-license-wikitext-invalid: This does not seem to be valid wikitext, or does not contain a license., mwe-upwiz-details-error-count: There {{PLURAL:$1|is one error|are $1 errors}} with the {{PLURAL:$2|form|forms}} above. Correct the {{PLURAL:$1|error|errors}}, and try submitting again., mwe-upwiz-too-many-files-ok: OK, mwe-upwiz-too-many-files-text: You can only upload $1 {{PLURAL:$1|file|files}} at once but you tried to upload $2 {{PLURAL:$2|file|files}} in total. Please try again with fewer files!, diff --git a/resources/mw.UploadWizardLicenseInput.js b/resources/mw.UploadWizardLicenseInput.js index 6056eae..8a9e154 100644 --- a/resources/mw.UploadWizardLicenseInput.js +++ b/resources/mw.UploadWizardLicenseInput.js @@ -442,8 +442,6 @@ errors.push( [ $errorEl, 'mwe-upwiz-error-license-wikitext-too-short' ] ); } else if ( text.length mw.UploadWizard.config.maxCustomLicenseLength ) { errors.push( [ $errorEl, 'mwe-upwiz-error-license-wikitext-too-long' ] ); - } else if ( !input.validateWikiText( text ) ) { - errors.push( [ $errorEl, 'mwe-upwiz-error-license-wikitext-invalid' ] ); } } ); } @@ -476,93 +474,6 @@ */ isSet: function() { return this.getSelectedInputs().length 0; - }, - - - /** -* Attempt to determine if wikitext parses... and maybe does it contain a license tag -* @return boolean -*/ - validateWikiText: function( text ) { - var ast, templates, found, licenseCategory, - input = this, - parser = new mw.jqueryMsg.parser(); - - try { - ast = parser.wikiTextToAst( text ); - } catch (e) { - mw.log.warn( e.message ); - return false; - } - - function accumTemplates( node, templates ) { - var nodeName, lcNodeName; - - if ( typeof node === 'object' ) { - nodeName = node[0]; - lcNodeName = nodeName.toLowerCase(); - - // templates like Self are special cased, as it is not a license tag and also reparses its string arguments into templates - // e.g. {{self|Cc-by-sa-3.0}} -- we should add 'Cc-by-sa-3.0' to the templates - if ( - mw.UploadWizard.config.licenseTagFilters -
[MediaWiki-commits] [Gerrit] several skin changes according to HW#2014082710000113 note #9 - change (mediawiki...BlueSpiceSkin)
Swidmann has submitted this change and it was merged. Change subject: several skin changes according to HW#201408271113 note #9 .. several skin changes according to HW#201408271113 note #9 Change-Id: Ibc7cf842d87d13e014426002cd05336ce940ebb5 --- M resources/components/extension.extendedSearch.less M resources/components/extension.widgetbar.less M resources/components/skin.content.less M resources/components/skin.dataAfterContent.less M resources/components/skin.font.less M resources/components/skin.menuTop.js M resources/components/skin.navigationTabs.less 7 files changed, 133 insertions(+), 5 deletions(-) Approvals: Swidmann: Verified; Looks good to me, approved diff --git a/resources/components/extension.extendedSearch.less b/resources/components/extension.extendedSearch.less index dcac99f..d337f1a 100644 --- a/resources/components/extension.extendedSearch.less +++ b/resources/components/extension.extendedSearch.less @@ -52,12 +52,32 @@ } } } +#bs-extendedsearch-form-specialpage{ + #bs-extendedsearch-inputfieldtext-specialpage{ + height: 16px; + } + .bs-extendedsearch-domaindiv{ + .bs-extendedsearch-multivaluefield{ + margin: 9px; + } + } +} #bs-extendedsearch-specialpage-body{ #bs-extendedsearch-filters-results-paging{ + .bs-extendedsearch-paging-no:hover{ + color: #666; + } + .bs-extendedsearch-paging-no-active{ + padding-top: 0px; + } + .bs-extendedsearch-sorting-bar bs-extendedsearch-default-textspacing{ + font-size: 0.75em; + } #bs-extendedsearch-results-paging{ #bs-extendedsearch-results{ .bs-search-result-info{ - margin-top: 0; + margin-top: -5px; + margin-bottom: 5px; line-height: 1.4em; } .bs-search-hit-text{ @@ -68,9 +88,9 @@ #bs-extendedsearch-filters{ #bs-extendedsearch-all-filter-boxes{ .bs-facet-title, .bs-extendedsearch-facetbox{ - font-size: 1em !important; .facetBarEntry{ - font-size: 0.8em !important; + font-size: 90% !important; + line-height: normal; } } } diff --git a/resources/components/extension.widgetbar.less b/resources/components/extension.widgetbar.less index 00b342c..8215ab4 100644 --- a/resources/components/extension.widgetbar.less +++ b/resources/components/extension.widgetbar.less @@ -73,6 +73,8 @@ display: table-caption; #bs-widgetbar-edit{ margin-right: 5px; + font-size: 80%; + padding-top: 5px; } } .bs-widget { diff --git a/resources/components/skin.content.less b/resources/components/skin.content.less index 60c9bf7..94c0a57 100644 --- a/resources/components/skin.content.less +++ b/resources/components/skin.content.less @@ -18,4 +18,34 @@ #bs-bodytext pre, #bs-bodytext .mw-code { overflow-x: auto; +} + +#bodyContent{ + #bs-bodytext{ + #mw-content-text{ + .bs-admincontrolbtn { + float:left; + margin-bottom:5px; + margin-right:5px; + text-align:center; + a { + border:1px solid #F0F0F0; + color:#C9D6DE; + display:block; + float:left; + height:90px; + text-decoration:none; + vertical-align:middle; + width:160px; + } + a:hover { + background:#F9F9F9 none repeat scroll 0 0; + color:#0B55C4; + border-color:#EEE #CCC #CCC #EEE; +
[MediaWiki-commits] [Gerrit] remove db1004 from s4 (previously depooled) - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/158590 Change subject: remove db1004 from s4 (previously depooled) .. remove db1004 from s4 (previously depooled) Change-Id: Ie8dbbc78ab56d2ae974a679c00b9bca1a8cad0a4 --- M manifests/site.pp 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/158590/1 diff --git a/manifests/site.pp b/manifests/site.pp index 067537a..3b0bf9a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -783,7 +783,7 @@ } } -node /^db10(04|40|42|53|56|59|64)\.eqiad\.wmnet/ { +node /^db10(40|42|53|56|59|64)\.eqiad\.wmnet/ { include admin $cluster = 'mysql' @@ -1004,6 +1004,13 @@ } } +# springle using for codfw preparation +node 'db1004.eqiad.wmnet' { + +include admin +include standard +} + node 'dobson.wikimedia.org' { include admin -- To view, visit https://gerrit.wikimedia.org/r/158590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8dbbc78ab56d2ae974a679c00b9bca1a8cad0a4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove db1004 from s4 (previously depooled) - change (operations/puppet)
Springle has submitted this change and it was merged. Change subject: remove db1004 from s4 (previously depooled) .. remove db1004 from s4 (previously depooled) Change-Id: Ie8dbbc78ab56d2ae974a679c00b9bca1a8cad0a4 --- M manifests/site.pp 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 067537a..3b0bf9a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -783,7 +783,7 @@ } } -node /^db10(04|40|42|53|56|59|64)\.eqiad\.wmnet/ { +node /^db10(40|42|53|56|59|64)\.eqiad\.wmnet/ { include admin $cluster = 'mysql' @@ -1004,6 +1004,13 @@ } } +# springle using for codfw preparation +node 'db1004.eqiad.wmnet' { + +include admin +include standard +} + node 'dobson.wikimedia.org' { include admin -- To view, visit https://gerrit.wikimedia.org/r/158590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8dbbc78ab56d2ae974a679c00b9bca1a8cad0a4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@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] Added fontweight - change (mediawiki...BlueSpiceSkin)
Swidmann has uploaded a new change for review. https://gerrit.wikimedia.org/r/158591 Change subject: Added fontweight .. Added fontweight Added fontweight bold, for i. e. safari browser Change-Id: I473c7ae66e0e9907a6115797c2229bd8a31ae91e --- M resources/bluespiceskin.fonts.css 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin refs/changes/91/158591/1 diff --git a/resources/bluespiceskin.fonts.css b/resources/bluespiceskin.fonts.css index 046b3a0..0f576d1 100644 --- a/resources/bluespiceskin.fonts.css +++ b/resources/bluespiceskin.fonts.css @@ -32,6 +32,12 @@ } @font-face{ + font-family: Open Sans; + src: url(fonts/open_sans_600.ttf); + font-weight: bold; +} + +@font-face{ font-family: Open Sans 300; src: url(fonts/open_sans_300.ttf); } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/158591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I473c7ae66e0e9907a6115797c2229bd8a31ae91e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/BlueSpiceSkin Gerrit-Branch: REL1_22 Gerrit-Owner: Swidmann widm...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] display for links in widgets changed - change (mediawiki...BlueSpiceExtensions)
Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/158592 Change subject: display for links in widgets changed .. display for links in widgets changed * due to the fact, that the widget bar is now bigger, the links can be bigger too Change-Id: Ib1a1e4ebc4197937cdb055bc5de4958d90e05d7f --- M PagesVisited/PagesVisited.class.php M SmartList/SmartList.class.php M WantedArticle/WantedArticle.class.php M WatchList/WatchList.class.php 4 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/92/158592/1 diff --git a/PagesVisited/PagesVisited.class.php b/PagesVisited/PagesVisited.class.php index 6baef42..c124a7e 100644 --- a/PagesVisited/PagesVisited.class.php +++ b/PagesVisited/PagesVisited.class.php @@ -197,7 +197,6 @@ if ( $oErrorListView-hasItems() ) { return $oErrorListView-execute(); } - $iCurrentNamespaceId = $oParser-getTitle()-getNamespace(); $oListView = $this-makePagesVisitedWikiList( $iCount, $sNamespaces, $iCurrentNamespaceId, $iMaxTitleLength, $sSortOrder ); $sOut = $oListView-execute(); @@ -252,7 +251,7 @@ $iCurrentNamespaceId = $this-getTitle()-getNamespace(); // TODO RBV (04.07.11 15:02): Rework method - implode() is a workaround for legacy code. - $oListView = $this-makePagesVisitedWikiList( $iCount, implode( ',', $aNamespaces ), $iCurrentNamespaceId, 19, $sSortOrder ); + $oListView = $this-makePagesVisitedWikiList( $iCount, implode( ',', $aNamespaces ), $iCurrentNamespaceId, 30, $sSortOrder ); $sOut = $oListView-execute(); if ( !( $oListView instanceof ViewTagError ) ) { diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php index ee74b94..ca37b2f 100644 --- a/SmartList/SmartList.class.php +++ b/SmartList/SmartList.class.php @@ -376,7 +376,7 @@ $oWidgetView -setId( 'bs-smartlist-edits' ) -setTitle( wfMessage( 'bs-smartlist-lastedits' )-plain() ) - -setBody( $this-getYourEdits( 5, 'widget' ) ) + -setBody( $this-getYourEdits( 5, 'widget', 30 ) ) -setTooltip( wfMessage( 'bs-smartlist-lastedits' )-plain() ) -setAdditionalBodyClasses( array( 'bs-nav-links', 'bs-widgetbar-portlet' ) ); //For correct margin and fontsize @@ -891,7 +891,7 @@ * Generates list of your edits * @return string list of edits */ - public function getYourEdits( $iCount, $sOrigin = 'dashboard' ) { + public function getYourEdits( $iCount, $sOrigin = 'dashboard', $iDisplayLength = 18 ) { wfProfileIn( 'BS::'.__METHOD__ ); $iCount = BsCore::sanitize( $iCount, 0, BsPARAMTYPE::INT ); @@ -917,7 +917,7 @@ if ( $sOrigin === 'dashboard' ) { $sHtml = $oTitle-getPrefixedText(); } else { - $sHtml = BsStringHelper::shorten( $oTitle-getPrefixedText() , array( 'max-length' = 18, 'position' = 'middle' ) ); + $sHtml = BsStringHelper::shorten( $oTitle-getPrefixedText() , array( 'max-length' = $iDisplayLength, 'position' = 'middle' ) ); } $sLink = Linker::link( $oTitle, $sHtml ); $aEdits[] = Html::openElement( 'li' ) . $sLink . Html::closeElement( 'li' ); diff --git a/WantedArticle/WantedArticle.class.php b/WantedArticle/WantedArticle.class.php index 2f1a327..1b6bf19 100644 --- a/WantedArticle/WantedArticle.class.php +++ b/WantedArticle/WantedArticle.class.php @@ -212,7 +212,7 @@ $oTitle = $aTitleList[$i]; $sWishTitle = BsStringHelper::shorten( $oTitle-getPrefixedText(), - array( 'max-length' = 18, 'position' = 'middle' ) + array( 'max-length' = 30, 'position' = 'middle' ) ); $aWikiCodeList[] = '*'.BsLinkProvider::makeEscapedWikiLinkForTitle( $oTitle, $sWishTitle ); } diff --git a/WatchList/WatchList.class.php b/WatchList/WatchList.class.php index d03415c..833503d 100644 --- a/WatchList/WatchList.class.php +++ b/WatchList/WatchList.class.php @@ -216,7 +216,7 @@ $oWatchList = $this-fetchWatchlist( $oCurrentUser, $iCount, - 20, + 30, $sOrder ); $sWatchListWikiText
[MediaWiki-commits] [Gerrit] big improvements to the tokens storage - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: big improvements to the tokens storage .. big improvements to the tokens storage - new APISite._tokens property (for internal use) which holds tokens cached *by user* - new APISite.tokens property (for external use) of TokenWallet type - new APISite.preload_tokens() method for caching tokens - use action=tokens instead of action=queryprop=infointoken=etc. when supported - the APISite.token() method has been deprecated and replaced with the 'tokens' property also added a very simple test Change-Id: I805002455798843fbe77556d3a6134bc9434417e --- M pywikibot/site.py M tests/site_tests.py 2 files changed, 66 insertions(+), 39 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index 46995af..07a280c 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1155,6 +1155,21 @@ return None +class TokenWallet(object): + +Container for tokens. + +def __init__(self, site): +self.site = site +self.site._tokens = {} + +def __getitem__(self, key): +storage = self.site._tokens.setdefault(self.site.user(), {}) +if key not in storage: +self.site.preload_tokens([key]) +return storage[key] + + class APISite(BaseSite): API interface to MediaWiki site. @@ -1190,7 +1205,7 @@ self._msgcache = {} self._loginstatus = LoginStatus.NOT_ATTEMPTED self._siteinfo = Siteinfo(self) -return +self.tokens = TokenWallet(self) @staticmethod def fromDBName(dbname): @@ -2172,6 +2187,35 @@ api.update_page(page, pagedata) yield page +def preload_tokens(self, types): +Preload one or multiple tokens. + +For all MediaWiki versions prior to 1.20, only one token can be +retrieved at once. + +@param types: the types of token (e.g., edit, move, delete); +see API documentation for full list of types +@type types: iterable + +storage = self._tokens.setdefault(self.user(), {}) +if LV(self.version()) LV('1.20'): +for tokentype in types: +query = api.PropertyGenerator('info', + titles='Dummy page', + intoken=tokentype, + site=self) +for item in query: +pywikibot.debug(unicode(item), _logger) +if (tokentype + 'token') in item: +storage[tokentype] = item[tokentype + 'token'] +else: +data = api.Request(site=self, action='tokens', + type='|'.join(types)).submit() +if 'tokens' in data and data['tokens']: +storage.update(dict((key[:-5], val) +for key, val in data['tokens'].items())) + +@deprecated(the 'tokens' property) def token(self, page, tokentype): Return token retrieved from wiki to allow changing page content. @@ -2180,19 +2224,7 @@ see API documentation for full list of types -query = api.PropertyGenerator(info, - titles=page.title(withSection=False), - intoken=tokentype, - site=self) -for item in query: -if not self.sametitle(item['title'], page.title(withSection=False)): -raise Error( -utoken: Query on page %s returned data on page [[%s]] -% (page.title(withSection=False, asLink=True), - item['title'])) -api.update_page(page, item) -pywikibot.debug(unicode(item), _logger) -return item[tokentype + token] +return self.tokens[tokentype] # following group of methods map more-or-less directly to API queries @@ -3396,7 +3428,7 @@ lastrev = None if not recreate: raise -token = self.token(page, edit) +token = self.tokens['edit'] # getting token also updates the 'lastrevid' value, which allows us to # detect if page has been changed since last time text was retrieved. @@ -3570,7 +3602,7 @@ if not page.exists(): raise NoPage(Cannot move page %s because it does not exist on %s. % (oldtitle, self)) -token = self.token(page, move) +token = self.tokens['move'] self.lock_page(page) req = api.Request(site=self, action=move, to=newtitle, token=token, reason=summary) @@ -3688,7 +3720,7 @@ @param summary: Edit
[MediaWiki-commits] [Gerrit] Chunked upload result should consistently have a stage value - change (mediawiki/core)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158593 Change subject: Chunked upload result should consistently have a stage value .. Chunked upload result should consistently have a stage value Change-Id: If9c2b215c43eef002482695701182c471f8bb450 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/855 --- M includes/api/ApiUpload.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/158593/1 diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index aa8fe21..657181b 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -241,6 +241,7 @@ ) ) ); $result['result'] = 'Poll'; + $result['stage'] = 'queued'; } else { $status = $this-mUpload-concatenateChunks(); if ( !$status-isGood() ) { @@ -631,6 +632,7 @@ ) ) ); $result['result'] = 'Poll'; + $result['stage'] = 'queued'; } else { /** @var $status Status */ $status = $this-mUpload-performUpload( $this-mParams['comment'], -- To view, visit https://gerrit.wikimedia.org/r/158593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9c2b215c43eef002482695701182c471f8bb450 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added batch message for Notifications - change (mediawiki...BlueSpiceExtensions)
Swidmann has uploaded a new change for review. https://gerrit.wikimedia.org/r/158594 Change subject: Added batch message for Notifications .. Added batch message for Notifications replaced testing value with real value Change-Id: Ie3b5361b0c1eedaba3b4d4e62b6a058ed1f518a5 --- M Notifications/Notifications.class.php 1 file changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/94/158594/1 diff --git a/Notifications/Notifications.class.php b/Notifications/Notifications.class.php index bbf32bb..31d342c 100644 --- a/Notifications/Notifications.class.php +++ b/Notifications/Notifications.class.php @@ -225,9 +225,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-edit', 'email-body-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-edit', + 'email-body-batch-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), 'icon' = 'bs-edit', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-create'] = array( @@ -242,9 +242,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-new', 'email-body-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-new', + 'email-body-batch-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), 'icon' = 'bs-create', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-delete'] = array( @@ -259,9 +259,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-delete', 'email-body-params' = array( 'titlelink', 'agent', 'deletereason' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-delete', + 'email-body-batch-params' = array( 'titlelink', 'agent', 'deletereason' ), 'icon' = 'bs-delete', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-move'] = array( @@ -276,7 +276,8 @@ 'email-subject-params' = array( 'title', 'agent', 'newtitle' ), 'email-body-message' = 'bs-notifications-email-move', 'email-body-params' = array( 'title', 'agent', 'newtitle', 'newtitlelink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-move', + 'email-body-batch-params' = array( 'title', 'agent', 'newtitle', 'newtitlelink' ), 'icon' = 'bs-move', ); @@ -292,7 +293,8 @@ 'email-subject-params' = array( 'user' ), 'email-body-message' = 'bs-notifications-email-addaccount', 'email-body-params' = array( 'userlink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-addaccount', + 'email-body-batch-params' = array( 'userlink' ), 'icon' = 'bs-newuser', ); @@ -308,7 +310,8 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-shout', 'email-body-params' = array( 'title', 'agent', 'shoutmsg', 'titlelink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-shout', + 'email-body-batch-params' = array( 'title', 'agent', 'shoutmsg', 'titlelink' ), 'icon' = 'bs-shoutbox', ); return true; -- To view, visit https://gerrit.wikimedia.org/r/158594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3b5361b0c1eedaba3b4d4e62b6a058ed1f518a5 Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] Removed obsolete value supplement template - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/158595 Change subject: Removed obsolete value supplement template .. Removed obsolete value supplement template supplement template is not in use anymore, same for wb-value-empty css class Change-Id: Ia89510321bd12ddc5f1f9c2d5361e994288b3cb4 --- M lib/resources/templates.php M lib/resources/wikibase.css 2 files changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/158595/1 diff --git a/lib/resources/templates.php b/lib/resources/templates.php index c4f8ed5..1845f94 100644 --- a/lib/resources/templates.php +++ b/lib/resources/templates.php @@ -200,11 +200,6 @@ /span HTML; - $templates['wb-property-value-supplement'] = -HTML -span class=wb-value-supplement$1/span -HTML; - $templates['wikibase-aliasesview'] = HTML div class=wikibase-aliasesview $1 diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index e14390a..5f66a13 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -118,11 +118,11 @@ display: block; /* need to force block explicitly to achieve 100% width */ } -.wb-value, .wb-value-supplement { +.wb-value { display: inline; } -.wb-empty, .wb-value-empty, .wb-value-supplement { +.wb-empty { color: #A1A1A1; } -- To view, visit https://gerrit.wikimedia.org/r/158595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia89510321bd12ddc5f1f9c2d5361e994288b3cb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use session_id() instead of $wgSessionStarted to check for s... - change (mediawiki...SocialLogin)
jenkins-bot has submitted this change and it was merged. Change subject: Use session_id() instead of $wgSessionStarted to check for session existence .. Use session_id() instead of $wgSessionStarted to check for session existence More reliable check and so that $wgSessionStarted can be removed at some point. Change-Id: I6541b52d090b0ea3f17c987ed2595d086bd1c3a1 --- M SocialLogin.body.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/SocialLogin.body.php b/SocialLogin.body.php index 7fde436..e0b55a9 100644 --- a/SocialLogin.body.php +++ b/SocialLogin.body.php @@ -102,8 +102,8 @@ } function onUserLoadAfterLoadFromSession( $user ) { - global $wgRequest, $wgOut, $wgContLang, $wgSocialLoginServices, $wgSocialLoginAddForms, $wgSessionStarted; - if (!$wgSessionStarted) { + global $wgRequest, $wgOut, $wgContLang, $wgSocialLoginServices, $wgSocialLoginAddForms; + if (session_id() == '') { wfSetupSession(); } $action = $wgRequest-getText('action', 'auth'); @@ -344,4 +344,4 @@ $wgOut-addHeadItem('Zocial Styles', link type='text/css' href='/extensions/SocialLogin/css/style.css' rel='stylesheet' /); $this-setHeaders(); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/121250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6541b52d090b0ea3f17c987ed2595d086bd1c3a1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SocialLogin Gerrit-Branch: master Gerrit-Owner: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Luft-on luf...@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] Reverted some extendedsearch stylings - change (mediawiki...BlueSpiceSkin)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/158596 Change subject: Reverted some extendedsearch stylings .. Reverted some extendedsearch stylings Facet stylings break there functionality and look bad. Also why is this done in skin? There is absolutly no need to style extendedsearch skin specific and so you get redundant statements Change-Id: I406277f260e4afb2e829bb2bc55f7acc6ac44f18 --- M resources/components/extension.extendedSearch.less 1 file changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin refs/changes/96/158596/1 diff --git a/resources/components/extension.extendedSearch.less b/resources/components/extension.extendedSearch.less index d337f1a..ec1b856 100644 --- a/resources/components/extension.extendedSearch.less +++ b/resources/components/extension.extendedSearch.less @@ -64,9 +64,6 @@ } #bs-extendedsearch-specialpage-body{ #bs-extendedsearch-filters-results-paging{ - .bs-extendedsearch-paging-no:hover{ - color: #666; - } .bs-extendedsearch-paging-no-active{ padding-top: 0px; } @@ -76,22 +73,10 @@ #bs-extendedsearch-results-paging{ #bs-extendedsearch-results{ .bs-search-result-info{ - margin-top: -5px; - margin-bottom: 5px; line-height: 1.4em; } .bs-search-hit-text{ margin-top: 0; - } - } - } - #bs-extendedsearch-filters{ - #bs-extendedsearch-all-filter-boxes{ - .bs-facet-title, .bs-extendedsearch-facetbox{ - .facetBarEntry{ - font-size: 90% !important; - line-height: normal; - } } } } -- To view, visit https://gerrit.wikimedia.org/r/158596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I406277f260e4afb2e829bb2bc55f7acc6ac44f18 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/BlueSpiceSkin Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implemented jQuery.wikibase.fingerprintview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented jQuery.wikibase.fingerprintview .. Implemented jQuery.wikibase.fingerprintview Change-Id: Id0a2457d4083ada7d2a705ca0c255f0e8f744016 --- M lib/resources/Resources.php M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js A lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M lib/resources/jquery.wikibase/resources.php A lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css M lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js M lib/resources/templates.php M lib/resources/wikibase.css A lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/View/TermBoxView.php M repo/resources/Resources.php M repo/resources/wikibase.initTermBox.js M repo/resources/wikibase.ui.entityViewInit.js 17 files changed, 847 insertions(+), 367 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved Henning Snater: Checked jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5a9708e..6836002 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -50,9 +50,10 @@ 'styles' = array( // Order must be hierarchical, do not order alphabetically 'wikibase.css', - 'jquery.wikibase/themes/default/jquery.wikibase.labelview.css', - 'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css', 'jquery.wikibase/themes/default/jquery.wikibase.aliasesview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.labelview.css', 'jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.sitelinkview.css', ) diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js index 12b5e6a..c07841b 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js @@ -62,14 +62,8 @@ this.options.value = this._checkValue( this.options.value ); - PARENT.prototype._create.call( this ); - var self = this, value = this.options.value; - - if( value value.description !== '' this.$text.text() === '' ) { - this._draw(); - } this.element // TODO: Move that code to a sensible place (see jQuery.wikibase.entityview): @@ -110,6 +104,12 @@ ] ); } } ); + + PARENT.prototype._create.call( this ); + + if( value value.description !== '' this.$text.text() === '' ) { + this._draw(); + } }, /** @@ -135,7 +135,9 @@ _draw: function() { if( !this._isInEditMode ) { this.element.removeClass( 'wb-edit' ); - this.$text.text( this.options.value.description ); + this.$text.text( + this.options.value.description || mw.msg( 'wikibase-description-empty' ) + ); return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js new file mode 100644 index 000..188a9b2 --- /dev/null +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js @@ -0,0 +1,396 @@ +/** + * @licence GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ +( function( mw, wb, $ ) { + 'use strict'; + + var PARENT = $.ui.TemplatedWidget; + +/** + * Displays and allows editing label and description in a specific language. + * @since 0.5 + * @extends jQuery.ui.TemplatedWidget + * + * @option {Object|null} value + * Object representing the widget's value. + * Structure: { language: {string}, label: {string|null}, description: {string|null } + * + * @option {string} [helpMessage] + * Default: mw.msg( 'wikibase-fingerprintview-input-help-message' ) + * + * @options
[MediaWiki-commits] [Gerrit] Implemented jQuery.wikibase.fingerprintgroupview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented jQuery.wikibase.fingerprintgroupview .. Implemented jQuery.wikibase.fingerprintgroupview Change-Id: I962ba1a96b1017d16f8f89acc37a21ac22f2edf3 --- M lib/resources/Resources.php A lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/resources.php A lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css M lib/resources/templates.php A lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintgroupview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php M repo/includes/View/TermBoxView.php M repo/resources/Resources.php M repo/resources/wikibase.initTermBox.js 11 files changed, 282 insertions(+), 96 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 4b9ba7d..721 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -52,6 +52,7 @@ 'wikibase.css', 'jquery.wikibase/themes/default/jquery.wikibase.aliasesview.css', 'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css', 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css', 'jquery.wikibase/themes/default/jquery.wikibase.labelview.css', diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js new file mode 100644 index 000..1d0b3d5 --- /dev/null +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -0,0 +1,100 @@ +/** + * @licence GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ +( function( mw, $ ) { + 'use strict'; + + var PARENT = $.ui.TemplatedWidget; + +/** + * Encapsulates a fingerprintlistview widget. + * @since 0.5 + * @extends jQuery.ui.TemplatedWidget + * + * @option {Object[]} value + * Object representing the widget's value. + * Structure: [ + * { language: {string], label: {string|null}, description: {string|null} } [, ...] + * ] + * + * @options {string} entityId + * + * @option {wikibase.RepoApi} api + */ +$.widget( 'wikibase.fingerprintgroupview', PARENT, { + options: { + template: 'wikibase-fingerprintgroupview', + templateParams: [ + function() { + return mw.msg( 'wikibase-terms' ); + }, + '' // fingerprintlistview + ], + templateShortCuts: { + $h: 'h2' + }, + value: [], + entityId: null, + api: null + }, + + /** +* @type {jQuery} +*/ + $fingerprintlistview: null, + + /** +* @see jQuery.ui.TemplatedWidget._create +*/ + _create: function() { + if( !$.isArray( this.options.value ) || !this.options.entityId || !this.options.api ) { + throw new Error( 'Required option(s) missing' ); + } + + PARENT.prototype._create.call( this ); + + this.element.addClass( 'wikibase-fingerprintgroupview' ); + + this.$fingerprintlistview = this.element.find( '.wikibase-fingerprintlistview' ); + + if( !this.$fingerprintlistview.length ) { + this.$fingerprintlistview = $( 'table/' ).appendTo( this.element ); + } + + this._createFingerprintlistview(); + }, + + /** +* @see jQuery.ui.TemplatedWidget.destroy +*/ + destroy: function() { + // When destroying a widget not initialized properly, fingerprintlistview will not have been + // created. + if( this.$fingerprintlistview ) { + var fingerprintlistview = this.$fingerprintlistview.data( 'fingerprintlistview' ); + + if( fingerprintlistview ) { + fingerprintlistview.destroy(); + } + + this.$fingerprintlistview.remove(); + } + + this.element.removeClass( 'wikibase-fingerprintgroupview' ); + PARENT.prototype.destroy.call( this ); + }, + + /** +* Creates and initializes the
[MediaWiki-commits] [Gerrit] Implemented jQuery.wikibase.fingerprintlistview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented jQuery.wikibase.fingerprintlistview .. Implemented jQuery.wikibase.fingerprintlistview Change-Id: I1c2d46f0e16d272051d124f98223493272155ac7 --- M lib/resources/Resources.php A lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.listview.js M lib/resources/jquery.wikibase/resources.php A lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css M lib/resources/templates.php A lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php M repo/includes/View/TermBoxView.php M repo/resources/Resources.php M repo/resources/wikibase.initTermBox.js 11 files changed, 226 insertions(+), 10 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 6836002..4b9ba7d 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -52,6 +52,7 @@ 'wikibase.css', 'jquery.wikibase/themes/default/jquery.wikibase.aliasesview.css', 'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css', 'jquery.wikibase/themes/default/jquery.wikibase.labelview.css', 'jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css', diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js new file mode 100644 index 000..e0f2691 --- /dev/null +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -0,0 +1,96 @@ +/** + * @licence GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ +( function( mw, wb, $ ) { + 'use strict'; + + var PARENT = $.ui.TemplatedWidget; + +/** + * Displays multiple fingerprints (see jQuery.wikibase.fingerprintview). + * @since 0.5 + * @extends jQuery.ui.TemplatedWidget + * + * @option {Object[]} value + * Object representing the widget's value. + * Structure: [ + * { language: {string], label: {string|null}, description: {string|null} } [, ...] + * ] + * + * @options {string} entityId + * + * @option {wikibase.RepoApi} api + */ +$.widget( 'wikibase.fingerprintlistview', PARENT, { + options: { + template: 'wikibase-fingerprintlistview', + templateParams: [ + '' // tbodys + ], + templateShortCuts: {}, + value: [], + entityId: null, + api: null + }, + + /** +* @see jQuery.ui.TemplatedWidget._create +*/ + _create: function() { + if( !$.isArray( this.options.value ) || !this.options.entityId || !this.options.api ) { + throw new Error( 'Required option(s) missing' ); + } + + PARENT.prototype._create.call( this ); + + this._createListView(); + + this.element.addClass( 'wikibase-fingerprintlistview' ); + }, + + /** +* @see jQuery.ui.TemplatedWidget.destroy +*/ + destroy: function() { + // When destroying a widget not initialized properly, listview will not have been created. + var listview = this.element.data( 'listview' ); + + if( listview ) { + listview.destroy(); + } + + this.element.removeClass( 'wikibase-fingerprintlistview' ); + PARENT.prototype.destroy.call( this ); + }, + + /** +* Creates the listview widget managing the fingerprintview widgets +*/ + _createListView: function() { + var self = this; + + this.element + .listview( { + listItemAdapter: new $.wikibase.listview.ListItemAdapter( { + listItemWidget: $.wikibase.fingerprintview, + listItemWidgetValueAccessor: 'value', + newItemOptionsFn: function( value ) { + return { + value: value, + entityId: self.options.entityId, + api: self.options.api, + helpMessage: mw.msg( +
[MediaWiki-commits] [Gerrit] Reverted some extendedsearch stylings - change (mediawiki...BlueSpiceSkin)
Smuggli has submitted this change and it was merged. Change subject: Reverted some extendedsearch stylings .. Reverted some extendedsearch stylings Facet stylings break there functionality and look bad. Also why is this done in skin? There is absolutly no need to style extendedsearch skin specific and so you get redundant statements Change-Id: I406277f260e4afb2e829bb2bc55f7acc6ac44f18 --- M resources/components/extension.extendedSearch.less 1 file changed, 0 insertions(+), 15 deletions(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/resources/components/extension.extendedSearch.less b/resources/components/extension.extendedSearch.less index d337f1a..ec1b856 100644 --- a/resources/components/extension.extendedSearch.less +++ b/resources/components/extension.extendedSearch.less @@ -64,9 +64,6 @@ } #bs-extendedsearch-specialpage-body{ #bs-extendedsearch-filters-results-paging{ - .bs-extendedsearch-paging-no:hover{ - color: #666; - } .bs-extendedsearch-paging-no-active{ padding-top: 0px; } @@ -76,22 +73,10 @@ #bs-extendedsearch-results-paging{ #bs-extendedsearch-results{ .bs-search-result-info{ - margin-top: -5px; - margin-bottom: 5px; line-height: 1.4em; } .bs-search-hit-text{ margin-top: 0; - } - } - } - #bs-extendedsearch-filters{ - #bs-extendedsearch-all-filter-boxes{ - .bs-facet-title, .bs-extendedsearch-facetbox{ - .facetBarEntry{ - font-size: 90% !important; - line-height: normal; - } } } } -- To view, visit https://gerrit.wikimedia.org/r/158596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I406277f260e4afb2e829bb2bc55f7acc6ac44f18 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/BlueSpiceSkin Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved stylings - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/158597 Change subject: Improved stylings .. Improved stylings Facets have a really ugly styling that images lay over the checkboxes. Don't easily go there and change anything which is related to them. Change-Id: If919accec4d3ff4a4ad4838c5f3f195d5a6aad9d --- M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css M ExtendedSearch/views/view.SearchResult.php 2 files changed, 15 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/97/158597/1 diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css index f6fbef7..fd2b916 100644 --- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css +++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css @@ -105,7 +105,7 @@ width: 45% !important; background-color: white !important; margin-right: 4px; - padding-top: 4px !important; + padding: 4px 0 1px 3px !important; } #bs-extendedsearch-form-specialpage { @@ -171,8 +171,8 @@ .bs-extendedsearch-sorting-bar { font-size: 1em !important; - padding-left: 5px; - padding-right: 5px; + padding-left: 5px !important; + padding-right: 5px !important; background-color: #F1F1F1; } @@ -190,17 +190,18 @@ background-color: #F1F1F1; border-color: #CC; font-size: 1em !important; + padding: 1px 0; } .bs-extendedsearch-paging-no:hover, .bs-extendedsearch-paging-no-active { - background-color: #3E5389; + background-color: #98a7c4; color: #FF; border-color: #6481AC; } .bs-extendedsearch-default-textspacing { - padding-top: 5px; + padding: 2px 0; height: 22px; } @@ -244,29 +245,24 @@ .bs-search-result-info { font-size: 11px !important; color: #666; - margin: 5px 0 0 28px; + margin: 0 0 0 32px; } .bs-search-result-info a { font-size: 1em !important; } div.bs-search-hit-text { - margin: 7px 0 0 28px; - padding-top: 1px; + margin: 0 0 0 32px; + padding-top: 5px; color: #666; + font-size: 0.9em !important; } div.bs-search-hit-text em { color: #000; font-style: normal; font-weight: bold; } -#hwstatus { - text-align:left; -} -#hwmode { - font-weight: bold; -} .bs-facet-title { - font-size: 13px !important; + font-size: 0.9em !important; background-color: #F1F1F1; color: #55; margin: 0 0 7px 0; @@ -291,7 +287,7 @@ .facetBarEntry { padding-left: 3px; line-height: 18px; - font-size: 11px !important; + font-size: 0.8em !important; } .facetBarEntry:hover { background-color: #F8F8F8; @@ -315,14 +311,14 @@ #bs-extendedsearch-all-filter-boxes input[type=checkbox] +label { margin-left: -15px; clear: both; - padding: 5px 0 4px 19px; + padding: 0 0 0 18px; /* @embed */ background: url(images/checkbox.png) left center no-repeat !important; } #bs-extendedsearch-all-filter-boxes div.facet-title input[type=checkbox] +label { margin-left: -15px; clear: both; - padding: 5px 0 4px 19px; + padding: 0 0 0 18px; /* @embed */ background: url(images/checkbox-title.png) left center no-repeat !important; } diff --git a/ExtendedSearch/views/view.SearchResult.php b/ExtendedSearch/views/view.SearchResult.php index 874fe28..65668ac 100644 --- a/ExtendedSearch/views/view.SearchResult.php +++ b/ExtendedSearch/views/view.SearchResult.php @@ -178,8 +178,7 @@ */ protected function makePagingDiv( $pageNo, $url = '', $bActive = false, $arrows = false ) { $aStyleClasses = array( - 'bs-extendedsearch-paging-no', - 'bs-extendedsearch-default-textspacing' + 'bs-extendedsearch-paging-no' ); if ( $arrows ) $aStyleClasses[] = 'bs-extendedsearch-paging-arrows'; if ( $bActive ) $aStyleClasses[] = 'bs-extendedsearch-paging-no-active'; -- To view, visit https://gerrit.wikimedia.org/r/158597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If919accec4d3ff4a4ad4838c5f3f195d5a6aad9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved stylings - change (mediawiki...BlueSpiceExtensions)
Smuggli has submitted this change and it was merged. Change subject: Improved stylings .. Improved stylings Facets have a really ugly styling that images lay over the checkboxes. Don't easily go there and change anything which is related to them. Change-Id: If919accec4d3ff4a4ad4838c5f3f195d5a6aad9d --- M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css M ExtendedSearch/views/view.SearchResult.php 2 files changed, 15 insertions(+), 20 deletions(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css index f6fbef7..fd2b916 100644 --- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css +++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css @@ -105,7 +105,7 @@ width: 45% !important; background-color: white !important; margin-right: 4px; - padding-top: 4px !important; + padding: 4px 0 1px 3px !important; } #bs-extendedsearch-form-specialpage { @@ -171,8 +171,8 @@ .bs-extendedsearch-sorting-bar { font-size: 1em !important; - padding-left: 5px; - padding-right: 5px; + padding-left: 5px !important; + padding-right: 5px !important; background-color: #F1F1F1; } @@ -190,17 +190,18 @@ background-color: #F1F1F1; border-color: #CC; font-size: 1em !important; + padding: 1px 0; } .bs-extendedsearch-paging-no:hover, .bs-extendedsearch-paging-no-active { - background-color: #3E5389; + background-color: #98a7c4; color: #FF; border-color: #6481AC; } .bs-extendedsearch-default-textspacing { - padding-top: 5px; + padding: 2px 0; height: 22px; } @@ -244,29 +245,24 @@ .bs-search-result-info { font-size: 11px !important; color: #666; - margin: 5px 0 0 28px; + margin: 0 0 0 32px; } .bs-search-result-info a { font-size: 1em !important; } div.bs-search-hit-text { - margin: 7px 0 0 28px; - padding-top: 1px; + margin: 0 0 0 32px; + padding-top: 5px; color: #666; + font-size: 0.9em !important; } div.bs-search-hit-text em { color: #000; font-style: normal; font-weight: bold; } -#hwstatus { - text-align:left; -} -#hwmode { - font-weight: bold; -} .bs-facet-title { - font-size: 13px !important; + font-size: 0.9em !important; background-color: #F1F1F1; color: #55; margin: 0 0 7px 0; @@ -291,7 +287,7 @@ .facetBarEntry { padding-left: 3px; line-height: 18px; - font-size: 11px !important; + font-size: 0.8em !important; } .facetBarEntry:hover { background-color: #F8F8F8; @@ -315,14 +311,14 @@ #bs-extendedsearch-all-filter-boxes input[type=checkbox] +label { margin-left: -15px; clear: both; - padding: 5px 0 4px 19px; + padding: 0 0 0 18px; /* @embed */ background: url(images/checkbox.png) left center no-repeat !important; } #bs-extendedsearch-all-filter-boxes div.facet-title input[type=checkbox] +label { margin-left: -15px; clear: both; - padding: 5px 0 4px 19px; + padding: 0 0 0 18px; /* @embed */ background: url(images/checkbox-title.png) left center no-repeat !important; } diff --git a/ExtendedSearch/views/view.SearchResult.php b/ExtendedSearch/views/view.SearchResult.php index 874fe28..65668ac 100644 --- a/ExtendedSearch/views/view.SearchResult.php +++ b/ExtendedSearch/views/view.SearchResult.php @@ -178,8 +178,7 @@ */ protected function makePagingDiv( $pageNo, $url = '', $bActive = false, $arrows = false ) { $aStyleClasses = array( - 'bs-extendedsearch-paging-no', - 'bs-extendedsearch-default-textspacing' + 'bs-extendedsearch-paging-no' ); if ( $arrows ) $aStyleClasses[] = 'bs-extendedsearch-paging-arrows'; if ( $bActive ) $aStyleClasses[] = 'bs-extendedsearch-paging-no-active'; -- To view, visit https://gerrit.wikimedia.org/r/158597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If919accec4d3ff4a4ad4838c5f3f195d5a6aad9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make compatible with toolbox (v 2.0.0) - change (mediawiki...CodeMirror)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/158598 Change subject: make compatible with toolbox (v 2.0.0) .. make compatible with toolbox (v 2.0.0) replace function $.fn.textSelection from file: MediaWiki/core/resources/src/jquery/jquery.textSelection.js Change-Id: Ie22f480968cf5eba1c4e91fbcf7881e6f86ee5ac --- M CodeMirror.php M resources/ext.CodeMirror.js M resources/mode/mediawiki/mediawiki.js 3 files changed, 191 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/98/158598/1 diff --git a/CodeMirror.php b/CodeMirror.php index 7945923..f7048ee 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const EXT_CODEMIRROR_VERSION = '1.12.0'; +const EXT_CODEMIRROR_VERSION = '2.0.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index 80a4a38..d4f0007 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -15,4 +15,192 @@ mode: 'text/mediawiki' } ); codeMirror.setSize( null, textbox1.height() ); + + // Replace jquery.textSelection.js + $.fn.textSelection = function ( command, options ) { + var fn, retval; + + fn = { + /** +* Get the contents of the textarea +*/ + getContents: function () { + return this.doc.getValue(); + }, + + /** +* Get the currently selected text in this textarea. Will focus the textarea +* in some browsers (IE/Opera) +*/ + getSelection: function () { + return this.doc.getSelection(); + }, + + /** +* Inserts text at the beginning and end of a text selection, optionally +* inserting text at the caret when selection is empty. +*/ + encapsulateSelection: function ( options ) { + var insertText, selText, + selectPeri = options.selectPeri, + pre = options.pre, post = options.post; + + if ( options.selectionStart !== undefined ) { + //fn[command].call( this, options ); + fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested + } + + selText = this.doc.getSelection(); + if ( !selText ) { + selectPeri = false; + selText = options.peri; + } else if ( options.replace ) { + selText = options.peri; + } else { + while ( selText.charAt( selText.length - 1 ) === ' ' ) { + // Exclude ending space char + selText = selText.substring( 0, selText.length - 1 ); + post += ' '; + } + while ( selText.charAt( 0 ) === ' ' ) { + // Exclude prepending space char + selText = selText.substring( 1, selText.length ); + pre = ' ' + pre; + } + } + + /** + * Do the splitlines stuff. + * + * Wrap each line of the selected text with pre and post + */ + function doSplitLines( selText, pre, post ) { + var i, + insertText = '', + selTextArr = selText.split( '\n' ); + for ( i = 0; i selTextArr.length; i++ ) { + insertText += pre + selTextArr[i] + post; + if ( i !==
[MediaWiki-commits] [Gerrit] Integrated fingerprintgroupview into entityview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Integrated fingerprintgroupview into entityview .. Integrated fingerprintgroupview into entityview Change-Id: I38cc93a9dbfae2ca9b2b04d2e12de58a0850acf0 --- M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M lib/resources/jquery.wikibase/resources.php M repo/resources/Resources.php D repo/resources/wikibase.initTermBox.js M repo/resources/wikibase.ui.entityViewInit.js 5 files changed, 105 insertions(+), 117 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index 2d9aa3c..f8c2ac1 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -17,6 +17,7 @@ * @option {wikibase.store.EntityStore} entityStore * @option {wikibase.ValueViewBuilder} valueViewBuilder * @option {wikibase.AbstractedRepoApi} api + * @option {string[]} languages */ $.widget( 'wikibase.entityview', PARENT, { /** @@ -35,8 +36,14 @@ value: null, entityStore: null, valueViewBuilder: null, - api: null + api: null, + languages: [] }, + + /** +* @type {jQuery} +*/ + $toc: null, /** * @type {jQuery} @@ -52,6 +59,11 @@ * @type {jQuery} */ $aliases: null, + + /** +* @type {jQuery} +*/ + $fingerprints: null, /** * @type {jQuery} @@ -72,9 +84,12 @@ throw new Error( 'Required option(s) missing' ); } + this.$toc = $( '.toc', this.element ); + this._initLabel(); this._initDescription(); this._initAliases(); + this._initFingerprints(); this._initClaims(); this._initSiteLinks(); @@ -93,7 +108,7 @@ this.$label.labelview( { value: { language: mw.config.get( 'wgUserLanguage' ), - label: $( '.wikibase-labelview' ).hasClass( 'wb-empty' ) + label: this.$label.hasClass( 'wb-empty' ) ? null // FIXME: entity object should not contain fallback strings : this.options.value.getLabel( mw.config.get( 'wgUserLanguage' ) ) @@ -117,7 +132,7 @@ this.$description.descriptionview( { value: { language: mw.config.get( 'wgUserLanguage' ), - description: $( '.wikibase-descriptionview', this.element ).hasClass( 'wb-empty' ) + description: this.$description.hasClass( 'wb-empty' ) ? null // FIXME: entity object should not contain fallback strings : this.options.value.getDescription( mw.config.get( 'wgUserLanguage' ) ) @@ -142,6 +157,45 @@ language: mw.config.get( 'wgUserLanguage' ), aliases: this.options.value.getAliases( mw.config.get( 'wgUserLanguage' ) ) }, + entityId: this.options.value.getId(), + api: this.options.api + } ); + }, + + _initFingerprints: function() { + if( !this.options.languages.length ) { + return; + } + + this.$fingerprints = $( '.wikibase-fingerprintgroupview' ); + + if( !this.$fingerprints.length ) { + var $precedingNode = this.$toc; + + if( !$precedingNode.length ) { + $precedingNode = $( '.wikibase-aliasesview' ); + } else { + this._addTocItem( + '#wb-terms', + mw.msg( 'wikibase-terms' ), + this.$toc.find( 'li' ).first() + ); + } + + this.$fingerprints = $( 'div/' ).insertAfter( $precedingNode ); + } + + var value = []; + for( var i = 0; i this.options.languages.length; i++ ) { + value.push( { + language: this.options.languages[i], + label: this.options.value.getLabel(
[MediaWiki-commits] [Gerrit] Provide own arrow images - change (mediawiki...LiquidThreads)
jenkins-bot has submitted this change and it was merged. Change subject: Provide own arrow images .. Provide own arrow images Copied from mediawiki/core's skins/common as of 1683741e7177eeff63e4653f4a4a633a90c9cf64. This is the best fix I'm willing to make at 2 AM, and, frankly, the best fix I'm willing to make to LiquidThreads at all. Bug: 70412 Change-Id: I307d82363fc81364cdbc9c9ee3f990ff326538e9 --- A images/arrow_disabled_first_25.png A images/arrow_disabled_last_25.png A images/arrow_disabled_left_25.png A images/arrow_disabled_right_25.png A images/arrow_first_25.png A images/arrow_last_25.png A images/arrow_left_25.png A images/arrow_right_25.png M pages/TalkpageView.php 9 files changed, 2 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/images/arrow_disabled_first_25.png b/images/arrow_disabled_first_25.png new file mode 100644 index 000..78a493e --- /dev/null +++ b/images/arrow_disabled_first_25.png Binary files differ diff --git a/images/arrow_disabled_last_25.png b/images/arrow_disabled_last_25.png new file mode 100644 index 000..2a64fd0 --- /dev/null +++ b/images/arrow_disabled_last_25.png Binary files differ diff --git a/images/arrow_disabled_left_25.png b/images/arrow_disabled_left_25.png new file mode 100644 index 000..83df068 --- /dev/null +++ b/images/arrow_disabled_left_25.png Binary files differ diff --git a/images/arrow_disabled_right_25.png b/images/arrow_disabled_right_25.png new file mode 100644 index 000..aa4fbf8 --- /dev/null +++ b/images/arrow_disabled_right_25.png Binary files differ diff --git a/images/arrow_first_25.png b/images/arrow_first_25.png new file mode 100644 index 000..52b32a5 --- /dev/null +++ b/images/arrow_first_25.png Binary files differ diff --git a/images/arrow_last_25.png b/images/arrow_last_25.png new file mode 100644 index 000..caf5033 --- /dev/null +++ b/images/arrow_last_25.png Binary files differ diff --git a/images/arrow_left_25.png b/images/arrow_left_25.png new file mode 100644 index 000..f363bf6 --- /dev/null +++ b/images/arrow_left_25.png Binary files differ diff --git a/images/arrow_right_25.png b/images/arrow_right_25.png new file mode 100644 index 000..3f8fee3 --- /dev/null +++ b/images/arrow_right_25.png Binary files differ diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php index 1f888e6..003e3b2 100644 --- a/pages/TalkpageView.php +++ b/pages/TalkpageView.php @@ -549,9 +549,9 @@ !$this-isNavigationBarShown() ) { return ''; } - global $wgStylePath, $wgLang; + global $wgExtensionAssetsPath, $wgLang; - $path = $wgStylePath/common/images; + $path = $wgExtensionAssetsPath/LiquidThreads/images; $labels = array( 'first' = 'table_pager_first', 'prev' = 'table_pager_prev', -- To view, visit https://gerrit.wikimedia.org/r/158551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I307d82363fc81364cdbc9c9ee3f990ff326538e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski matma@gmail.com Gerrit-Reviewer: Bartosz DziewoĆski matma@gmail.com Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: Werdna agarr...@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] Update Special:ChangeEmail to use HTMLForm - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Special:ChangeEmail to use HTMLForm .. Update Special:ChangeEmail to use HTMLForm Makes the code shorter and easier to read. Change-Id: I629cee4264fad6cde98495c0e8daffe5ea245b48 --- M includes/specials/SpecialChangeEmail.php 1 file changed, 84 insertions(+), 160 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index 7fc4a17..d3e7398 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -26,18 +26,11 @@ * * @ingroup SpecialPage */ -class SpecialChangeEmail extends UnlistedSpecialPage { +class SpecialChangeEmail extends FormSpecialPage { /** -* Users password -* @var string +* @var Status */ - protected $mPassword; - - /** -* Users new email address -* @var string -*/ - protected $mNewEmail; + private $status; public function __construct() { parent::__construct( 'ChangeEmail', 'editmyprivateinfo' ); @@ -57,196 +50,128 @@ * @param string $par */ function execute( $par ) { - global $wgAuth; - - $this-setHeaders(); - $this-outputHeader(); - $out = $this-getOutput(); $out-disallowUserJs(); $out-addModules( 'mediawiki.special.changeemail' ); + return parent::execute( $par ); + } + + protected function checkExecutePermissions( User $user ) { + global $wgAuth; + if ( !$wgAuth-allowPropChange( 'emailaddress' ) ) { - $this-error( 'cannotchangeemail' ); - - return; + throw new ErrorPageError( 'changeemail', 'cannotchangeemail' ); } - - $user = $this-getUser(); - $request = $this-getRequest(); $this-requireLogin( 'changeemail-no-info' ); - if ( $request-wasPosted() $request-getBool( 'wpCancel' ) ) { - $this-doReturnTo(); - - return; - } - - $this-checkReadOnly(); - $this-checkPermissions(); - // This could also let someone check the current email address, so // require both permissions. - if ( !$user-isAllowed( 'viewmyprivateinfo' ) ) { + if ( !$this-getUser()-isAllowed( 'viewmyprivateinfo' ) ) { throw new PermissionsError( 'viewmyprivateinfo' ); } - $this-mPassword = $request-getVal( 'wpPassword' ); - $this-mNewEmail = $request-getVal( 'wpNewEmail' ); - - if ( $request-wasPosted() -$user-matchEditToken( $request-getVal( 'token' ) ) - ) { - $info = $this-attemptChange( $user, $this-mPassword, $this-mNewEmail ); - if ( $info === true ) { - $this-doReturnTo(); - } elseif ( $info === 'eauth' ) { - # Notify user that a confirmation email has been sent... - $out-wrapWikiMsg( div class='error' style='clear: both;'\n$1\n/div, - 'eauthentsent', $user-getName() ); - $this-doReturnTo( 'soft' ); // just show the link to go back - return; // skip form - } - } - - $this-showForm(); + parent::checkExecutePermissions( $user ); } - /** -* @param string $type -*/ - protected function doReturnTo( $type = 'hard' ) { + protected function getFormFields() { + $user = $this-getUser(); + + $fields = array( + 'Name' = array( + 'type' = 'info', + 'label-message' = 'username', + 'default' = $user-getName(), + ), + 'OldEmail' = array( + 'type' = 'info', + 'label-message' = 'changeemail-oldemail', + 'default' = $user-getEmail() ?: $this-msg( 'changeemail-none' )-text(), + ), + 'NewEmail' = array( + 'type' = 'email', + 'label-message' = 'changeemail-newemail', + ), + ); + + if ( $this-getConfig()-get( 'RequirePasswordforEmailChange' )
[MediaWiki-commits] [Gerrit] Added aliasesview to fingerprintview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Added aliasesview to fingerprintview .. Added aliasesview to fingerprintview Change-Id: I12309c6bdebbe7461c7922f1e8c78e8c5aeeab31 --- M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css M lib/resources/templates.php M lib/resources/wikibase.css M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js M repo/i18n/qqq.json M repo/includes/View/TermBoxView.php M repo/tests/phpunit/includes/View/TermBoxViewTest.php 13 files changed, 275 insertions(+), 91 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js index 9444375..bbe2806 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js @@ -175,7 +175,8 @@ var tagadata = this.$list.data( 'tagadata' ); // calculate size for all input elements initially: - tagadata.getTags().find( 'input' ).inputautoexpand( expansionOptions ); + tagadata.getTags().add( tagadata.getHelperTag() ) + .find( 'input' ).inputautoexpand( expansionOptions ); // also make sure that new helper tags will calculate size correctly: this.$list.on( 'tagadatahelpertagadded.' + this.widgetName, function( event, tag ) { diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js index c07841b..2c55386 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js @@ -244,6 +244,8 @@ this._trigger( 'change' ); } + this.element[this.options.value.description ? 'removeClass' : 'addClass']( 'wb-empty' ); + this._isInEditMode = false; this._draw(); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index f8c2ac1..944389c 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -97,7 +97,7 @@ }, _initLabel: function() { - this.$label = $( '.wb-firstHeading .wikibase-labelview', this.element ); + this.$label = $( '.wb-firstHeading .wikibase-labelview', this.element ).first(); if( !this.$label.length ) { this.$label = mw.template( 'wikibase-h1', this.options.value.getId(), @@ -124,7 +124,7 @@ }, _initDescription: function() { - this.$description = $( '.wikibase-descriptionview', this.element ); + this.$description = $( '.wikibase-descriptionview', this.element ).first(); if( !this.$description.length ) { this.$description = $( 'div/' ).appendTo( this.element ); } @@ -147,7 +147,7 @@ }, _initAliases: function() { - this.$aliases = $( '.wikibase-aliasesview', this.element ); + this.$aliases = $( '.wikibase-aliasesview', this.element ).first(); if( !this.$aliases.length ) { this.$aliases = $( 'div/' ).appendTo( this.element ); } @@ -190,7 +190,8 @@ value.push( { language: this.options.languages[i], label: this.options.value.getLabel( this.options.languages[i] ) || null, - description: this.options.value.getDescription( this.options.languages[i] ) || null + description: this.options.value.getDescription( this.options.languages[i] ) || null, + aliases: this.options.value.getAliases( this.options.languages[i] ) || null } ); } @@ -345,7 +346,7 @@ .on( 'startItemPageEditMode', toolbarStatesSetter( 'disable' ) ) .on( 'stopItemPageEditMode', toolbarStatesSetter( 'enable' ) ) .on( 'startItemPageEditMode', function(
[MediaWiki-commits] [Gerrit] display for links in widgets changed - change (mediawiki...BlueSpiceExtensions)
Swidmann has submitted this change and it was merged. Change subject: display for links in widgets changed .. display for links in widgets changed * due to the fact, that the widget bar is now bigger, the links can be bigger too Change-Id: Ib1a1e4ebc4197937cdb055bc5de4958d90e05d7f --- M PagesVisited/PagesVisited.class.php M SmartList/SmartList.class.php M WantedArticle/WantedArticle.class.php M WatchList/WatchList.class.php 4 files changed, 6 insertions(+), 7 deletions(-) Approvals: Smuggli: Looks good to me, but someone else must approve Swidmann: Verified; Looks good to me, approved diff --git a/PagesVisited/PagesVisited.class.php b/PagesVisited/PagesVisited.class.php index 6baef42..c124a7e 100644 --- a/PagesVisited/PagesVisited.class.php +++ b/PagesVisited/PagesVisited.class.php @@ -197,7 +197,6 @@ if ( $oErrorListView-hasItems() ) { return $oErrorListView-execute(); } - $iCurrentNamespaceId = $oParser-getTitle()-getNamespace(); $oListView = $this-makePagesVisitedWikiList( $iCount, $sNamespaces, $iCurrentNamespaceId, $iMaxTitleLength, $sSortOrder ); $sOut = $oListView-execute(); @@ -252,7 +251,7 @@ $iCurrentNamespaceId = $this-getTitle()-getNamespace(); // TODO RBV (04.07.11 15:02): Rework method - implode() is a workaround for legacy code. - $oListView = $this-makePagesVisitedWikiList( $iCount, implode( ',', $aNamespaces ), $iCurrentNamespaceId, 19, $sSortOrder ); + $oListView = $this-makePagesVisitedWikiList( $iCount, implode( ',', $aNamespaces ), $iCurrentNamespaceId, 30, $sSortOrder ); $sOut = $oListView-execute(); if ( !( $oListView instanceof ViewTagError ) ) { diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php index ee74b94..ca37b2f 100644 --- a/SmartList/SmartList.class.php +++ b/SmartList/SmartList.class.php @@ -376,7 +376,7 @@ $oWidgetView -setId( 'bs-smartlist-edits' ) -setTitle( wfMessage( 'bs-smartlist-lastedits' )-plain() ) - -setBody( $this-getYourEdits( 5, 'widget' ) ) + -setBody( $this-getYourEdits( 5, 'widget', 30 ) ) -setTooltip( wfMessage( 'bs-smartlist-lastedits' )-plain() ) -setAdditionalBodyClasses( array( 'bs-nav-links', 'bs-widgetbar-portlet' ) ); //For correct margin and fontsize @@ -891,7 +891,7 @@ * Generates list of your edits * @return string list of edits */ - public function getYourEdits( $iCount, $sOrigin = 'dashboard' ) { + public function getYourEdits( $iCount, $sOrigin = 'dashboard', $iDisplayLength = 18 ) { wfProfileIn( 'BS::'.__METHOD__ ); $iCount = BsCore::sanitize( $iCount, 0, BsPARAMTYPE::INT ); @@ -917,7 +917,7 @@ if ( $sOrigin === 'dashboard' ) { $sHtml = $oTitle-getPrefixedText(); } else { - $sHtml = BsStringHelper::shorten( $oTitle-getPrefixedText() , array( 'max-length' = 18, 'position' = 'middle' ) ); + $sHtml = BsStringHelper::shorten( $oTitle-getPrefixedText() , array( 'max-length' = $iDisplayLength, 'position' = 'middle' ) ); } $sLink = Linker::link( $oTitle, $sHtml ); $aEdits[] = Html::openElement( 'li' ) . $sLink . Html::closeElement( 'li' ); diff --git a/WantedArticle/WantedArticle.class.php b/WantedArticle/WantedArticle.class.php index 2f1a327..1b6bf19 100644 --- a/WantedArticle/WantedArticle.class.php +++ b/WantedArticle/WantedArticle.class.php @@ -212,7 +212,7 @@ $oTitle = $aTitleList[$i]; $sWishTitle = BsStringHelper::shorten( $oTitle-getPrefixedText(), - array( 'max-length' = 18, 'position' = 'middle' ) + array( 'max-length' = 30, 'position' = 'middle' ) ); $aWikiCodeList[] = '*'.BsLinkProvider::makeEscapedWikiLinkForTitle( $oTitle, $sWishTitle ); } diff --git a/WatchList/WatchList.class.php b/WatchList/WatchList.class.php index d03415c..833503d 100644 --- a/WatchList/WatchList.class.php +++ b/WatchList/WatchList.class.php @@ -216,7 +216,7 @@ $oWatchList = $this-fetchWatchlist( $oCurrentUser, $iCount, - 20, + 30, $sOrder ); $sWatchListWikiText = $oWatchList-execute();
[MediaWiki-commits] [Gerrit] Revert RepoApi to explicitly query for token - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/158599 Change subject: Revert RepoApi to explicitly query for token .. Revert RepoApi to explicitly query for token Instead of using the current wiki's token, RepoApi queries the actual Repo instance for an edit token again for being able to use an RepoApi instance on the client. Change-Id: Id45adfb73fccbea162510ae95e36389bdbe7496f --- M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 1 file changed, 69 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/99/158599/1 diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js index 3b64720..9924b1b 100644 --- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js +++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js @@ -14,8 +14,17 @@ * @since 0.4 (since 0.3 as wb.Api without support for client usage) */ wb.RepoApi = function wbRepoApi() { - var wbRepo = mw.config.get( 'wbRepo' ); - this._repoApiEndpoint = wbRepo.url + wbRepo.scriptPath + '/api.php'; + var localApiEndpoint = mw.config.get( 'wgServer' ) + + mw.config.get( 'wgScriptPath' ) + + '/api.php'; + + this._repoConfig = mw.config.get( 'wbRepo' ); + this._repoApiEndpoint = this._repoConfig.url + this._repoConfig.scriptPath + '/api.php'; + + if( localApiEndpoint === this._repoApiEndpoint ) { + // The current wiki *is* the repo so we can just use user.tokens to get the edit token + this._repoEditToken = mw.user.tokens.get( 'editToken' ); + } }; $.extend( wb.RepoApi.prototype, { @@ -23,6 +32,16 @@ * @type {string} */ _repoApiEndpoint: null, + + /** +* @type {Object} +*/ + _repoConfig: null, + + /** +* @type {string} +*/ + _repoEditToken: null, /** * mediaWiki.Api object for internal usage. By having this initialized in the prototype, we can @@ -519,7 +538,9 @@ * @throws {Error} If a parameter is not specified properly */ post: function( params ) { - var options = {}; + var self = this, + options = {}, + deferred = $.Deferred(); this._extendRepoCallParams( params, options ); // Unconditionally set the bot parameter to match the UI behaviour of core @@ -531,7 +552,51 @@ } } ); - return this._api.postWithToken( 'edit', params, options ); + this._getRepoEditToken() + .done( function( token ) { + params.token = token; + + self._api.post( params, options ) + .done( deferred.resolve ) + .fail( deferred.reject ); + } ) + .fail( deferred.reject ); + + return deferred.promise(); + }, + + /** +* Retrieves an edit token. +* +* @return {jQuery.Promise} +* Resolved parameters: +* - {string} +* Rejected parameters: +* - {string} +* - {*} +*/ + _getRepoEditToken: function() { + var self = this, + deferred = $.Deferred(); + + if( this._repoEditToken ) { + return deferred.resolve( this._repoEditToken ).promise(); + } + + this.get( { + action: 'query', + intoken: 'edit', + titles: 'Main page', + prop: 'info', + indexpageids: 1 + } ) + .done( function( data ) { + self._repoEditToken = data.query.pages[data.query.pageids[0]].edittoken; + deferred.resolve( self._repoEditToken ); + } ) + .fail( deferred.reject ); + + return deferred.promise(); }, /** -- To view, visit https://gerrit.wikimedia.org/r/158599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id45adfb73fccbea162510ae95e36389bdbe7496f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed use of deprecated method - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/158600 Change subject: Removed use of deprecated method .. Removed use of deprecated method Change-Id: I9dec1558199f1d21c4fbac8fb14a02c38dda983c --- M RSSStandards/RSSStandards.class.php 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/00/158600/1 diff --git a/RSSStandards/RSSStandards.class.php b/RSSStandards/RSSStandards.class.php index b7a889d..e32d64a 100644 --- a/RSSStandards/RSSStandards.class.php +++ b/RSSStandards/RSSStandards.class.php @@ -353,8 +353,17 @@ $_hash = $wgRequest-getVal( 'h', '' ); if ( !( $user $_hash == md5( $_user.$user-getToken().$user-getId() ) ) || $user-isAnon() ) { $wgOut-setPageTitle( wfMessage( 'bs-rssstandards-watchnologin' )-plain() ); - $llink = $skin-makeKnownLinkObj( SpecialPage::getTitleFor( 'Userlogin' ), wfMessage( 'loginreqlink' )-plain(), 'returnto=' . $specialTitle-getPrefixedUrl() ); - $wgOut-addHtml( wfMessage( 'watchlistanontext', $llink )-plain() ); + + $oTitle = SpecialPage::getTitleFor( 'Userlogin' ); + $sLink = Linker::link( + $oTitle, + wfMessage( 'loginreqlink' )-plain(), + array(), + array( + 'returnto' = $specialTitle-getPrefixedUrl() + ) + ); + $wgOut-addHtml( wfMessage( 'watchlistanontext', $sLink )-plain() ); return; } } else { -- To view, visit https://gerrit.wikimedia.org/r/158600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dec1558199f1d21c4fbac8fb14a02c38dda983c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki: remove submodule - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158601 Change subject: mediawiki: remove submodule .. mediawiki: remove submodule Change-Id: I753824f1239e9c77e15b9ee254e5893f393d --- M .gitmodules D modules/mediawiki/files/apache/config 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/158601/1 diff --git a/.gitmodules b/.gitmodules index f07ab5a..2e209d2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,6 +25,3 @@ [submodule modules/cdh] path = modules/cdh url = https://gerrit.wikimedia.org/r/operations/puppet/cdh -[submodule modules/mediawiki/files/apache/config] - path = modules/mediawiki/files/apache/config - url = https://gerrit.wikimedia.org/r/operations/apache-config diff --git a/modules/mediawiki/files/apache/config b/modules/mediawiki/files/apache/config deleted file mode 16 index 023f767..000 --- a/modules/mediawiki/files/apache/config +++ /dev/null -Subproject commit 023f767801cb284cf3cfa88771243cb035c58722 -- To view, visit https://gerrit.wikimedia.org/r/158601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I753824f1239e9c77e15b9ee254e5893f393d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: use HHVM everywhere, get rid of mod_php - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158602 Change subject: beta: use HHVM everywhere, get rid of mod_php .. beta: use HHVM everywhere, get rid of mod_php Change-Id: I6ec53da483bebfa375eba2383cbf60123ff1ce26 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- A modules/mediawiki/files/apache/configs/hhvm_catchall.conf M modules/mediawiki/manifests/web/beta_sites.pp 2 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/158602/1 diff --git a/modules/mediawiki/files/apache/configs/hhvm_catchall.conf b/modules/mediawiki/files/apache/configs/hhvm_catchall.conf new file mode 100644 index 000..f47f349 --- /dev/null +++ b/modules/mediawiki/files/apache/configs/hhvm_catchall.conf @@ -0,0 +1,7 @@ +# This file is managed by puppet +# Execute all PHP (and Hack) files via HHVM. +IfDefine HHVM +FilesMatch\.(php|hh)$ +RewriteRule ^(.*)$ fcgi://127.0.0.1:9000$1 [P] +/FilesMatch +/IfDefine diff --git a/modules/mediawiki/manifests/web/beta_sites.pp b/modules/mediawiki/manifests/web/beta_sites.pp index 5bf21bd..f62eb6b 100644 --- a/modules/mediawiki/manifests/web/beta_sites.pp +++ b/modules/mediawiki/manifests/web/beta_sites.pp @@ -1,5 +1,15 @@ class mediawiki::web::beta_sites { tag 'mediawiki', 'mw-apache-config' +# HHVM catchall, and removal of mod_php +apache::conf { 'hhvm_catchall': +source = 'puppet:///modules/mediawiki/apache/configs/hhvm_catchall.conf', +priority = 50, +} + +apache::mod_conf { 'php5': +ensure = 'absent', +} + # Now the sites, in strict sequence apache::site { 'nonexistent': source = 'puppet:///modules/mediawiki/apache/beta/sites/nonexistent.conf', -- To view, visit https://gerrit.wikimedia.org/r/158602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ec53da483bebfa375eba2383cbf60123ff1ce26 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki: remove submodule - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: mediawiki: remove submodule .. mediawiki: remove submodule Change-Id: I753824f1239e9c77e15b9ee254e5893f393d --- M .gitmodules D modules/mediawiki/files/apache/config 2 files changed, 0 insertions(+), 3 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitmodules b/.gitmodules index f07ab5a..2e209d2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,6 +25,3 @@ [submodule modules/cdh] path = modules/cdh url = https://gerrit.wikimedia.org/r/operations/puppet/cdh -[submodule modules/mediawiki/files/apache/config] - path = modules/mediawiki/files/apache/config - url = https://gerrit.wikimedia.org/r/operations/apache-config diff --git a/modules/mediawiki/files/apache/config b/modules/mediawiki/files/apache/config deleted file mode 16 index 023f767..000 --- a/modules/mediawiki/files/apache/config +++ /dev/null -Subproject commit 023f767801cb284cf3cfa88771243cb035c58722 -- To view, visit https://gerrit.wikimedia.org/r/158601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I753824f1239e9c77e15b9ee254e5893f393d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor SpecialMergeItems - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor SpecialMergeItems .. Refactor SpecialMergeItems Rewrite of SpecialMergeItems based on ItemMergeInteractor. Change-Id: I7d7402c874d7fc306f3da14fe21f53c656b9f063 --- M lib/i18n/en.json M lib/i18n/qqq.json M lib/tests/phpunit/specials/SpecialPageTestBase.php M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/ChangeOp/ChangeOpsMerge.php M repo/includes/Interactors/ItemMergeException.php M repo/includes/Interactors/ItemMergeInteractor.php A repo/includes/Interactors/TokenCheckException.php A repo/includes/Interactors/TokenCheckInteractor.php M repo/includes/specials/SpecialMergeItems.php M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php A repo/tests/phpunit/includes/Interactors/TokenCheckInteractorTest.php M repo/tests/phpunit/includes/specials/SpecialMergeItemsTest.php 14 files changed, 734 insertions(+), 195 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/i18n/en.json b/lib/i18n/en.json index 2ca38d5..012d83e 100644 --- a/lib/i18n/en.json +++ b/lib/i18n/en.json @@ -22,7 +22,7 @@ wikibase-diffview-alias: aliases, wikibase-diffview-description: description, wikibase-diffview-link: links, - wikibase-error-unexpected: An unexpected error occurred: $1., + wikibase-error-unexpected: Error: $1., wikibase-error-save-generic: An error occurred while saving. Your changes could not be completed., wikibase-error-remove-generic: An error occurred while trying to perform remove. Your changes could not be completed., wikibase-error-save-connection: A connection error has occurred while saving. Your changes could not be completed. Please check your Internet connection., diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json index 0dec407..e7dda25 100644 --- a/lib/i18n/qqq.json +++ b/lib/i18n/qqq.json @@ -31,7 +31,7 @@ wikibase-diffview-alias: Sub heading for alias changes in a diff\n{{Identical|Alias}}, wikibase-diffview-description: Sub heading for description changes in a diff.\n{{Identical|Description}}, wikibase-diffview-link: Sub heading for link changes in a diff.\n{{Identical|Link}}, - wikibase-error-unexpected: Generic error used by the API to indicate that an unexpected error occurred.\n\nParameters:\n* $1 - the raw, unlocalized error message, + wikibase-error-unexpected: Generic error messaged used for reporting unknown exception.\n\nParameters:\n* $1 - the raw, unlocalized error message, wikibase-error-save-generic: Generic error message for an error happening during a save operation., wikibase-error-remove-generic: Generic error message for an error happening during a remove operation, wikibase-error-save-connection: Error message for an error happening during a save operation. The error might most likely be caused by a connection problem., diff --git a/lib/tests/phpunit/specials/SpecialPageTestBase.php b/lib/tests/phpunit/specials/SpecialPageTestBase.php index a947bac..1b26039 100644 --- a/lib/tests/phpunit/specials/SpecialPageTestBase.php +++ b/lib/tests/phpunit/specials/SpecialPageTestBase.php @@ -8,6 +8,7 @@ use OutputPage; use RequestContext; use SpecialPage; +use User; use WebRequest; /** @@ -55,12 +56,19 @@ * @param string $sub The subpage parameter to call the page with * @param WebRequest|null $request Web request that may contain URL parameters, etc * @param string|null $language The language code which should be used in the context of this special page +* @param User|null $user The user which should be used in the context of this special page * -* @throws Exception|null +* @throws \Exception +* @throws null * @return array array( String, \WebResponse ) containing the output generated * by the special page. */ - protected function executeSpecialPage( $sub = '', WebRequest $request = null, $language = null ) { + protected function executeSpecialPage( + $sub = '', + WebRequest $request = null, + $language = null, + User $user = null + ) { if ( $request === null ) { $request = new \FauxRequest(); } @@ -69,10 +77,15 @@ $context = new DerivativeContext( RequestContext::getMain() ); $context-setRequest( $request ); + if ( $language !== null ) { $context-setLanguage( $language ); } + if ( $user !== null ) { + $context-setUser( $user ); + } + $out = new OutputPage( $context ); $context-setOutput( $out ); diff --git
[MediaWiki-commits] [Gerrit] Rewrite #2 of caching logic - change (mediawiki...GlobalUserPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/158603 Change subject: Rewrite #2 of caching logic .. Rewrite #2 of caching logic I got rid of all the localization stuff, it was just a huge pain to manage and really confusing. The functionality isn't removed entirely, {{int:}} functions should still work properly. This makes the code a bunch simpler and easier to follow. Change-Id: I32cd876485398b5b860c375797e70bb7d8e31cd9 --- M GlobalUserPage.body.php M GlobalUserPage.hooks.php 2 files changed, 67 insertions(+), 193 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/03/158603/1 diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php index c6c2a4a..3152e86 100644 --- a/GlobalUserPage.body.php +++ b/GlobalUserPage.body.php @@ -2,11 +2,6 @@ class GlobalUserPage extends Article { - /** -* @var string -*/ - protected $globalTitle; - public function showMissingArticle() { global $wgGlobalUserPageLoadRemoteModules; $title = $this-getTitle(); @@ -16,9 +11,10 @@ return; } + $user = User::newFromName( $this-getUsername() ); + $out = $this-getContext()-getOutput(); - list( $langCode, $touched ) = $this-getRemoteTitle(); - $parsedOutput = $this-getRemoteParsedText( $langCode, $touched ); + $parsedOutput = $this-getRemoteParsedText( self::getCentralTouched( $user ) ); $out-addHTML( $parsedOutput['text']['*'] ); $out-addModuleStyles( 'ext.GlobalUserPage' ); @@ -51,14 +47,6 @@ } /** -* @param string $username -* @return string -*/ - private static function getEnabledCacheKey( $username ) { - return 'globaluserpage:enabled:' . md5( $username ); - } - - /** * Given a Title, assuming it doesn't exist, should * we display a global user page on it * @@ -66,8 +54,6 @@ * @return bool */ public static function displayGlobalPage( Title $title ) { - global $wgMemc; - if ( !self::canBeGlobal( $title ) ) { return false; } @@ -85,61 +71,78 @@ // TODO: Add a hook here for things like CentralAuth // to check User:A@foowiki === User:A@centralwiki - $key = self::getEnabledCacheKey( $user-getName() ); + return (bool)self::getCentralTouched( $user ); + } + + public function clearAllCaches() { + $this-clearTouchedCache(); + $this-getRemoteParsedText( + self::getTouchedCacheKey( $this-getUsername() ), + /* $useCache = */ false + ); + } + + public function clearTouchedCache() { + global $wgMemc; + $wgMemc-delete( self::getTouchedCacheKey( $this-getUsername() ) ); + } + + private static function getTouchedCacheKey( $username ) { + return globaluserpage:touched: . md5( $username ); + } + + /** +* Get the page_touched of the central user page +* +* @todo this probably shouldn't be static +* @param User $user +* @return string|bool +*/ + protected static function getCentralTouched( User $user ) { + global $wgMemc, $wgGlobalUserPageCacheExpiry; + $key = self::getTouchedCacheKey( $user-getName() ); $data = $wgMemc-get( $key ); if ( $data === false ) { - // Ugh, no cache. Open up a database connection to check if at least the root user page exists - $dbr = self::getRemoteDB( DB_SLAVE ); - $row = $dbr-selectRow( + // Ugh, no cache. Open up a database connection... + $row = self::getRemoteDB( DB_SLAVE )-selectRow( 'page', - array( 'page_id' ), - array( - 'page_title' = $user-getName(), - 'page_namespace' = NS_USER - ) + array( 'page_id', 'page_touched', 'page_len' ), + array( 'page_namespace' = NS_USER, $user-getUserPage()-getDBkey() ), + __METHOD__ ); - if ( $row === false ) { + + if ( $row === false || (int)$row-page_len === 0 ) { // We cache `null` to indicate boolean false $data = null;
[MediaWiki-commits] [Gerrit] Do some instance caching in GlobalUserPage::displayGlobalPage() - change (mediawiki...GlobalUserPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/158604 Change subject: Do some instance caching in GlobalUserPage::displayGlobalPage() .. Do some instance caching in GlobalUserPage::displayGlobalPage() Change-Id: I4e8b2e26f4b27558f15b57daa69ac7a19cff8412 --- M GlobalUserPage.body.php 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/04/158604/1 diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php index 3152e86..4fe8849 100644 --- a/GlobalUserPage.body.php +++ b/GlobalUserPage.body.php @@ -54,24 +54,35 @@ * @return bool */ public static function displayGlobalPage( Title $title ) { + static $cache = array(); + $text = $title-getPrefixedText(); + // Do some instance caching since this can be + // called frequently due do the Linker hook + if ( isset( $cache[$text] ) ) { + return $cache[$text]; + } if ( !self::canBeGlobal( $title ) ) { + $cache[$text] = false; return false; } $user = User::newFromName( $title-getText() ); if ( !$user || $user-getId() === 0 ) { + $cache[$text] = false; return false; } if ( !$user-getOption( 'globaluserpage' ) ) { + $cache[$text] = false; return false; } // TODO: Add a hook here for things like CentralAuth // to check User:A@foowiki === User:A@centralwiki - return (bool)self::getCentralTouched( $user ); + $cache[$text] = (bool)self::getCentralTouched( $user ); + return $cache[$text]; } public function clearAllCaches() { -- To view, visit https://gerrit.wikimedia.org/r/158604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e8b2e26f4b27558f15b57daa69ac7a19cff8412 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage 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 basic support for showing a footer at the bottom of glob... - change (mediawiki...GlobalUserPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/158605 Change subject: Add basic support for showing a footer at the bottom of global user pages .. Add basic support for showing a footer at the bottom of global user pages Bug: 66931 Change-Id: Id937079ce51121ee5e26a356e67fa3015b246e4d --- M GlobalUserPage.body.php M GlobalUserPage.php M ext.GlobalUserPage.css M i18n/en.json M i18n/qqq.json 5 files changed, 35 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/05/158605/1 diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php index 4fe8849..0df10a8 100644 --- a/GlobalUserPage.body.php +++ b/GlobalUserPage.body.php @@ -3,7 +3,8 @@ class GlobalUserPage extends Article { public function showMissingArticle() { - global $wgGlobalUserPageLoadRemoteModules; + global $wgGlobalUserPageLoadRemoteModules, $wgGlobalUserPageFooterKey, + $wgGlobalUserPageDBname; $title = $this-getTitle(); if ( !self::displayGlobalPage( $title ) ) { @@ -18,6 +19,18 @@ $out-addHTML( $parsedOutput['text']['*'] ); $out-addModuleStyles( 'ext.GlobalUserPage' ); + if ( $wgGlobalUserPageFooterKey ) { + $out-wrapWikiMsg( + 'div class=mw-globaluserpage-footerspan class=plainlinks\n$1\n/span/div', + array( + $wgGlobalUserPageFooterKey, + $this-getUsername(), + // Eh, WikiMap requires $wgConf :( + WikiMap::foreignUserLink( $wgGlobalUserPageDBname, $this-getUsername() ) + ) + ); + } + // Scary ResourceLoader things... if ( $wgGlobalUserPageLoadRemoteModules ) { $rl = $out-getResourceLoader(); diff --git a/GlobalUserPage.php b/GlobalUserPage.php index 0f9378d..ae53b62 100644 --- a/GlobalUserPage.php +++ b/GlobalUserPage.php @@ -52,6 +52,16 @@ */ $wgGlobalUserPageDBname = 'shoutwiki'; +/** + * Optionally add a footer message to the + * bottom of every global user page. Should + * be set to the name of a message key, or + * false if no footer is wanted. + * + * @var string|bool + */ +$wgGlobalUserPageFooterKey = globaluserpage-footer; + // Extension credits that will show up on Special:Version $wgExtensionCredits['other'][] = array( 'path' = __FILE__, diff --git a/ext.GlobalUserPage.css b/ext.GlobalUserPage.css index b3ffee3..21d9763 100644 --- a/ext.GlobalUserPage.css +++ b/ext.GlobalUserPage.css @@ -1,3 +1,10 @@ .mw-editsection /* Only needed for pre-1.24 wikis */ { display: none; } + +.mw-globaluserpage-footer { + padding: 3px; + border: 1px solid #aaa; + font-size: 85%; + text-align: center; +} diff --git a/i18n/en.json b/i18n/en.json index dc94f13..f5e6f73 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,7 +5,7 @@ ] }, globaluserpage-desc: Automatically fetches user pages from [http://www.shoutwiki.com ShoutWiki Hub], - globaluserpage-notice: This page was downloaded from [http://www.shoutwiki.com/?oldid=$1 ShoutWiki Hub] and can be edited there., globaluserpage-edit-tab: Edit on ShoutWiki Hub, - globaluserpage-preferences: Use [[s:Help:Global user pages|global user page]] + globaluserpage-preferences: Use [[s:Help:Global user pages|global user page]], + globaluserpage-footer: '''This is a [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:GlobalUserPage global user page].''' The original page is located at [$2 $2] } diff --git a/i18n/qqq.json b/i18n/qqq.json index cb26539..4eb94ea 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -8,5 +8,6 @@ globaluserpage-desc: {{desc|name=GlobalUserPage|url=https://www.mediawiki.org/wiki/Extension:GlobalUserPage}};, globaluserpage-notice: Message shown above user pages from ShoutWiki Hub. Parameters:\n* $1 - the revision ID of the page that was fetched, globaluserpage-edit-tab: Text on tab that replaces \create\, and links to the edit interface on ShoutWiki Hub, - globaluserpage-preferences: Shown on Special:Preferences + globaluserpage-preferences: Shown on Special:Preferences, + globaluserpage-footer: Footer shown on global user pages. $1 is the user\'s name, and $2 is a link to the original user page on the central wiki. } -- To view, visit https://gerrit.wikimedia.org/r/158605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id937079ce51121ee5e26a356e67fa3015b246e4d Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] Optimized applying wb-empty class in label/descriptionview - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/158606 Change subject: Optimized applying wb-empty class in label/descriptionview .. Optimized applying wb-empty class in label/descriptionview Change-Id: Ib051834e50bed20e323bf5cf8ba29a2224c9c01e --- M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/06/158606/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js index 1536387..3946847 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js @@ -115,6 +115,8 @@ * Main draw routine. */ _draw: function() { + this.element[this.options.value.description ? 'removeClass' : 'addClass']( 'wb-empty' ); + if( !this._isInEditMode ) { this.$text.text( this.options.value.description || mw.msg( 'wikibase-description-empty' ) @@ -234,7 +236,6 @@ this.$text.children( 'input' ).val( '' ); } - this.element[this.options.value.description ? 'removeClass' : 'addClass']( 'wb-empty' ); this.element.removeClass( 'wb-edit' ); this._isBeingEdited = false; this._isInEditMode = false; diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js index ab1fe64..785d98d 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js @@ -129,6 +129,8 @@ this.$entityId.empty(); } + this.element[this.options.value.label ? 'removeClass' : 'addClass']( 'wb-empty' ); + if( !this._isInEditMode ) { this.$text.text( this.options.value.label || mw.msg( 'wikibase-label-empty' ) ); return; @@ -246,7 +248,6 @@ this.$text.children( 'input' ).val( '' ); } - this.element[this.options.value.label ? 'removeClass' : 'addClass']( 'wb-empty' ); this.element.removeClass( 'wb-edit' ); this._isBeingEdited = false; this._isInEditMode = false; -- To view, visit https://gerrit.wikimedia.org/r/158606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib051834e50bed20e323bf5cf8ba29a2224c9c01e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preview of Summarize displays as empty - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Preview of Summarize displays as empty .. Preview of Summarize displays as empty Bug: 70200 Change-Id: Ibf53fdc7f3c67c7259fcc6d761b2bcada728ca03 --- M modules/new/components/flow-board.js M tests/qunit/new/components/test_flow-board.js 2 files changed, 35 insertions(+), 2 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/new/components/flow-board.js b/modules/new/components/flow-board.js index 194b3cf..cdba869 100644 --- a/modules/new/components/flow-board.js +++ b/modules/new/components/flow-board.js @@ -753,12 +753,18 @@ replies: [ id ], isPreview: true }; + templateParams = {}; + + // This is for most previews which expect a revision key revision[contentNode] = { content: data['flow-parsoid-utils'].content, format: data['flow-parsoid-utils'].format }; + // This fixes summarize which expects a key summary + templateParams[contentNode] = revision[contentNode]; - templateParams = { + $.extend( templateParams, { + // This fixes titlebar which expects a key content for title content: { content: $titleField.val() || '', format: 'content' @@ -771,7 +777,7 @@ last_updated: +new Date(), replies: [ id ], revisions: {} - }; + } ); templateParams.posts[id] = { 0: id }; templateParams.revisions[id] = revision; diff --git a/tests/qunit/new/components/test_flow-board.js b/tests/qunit/new/components/test_flow-board.js index 3b71c69..abf78aa 100644 --- a/tests/qunit/new/components/test_flow-board.js +++ b/tests/qunit/new/components/test_flow-board.js @@ -45,4 +45,31 @@ assert.strictEqual( $input.hasClass( 'flow-preview-target-hidden' ), false, 'Input is no longer hidden.' ); } ); +QUnit.test( 'FlowBoardComponent.UI.events.apiHandlers.preview (summary)', 3, function( assert ) { + var $container = this.$el, + $form = $( 'form' ).appendTo( $container ), + $textarea = $( 'textarea data-flow-preview-template=flow_topic_titlebar_summary data-flow-preview-node=summarytext/textarea' ).appendTo( $form ), + $btn = $( 'button name=preview' ). + appendTo( $form ), + info = { + $target: $textarea, + status: 'done' + }, + data = { + 'flow-parsoid-utils': { + format: 'html', + content: 'hello' + } + }; + + this.UI.events.apiHandlers.preview.call( $btn, info, data ); + + // check all is well. + assert.strictEqual( $container.find( '.flow-preview-warning' ).length, 1, + 'There is a preview warning.' ); + assert.strictEqual( $container.find( '.flow-topic-summary' ).length, 1, 'Summary visible.' ); + assert.strictEqual( $.trim( $container.find( '.flow-topic-summary' ).text() ), + 'hello', 'Check content of summary.' ); +} ); + } ( jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/158142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf53fdc7f3c67c7259fcc6d761b2bcada728ca03 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Bsitu bs...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: SG shah...@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] New Wikidata Build - 05/09/2014 10:00 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/158607 Change subject: New Wikidata Build - 05/09/2014 10:00 .. New Wikidata Build - 05/09/2014 10:00 Change-Id: I0158fd30360e01b5559f56a47481a71de22136d9 --- M composer.lock M extensions/ValueView/README.md M extensions/ValueView/ValueView.php M extensions/ValueView/lib/jquery.ui/jquery.ui.toggler.css M extensions/ValueView/lib/resources.php M extensions/Wikibase/.jshintignore M extensions/Wikibase/client/i18n/ar.json M extensions/Wikibase/client/i18n/da.json M extensions/Wikibase/client/i18n/oc.json M extensions/Wikibase/composer.json M extensions/Wikibase/lib/WikibaseLib.hooks.php M extensions/Wikibase/lib/i18n/da.json M extensions/Wikibase/lib/i18n/en.json M extensions/Wikibase/lib/i18n/nl.json M extensions/Wikibase/lib/i18n/qqq.json M extensions/Wikibase/lib/includes/serializers/LegacyInternalClaimSerializer.php M extensions/Wikibase/lib/includes/serializers/LegacyInternalEntitySerializer.php M extensions/Wikibase/lib/resources/Resources.php R extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.LICENSE R extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.css A extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js A extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js A extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js A extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.listview.js M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js A extensions/Wikibase/lib/resources/jquery.wikibase/resources.php A extensions/Wikibase/lib/resources/jquery.wikibase/snakview/resources.php R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.SnakTypeSelector.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.ViewState.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.variations.NoValue.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.variations.SomeValue.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.variations.Value.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.variations.Variation.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/snakview.variations.js R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/themes/default/images/ui-icon_snaktypeselector_2694e8.png R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/themes/default/images/ui-icon_snaktypeselector_3d80b3.png R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/themes/default/images/ui-icon_snaktypeselector_66.png R extensions/Wikibase/lib/resources/jquery.wikibase/snakview/themes/default/snakview.SnakTypeSelector.css A extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css A extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css A extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/movetoolbar.js A extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/resources.php M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/toolbar.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/toolbarbase.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/toolbarbutton.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/toolbarlabel.js A extensions/Wikibase/lib/resources/jquery/jquery.removeClassByRegex.js M extensions/Wikibase/lib/resources/templates.php A extensions/Wikibase/lib/resources/wikibase.RepoApi/resources.php M extensions/Wikibase/lib/resources/wikibase.css A extensions/Wikibase/lib/resources/wikibase.store/resources.php A extensions/Wikibase/lib/resources/wikibase.utilities/resources.php D extensions/Wikibase/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js D extensions/Wikibase/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js D extensions/Wikibase/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js M
[MediaWiki-commits] [Gerrit] Allow .mw-echo-title-heading outside special page - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Allow .mw-echo-title-heading outside special page .. Allow .mw-echo-title-heading outside special page This class was only being applied to notification output on special pages and not in the overlay, move it so it can. Additionally: * bolds .mw-echo-title-heading same as the anchors it works with * clean up a repeated rule against `.mw-echo-title a` Change-Id: I579252399b39746f5aa2cfc51b5cd3b9b8b2cdb0 --- M modules/overlay/ext.echo.overlay.less M modules/special/ext.echo.special.less 2 files changed, 2 insertions(+), 13 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/overlay/ext.echo.overlay.less b/modules/overlay/ext.echo.overlay.less index 710002c..2131991 100644 --- a/modules/overlay/ext.echo.overlay.less +++ b/modules/overlay/ext.echo.overlay.less @@ -109,20 +109,16 @@ } .mw-echo-title { - a { + .mw-echo-title-heading, a { font-weight: bold; } - // Helper class to be used to force single-line text in overlay + .mw-echo-title-heading, .plainlinks { .truncated-text(); max-width: 100%; display: inline-block; vertical-align: top; - } - - a { - font-weight: bold; } } diff --git a/modules/special/ext.echo.special.less b/modules/special/ext.echo.special.less index 282749c..57cb9c2 100644 --- a/modules/special/ext.echo.special.less +++ b/modules/special/ext.echo.special.less @@ -1,5 +1,3 @@ -@import '../mixins.less'; - /* Echo specific CSS */ #mw-echo-more { @@ -71,11 +69,6 @@ padding: 0; margin: 30px 0 0 0; max-width: 600px; - - // Helper class to be used to force single-line text capped by ellipsis in container - .mw-echo-title-heading { - .truncated-text(); - } } .mw-echo-notification { -- To view, visit https://gerrit.wikimedia.org/r/158572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I579252399b39746f5aa2cfc51b5cd3b9b8b2cdb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@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] css changes - change (mediawiki...BlueSpiceSkin)
Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/158608 Change subject: css changes .. css changes * latest css changes from user feedback Change-Id: I2ce36fe4cf749c029cc9cd30a44b0bb5208316cc --- M resources/components/extension.extendedSearch.less M resources/components/skin.content.less M resources/components/skin.font.less M resources/components/skin.links.less 4 files changed, 39 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin refs/changes/08/158608/1 diff --git a/resources/components/extension.extendedSearch.less b/resources/components/extension.extendedSearch.less index ec1b856..c574bff 100644 --- a/resources/components/extension.extendedSearch.less +++ b/resources/components/extension.extendedSearch.less @@ -21,10 +21,10 @@ margin-left: -2px !important; width: 337px !important; li.ui-menu-item a{ - padding: 2px 10px; + padding: 5px 10px; } li.ui-menu-item a{ - margin: 3px 0; + margin: 0; } li.ui-menu-item a:hover{ background-color: @bs-color-light-grey; @@ -80,5 +80,17 @@ } } } + #bs-extendedsearch-filters{ + #bs-extendedsearch-all-filter-boxes{ + .bs-facet-title, .bs-extendedsearch-facetbox{ + font-size: 1em !important; + .facetBarEntry{ + font-size: 90% !important; + line-height: normal; + padding: 4px 0; + } + } + } + } } } \ No newline at end of file diff --git a/resources/components/skin.content.less b/resources/components/skin.content.less index 94c0a57..08f8045 100644 --- a/resources/components/skin.content.less +++ b/resources/components/skin.content.less @@ -23,6 +23,9 @@ #bodyContent{ #bs-bodytext{ #mw-content-text{ + a{ + word-break: break-word; + } .bs-admincontrolbtn { float:left; margin-bottom:5px; @@ -37,6 +40,7 @@ text-decoration:none; vertical-align:middle; width:160px; + padding: 10px 5px; } a:hover { background:#F9F9F9 none repeat scroll 0 0; diff --git a/resources/components/skin.font.less b/resources/components/skin.font.less index 79de5b3..da8a3d6 100644 --- a/resources/components/skin.font.less +++ b/resources/components/skin.font.less @@ -28,7 +28,7 @@ } #content{ h1, h2, h3, h4, h5, h6{ - font-family: @bs-font-roboto; + font-family: @bs-font-default; border-bottom: none; font-weight: normal; a.mw-editsection.icon-pencil:before{ @@ -67,6 +67,17 @@ a[class*='icon-']:hover{ color: @bs-color-dark-blue; text-decoration: none; + } + .bs-blog-item-info{ + color: #999; + margin: 5px 0 12px 0; + } + .bs-blog-header{ + border-bottom: none; + } + .bs-blog-item-headline{ + margin-bottom: 0; + border-bottom-color: @bs-color-dark-grey; } } #bs-data-after-content{ @@ -182,6 +193,14 @@ font-family: @bs-font-default; } } + #bs-personal-info{ + li a:before{ + color: @bs-color-dark-grey; + } + li a:hover:before{ + color: @bs-color-dark-blue; + } + } span.bs-personal-not-loggedin a, span.bs-personal-not-loggedin a:hover, span.bs-personal-not-loggedin a:active, diff --git a/resources/components/skin.links.less b/resources/components/skin.links.less index ef33142..5990fff 100644 ---
[MediaWiki-commits] [Gerrit] make compatible with toolbox (v 2.0.0) - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: make compatible with toolbox (v 2.0.0) .. make compatible with toolbox (v 2.0.0) replace function $.fn.textSelection from file: MediaWiki/core/resources/src/jquery/jquery.textSelection.js Change-Id: Ie22f480968cf5eba1c4e91fbcf7881e6f86ee5ac --- M CodeMirror.php M resources/ext.CodeMirror.js M resources/mode/mediawiki/mediawiki.js 3 files changed, 192 insertions(+), 3 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/CodeMirror.php b/CodeMirror.php index 7945923..f7048ee 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const EXT_CODEMIRROR_VERSION = '1.12.0'; +const EXT_CODEMIRROR_VERSION = '2.0.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index 80a4a38..c3332da 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -15,4 +15,193 @@ mode: 'text/mediawiki' } ); codeMirror.setSize( null, textbox1.height() ); + + // Replace jquery.textSelection.js + $.fn.textSelection = function ( command, options ) { + var fn, retval; + + fn = { + /** +* Get the contents of the textarea +*/ + getContents: function () { + return this.doc.getValue(); + }, + + /** +* Get the currently selected text in this textarea. Will focus the textarea +* in some browsers (IE/Opera) +*/ + getSelection: function () { + return this.doc.getSelection(); + }, + + /** +* Inserts text at the beginning and end of a text selection, optionally +* inserting text at the caret when selection is empty. +*/ + encapsulateSelection: function ( options ) { + var insertText, selText, + selectPeri = options.selectPeri, + pre = options.pre, post = options.post; + + if ( options.selectionStart !== undefined ) { + //fn[command].call( this, options ); + fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested + } + + selText = this.doc.getSelection(); + if ( !selText ) { + selText = options.peri; + } else if ( options.replace ) { + selectPeri = false; + selText = options.peri; + } else { + selectPeri = false; + while ( selText.charAt( selText.length - 1 ) === ' ' ) { + // Exclude ending space char + selText = selText.substring( 0, selText.length - 1 ); + post += ' '; + } + while ( selText.charAt( 0 ) === ' ' ) { + // Exclude prepending space char + selText = selText.substring( 1, selText.length ); + pre = ' ' + pre; + } + } + + /** + * Do the splitlines stuff. + * + * Wrap each line of the selected text with pre and post + */ + function doSplitLines( selText, pre, post ) { + var i, + insertText = '', + selTextArr = selText.split( '\n' ); + for ( i = 0; i selTextArr.length; i++ ) { + insertText += pre + selTextArr[i] + post; + if ( i !==
[MediaWiki-commits] [Gerrit] Revert RepoApi to explicitly query for token - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Revert RepoApi to explicitly query for token .. Revert RepoApi to explicitly query for token Instead of using the current wiki's token, RepoApi queries the actual Repo instance for an edit token again for being able to use an RepoApi instance on the client. Change-Id: Id45adfb73fccbea162510ae95e36389bdbe7496f --- M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 1 file changed, 69 insertions(+), 4 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js index 3b64720..9924b1b 100644 --- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js +++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js @@ -14,8 +14,17 @@ * @since 0.4 (since 0.3 as wb.Api without support for client usage) */ wb.RepoApi = function wbRepoApi() { - var wbRepo = mw.config.get( 'wbRepo' ); - this._repoApiEndpoint = wbRepo.url + wbRepo.scriptPath + '/api.php'; + var localApiEndpoint = mw.config.get( 'wgServer' ) + + mw.config.get( 'wgScriptPath' ) + + '/api.php'; + + this._repoConfig = mw.config.get( 'wbRepo' ); + this._repoApiEndpoint = this._repoConfig.url + this._repoConfig.scriptPath + '/api.php'; + + if( localApiEndpoint === this._repoApiEndpoint ) { + // The current wiki *is* the repo so we can just use user.tokens to get the edit token + this._repoEditToken = mw.user.tokens.get( 'editToken' ); + } }; $.extend( wb.RepoApi.prototype, { @@ -23,6 +32,16 @@ * @type {string} */ _repoApiEndpoint: null, + + /** +* @type {Object} +*/ + _repoConfig: null, + + /** +* @type {string} +*/ + _repoEditToken: null, /** * mediaWiki.Api object for internal usage. By having this initialized in the prototype, we can @@ -519,7 +538,9 @@ * @throws {Error} If a parameter is not specified properly */ post: function( params ) { - var options = {}; + var self = this, + options = {}, + deferred = $.Deferred(); this._extendRepoCallParams( params, options ); // Unconditionally set the bot parameter to match the UI behaviour of core @@ -531,7 +552,51 @@ } } ); - return this._api.postWithToken( 'edit', params, options ); + this._getRepoEditToken() + .done( function( token ) { + params.token = token; + + self._api.post( params, options ) + .done( deferred.resolve ) + .fail( deferred.reject ); + } ) + .fail( deferred.reject ); + + return deferred.promise(); + }, + + /** +* Retrieves an edit token. +* +* @return {jQuery.Promise} +* Resolved parameters: +* - {string} +* Rejected parameters: +* - {string} +* - {*} +*/ + _getRepoEditToken: function() { + var self = this, + deferred = $.Deferred(); + + if( this._repoEditToken ) { + return deferred.resolve( this._repoEditToken ).promise(); + } + + this.get( { + action: 'query', + intoken: 'edit', + titles: 'Main page', + prop: 'info', + indexpageids: 1 + } ) + .done( function( data ) { + self._repoEditToken = data.query.pages[data.query.pageids[0]].edittoken; + deferred.resolve( self._repoEditToken ); + } ) + .fail( deferred.reject ); + + return deferred.promise(); }, /** -- To view, visit https://gerrit.wikimedia.org/r/158599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id45adfb73fccbea162510ae95e36389bdbe7496f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com 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] APIQueryInfo: Allow fetching the canonical url of a page - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/158609 Change subject: APIQueryInfo: Allow fetching the canonical url of a page .. APIQueryInfo: Allow fetching the canonical url of a page Change-Id: If0f62481d059815390b74ccf8167957bc1dbce52 --- M includes/api/ApiQueryInfo.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/158609/1 diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 3ac9c8a..d7037e3 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -458,6 +458,7 @@ if ( $this-fld_url ) { $pageInfo['fullurl'] = wfExpandUrl( $title-getFullURL(), PROTO_CURRENT ); $pageInfo['editurl'] = wfExpandUrl( $title-getFullURL( 'action=edit' ), PROTO_CURRENT ); + $pageInfo['canonicalurl'] = wfExpandUrl( $title-getFullURL(), PROTO_CANONICAL ); } if ( $this-fld_readable $title-userCan( 'read', $this-getUser() ) ) { $pageInfo['readable'] = ''; @@ -837,7 +838,7 @@ ' watchers - The number of watchers, if allowed', ' notificationtimestamp - The watchlist notification timestamp of each page', ' subjectid - The page ID of the parent page for each talk page', - ' url - Gives a full URL to the page, and also an edit URL', + ' url - Gives a full URL, an edit URL, and the canonical URL for each page', ' readable - Whether the user can read this page', ' preload - Gives the text returned by EditFormPreloadText', ' displaytitle - Gives the way the page title is actually displayed', -- To view, visit https://gerrit.wikimedia.org/r/158609 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0f62481d059815390b74ccf8167957bc1dbce52 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/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] fix fluent Interface for FindReplace (v 2.0.1) - change (mediawiki...CodeMirror)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/158611 Change subject: fix fluent Interface for FindReplace (v 2.0.1) .. fix fluent Interface for FindReplace (v 2.0.1) Change-Id: I07ed6b7d1f3df9de07b0495909a93680ec4c0c92 --- M CodeMirror.php M resources/ext.CodeMirror.js 2 files changed, 93 insertions(+), 87 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/11/158611/1 diff --git a/CodeMirror.php b/CodeMirror.php index f7048ee..4b7ae74 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const EXT_CODEMIRROR_VERSION = '2.0.0'; +const EXT_CODEMIRROR_VERSION = '2.0.1'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index c3332da..aadb9b5 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -25,7 +25,7 @@ * Get the contents of the textarea */ getContents: function () { - return this.doc.getValue(); + return codeMirror.doc.getValue(); }, /** @@ -33,7 +33,7 @@ * in some browsers (IE/Opera) */ getSelection: function () { - return this.doc.getSelection(); + return codeMirror.doc.getSelection(); }, /** @@ -41,109 +41,115 @@ * inserting text at the caret when selection is empty. */ encapsulateSelection: function ( options ) { - var insertText, selText, - selectPeri = options.selectPeri, - pre = options.pre, post = options.post; + return this.each( function () { + var insertText, selText, + selectPeri = options.selectPeri, + pre = options.pre, post = options.post; - if ( options.selectionStart !== undefined ) { - //fn[command].call( this, options ); - fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested - } - - selText = this.doc.getSelection(); - if ( !selText ) { - selText = options.peri; - } else if ( options.replace ) { - selectPeri = false; - selText = options.peri; - } else { - selectPeri = false; - while ( selText.charAt( selText.length - 1 ) === ' ' ) { - // Exclude ending space char - selText = selText.substring( 0, selText.length - 1 ); - post += ' '; + if ( options.selectionStart !== undefined ) { + //fn[command].call( this, options ); + fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested } - while ( selText.charAt( 0 ) === ' ' ) { - // Exclude prepending space char - selText = selText.substring( 1, selText.length ); - pre = ' ' + pre; - } - } - /** - * Do the splitlines stuff. - * - * Wrap each line of the selected text with pre and post - */ - function doSplitLines( selText, pre, post ) { - var i, - insertText = '', - selTextArr = selText.split( '\n' ); -
[MediaWiki-commits] [Gerrit] fix fluent Interface for FindReplace (v 2.0.1) - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: fix fluent Interface for FindReplace (v 2.0.1) .. fix fluent Interface for FindReplace (v 2.0.1) Change-Id: I07ed6b7d1f3df9de07b0495909a93680ec4c0c92 --- M CodeMirror.php M resources/ext.CodeMirror.js 2 files changed, 93 insertions(+), 87 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/CodeMirror.php b/CodeMirror.php index f7048ee..4b7ae74 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const EXT_CODEMIRROR_VERSION = '2.0.0'; +const EXT_CODEMIRROR_VERSION = '2.0.1'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index c3332da..aadb9b5 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -25,7 +25,7 @@ * Get the contents of the textarea */ getContents: function () { - return this.doc.getValue(); + return codeMirror.doc.getValue(); }, /** @@ -33,7 +33,7 @@ * in some browsers (IE/Opera) */ getSelection: function () { - return this.doc.getSelection(); + return codeMirror.doc.getSelection(); }, /** @@ -41,109 +41,115 @@ * inserting text at the caret when selection is empty. */ encapsulateSelection: function ( options ) { - var insertText, selText, - selectPeri = options.selectPeri, - pre = options.pre, post = options.post; + return this.each( function () { + var insertText, selText, + selectPeri = options.selectPeri, + pre = options.pre, post = options.post; - if ( options.selectionStart !== undefined ) { - //fn[command].call( this, options ); - fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested - } - - selText = this.doc.getSelection(); - if ( !selText ) { - selText = options.peri; - } else if ( options.replace ) { - selectPeri = false; - selText = options.peri; - } else { - selectPeri = false; - while ( selText.charAt( selText.length - 1 ) === ' ' ) { - // Exclude ending space char - selText = selText.substring( 0, selText.length - 1 ); - post += ' '; + if ( options.selectionStart !== undefined ) { + //fn[command].call( this, options ); + fn.setSelection( { 'start': options.selectionStart, 'end': options.selectionEnd } ); // not tested } - while ( selText.charAt( 0 ) === ' ' ) { - // Exclude prepending space char - selText = selText.substring( 1, selText.length ); - pre = ' ' + pre; - } - } - /** - * Do the splitlines stuff. - * - * Wrap each line of the selected text with pre and post - */ - function doSplitLines( selText, pre, post ) { - var i, - insertText = '', - selTextArr = selText.split( '\n' ); - for ( i = 0; i selTextArr.length; i++ )
[MediaWiki-commits] [Gerrit] Replace Mantle's EventEmitter with oojs's - change (mediawiki...Mantle)
jenkins-bot has submitted this change and it was merged. Change subject: Replace Mantle's EventEmitter with oojs's .. Replace Mantle's EventEmitter with oojs's Requires I89056c47fa14af3d7ba8cd326bcd84302353fe0c in oojs Change-Id: I960592a3e8f3c853ee676fc6e983beda1b39563e --- M includes/Resources.php M javascripts/common/eventemitter.js 2 files changed, 12 insertions(+), 66 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 16548c7..6586312 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -67,6 +67,7 @@ 'ext.mantle.oo' = $wgMantleResourceBoilerplate + array( 'dependencies' = array( 'ext.mantle.modules', + 'oojs', ), 'scripts' = array( 'javascripts/common/Class.js', diff --git a/javascripts/common/eventemitter.js b/javascripts/common/eventemitter.js index 9e7f37e..858937c 100644 --- a/javascripts/common/eventemitter.js +++ b/javascripts/common/eventemitter.js @@ -1,75 +1,20 @@ -( function( M, $ ) { +/*global OO */ +( function( M, $, OO ) { var Class = M.require( 'Class' ), EventEmitter; - function callbackProxy( callback ) { - return function() { - var args = Array.prototype.slice.call( arguments, 1 ); - callback.apply( callback, args ); - }; - } - - /** -* @class -* @extends Class -*/ - EventEmitter = Class.extend( { - /** -* Bind a callback to the event. -* -* @method -* @param {string} event Event name. -* @param {Function} callback Callback to be bound. -*/ - on: function( event, callback ) { - $( this ).on( event, callbackProxy( callback ) ); - return this; - }, - - /** -* Bind a callback to the event and run it only once. -* -* @method -* @param {string} event Event name. -* @param {Function} callback Callback to be bound. -*/ - one: function( event, callback ) { - $( this ).one( event, callbackProxy( callback ) ); - return this; - }, - - /** -* Emit an event. This causes all bound callbacks to be run. -* -* @method -* @param {string} event Event name. -* @param {*} [arguments] Optional arguments to be passed to callbacks. -*/ - emit: function( event /* , arg1, arg2, ... */ ) { - var args = Array.prototype.slice.call( arguments, 1 ); - // use .triggerHandler() for emitting events to avoid accidentally - // invoking object's functions, e.g. don't call obj.something() when - // doing obj.emit( 'something' ) - $( this ).triggerHandler( event, args ); - return this; - }, - - /** -* Remove a callback. -* -* @name EventEmitter.prototype.off -* @method -* @param {string} event Event name. -*/ - off: function( event ) { - $( this ).off( event ); - return this; - } - } ); + // HACK: wrap around oojs's EventEmitter + // This needs some hackery to make oojs's + // and Mantle's different OO models get along, + // and we need to alias one() to once(). + EventEmitter = Class.extend( $.extend( { + initialize: OO.EventEmitter, + one: OO.EventEmitter.prototype.once + }, OO.EventEmitter.prototype ) ); M.define( 'eventemitter', EventEmitter ); // FIXME: if we want more of M's functionality in loaded in head, // move this to a separate file $.extend( mw.mantle, new EventEmitter() ); -}( mw.mantle, jQuery ) ); +}( mw.mantle, jQuery, OO ) ); -- To view, visit https://gerrit.wikimedia.org/r/155593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I960592a3e8f3c853ee676fc6e983beda1b39563e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Mantle Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___
[MediaWiki-commits] [Gerrit] puppet-compiler: alleviate disk space problems - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158612 Change subject: puppet-compiler: alleviate disk space problems .. puppet-compiler: alleviate disk space problems In order to solve the long-standing disk space problems in the puppet-compiler ci job, we do the following: - mount in bind the space-eating dirs from /mnt, where we have a large secondary disk. - set up a weekly cronjob that should clean up leftovers Change-Id: Iee31f83e958a856c46c7318cefa70781d8a5d2bb Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M manifests/role/puppet_compiler.pp 1 file changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/158612/1 diff --git a/manifests/role/puppet_compiler.pp b/manifests/role/puppet_compiler.pp index cc9231b..b8bd496 100644 --- a/manifests/role/puppet_compiler.pp +++ b/manifests/role/puppet_compiler.pp @@ -13,7 +13,6 @@ srange = '\$INTERNAL' } } -'production': { require role::ci::slave } default : { fail(Realm ${::realm} NOT supported by this role.) } } @@ -23,4 +22,42 @@ user= 'jenkins-deploy', } +file { '/mnt/puppet-compiler-output': +ensure = directory, +owner = 'jenkins-deploy', +group = 'jenkins-deploy', +require = $::role::ci::slave::labs::common::slash_mnt_require +} + +mount { ${::puppet_compiler::program_dir}/output: +ensure = mounted, +options = bind, +device = '/mnt/puppet-compiler-output' +} + +file { '/mnt/puppet-compiler-external': +ensure = directory, +owner = 'jenkins-deploy', +group = 'jenkins-deploy', +require = $::role::ci::slave::labs::common::slash_mnt_require +} + +mount { ${::puppet_compiler::program_dir}/external/change: +ensure = mounted, +options = bind, +device = '/mnt/puppet-compiler-external' +} + +cron { 'check_compiler_stale_repositories': +command = '/usr/bin/find /mnt/puppet-compiler-external -mindepth 1 -maxdepth 1 -ctime +1 -type d | /usr/bin/xargs rm -rf', +user= 'jenkins-deploy', +weekday = 0, +} + +cron { 'check_compiler_stale_output': +command = '/usr/bin/find /mnt/puppet-compiler-output -mindepth 1 -maxdepth 1 -ctime +10 -type d | /usr/bin/xargs rm -rf', +user= 'jenkins-deploy', +weekday = 0, +} + } -- To view, visit https://gerrit.wikimedia.org/r/158612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee31f83e958a856c46c7318cefa70781d8a5d2bb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] puppet-compiler: alleviate disk space problems - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: puppet-compiler: alleviate disk space problems .. puppet-compiler: alleviate disk space problems In order to solve the long-standing disk space problems in the puppet-compiler ci job, we do the following: - mount in bind the space-eating dirs from /mnt, where we have a large secondary disk. - set up a weekly cronjob that should clean up leftovers Change-Id: Iee31f83e958a856c46c7318cefa70781d8a5d2bb Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M manifests/role/puppet_compiler.pp 1 file changed, 38 insertions(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/puppet_compiler.pp b/manifests/role/puppet_compiler.pp index cc9231b..b8bd496 100644 --- a/manifests/role/puppet_compiler.pp +++ b/manifests/role/puppet_compiler.pp @@ -13,7 +13,6 @@ srange = '\$INTERNAL' } } -'production': { require role::ci::slave } default : { fail(Realm ${::realm} NOT supported by this role.) } } @@ -23,4 +22,42 @@ user= 'jenkins-deploy', } +file { '/mnt/puppet-compiler-output': +ensure = directory, +owner = 'jenkins-deploy', +group = 'jenkins-deploy', +require = $::role::ci::slave::labs::common::slash_mnt_require +} + +mount { ${::puppet_compiler::program_dir}/output: +ensure = mounted, +options = bind, +device = '/mnt/puppet-compiler-output' +} + +file { '/mnt/puppet-compiler-external': +ensure = directory, +owner = 'jenkins-deploy', +group = 'jenkins-deploy', +require = $::role::ci::slave::labs::common::slash_mnt_require +} + +mount { ${::puppet_compiler::program_dir}/external/change: +ensure = mounted, +options = bind, +device = '/mnt/puppet-compiler-external' +} + +cron { 'check_compiler_stale_repositories': +command = '/usr/bin/find /mnt/puppet-compiler-external -mindepth 1 -maxdepth 1 -ctime +1 -type d | /usr/bin/xargs rm -rf', +user= 'jenkins-deploy', +weekday = 0, +} + +cron { 'check_compiler_stale_output': +command = '/usr/bin/find /mnt/puppet-compiler-output -mindepth 1 -maxdepth 1 -ctime +10 -type d | /usr/bin/xargs rm -rf', +user= 'jenkins-deploy', +weekday = 0, +} + } -- To view, visit https://gerrit.wikimedia.org/r/158612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee31f83e958a856c46c7318cefa70781d8a5d2bb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] puppet-compiler: fixups - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158613 Change subject: puppet-compiler: fixups .. puppet-compiler: fixups Apparently puppet does not do the right thing when presented with an empty type in a mount stanza... Change-Id: Ie9f12e3894eacdd87c9ce028520b9d384bbcb451 --- M manifests/role/puppet_compiler.pp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/158613/1 diff --git a/manifests/role/puppet_compiler.pp b/manifests/role/puppet_compiler.pp index b8bd496..167ac16 100644 --- a/manifests/role/puppet_compiler.pp +++ b/manifests/role/puppet_compiler.pp @@ -25,26 +25,26 @@ file { '/mnt/puppet-compiler-output': ensure = directory, owner = 'jenkins-deploy', -group = 'jenkins-deploy', require = $::role::ci::slave::labs::common::slash_mnt_require } mount { ${::puppet_compiler::program_dir}/output: ensure = mounted, -options = bind, +type= 'auto', +options = 'bind', device = '/mnt/puppet-compiler-output' } file { '/mnt/puppet-compiler-external': ensure = directory, owner = 'jenkins-deploy', -group = 'jenkins-deploy', require = $::role::ci::slave::labs::common::slash_mnt_require } mount { ${::puppet_compiler::program_dir}/external/change: ensure = mounted, -options = bind, +type= 'auto', +options = 'bind', device = '/mnt/puppet-compiler-external' } -- To view, visit https://gerrit.wikimedia.org/r/158613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9f12e3894eacdd87c9ce028520b9d384bbcb451 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] puppet-compiler: fixups - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: puppet-compiler: fixups .. puppet-compiler: fixups Apparently puppet does not do the right thing when presented with an empty type in a mount stanza... Change-Id: Ie9f12e3894eacdd87c9ce028520b9d384bbcb451 --- M manifests/role/puppet_compiler.pp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/puppet_compiler.pp b/manifests/role/puppet_compiler.pp index b8bd496..167ac16 100644 --- a/manifests/role/puppet_compiler.pp +++ b/manifests/role/puppet_compiler.pp @@ -25,26 +25,26 @@ file { '/mnt/puppet-compiler-output': ensure = directory, owner = 'jenkins-deploy', -group = 'jenkins-deploy', require = $::role::ci::slave::labs::common::slash_mnt_require } mount { ${::puppet_compiler::program_dir}/output: ensure = mounted, -options = bind, +type= 'auto', +options = 'bind', device = '/mnt/puppet-compiler-output' } file { '/mnt/puppet-compiler-external': ensure = directory, owner = 'jenkins-deploy', -group = 'jenkins-deploy', require = $::role::ci::slave::labs::common::slash_mnt_require } mount { ${::puppet_compiler::program_dir}/external/change: ensure = mounted, -options = bind, +type= 'auto', +options = 'bind', device = '/mnt/puppet-compiler-external' } -- To view, visit https://gerrit.wikimedia.org/r/158613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9f12e3894eacdd87c9ce028520b9d384bbcb451 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QUnit tests for isAbuse method of MTAbuseCard - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: QUnit tests for isAbuse method of MTAbuseCard .. QUnit tests for isAbuse method of MTAbuseCard Change-Id: I963181ae43c2f6e73c7261d17daf36390de14b87 --- M Resources.php A tests/qunit/ext.cx.tools.mtabuse.test.js 2 files changed, 57 insertions(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index bbc1902..4846060 100644 --- a/Resources.php +++ b/Resources.php @@ -451,11 +451,13 @@ $modules['qunit']['ext.cx.tools.tests'] = array( 'scripts' = array( - 'tests/qunit/ext.cx.tools.template.test.js' + 'tests/qunit/ext.cx.tools.template.test.js', + 'tests/qunit/ext.cx.tools.mtabuse.test.js' ), 'dependencies' = array( 'ext.cx.model', 'ext.cx.tools.template', + 'ext.cx.tools.mtabuse' ), ) + $resourcePaths; }; diff --git a/tests/qunit/ext.cx.tools.mtabuse.test.js b/tests/qunit/ext.cx.tools.mtabuse.test.js new file mode 100644 index 000..1f8d5fc --- /dev/null +++ b/tests/qunit/ext.cx.tools.mtabuse.test.js @@ -0,0 +1,54 @@ +/** + * QUnit tests for Content Translation. + * + * @file + * @ingroup Extensions + * @licence GPL-2.0+ + */ + +( function ( $, mw ) { + 'use strict'; + + QUnit.module( 'ext.cx.tools.mtabuse', QUnit.newMwEnvironment() ); + + QUnit.test( 'MT Abuse - isAbuse method tests', 5, function ( assert ) { + var progress, mtAbuseCard = new mw.cx.tools.mtabuse(); + progress = { + any: 0, + human: 0, + mt: 0, + mtSectionsCount: 0 + }; + assert.assertFalse( mtAbuseCard.isAbuse( progress ), 'Beginning of translation. Nothing done.' ); + progress = { + any: 1.0, + human: 0.9, + mt: 0.1, + mtSectionsCount: 10 + }; + assert.assertFalse( mtAbuseCard.isAbuse( progress ), 'Translation with 90% human edits' ); + progress = { + any: 0, + human: 0, + mt: 0.8, + mtSectionsCount: 2 + }; + assert.assertFalse( mtAbuseCard.isAbuse( progress ), 'Translation with 80% MT, but only 2 sections translated' ); + progress = { + any: 0, + human: 0, + mt: 0.8, + mtSectionsCount: 6 + }; + assert.assertTrue( mtAbuseCard.isAbuse( progress ), 'Translation with 80% MT, 6 sections translated' ); + progress = { + any: 0.76, + human: 0, + mt: 0.8, + mtSectionsCount: 5 + }; + assert.assertTrue( mtAbuseCard.isAbuse( progress ), + 'Translation with 80% MT, only 5 sections translated, but total translation is 76%' ); + } ); + +}( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/158347 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I963181ae43c2f6e73c7261d17daf36390de14b87 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com 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] Don't use SkinBuildSidebar hook for other projects feature - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use SkinBuildSidebar hook for other projects feature .. Don't use SkinBuildSidebar hook for other projects feature Using SkinBuildSidebar for this does not work with $wgEnableSidebarCache since that is a shared cache across all pages on a wiki. On wmf wikis, most currently have $wgEnableSidebarCache disabled so this change shouldn't be significant performance-wise, although it might be nice to add extra per-page caching for this part of the sidebar. Bug: 70234 Change-Id: Ib614808443afe993ed746c6fc57352d60015b7f9 --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php 2 files changed, 17 insertions(+), 39 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index cee6c79..83ae926 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -611,36 +611,8 @@ } /** -* Displays a sidebar section for other project links. -* -* @since 0.5 -* -* @param Skin $skin -* @param array $bar -* -* @return bool -*/ - public static function onSkinBuildSidebar( Skin $skin, $bar ) { - $settings = WikibaseClient::getDefaultInstance()-getSettings(); - - if ( - !$settings-getSetting( 'otherProjectsLinksBeta' ) - !$settings-getSetting( 'otherProjectsLinksByDefault' ) - ) { - return true; - } - - $otherProjectsSidebarGenerator = WikibaseClient::getDefaultInstance()-getOtherProjectsSidebarGenerator(); - $otherProjectsSidebar = $otherProjectsSidebarGenerator-buildProjectLinkSidebar( $skin-getContext()-getTitle() ); - if ( count( $otherProjectsSidebar ) !== 0 ) { - $bar['wikibase-otherprojects'] = $otherProjectsSidebar; - } - - return true; - } - - /** -* Filters the display of other project sidebar according to the beta feature +* Adds the other projects section to the sidebar, if enabled project wide or +* the user has the beta featured enabled. * * @since 0.5 * @@ -650,14 +622,21 @@ * @return bool */ public static function onSidebarBeforeOutput( Skin $skin, array $sidebar ) { - $settings = WikibaseClient::getDefaultInstance()-getSettings(); - if ( - $settings-getSetting( 'otherProjectsLinksBeta' ) - !$settings-getSetting( 'otherProjectsLinksByDefault' ) - class_exists( '\BetaFeatures' ) - !BetaFeatures::isFeatureEnabled( $skin-getUser(), 'wikibase-otherprojects' ) - ) { - unset( $sidebar['wikibase-otherprojects'] ); + $wikibaseClient = WikibaseClient::getDefaultInstance(); + $settings = $wikibaseClient-getSettings(); + + $betaFeatureEnabled = class_exists( '\BetaFeatures' ) + $settings-getSetting( 'otherProjectsLinksBeta' ) + BetaFeatures::isFeatureEnabled( $skin-getUser(), 'wikibase-otherprojects' ); + + if ( $settings-getSetting( 'otherProjectsLinksByDefault' ) || $betaFeatureEnabled ) { + $otherProjectsSidebarGenerator = $wikibaseClient-getOtherProjectsSidebarGenerator(); + $title = $skin-getContext()-getTitle(); + $otherProjectsSidebar = $otherProjectsSidebarGenerator-buildProjectLinkSidebar( $title ); + + if ( count( $otherProjectsSidebar ) !== 0 ) { + $sidebar['wikibase-otherprojects'] = $otherProjectsSidebar; + } } return true; diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 5f775b8..b4a9e3f 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -98,7 +98,6 @@ $wgHooks['ParserGetVariableValueSwitch'][] = '\Wikibase\ClientHooks::onParserGetVariableValueSwitch'; $wgHooks['SkinTemplateGetLanguageLink'][] = '\Wikibase\ClientHooks::onSkinTemplateGetLanguageLink'; $wgHooks['SkinTemplateOutputPageBeforeExec'][] = '\Wikibase\ClientHooks::onSkinTemplateOutputPageBeforeExec'; - $wgHooks['SkinBuildSidebar'][] = '\Wikibase\ClientHooks::onSkinBuildSidebar'; $wgHooks['SpecialMovepageAfterMove'][] = '\Wikibase\ClientHooks::onSpecialMovepageAfterMove'; $wgHooks['SpecialWatchlistQuery'][] =
[MediaWiki-commits] [Gerrit] Added batch message for Notifications - change (mediawiki...BlueSpiceExtensions)
Smuggli has submitted this change and it was merged. Change subject: Added batch message for Notifications .. Added batch message for Notifications replaced testing value with real value Change-Id: Ie3b5361b0c1eedaba3b4d4e62b6a058ed1f518a5 --- M Notifications/Notifications.class.php 1 file changed, 12 insertions(+), 9 deletions(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/Notifications/Notifications.class.php b/Notifications/Notifications.class.php index bbf32bb..31d342c 100644 --- a/Notifications/Notifications.class.php +++ b/Notifications/Notifications.class.php @@ -225,9 +225,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-edit', 'email-body-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-edit', + 'email-body-batch-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), 'icon' = 'bs-edit', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-create'] = array( @@ -242,9 +242,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-new', 'email-body-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-new', + 'email-body-batch-params' = array( 'title', 'agent', 'summary', 'titlelink', 'difflink' ), 'icon' = 'bs-create', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-delete'] = array( @@ -259,9 +259,9 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-delete', 'email-body-params' = array( 'titlelink', 'agent', 'deletereason' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-delete', + 'email-body-batch-params' = array( 'titlelink', 'agent', 'deletereason' ), 'icon' = 'bs-delete', -// 'bundle' = array( 'web' = true, 'email' = true ), ); $notifications['bs-move'] = array( @@ -276,7 +276,8 @@ 'email-subject-params' = array( 'title', 'agent', 'newtitle' ), 'email-body-message' = 'bs-notifications-email-move', 'email-body-params' = array( 'title', 'agent', 'newtitle', 'newtitlelink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-move', + 'email-body-batch-params' = array( 'title', 'agent', 'newtitle', 'newtitlelink' ), 'icon' = 'bs-move', ); @@ -292,7 +293,8 @@ 'email-subject-params' = array( 'user' ), 'email-body-message' = 'bs-notifications-email-addaccount', 'email-body-params' = array( 'userlink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-addaccount', + 'email-body-batch-params' = array( 'userlink' ), 'icon' = 'bs-newuser', ); @@ -308,7 +310,8 @@ 'email-subject-params' = array( 'title', 'agent' ), 'email-body-message' = 'bs-notifications-email-shout', 'email-body-params' = array( 'title', 'agent', 'shoutmsg', 'titlelink' ), - 'email-body-batch-message' = 'hello again', + 'email-body-batch-message' = 'bs-notifications-email-shout', + 'email-body-batch-params' = array( 'title', 'agent', 'shoutmsg', 'titlelink' ), 'icon' = 'bs-shoutbox', ); return true; -- To view, visit https://gerrit.wikimedia.org/r/158594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3b5361b0c1eedaba3b4d4e62b6a058ed1f518a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Swidmann
[MediaWiki-commits] [Gerrit] Track more link clicks - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158614 Change subject: Track more link clicks .. Track more link clicks - About page - Discuss page - Help page - Location page - Uploader page Change-Id: I1ebcb39049ad9b521968eb2024be9b86a49e5b0c Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/851 --- M MultimediaViewer.php M resources/mmv/logging/mmv.logging.ActionLogger.js M resources/mmv/ui/mmv.ui.metadataPanel.js 3 files changed, 58 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/14/158614/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index e0fbfad..e7962d3 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -922,7 +922,7 @@ global $wgResourceModules, $wgEventLoggingSchemas; if ( isset( $wgResourceModules['ext.eventLogging'] ) ) { - $wgEventLoggingSchemas[ 'MediaViewer' ] = 8935662; + $wgEventLoggingSchemas[ 'MediaViewer' ] = 9763419; $wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896; $wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641; diff --git a/resources/mmv/logging/mmv.logging.ActionLogger.js b/resources/mmv/logging/mmv.logging.ActionLogger.js index afe4336..35af041 100644 --- a/resources/mmv/logging/mmv.logging.ActionLogger.js +++ b/resources/mmv/logging/mmv.logging.ActionLogger.js @@ -81,7 +81,12 @@ 'optout-loggedin': 'opt-out (via quick link at bottom of metadata panel) by logged-in user', 'optout-anon': 'opt-out by anonymous user', 'optin-loggedin': 'opt-in (via quick link at bottom of metadata panel) by logged-in user', - 'optin-anon': 'opt-in by anonymous user' + 'optin-anon': 'opt-in by anonymous user', + 'about-page': 'User opened the about page.', + 'discuss-page': 'User opened the discuss page.', + 'help-page': 'User opened the help page.', + 'location-page': 'User opened the location page.', + 'uploader-page': 'User opened the uploader page.' }; /** diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 8541d5f..75c8911 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -165,14 +165,16 @@ * Initializes the title and credit elements. */ MPP.initializeTitleAndCredit = function () { + var self = this; + this.$titleAndCredit = $( 'div' ) .addClass( 'mw-mmv-title-credit' ) // Since these elements are created dynamically, we listen this way for logging purposes - .on( 'click', '.mw-mmv-author a', function () { - mw.mmv.actionLogger.log( 'author-page' ); + .on( 'click', '.mw-mmv-author a', function ( e ) { + self.trackLinkClick.call( this, 'author-page', e ); } ) - .on( 'click', '.mw-mmv-source a', function () { - mw.mmv.actionLogger.log( 'source-page' ); + .on( 'click', '.mw-mmv-source a', function ( e ) { + self.trackLinkClick.call( this, 'source-page', e ); } ) .appendTo( this.$titleDiv ); @@ -240,8 +242,8 @@ .addClass( 'mw-mmv-license empty' ) .prop( 'href', '#' ) .appendTo( this.$titlePara ) - .on( 'click', function() { - mw.mmv.actionLogger.log( 'license-page' ); + .on( 'click', function( e ) { + panel.trackLinkClick.call( this, 'license-page', e ); } ); this.$permissionLink = $( 'span' ) @@ -324,6 +326,8 @@ * Initializes the link to the uploader's file page. */ MPP.initializeUploader = function () { + var self = this; + this.$usernameLi = $( 'li' ) .addClass( 'mw-mmv-username-li empty' ) .appendTo( this.$imageLinks ); @@ -331,20 +335,24 @@ this.$username = $( 'a' ) .addClass( 'mw-mmv-username' ) .prop( 'href', '#' ) - .appendTo( this.$usernameLi ); + .appendTo( this.$usernameLi ) + .click( function( e ) { self.trackLinkClick.call( this, 'uploader-page', e ); } ); }; /** * Initializes the geolocation element. */
[MediaWiki-commits] [Gerrit] One suggestion is enough - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/158615 Change subject: One suggestion is enough .. One suggestion is enough For performance reasons one suggestion is enough Change-Id: I7341bcb72b5bb158d5be1b7f7a14b81e44e4ae7c --- M ExtendedSearch/includes/SearchService.class.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/15/158615/1 diff --git a/ExtendedSearch/includes/SearchService.class.php b/ExtendedSearch/includes/SearchService.class.php index a990c37..c588359 100644 --- a/ExtendedSearch/includes/SearchService.class.php +++ b/ExtendedSearch/includes/SearchService.class.php @@ -209,6 +209,7 @@ $aParams['spellcheck'] = 'true'; $aParams['q'] = $sQuery; $aParams['spellcheck.q'] = $sQuery; + $aParams['spellcheck.count'] = 1; if ( $bIndexing === false ) { $aParams['wt'] = self::SOLR_WRITER; @@ -243,7 +244,7 @@ */ public function getSpellcheck( $sSearch, $aSearchOptions, $bIndexing = false ) { try { - $oHits = $this-spellcheck( $sSearch, 0, 3, $aSearchOptions, $bIndexing ); + $oHits = $this-spellcheck( $sSearch, 0, 1, $aSearchOptions, $bIndexing ); } catch ( Exception $e ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/158615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7341bcb72b5bb158d5be1b7f7a14b81e44e4ae7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] One suggestion is enough - change (mediawiki...BlueSpiceExtensions)
Smuggli has submitted this change and it was merged. Change subject: One suggestion is enough .. One suggestion is enough For performance reasons one suggestion is enough Change-Id: I7341bcb72b5bb158d5be1b7f7a14b81e44e4ae7c --- M ExtendedSearch/includes/SearchService.class.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Smuggli: Verified; Looks good to me, approved diff --git a/ExtendedSearch/includes/SearchService.class.php b/ExtendedSearch/includes/SearchService.class.php index a990c37..c588359 100644 --- a/ExtendedSearch/includes/SearchService.class.php +++ b/ExtendedSearch/includes/SearchService.class.php @@ -209,6 +209,7 @@ $aParams['spellcheck'] = 'true'; $aParams['q'] = $sQuery; $aParams['spellcheck.q'] = $sQuery; + $aParams['spellcheck.count'] = 1; if ( $bIndexing === false ) { $aParams['wt'] = self::SOLR_WRITER; @@ -243,7 +244,7 @@ */ public function getSpellcheck( $sSearch, $aSearchOptions, $bIndexing = false ) { try { - $oHits = $this-spellcheck( $sSearch, 0, 3, $aSearchOptions, $bIndexing ); + $oHits = $this-spellcheck( $sSearch, 0, 1, $aSearchOptions, $bIndexing ); } catch ( Exception $e ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/158615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7341bcb72b5bb158d5be1b7f7a14b81e44e4ae7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add patch to make RUSAGE_THREAD available to profiling. - change (operations...hhvm)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158616 Change subject: Add patch to make RUSAGE_THREAD available to profiling. .. Add patch to make RUSAGE_THREAD available to profiling. Change-Id: Icc2c849e829a5120c418c731d4068118ca452cef Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M debian/patches/series 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/16/158616/1 diff --git a/debian/patches/series b/debian/patches/series index d7f7636..55f42d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ # cherry-picks from upstream ArrayObject-append-should-delegate-to-ArrayObject-of.patch Fix-handling-of-pcre-overflow-expressions.patch +Make-RUSAGE_THREAD-available-to-getrusage.patch -- To view, visit https://gerrit.wikimedia.org/r/158616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc2c849e829a5120c418c731d4068118ca452cef Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implemented sitelinkgrouplistview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented sitelinkgrouplistview .. Implemented sitelinkgrouplistview Change-Id: I43a7897e999bd5239eaaec29bba8393728586426 --- M lib/resources/Resources.php M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js A lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/resources.php A lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgrouplistview.css M lib/resources/templates.php A lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php M repo/includes/View/SiteLinksView.php 13 files changed, 400 insertions(+), 48 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 721..1b867a6 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -56,6 +56,7 @@ 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css', 'jquery.wikibase/themes/default/jquery.wikibase.labelview.css', + 'jquery.wikibase/themes/default/jquery.wikibase.sitelinkgrouplistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css', 'jquery.wikibase/themes/default/jquery.wikibase.sitelinkview.css', ) diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index 944389c..228f9de 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -97,6 +97,7 @@ }, _initLabel: function() { + // TODO: Allow initializing entitview on empty DOM this.$label = $( '.wb-firstHeading .wikibase-labelview', this.element ).first(); if( !this.$label.length ) { this.$label = mw.template( 'wikibase-h1', @@ -228,25 +229,21 @@ _initSiteLinks: function() { var self = this; - this.$siteLinks = $( '.wikibase-sitelinkgroupview', this.element ); + this.$siteLinks = $( '.wikibase-sitelinkgrouplistview', this.element ); - this.$siteLinks.each( function() { - var $sitelinklistview = $( this ), - siteIdsOfGroup = []; + // Scrape group and site link order from existing DOM: + var value = []; + this.$siteLinks.find( '.wikibase-sitelinkgroupview' ).each( function() { + var $sitelinkgroupview = $( this ), + $sitelinklistview = $sitelinkgroupview.find( '.wikibase-sitelinklistview' ), + group = $sitelinkgroupview.data( 'wb-sitelinks-group' ), + siteIdsOfGroup = [], + siteLinks = self.options.value.getSiteLinks(), + siteLinksOfGroup = []; $sitelinklistview.find( '.wikibase-sitelinkview' ).each( function() { siteIdsOfGroup.push( $( this ).data( 'wb-siteid' ) ); } ); - - $sitelinklistview.toolbarcontroller( { - addtoolbar: ['sitelinklistview'], - edittoolbar: ['sitelinkview'] - } ); - - // TODO: Implement sitelinkgrouplistview to manage sitelinklistview widgets - var group = $( this ).data( 'wb-sitelinks-group' ), - siteLinks = self.options.value.getSiteLinks(), - siteLinksOfGroup = []; for( var i = 0; i siteIdsOfGroup.length; i++ ) { for( var j = 0; j siteLinks.length; j++ ) { @@ -257,16 +254,18 @@ } } - $( this ).sitelinkgroupview( { - value: { - group: group, - siteLinks: siteLinksOfGroup - }, -
[MediaWiki-commits] [Gerrit] Removed obsolete value supplement template - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Removed obsolete value supplement template .. Removed obsolete value supplement template supplement template is not in use anymore, same for wb-value-empty css class Change-Id: Ia89510321bd12ddc5f1f9c2d5361e994288b3cb4 --- M lib/resources/templates.php M lib/resources/wikibase.css M repo/resources/wikibase.ui.entityViewInit.js 3 files changed, 2 insertions(+), 11 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/templates.php b/lib/resources/templates.php index c4f8ed5..1845f94 100644 --- a/lib/resources/templates.php +++ b/lib/resources/templates.php @@ -200,11 +200,6 @@ /span HTML; - $templates['wb-property-value-supplement'] = -HTML -span class=wb-value-supplement$1/span -HTML; - $templates['wikibase-aliasesview'] = HTML div class=wikibase-aliasesview $1 diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index e14390a..5f66a13 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -118,11 +118,11 @@ display: block; /* need to force block explicitly to achieve 100% width */ } -.wb-value, .wb-value-supplement { +.wb-value { display: inline; } -.wb-empty, .wb-value-empty, .wb-value-supplement { +.wb-empty { color: #A1A1A1; } diff --git a/repo/resources/wikibase.ui.entityViewInit.js b/repo/resources/wikibase.ui.entityViewInit.js index 11d2faa..beba6d3 100644 --- a/repo/resources/wikibase.ui.entityViewInit.js +++ b/repo/resources/wikibase.ui.entityViewInit.js @@ -18,10 +18,6 @@ $( '.wb-editsection' ).parent( 'td' ).not( '.wb-terms td' ).remove(); $( '.wb-editsection:not(td)' ).remove(); - // remove all infos about empty values which are displayed in non-JS - $( '.wb-value-empty' ).not( '.wikibase-fingerprintview td' ) - .empty().removeClass( 'wb-value-empty' ); - // Since the DOM is altered for the property edit tools to initialize properly, the // following hook informs about these operations having finished. // TODO: This hook is not supposed to be permanent. Remove it as soon as no more global DOM -- To view, visit https://gerrit.wikimedia.org/r/158595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia89510321bd12ddc5f1f9c2d5361e994288b3cb4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Provide own arrow images - change (mediawiki...LiquidThreads)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/158617 Change subject: Provide own arrow images .. Provide own arrow images Copied from mediawiki/core's skins/common as of 1683741e7177eeff63e4653f4a4a633a90c9cf64. This is the best fix I'm willing to make at 2 AM, and, frankly, the best fix I'm willing to make to LiquidThreads at all. Bug: 70412 Change-Id: I307d82363fc81364cdbc9c9ee3f990ff326538e9 (cherry picked from commit da91757e401a1ee2d21ce3058e076e4a82e1452d) --- A images/arrow_disabled_first_25.png A images/arrow_disabled_last_25.png A images/arrow_disabled_left_25.png A images/arrow_disabled_right_25.png A images/arrow_first_25.png A images/arrow_last_25.png A images/arrow_left_25.png A images/arrow_right_25.png M pages/TalkpageView.php 9 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads refs/changes/17/158617/1 diff --git a/images/arrow_disabled_first_25.png b/images/arrow_disabled_first_25.png new file mode 100644 index 000..78a493e --- /dev/null +++ b/images/arrow_disabled_first_25.png Binary files differ diff --git a/images/arrow_disabled_last_25.png b/images/arrow_disabled_last_25.png new file mode 100644 index 000..2a64fd0 --- /dev/null +++ b/images/arrow_disabled_last_25.png Binary files differ diff --git a/images/arrow_disabled_left_25.png b/images/arrow_disabled_left_25.png new file mode 100644 index 000..83df068 --- /dev/null +++ b/images/arrow_disabled_left_25.png Binary files differ diff --git a/images/arrow_disabled_right_25.png b/images/arrow_disabled_right_25.png new file mode 100644 index 000..aa4fbf8 --- /dev/null +++ b/images/arrow_disabled_right_25.png Binary files differ diff --git a/images/arrow_first_25.png b/images/arrow_first_25.png new file mode 100644 index 000..52b32a5 --- /dev/null +++ b/images/arrow_first_25.png Binary files differ diff --git a/images/arrow_last_25.png b/images/arrow_last_25.png new file mode 100644 index 000..caf5033 --- /dev/null +++ b/images/arrow_last_25.png Binary files differ diff --git a/images/arrow_left_25.png b/images/arrow_left_25.png new file mode 100644 index 000..f363bf6 --- /dev/null +++ b/images/arrow_left_25.png Binary files differ diff --git a/images/arrow_right_25.png b/images/arrow_right_25.png new file mode 100644 index 000..3f8fee3 --- /dev/null +++ b/images/arrow_right_25.png Binary files differ diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php index 1f888e6..003e3b2 100644 --- a/pages/TalkpageView.php +++ b/pages/TalkpageView.php @@ -549,9 +549,9 @@ !$this-isNavigationBarShown() ) { return ''; } - global $wgStylePath, $wgLang; + global $wgExtensionAssetsPath, $wgLang; - $path = $wgStylePath/common/images; + $path = $wgExtensionAssetsPath/LiquidThreads/images; $labels = array( 'first' = 'table_pager_first', 'prev' = 'table_pager_prev', -- To view, visit https://gerrit.wikimedia.org/r/158617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I307d82363fc81364cdbc9c9ee3f990ff326538e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: wmf/1.24wmf20 Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Bartosz DziewoĆski matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Hide reply and edit links in locked posts - change (mediawiki...Flow)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/158618 Change subject: WIP: Hide reply and edit links in locked posts .. WIP: Hide reply and edit links in locked posts Change-Id: I1e5f36c0a7f125e440110aff082410839ac2fd2e --- M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/flow_post_meta_actions.handlebars M modules/new/styles/board/moderated.less M modules/new/styles/board/topic/post.less M tests/browser/features/close_reopen_topics.feature M tests/browser/features/step_definitions/close_reopen_topics_steps.rb M tests/browser/features/support/pages/flow_page.rb 9 files changed, 94 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/18/158618/1 diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php index 01c1b69..a2b19ae 100644 --- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php +++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php @@ -197,7 +197,6 @@ data-flow-interactive-handler=activateReplyPost'.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null), ENT_QUOTES, 'UTF-8').'/a ' : '').' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) isset($in['actions']['edit'])) ? $in['actions']['edit'] : null))) ? ' - #8226; a href='.htmlentities(((is_array($in['actions']['edit']) isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null), ENT_QUOTES, 'UTF-8').' title='.htmlentities(((is_array($in['actions']['edit']) isset($in['actions']['edit']['title'])) ? $in['actions']['edit']['title'] : null), ENT_QUOTES, 'UTF-8').' data-flow-api-handler=activateEditPost @@ -208,7 +207,6 @@ /a ' : '').' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) isset($in['actions']['thank'])) ? $in['actions']['thank'] : null))) ? ' - #8226; '.' a class=mw-ui-constructive mw-ui-quiet mw-thanks-flow-thank-link href='.htmlentities(((is_array($in['actions']['thank']) isset($in['actions']['thank']['url'])) ? $in['actions']['thank']['url'] : null), ENT_QUOTES, 'UTF-8').' @@ -221,13 +219,20 @@ class=mw-ui-progressive mw-ui-quiet title='.htmlentities(((is_array($in['links']['diff-prev']) isset($in['links']['diff-prev']['title'])) ? $in['links']['diff-prev']['title'] : null), ENT_QUOTES, 'UTF-8').' ' : '').' + Updated upstream '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in) isset($in['revisionId'])) ? $in['revisionId'] : null),'flow-edited-ago'),Array()), 'encq').' +=== + '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in) isset($in['revisionId'])) ? $in['revisionId'] : null),'flow-edited-ago',((is_array($in) isset($in['1'])) ? $in['1'] : null)),Array()), 'encq').' + Stashed changes '.((LCRun3::ifvar($cx, ((is_array($in['links']) isset($in['links']['diff-prev'])) ? $in['links']['diff-prev'] : null))) ? ' /a ' : '').' - #8226; ' : '').' + Updated upstream '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in) isset($in['postId'])) ? $in['postId'] : null),'flow-time-ago'),Array()), 'encq').' +=== + '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in) isset($in['postId'])) ? $in['postId'] : null),'flow-time-ago',((is_array($in) isset($in['0'])) ? $in['0'] : null),((is_array($in) isset($in['timestamp_readable'])) ? $in['timestamp_readable'] : null)),Array()), 'encq').' + Stashed changes /div div class=flow-menu @@ -402,7 +407,6 @@ data-flow-interactive-handler=activateReplyPost'.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null), ENT_QUOTES, 'UTF-8').'/a ' : '').' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) isset($in['actions']['edit'])) ? $in['actions']['edit'] : null))) ? ' - #8226; a href='.htmlentities(((is_array($in['actions']['edit']) isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null), ENT_QUOTES, 'UTF-8').'
[MediaWiki-commits] [Gerrit] Typo fix: HMTL â HTML - change (mediawiki/core)
Bartosz DziewoĆski has uploaded a new change for review. https://gerrit.wikimedia.org/r/158619 Change subject: Typo fix: HMTL â HTML .. Typo fix: HMTL â HTML Change-Id: Id2bb52b92b7cf47a7a22506a01663acfee606ac4 --- M includes/page/Article.php M maintenance/dictionary/mediawiki.dic 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/158619/1 diff --git a/includes/page/Article.php b/includes/page/Article.php index b433414..dab075e 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1462,7 +1462,7 @@ * @param Title|array $target Destination(s) to redirect * @param bool $appendSubtitle [optional] * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? -* @return string Containing HMTL with redirect link +* @return string Containing HTML with redirect link */ public function viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) { $lang = $this-getTitle()-getPageLanguage(); @@ -1483,7 +1483,7 @@ * @param Language $lang * @param Title|array $target Destination(s) to redirect * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? -* @return string Containing HMTL with redirect link +* @return string Containing HTML with redirect link */ public static function getRedirectHeaderHtml( Language $lang, $target, $forceKnown = false ) { global $wgStylePath; diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index fc72908..d043818 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -1811,7 +1811,6 @@ hitcounter hits hmac -hmtl hobby homelink hookaborted -- To view, visit https://gerrit.wikimedia.org/r/158619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2bb52b92b7cf47a7a22506a01663acfee606ac4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Put other project links in parser cache - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Put other project links in parser cache .. Put other project links in parser cache Bug: 70393 Change-Id: I25cc3ea4af94c77eb67ddc02a84df0d95e1348cc --- M client/WikibaseClient.hooks.php D client/includes/EntityIdPropertyUpdater.php M client/includes/LangLinkHandler.php M client/includes/WikibaseClient.php M client/tests/phpunit/includes/LangLinkHandlerTest.php 5 files changed, 157 insertions(+), 96 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 83ae926..80b2bd4 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -346,7 +346,9 @@ return true; } - if ( !self::isWikibaseEnabled( $parser-getTitle()-getNamespace() ) ) { + $title = $parser-getTitle(); + + if ( !self::isWikibaseEnabled( $title-getNamespace() ) ) { // shorten out return true; } @@ -355,8 +357,6 @@ // @todo split up the multiple responsibilities here and in lang link handler - $parserOutput = $parser-getOutput(); - // only run this once, for the article content and not interface stuff //FIXME: this also runs for messages in EditPage::showEditTools! Ugh! if ( $parser-getOptions()-getInterfaceMessage() ) { @@ -364,32 +364,26 @@ return true; } - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); + $langLinkHandler = WikibaseClient::getDefaultInstance()-getLangLinkHandler(); - $langLinkHandler = new LangLinkHandler( - $settings-getSetting( 'siteGlobalID' ), - $wikibaseClient-getNamespaceChecker(), - $wikibaseClient-getStore()-getSiteLinkTable(), - $wikibaseClient-getSiteStore(), - $wikibaseClient-getLangLinkSiteGroup() - ); - - $useRepoLinks = $langLinkHandler-useRepoLinks( $parser-getTitle(), $parser-getOutput() ); + $parserOutput = $parser-getOutput(); + $useRepoLinks = $langLinkHandler-useRepoLinks( $title, $parserOutput ); try { if ( $useRepoLinks ) { // add links - $langLinkHandler-addLinksFromRepository( $parser-getTitle(), $parser-getOutput() ); + $langLinkHandler-addLinksFromRepository( $title, $parserOutput ); } - $langLinkHandler-updateItemIdProperty( $parser-getTitle(), $parser-getOutput() ); + $langLinkHandler-updateItemIdProperty( $title, $parserOutput ); + $langLinkHandler-updateOtherProjectsLinksData( $title, $parserOutput ); } catch ( \Exception $e ) { wfWarn( 'Failed to add repo links: ' . $e-getMessage() ); } + $settings = WikibaseClient::getDefaultInstance()-getSettings(); + if ( $useRepoLinks || $settings-getSetting( 'alwaysSort' ) ) { - // sort links $interwikiSorter = new InterwikiSorter( $settings-getSetting( 'sort' ), $settings-getSetting( 'interwikiSortOrders' ), @@ -551,6 +545,12 @@ $out-setProperty( 'wikibase_item', $itemId ); } + $otherProjects = $pout-getExtensionData( 'wikibase-otherprojects-sidebar' ); + + if ( $otherProjects !== null ) { + $out-setProperty( 'wikibase-otherprojects-sidebar', $otherProjects ); + } + return true; } @@ -622,6 +622,13 @@ * @return bool */ public static function onSidebarBeforeOutput( Skin $skin, array $sidebar ) { + $outputPage = $skin-getContext()-getOutput(); + $title = $outputPage-getTitle(); + + if ( !self::isWikibaseEnabled( $title-getNamespace() ) ) { + return true; + } + $wikibaseClient = WikibaseClient::getDefaultInstance(); $settings = $wikibaseClient-getSettings(); @@ -630,11 +637,15 @@ BetaFeatures::isFeatureEnabled( $skin-getUser(), 'wikibase-otherprojects' ); if ( $settings-getSetting( 'otherProjectsLinksByDefault' ) || $betaFeatureEnabled ) { -
[MediaWiki-commits] [Gerrit] Add Rolling New Active Editor - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/158620 Change subject: Add Rolling New Active Editor .. Add Rolling New Active Editor Bug: 67459 Change-Id: I70e39fcae19f54afa09da31301e3955775a0acf3 --- A tests/test_metrics/test_rolling_new_active_editor.py M wikimetrics/metrics/__init__.py A wikimetrics/metrics/rolling_new_active_editor.py 3 files changed, 287 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/20/158620/1 diff --git a/tests/test_metrics/test_rolling_new_active_editor.py b/tests/test_metrics/test_rolling_new_active_editor.py new file mode 100644 index 000..6eb1ce8 --- /dev/null +++ b/tests/test_metrics/test_rolling_new_active_editor.py @@ -0,0 +1,156 @@ +from datetime import datetime, timedelta +from nose.tools import assert_true, assert_equal, assert_false + +from tests.fixtures import DatabaseTest, i, d +from wikimetrics.utils import format_pretty_date as s +from wikimetrics.models import Revision, Logging +from wikimetrics.metrics import RollingNewActiveEditor +from wikimetrics.enums import TimeseriesChoices + + +class RollingNewActiveEditorTest(DatabaseTest): + +TODO: add timeseries support and use the following tests: + gerrit.wikimedia.org/r/#/c/147312/5/tests/test_metrics/test_rolling_active_editor.py + +def runTest(self): +pass + +def setUp(self): +DatabaseTest.setUp(self) + +# registration for all the editors below +self.before_r = before_r = 2013120100 +self.r = r = 2014010100 +# exactly 30 days after registration +self.m = m = 2014013100 +self.r_plus_30 = s(d(self.m)) +self.editor_count = 10 + +self.create_test_cohort( +# 5 editors will have registered on time, 5 will not +editor_count=self.editor_count, +revisions_per_editor=8, +revision_timestamps=[ +# NOTE: these first 5 are registered BEFORE r +# this one will make 5 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, r + 5, m + 6, m + 7, m + 8], +# this one will make 3 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make 8 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, r + 5, r + 6, r + 7, r + 8], +# this one will make 0 edits within 30 days of self.r_plus_30 +[m + 1, m + 2, m + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make the 5th edit right on self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, m + 0, m + 6, m + 7, m + 8], + +# NOTE: these next 5 are registered AFTER r +# this one will make 5 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, r + 5, m + 6, m + 7, m + 8], +# this one will make 3 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make 8 edits within 30 days of self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, r + 5, r + 6, r + 7, r + 8], +# this one will make 0 edits within 30 days of self.r_plus_30 +[m + 1, m + 2, m + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make the 5th edit right on self.r_plus_30 +[r + 1, r + 2, r + 3, r + 4, m + 0, m + 6, m + 7, m + 8], +], +user_registrations=([before_r] * 5) + ([r] * 5), +revision_lengths=10 +) +self.create_non_editors([ +(r, 'newusers', 'create'), +(r, 'newusers', 'create'), +(m, 'newusers', 'create'), +]) + +def test_validates(self): +metric = RollingNewActiveEditor( +end_date='blah' +) +assert_false(metric.validate()) + +metric = RollingNewActiveEditor( +end_date=self.r_plus_30, +) +assert_true(metric.validate()) + +def test_normal_cohort(self): +metric = RollingNewActiveEditor( +end_date=self.r_plus_30, +) +results = metric(self.editor_ids, self.mwSession) + +assert_equal(set(results.keys()), set(self.editor_ids)) +assert_equal([0, 0, 0, 0, 0, 1, 0, 1, 0, 1], [ +results[self.editor_ids[x]][metric.id] for x in range(self.editor_count) +]) + +def test_normal_cohort_with_archived_revisions(self): +self.archive_revisions() +self.test_normal_cohort() + +def test_wiki_cohort(self): +# make one of the non-cohort users, who registered on self.r, active +make_active = self.non_editors[0] +
[MediaWiki-commits] [Gerrit] Add patch to make RUSAGE_THREAD available to profiling. - change (operations...hhvm)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Add patch to make RUSAGE_THREAD available to profiling. .. Add patch to make RUSAGE_THREAD available to profiling. Change-Id: Icc2c849e829a5120c418c731d4068118ca452cef Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M debian/changelog A debian/patches/Make-RUSAGE_THREAD-available-to-getrusage.patch M debian/patches/series 3 files changed, 55 insertions(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 990b35e..67d2bfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +hhvm (3.3-dev+20140728+wmf7) trusty-wikimedia; urgency=low + + * debian/patches: +- new patch cherry-picked from upstream 883860d: +Make-RUSAGE_THREAD-available-to-getrusage.patch + + -- Giuseppe Lavagetto glavage...@wikimedia.org Wed, 5 Sep 2014 13:45:07 +0200 + hhvm (3.3-dev+20140728+wmf6) trusty-wikimedia; urgency=low * debian/patches: diff --git a/debian/patches/Make-RUSAGE_THREAD-available-to-getrusage.patch b/debian/patches/Make-RUSAGE_THREAD-available-to-getrusage.patch new file mode 100644 index 000..6936fcb --- /dev/null +++ b/debian/patches/Make-RUSAGE_THREAD-available-to-getrusage.patch @@ -0,0 +1,46 @@ +From 883860d245aa089364e9832da08f1a76987b17eb Mon Sep 17 00:00:00 2001 +From: Ori Livneh o...@wikimedia.org +Date: Sat, 30 Aug 2014 17:49:33 -0700 +Subject: [PATCH] Make RUSAGE_THREAD available to getrusage PHP function + +The signature of the PHP function is getrusage( [ int $who = 0 ] ). +In both HHVM and PHP5, $who can be 1 to request RUSAGE_CHILDREN data. This +change allows $who to be 2 to request RUSAGE_THREAD data. RUSAGE_THREAD +measures resource usage for just the calling thread. + +This allows HHVM PHP code to measure resource usage for the current request. +(In PHP5 this can be done with RUSAGE_SELF, by dint of the threading model.) +--- + hphp/runtime/ext/std/ext_std_options.cpp | 18 +- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/hphp/runtime/ext/std/ext_std_options.cpp b/hphp/runtime/ext/std/ext_std_options.cpp +index 4b9a84c..369b45f 100644 +--- a/hphp/runtime/ext/std/ext_std_options.cpp b/hphp/runtime/ext/std/ext_std_options.cpp +@@ -709,8 +709,24 @@ const StaticString + static Array HHVM_FUNCTION(getrusage, int64_t who /* = 0 */) { + struct rusage usg; + memset(usg, 0, sizeof(struct rusage)); ++ int actual_who; ++ switch (who) { ++ case 1: ++actual_who = RUSAGE_CHILDREN; ++break; ++ case 2: ++#ifdef RUSAGE_THREAD ++actual_who = RUSAGE_THREAD; ++#else ++throw_not_supported(__func__, RUSAGE_THREAD is not defined on this sytem); ++#endif ++break; ++ default: ++actual_who = RUSAGE_SELF; ++break; ++ } + +- if (getrusage(who == 1 ? RUSAGE_CHILDREN : RUSAGE_SELF, usg) == -1) { ++ if (getrusage(actual_who, usg) == -1) { + raise_error(getrusage returned %d: %s, errno, + folly::errnoStr(errno).c_str()); + } diff --git a/debian/patches/series b/debian/patches/series index d7f7636..55f42d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ # cherry-picks from upstream ArrayObject-append-should-delegate-to-ArrayObject-of.patch Fix-handling-of-pcre-overflow-expressions.patch +Make-RUSAGE_THREAD-available-to-getrusage.patch -- To view, visit https://gerrit.wikimedia.org/r/158616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc2c849e829a5120c418c731d4068118ca452cef Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix lintian overrides - change (operations...hhvm)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/158621 Change subject: fix lintian overrides .. fix lintian overrides Change-Id: I0ce960f412670f257755a0c869a41501b6c97ab4 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M debian/hhvm.lintian-overrides 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/21/158621/1 diff --git a/debian/hhvm.lintian-overrides b/debian/hhvm.lintian-overrides index 7d88c8c..4aba78a 100644 --- a/debian/hhvm.lintian-overrides +++ b/debian/hhvm.lintian-overrides @@ -1,4 +1,4 @@ hhvm: spelling-error-in-binary usr/bin/hhvm tEH the hhvm: spelling-error-in-binary usr/bin/hhvm taht that hhvm: binary-without-manpage usr/bin/hhvm -hhvm-dev: binary-without-manpage usr/bin/hphpize +hhvm: binary-without-manpage usr/bin/hphpize -- To view, visit https://gerrit.wikimedia.org/r/158621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ce960f412670f257755a0c869a41501b6c97ab4 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix lintian overrides - change (operations...hhvm)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: fix lintian overrides .. fix lintian overrides Change-Id: I0ce960f412670f257755a0c869a41501b6c97ab4 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M debian/hhvm.lintian-overrides 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/debian/hhvm.lintian-overrides b/debian/hhvm.lintian-overrides index 7d88c8c..4aba78a 100644 --- a/debian/hhvm.lintian-overrides +++ b/debian/hhvm.lintian-overrides @@ -1,4 +1,4 @@ hhvm: spelling-error-in-binary usr/bin/hhvm tEH the hhvm: spelling-error-in-binary usr/bin/hhvm taht that hhvm: binary-without-manpage usr/bin/hhvm -hhvm-dev: binary-without-manpage usr/bin/hphpize +hhvm: binary-without-manpage usr/bin/hphpize -- To view, visit https://gerrit.wikimedia.org/r/158621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ce960f412670f257755a0c869a41501b6c97ab4 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reset searchTerms[] before populating. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Reset searchTerms[] before populating. .. Reset searchTerms[] before populating. Otherwise, multiple calls to searchQuery() would accumulate search terms. searchTerms[] is defined in SearchEngine so we can't just get rid of it altogether. Change-Id: Iddbb3920e3a9d5849c99fe90d2d725d16019b51d --- M includes/search/SearchPostgres.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/search/SearchPostgres.php b/includes/search/SearchPostgres.php index 914bc1c..c64c845 100644 --- a/includes/search/SearchPostgres.php +++ b/includes/search/SearchPostgres.php @@ -142,6 +142,7 @@ $top = $res-fetchRow(); $top = $top[0]; + $this-searchTerms = array(); if ( $top === ) { ## e.g. if only stopwords are used XXX return something better $query = SELECT page_id, page_namespace, page_title, 0 AS score . FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id . -- To view, visit https://gerrit.wikimedia.org/r/27049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddbb3920e3a9d5849c99fe90d2d725d16019b51d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Oren orenboch...@gmail.com Gerrit-Reviewer: Qgil q...@wikimedia.org Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot Gerrit-Reviewer: saper sa...@saper.info ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Article: Localize alt text of redirect icon - change (mediawiki/core)
Bartosz DziewoĆski has uploaded a new change for review. https://gerrit.wikimedia.org/r/158622 Change subject: Article: Localize alt text of redirect icon .. Article: Localize alt text of redirect icon Change-Id: If0632c51d878d4a18a881eb0b58e8c1857f6d020 --- M includes/page/Article.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/158622/1 diff --git a/includes/page/Article.php b/includes/page/Article.php index dab075e..71350ac 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1531,9 +1531,11 @@ } } + $redirectToText = wfMessage( 'redirectto' )-inLanguage( $lang )-text(); + $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; return 'div class=redirectMsg' . - Html::element( 'img', array( 'src' = $imageUrl, 'alt' = '#REDIRECT' ) ) . + Html::element( 'img', array( 'src' = $imageUrl, 'alt' = $redirectToText ) ) . 'span class=redirectText' . $link . '/span/div'; } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index db1325c..af19287 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -208,6 +208,7 @@ otherlanguages: In other languages, redirectedfrom: (Redirected from $1), redirectpagesub: Redirect page, + redirectto: Redirect to, talkpageheader: -, lastmodifiedat: This page was last modified on $1, at $2., viewcount: This page has been accessed {{PLURAL:$1|once|$1 times}}., diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index bef8ee0..590fee4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -370,6 +370,7 @@ otherlanguages: This message is shown under the toolbox. It is used if there are interwiki links added to the page, like codenowiki[[/nowikien:Interwiki article]]/code.\n{{Identical|Otherlanguages}}, redirectedfrom: The text displayed when a certain page is redirected to another page. Parameters:\n* $1 - the name of the page user came from, redirectpagesub: Displayed under the page title of a page which is a redirect to another page, see [{{fullurl:Project:Translators|redirect=no}} Project:Translators] for example.\n\n{{Identical|Redirect page}}, + redirectto: Alt text of the arrow icon shown on redirect pages ([[commons:File:Sample redirect page.jpg]]).\n\n{{Identical|Redirect page}}, talkpageheader: {{notranslate}}, lastmodifiedat: This message is shown below each page, in the footer with the logos and links.\n\nParameters:\n* $1 - date\n* $2 - time\nSee also:\n* {{msg-mw|Lastmodifiedatby}}, viewcount: Used as page-view counter. Parameters:\n* $1 - number of pageviews, -- To view, visit https://gerrit.wikimedia.org/r/158622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0632c51d878d4a18a881eb0b58e8c1857f6d020 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove sync-l10nupdate(-1)? - change (operations/puppet)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/158624 Change subject: Remove sync-l10nupdate(-1)? .. Remove sync-l10nupdate(-1)? Change-Id: I3f2033155e5f7f81ac58f6f7a36b4e568bd137f7 --- D files/misc/l10nupdate/sync-l10nupdate D files/misc/l10nupdate/sync-l10nupdate-1 M manifests/misc/deployment.pp 3 files changed, 2 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/158624/1 diff --git a/files/misc/l10nupdate/sync-l10nupdate b/files/misc/l10nupdate/sync-l10nupdate deleted file mode 100755 index 7d60f43..000 --- a/files/misc/l10nupdate/sync-l10nupdate +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# This script belongs in /usr/local/bin/. -sudo -u l10nupdate /usr/local/bin/sync-l10nupdate-1 $@ - diff --git a/files/misc/l10nupdate/sync-l10nupdate-1 b/files/misc/l10nupdate/sync-l10nupdate-1 deleted file mode 100755 index 4fdcaf3..000 --- a/files/misc/l10nupdate/sync-l10nupdate-1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# This script belongs in /usr/local/bin/. -. /usr/local/lib/mw-deployment-vars.sh - -MWVER=$1 - -if [ -z $MWVER ]; then - echo FAILED: MediaWiki version not provided - exit 1 -fi - -echo Synchronizing $MW_COMMON_SOURCE/php-$MWVER/cache/l10n to $MW_COMMON/php-$MWVER/cache/l10n... -echo mediawiki-installation: - -# Set forklimit to 30 (-F 30) to prevent NFS from getting overloaded causing some machines to be skipped -dsh -o -oPasswordAuthentication=no -F 30 -cM -g mediawiki-installation \ - sudo -u mwdeploy rsync -a $MW_RSYNC_HOST::common/php-$MWVER/cache/l10n/ $MW_COMMON/php-$MWVER/cache/l10n diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp index c5f81dc..bbe22cc 100644 --- a/manifests/misc/deployment.pp +++ b/manifests/misc/deployment.pp @@ -243,15 +243,9 @@ mode = '0555', source = 'puppet:///files/misc/l10nupdate/l10nupdate-1'; '/usr/local/bin/sync-l10nupdate': -owner = 'root', -group = 'root', -mode = '0555', -source = 'puppet:///files/misc/l10nupdate/sync-l10nupdate'; +ensure = absent; '/usr/local/bin/sync-l10nupdate-1': -owner = 'root', -group = 'root', -mode = '0555', -source = 'puppet:///files/misc/l10nupdate/sync-l10nupdate-1'; +ensure = absent; # add ssh keypair for l10nupdate user from fenari for RT-5187 '/home/l10nupdate/.ssh/id_rsa': owner = 'l10nupdate', -- To view, visit https://gerrit.wikimedia.org/r/158624 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f2033155e5f7f81ac58f6f7a36b4e568bd137f7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use sync-dir to copy out l10n json files, build cdbs on hosts - change (operations/puppet)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/158623 Change subject: Use sync-dir to copy out l10n json files, build cdbs on hosts .. Use sync-dir to copy out l10n json files, build cdbs on hosts Minimal improvements to l10nupdate-1 Change-Id: Ib9c55f2f846f264fa750f718c6d8c5aa21e78613 --- M files/misc/l10nupdate/l10nupdate-1 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/158623/1 diff --git a/files/misc/l10nupdate/l10nupdate-1 b/files/misc/l10nupdate/l10nupdate-1 index 3a29274..b12c096 100755 --- a/files/misc/l10nupdate/l10nupdate-1 +++ b/files/misc/l10nupdate/l10nupdate-1 @@ -99,7 +99,8 @@ echo Syncing to Apaches at `date --rfc-3339=seconds` SYNC_START=$(date +%s) - $BINDIR/sync-l10nupdate-1 $mwVerNum + $BINDIR/sync-dir $mwVerNum + sudo -u mwdeploy $BINDIR/scap-rebuild-cdbs # TODO: Add parameter to scap-rebuild-cdbs to only build 1 version of MW SYNC_END=$(date +%s) $BINDIR/dologmsg !log LocalisationUpdate completed ($mwVerNum) at `date --rfc-3339=seconds` echo All done at `date --rfc-3339=seconds` -- To view, visit https://gerrit.wikimedia.org/r/158623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9c55f2f846f264fa750f718c6d8c5aa21e78613 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] APIQueryInfo: Allow fetching the canonical url of a page - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: APIQueryInfo: Allow fetching the canonical url of a page .. APIQueryInfo: Allow fetching the canonical url of a page Change-Id: If0f62481d059815390b74ccf8167957bc1dbce52 --- M includes/api/ApiQueryInfo.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 3ac9c8a..d7037e3 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -458,6 +458,7 @@ if ( $this-fld_url ) { $pageInfo['fullurl'] = wfExpandUrl( $title-getFullURL(), PROTO_CURRENT ); $pageInfo['editurl'] = wfExpandUrl( $title-getFullURL( 'action=edit' ), PROTO_CURRENT ); + $pageInfo['canonicalurl'] = wfExpandUrl( $title-getFullURL(), PROTO_CANONICAL ); } if ( $this-fld_readable $title-userCan( 'read', $this-getUser() ) ) { $pageInfo['readable'] = ''; @@ -837,7 +838,7 @@ ' watchers - The number of watchers, if allowed', ' notificationtimestamp - The watchlist notification timestamp of each page', ' subjectid - The page ID of the parent page for each talk page', - ' url - Gives a full URL to the page, and also an edit URL', + ' url - Gives a full URL, an edit URL, and the canonical URL for each page', ' readable - Whether the user can read this page', ' preload - Gives the text returned by EditFormPreloadText', ' displaytitle - Gives the way the page title is actually displayed', -- To view, visit https://gerrit.wikimedia.org/r/158609 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0f62481d059815390b74ccf8167957bc1dbce52 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Anomie bjor...@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] Log whether attribution could be presented by MediaViewer - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Log whether attribution could be presented by MediaViewer .. Log whether attribution could be presented by MediaViewer Change-Id: Ib4e8fbafa16c86ff902c838cc93b1710a7ca87af Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/858 --- M MultimediaViewer.php M MultimediaViewerHooks.php A resources/mmv/logging/mmv.logging.AttributionLogger.js M resources/mmv/ui/mmv.ui.metadataPanel.js 4 files changed, 100 insertions(+), 3 deletions(-) Approvals: GergĆ Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index e0fbfad..78e8b93 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -35,6 +35,16 @@ $wgMediaViewerDurationLoggingSamplingFactor = false; } +if ( !isset( $wgMediaViewerAttributionLoggingSamplingFactor ) ) { + /** +* If set, records whether image attribution data was available. A value of 1000 means there will be an +* 1:1000 chance to log the attribution event. +* False if unset. +* @var int|bool +*/ + $wgMediaViewerAttributionLoggingSamplingFactor = false; +} + if ( !isset( $wgMediaViewerActionLoggingSamplingFactorMap ) ) { /** * If set, records user actions via EventLogging and applies a sampling factor according to the map. A default key in the map must be set. @@ -497,6 +507,7 @@ 'mediawiki.user', 'mmv.HtmlUtils', 'mmv.logging.ActionLogger', + 'mmv.logging.AttributionLogger', 'mmv.ui', 'mmv.ui.progressBar', 'mmv.ui.stripeButtons', @@ -876,7 +887,7 @@ 'mmv.base', 'mmv.logging.Logger', 'oojs' - ) + ), ), 'mmv.logging.DurationLogger' = $wgMediaViewerResourceTemplate + array( @@ -889,7 +900,20 @@ 'mmv.logging.Logger', 'oojs', 'mediawiki.user', - ) + ), + ), + + 'mmv.logging.AttributionLogger' = $wgMediaViewerResourceTemplate + array( + 'scripts' = array( + 'mmv/logging/mmv.logging.AttributionLogger.js', + ), + + 'dependencies' = array( + 'mmv.base', + 'mmv.logging.Logger', + 'oojs', + 'mediawiki.user', + ), ), 'mmv.head' = $wgMediaViewerResourceTemplate + array( @@ -925,6 +949,7 @@ $wgEventLoggingSchemas[ 'MediaViewer' ] = 8935662; $wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896; $wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641; + $wgEventLoggingSchemas[ 'MultimediaViewerAttribution' ] = 9758179; $wgResourceModules['mmv.logging.ActionLogger']['dependencies'][] = 'ext.eventLogging'; $wgResourceModules['mmv.logging.Performance']['dependencies'][] = 'ext.eventLogging'; diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index 399044d..ff4fce5 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -140,7 +140,7 @@ */ public static function resourceLoaderGetConfigVars( $vars ) { global $wgAPIPropModules, $wgMediaViewerActionLoggingSamplingFactorMap, $wgNetworkPerformanceSamplingFactor, $wgMediaViewerDurationLoggingSamplingFactor, - $wgMediaViewerIsInBeta, $wgMediaViewerUseThumbnailGuessing; + $wgMediaViewerAttributionLoggingSamplingFactor, $wgMediaViewerIsInBeta, $wgMediaViewerUseThumbnailGuessing; $vars['wgMultimediaViewer'] = array( 'infoLink' = self::$infoLink, 'discussionLink' = self::$discussionLink, @@ -150,6 +150,7 @@ 'durationSamplingFactor' = $wgMediaViewerDurationLoggingSamplingFactor, 'networkPerformanceSamplingFactor' = $wgNetworkPerformanceSamplingFactor, 'actionLoggingSamplingFactorMap' = $wgMediaViewerActionLoggingSamplingFactorMap, + 'attributionSamplingFactor' = $wgMediaViewerAttributionLoggingSamplingFactor, 'tooltipDelay' = 1000, ); $vars['wgMediaViewer'] = true; diff --git a/resources/mmv/logging/mmv.logging.AttributionLogger.js b/resources/mmv/logging/mmv.logging.AttributionLogger.js new file mode 100644 index 000..45888f1 --- /dev/null +++ b/resources/mmv/logging/mmv.logging.AttributionLogger.js @@ -0,0 +1,69 @@ +/* + *
[MediaWiki-commits] [Gerrit] update INSTALL instructions - change (mediawiki...GWToolset)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/158625 Change subject: update INSTALL instructions .. update INSTALL instructions Change-Id: I22be97b87aa593221e25d0891d2b317dbd3ce5f9 --- M INSTALL 1 file changed, 7 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/25/158625/1 diff --git a/INSTALL b/INSTALL index 801241f..2628035 100644 --- a/INSTALL +++ b/INSTALL @@ -4,7 +4,7 @@ 1. Licensing 2. Target Wiki 3. Required Software -4. Required MediaWiki Templates +4. Recommended MediaWiki Templates 5. Recommended Extensions 6. Configuration a. php.ini @@ -40,11 +40,12 @@ * [PHP finfo extension]( http://www.php.net/manual/en/fileinfo.setup.php ) -Required MediaWiki Templates - -In order for GWToolset to map metadata with a MediaWiki template, the MediaWiki template must be -installed in the wiki. Currently, GWToolset is limited to mapping with the following, Commons, -MediaWiki templates which should be imported or available in the wiki: +Recommended MediaWiki Templates + +In order for GWToolset to map metadata with a MediaWiki template, the MediaWiki +template must be installed in the wiki. Below are examples of some MediaWiki +templates you can use. We recommend that you at least import the Artwork template +using Special:Export on commons and Special:Import on your local wiki. * [Artwork] ( http://commons.wikimedia.org/wiki/Template:Artwork ) * [Book] ( http://commons.wikimedia.org/wiki/Template:Book ) @@ -91,13 +92,6 @@ _load the extension_ * `require_once $IP/extensions/GWToolset/GWToolset.php;` - -_add/remove groups_ -Depending on the permissions you have set-up in your wiki, you may need to give admins -or another user group the ability to add the âgwtoolsetâ group to other user accounts. -this can be accomplished by adding something similar to the following: -* $wgAddGroups['sysop'][] = 'gwtoolset'; -* $wgRemoveGroups['sysop'][] = 'gwtoolset'; _FileBackend_ The extension makes use of a file backend to temporarily store metada files for processing. -- To view, visit https://gerrit.wikimedia.org/r/158625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22be97b87aa593221e25d0891d2b317dbd3ce5f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Dan-nl d_ent...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix non-existing property - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/158626 Change subject: Fix non-existing property .. Fix non-existing property The catch statement outputs $row-cuc_id, which may no longer exist after $row was reassigned a new value in the try part. Change-Id: I3930a283b98a2b2a80f94a600a6fbe92ba9fb3f1 --- M Hooks.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/26/158626/1 diff --git a/Hooks.php b/Hooks.php index 78d9a18..9aa31a5 100644 --- a/Hooks.php +++ b/Hooks.php @@ -301,6 +301,7 @@ set_error_handler( new Flow\RecoverableErrorHandler, -1 ); $replacement = null; + $cucId = $row-cuc_id; try { /** @var CheckUserQuery $query */ $query = Container::get( 'query.checkuser' ); @@ -311,7 +312,7 @@ $replacement = Container::get( 'formatter.checkuser' )-format( $row, $checkUser-getContext() ); } } catch ( Exception $e ) { - wfDebugLog( 'Flow', __METHOD__ . ': Exception formatting cu ' . $row-cuc_id . ' ' . $e ); + wfDebugLog( 'Flow', __METHOD__ . ': Exception formatting cu ' . $cucId . ' ' . $e ); \MWExceptionHandler::logException( $e ); } restore_error_handler(); -- To view, visit https://gerrit.wikimedia.org/r/158626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3930a283b98a2b2a80f94a600a6fbe92ba9fb3f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Article: Don't hardcode img tags on redirect page - change (mediawiki/core)
Bartosz DziewoĆski has uploaded a new change for review. https://gerrit.wikimedia.org/r/158627 Change subject: Article: Don't hardcode img tags on redirect page .. Article: Don't hardcode img tags on redirect page * Created a ResourceLoader module for redirect page styling. * Fixed a couple of bugs in Article code. Keeping two of the old files for a while because they might still be referenced by something (bug 69277 comment 11). Bug: 69277 Change-Id: I8fa565833545e41d0232101566da8c5ffa850e36 --- M includes/content/WikitextContent.php M includes/page/Article.php M resources/Resources.php R resources/src/mediawiki.action/images/nextredirect-ltr.png R resources/src/mediawiki.action/images/nextredirect-rtl.png A resources/src/mediawiki.action/images/redirect-ltr.png A resources/src/mediawiki.action/images/redirect-rtl.png A resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css M resources/src/mediawiki.legacy/oldshared.css 9 files changed, 76 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/158627/1 diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index d23f925..3ab6a6d 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -336,6 +336,7 @@ Article::getRedirectHeaderHtml( $title-getPageLanguage(), $chain, false ) . $output-getText() ); + $output-addModuleStyles( 'mediawiki.action.view.redirectPage' ); } } } diff --git a/includes/page/Article.php b/includes/page/Article.php index 71350ac..e17b80d 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1466,10 +1466,11 @@ */ public function viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) { $lang = $this-getTitle()-getPageLanguage(); + $out = $this-getContext()-getOutput(); if ( $appendSubtitle ) { - $out = $this-getContext()-getOutput(); $out-addSubtitle( wfMessage( 'redirectpagesub' )-parse() ); } + $out-addModuleStyles( 'mediawiki.action.view.redirectPage' ); return static::getRedirectHeaderHtml( $lang, $target, $forceKnown ); } @@ -1486,57 +1487,30 @@ * @return string Containing HTML with redirect link */ public static function getRedirectHeaderHtml( Language $lang, $target, $forceKnown = false ) { - global $wgStylePath; - if ( !is_array( $target ) ) { $target = array( $target ); } - $imageDir = $lang-getDir(); - - // the loop prepends the arrow image before the link, so the first case needs to be outside - - /** @var $title Title */ - $title = array_shift( $target ); - - if ( $forceKnown ) { - $link = Linker::linkKnown( $title, htmlspecialchars( $title-getFullText() ) ); - } else { - $link = Linker::link( $title, htmlspecialchars( $title-getFullText() ) ); + $html = 'ul class=redirectText'; + /** @var Title $title */ + foreach ( $target as $title ) { + $html .= 'li' . Linker::link( + $title, + htmlspecialchars( $title-getFullText() ), + array(), + // Automatically append redirect=no to each link, since most of them are + // redirect pages themselves. + array( 'redirect' = 'no' ), + ( $forceKnown ? array( 'known', 'noclasses' ) : array() ) + ) . '/li'; } - - $nextRedirect = $wgStylePath . '/common/images/nextredirect' . $imageDir . '.png'; - $alt = $lang-isRTL() ? 'â' : 'â'; - - // Automatically append redirect=no to each link, since most of them are - // redirect pages themselves. - /** @var Title $rt */ - foreach ( $target as $rt ) { - $link .= Html::element( 'img', array( 'src' = $nextRedirect, 'alt' = $alt ) ); - if ( $forceKnown ) { - $link .= Linker::linkKnown( - $rt, - htmlspecialchars( $rt-getFullText(), - array(), - array( 'redirect' = 'no' ) - ) -
[MediaWiki-commits] [Gerrit] Only show diff hist links in CU - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/158628 Change subject: Only show diff hist links in CU .. Only show diff hist links in CU This matches behavior of regular articles (as well as Flow entries in Contributions RecentChanges) Change-Id: I0321fd1af13f0bd04c1233984df49967ca685b1e --- M includes/Formatter/CheckUserFormatter.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/28/158628/1 diff --git a/includes/Formatter/CheckUserFormatter.php b/includes/Formatter/CheckUserFormatter.php index 9fea38b..d46816f 100644 --- a/includes/Formatter/CheckUserFormatter.php +++ b/includes/Formatter/CheckUserFormatter.php @@ -37,7 +37,14 @@ return null; } - $data = array( 'links' = $links, 'properties' = $properties ); + $data = array( + 'links' = array( + $this-getDiffAnchor( $links, $ctx ), + $this-getHistAnchor( $links, $ctx ), + ), + 'properties' = $properties + ); + return array( 'links' = $this-formatAnchorsAsPipeList( $data['links'], $ctx ), 'title' = $this-changeSeparator() . $this-getTitleLink( $data, $row, $ctx ), -- To view, visit https://gerrit.wikimedia.org/r/158628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0321fd1af13f0bd04c1233984df49967ca685b1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Setting celery concurrency to 24 - change (operations...wikimetrics)
Nuria has uploaded a new change for review. https://gerrit.wikimedia.org/r/158629 Change subject: Setting celery concurrency to 24 .. Setting celery concurrency to 24 Per our DBA's advice we are setting the celery concurrency level to the number of cores in labs machines. Change-Id: Ifda3f1591b46e8066986f2021ef99e87849802e6 --- M manifests/init.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/wikimetrics refs/changes/29/158629/1 diff --git a/manifests/init.pp b/manifests/init.pp index 6df153f..324995b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,7 +24,7 @@ # Default: redis://localhost:6379/0 # # $celery_concurrency- celery queue concurrency. -# Default: 16 +# Default: 24 (number of cores in labs) # $server_name - VirtualHost ServerName of wikimetrics webserver. # Default: localhost # $server_port - VirtualHost listen port of wikimetrics webserver. @@ -89,7 +89,7 @@ $celery_broker_url = 'redis://localhost:6379/0', $celery_result_url = 'redis://localhost:6379/0', -$celery_concurrency= 10, +$celery_concurrency= 24, $server_name = 'localhost', $server_port = 5000, -- To view, visit https://gerrit.wikimedia.org/r/158629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifda3f1591b46e8066986f2021ef99e87849802e6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/wikimetrics Gerrit-Branch: master Gerrit-Owner: Nuria nu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add Rolling Surviving New Active Editor - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/158630 Change subject: [WIP] Add Rolling Surviving New Active Editor .. [WIP] Add Rolling Surviving New Active Editor NOTE: not ready but proof that I do TDD sometimes :) Bug: 67460 Change-Id: I38b324e0228833d47e5df71d2022432d6066372a --- M tests/test_metrics/test_rolling_new_active_editor.py A tests/test_metrics/test_rolling_surviving_new_active_editor.py 2 files changed, 165 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/30/158630/1 diff --git a/tests/test_metrics/test_rolling_new_active_editor.py b/tests/test_metrics/test_rolling_new_active_editor.py index 6eb1ce8..30b9880 100644 --- a/tests/test_metrics/test_rolling_new_active_editor.py +++ b/tests/test_metrics/test_rolling_new_active_editor.py @@ -136,8 +136,6 @@ } for user_id, result in expected_results.items(): assert_equal(results[user_id][metric.id], result) -# users with no edits at all just won't show up -assert_equal(results.get(self.editor_ids[3], -1), -1) def test_wiki_cohort_nobody_qualifying(self): # make everyone fail the registration criteria and make sure they're excluded diff --git a/tests/test_metrics/test_rolling_surviving_new_active_editor.py b/tests/test_metrics/test_rolling_surviving_new_active_editor.py new file mode 100644 index 000..2b5ed88 --- /dev/null +++ b/tests/test_metrics/test_rolling_surviving_new_active_editor.py @@ -0,0 +1,165 @@ +from datetime import datetime, timedelta +from nose.tools import assert_true, assert_equal, assert_false + +from tests.fixtures import DatabaseTest, i, d +from wikimetrics.utils import format_pretty_date as s +from wikimetrics.models import Revision, Logging +from wikimetrics.metrics import RollingNewActiveEditor +from wikimetrics.enums import TimeseriesChoices + + +class RollingNewActiveEditorTest(DatabaseTest): + +TODO: add timeseries support and use the following tests: + gerrit.wikimedia.org/r/#/c/147312/5/tests/test_metrics/test_rolling_active_editor.py + +def runTest(self): +pass + +def setUp(self): +DatabaseTest.setUp(self) + +# registration for all the editors below +self.before_r = before_r = 2013120100 +self.r = r = 2014010100 +# exactly 30 days after registration +self.m = m = 2014013100 +# exactly 60 days after registration +self.m2 = m2 = 2014030200 +self.r_plus_60 = s(d(self.m2)) +self.editor_count = 12 + +self.create_test_cohort( +# 5 editors will have registered on time, 5 will not +editor_count=self.editor_count, +revisions_per_editor=8, +revision_timestamps=[ +# NOTE: these first 6 are registered BEFORE r +# this one will make 5 edits within 30 days of m, 3 after +[r + 1, r + 2, r + 3, r + 4, r + 5, m + 6, m + 7, m + 8], +# this one will make 3 edits within 30 days of m, 5 after +[r + 1, r + 2, r + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make 8 edits within 30 days of m, 0 after +[r + 1, r + 2, r + 3, r + 4, r + 5, r + 6, r + 7, r + 8], +# this one will make 0 edits within 30 days of m, 8 after +[m + 1, m + 2, m + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make the 5th edit right on m, 4 after +[r + 1, r + 2, r + 3, r + 4, m + 0, m + 6, m + 7, m + 8], +# this one will make no edits within r - r + 60 days +[m2 + 1] * 8, + +# NOTE: these next 6 are registered AFTER r +# this one will make 5 edits within 30 days of m, 3 after +[r + 1, r + 2, r + 3, r + 4, r + 5, m + 6, m + 7, m + 8], +# this one will make 3 edits within 30 days of m, 5 after +[r + 1, r + 2, r + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make 8 edits within 30 days of m, 0 after +[r + 1, r + 2, r + 3, r + 4, r + 5, r + 6, r + 7, r + 8], +# this one will make 0 edits within 30 days of m, 8 after +[m + 1, m + 2, m + 3, m + 4, m + 5, m + 6, m + 7, m + 8], +# this one will make the 5th edit right on m, 4 after +[r + 1, r + 2, r + 3, r + 4, m + 0, m + 6, m + 7, m + 8], +# this one will make no edits within r - r + 60 days +[m2 + 1] * 8, +], +user_registrations=([before_r] * 6) + ([r] * 6), +revision_lengths=10 +) +self.create_non_editors([ +(r, 'newusers', 'create'), +(r, 'newusers', 'create'), +(m,
[MediaWiki-commits] [Gerrit] WIP: Add mw-ui-icon - change (mediawiki/core)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/158632 Change subject: WIP: Add mw-ui-icon .. WIP: Add mw-ui-icon Compatible with IE8+ (because of the use of pseudo-elements). Bug: 55535 Change-Id: I68a1b207d8a4af57879361921a5f8c3aeda3fd9a --- M docs/kss/Makefile A docs/kss/foo.css M resources/Resources.php A resources/src/mediawiki.ui/components/icons.less A resources/src/mediawiki.ui/components/images/kss/ok.png A resources/src/mediawiki.ui/components/images/kss/ok.svg 6 files changed, 113 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/158632/1 diff --git a/docs/kss/Makefile b/docs/kss/Makefile index ff735d5..d28efa2 100644 --- a/docs/kss/Makefile +++ b/docs/kss/Makefile @@ -4,7 +4,7 @@ # Generates CSS of mediawiki.ui and mediawiki.ui.button using ResourceLoader, then applies it to the # KSS style guide $(eval KSS_RL_TMP := $(shell mktemp /tmp/tmp.XX)) - @curl -sG ${MEDIAWIKI_LOAD_URL}?modules=mediawiki.ui.anchor|mediawiki.ui.checkbox|mediawiki.ui.input|mediawiki.legacy.shared|mediawiki.legacy.commonPrint|mediawiki.ui|mediawiki.ui.buttononly=styles $(KSS_RL_TMP) + @curl -sG ${MEDIAWIKI_LOAD_URL}?modules=mediawiki.ui.anchor|mediawiki.ui.checkbox|mediawiki.ui.input|mediawiki.ui.icon|mediawiki.legacy.shared|mediawiki.legacy.commonPrint|mediawiki.ui|mediawiki.ui.button|mediawiki.ui.icononly=styles $(KSS_RL_TMP) @node_modules/.bin/kss-node ../../resources/src/mediawiki.ui static/ --css $(KSS_RL_TMP) -t styleguide-template @rm $(KSS_RL_TMP) diff --git a/docs/kss/foo.css b/docs/kss/foo.css new file mode 100644 index 000..664f6b8 --- /dev/null +++ b/docs/kss/foo.css @@ -0,0 +1 @@ +File not found: /vagrant/mediawiki/skins/MonoBook/MonoBook.php diff --git a/resources/Resources.php b/resources/Resources.php index 946f3c9..c38f7dd 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1491,6 +1491,13 @@ 'position' = 'top', 'targets' = array( 'desktop', 'mobile' ), ), + 'mediawiki.ui.icon' = array( + 'styles' = array( + 'resources/src/mediawiki.ui/components/icons.less', + ), + 'position' = 'top', + 'targets' = array( 'desktop', 'mobile' ), + ), /* es5-shim */ 'es5-shim' = array( diff --git a/resources/src/mediawiki.ui/components/icons.less b/resources/src/mediawiki.ui/components/icons.less new file mode 100644 index 000..9986f61 --- /dev/null +++ b/resources/src/mediawiki.ui/components/icons.less @@ -0,0 +1,91 @@ +@import mediawiki.mixins; + +// Icons +// +// Markup: +// div class=mw-ui-icon mw-ui-icon-ok mw-ui-icon-onlyOK/div +// div class=mw-ui-icon mw-ui-icon-before mw-ui-icon-okOK/div +// div class=mw-ui-icon mw-ui-icon-after mw-ui-icon-okOK/div +// button class=mw-ui-button mw-ui-icon mw-ui-icon-ok mw-ui-icon-only mw-ui-progressiveOK/button +// button class=mw-ui-button mw-ui-icon mw-ui-icon-ok mw-ui-icon-before mw-ui-progressiveOK/button +// button class=mw-ui-button mw-ui-icon mw-ui-icon-ok mw-ui-icon-after mw-ui-progressiveOK/button +// +// Styleguide 4. +.mw-ui-icon-ok { + .mw-ui-icon-bgimage(images/kss/ok.svg, images/kss/ok.png); +} + +// Adds the container for the icon to the element, adds a gutter +// either side of the icon, and optionally hides the element's text. +// +// If the text is hidden, then explicitly set the element's width and +// remove any horizontal padding. Otherwise, add a gutter before the +// element's text for the icon. +// +// @icon_size - The size of the icon. Icons are assumed to be square, +// so the width and height of the icon will be set to `@icon_size`. +// @gutter_width - The width of the icon gutter. +// @hide_text - Whether or not to hide the text of the element. +// True by default. +.mw-ui-icon { + @icon_size: 1.4em; + @gutter_width: 1em; + position: relative; + min-height: @icon_size; + .mw-ui-icon-only { + text-indent: -999px; + width: @icon_size + ( 2 * @gutter_width ); + ::before { + left: 0; + position: absolute; + } + } + + :after, + ::after, + :before, + ::before { + background-repeat: no-repeat; + background-size: 100% 100%; + display: inline-block; + position: relative; + height: @icon_size; + content: ''; + // Let the width property deal with setting up the gutter for the + // icon. + padding-left: @gutter_width; + padding-right: @gutter_width; + } + + .mw-ui-icon-before { + :before, + ::before { +
[MediaWiki-commits] [Gerrit] Move log log_page entries are now that of the moved page - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Move log log_page entries are now that of the moved page .. Move log log_page entries are now that of the moved page bug: 57084 Change-Id: Ibc20d79093eedcdaba1873861e177ca3a6108bca --- M RELEASE-NOTES-1.24 M includes/Title.php 2 files changed, 7 insertions(+), 3 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index c5b6cd4..bdf9a11 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -434,6 +434,8 @@ called unconditionally. * TablePager::getBody() is now 'final' and can't be overridden in subclasses. * TablePager::getBody() is deprecated, use getBodyOutput() or getFullOutput(). +* log_page for move log entries store the original page ID, rather than that + of the new redirect page. This is not retroactive. Renamed classes * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/Title.php b/includes/Title.php index 7fdeb05..ca292ee 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3931,9 +3931,13 @@ $redirectContent = null; } + // bug 57084: log_page should be the ID of the *moved* page + $oldid = $this-getArticleID(); + $logTitle = clone $this; + $logEntry = new ManualLogEntry( 'move', $logType ); $logEntry-setPerformer( $wgUser ); - $logEntry-setTarget( $this ); + $logEntry-setTarget( $logTitle ); $logEntry-setComment( $reason ); $logEntry-setParameters( array( '4::target' = $nt-getPrefixedText(), @@ -3948,8 +3952,6 @@ } # Truncate for whole multibyte characters. $comment = $wgContLang-truncate( $comment, 255 ); - - $oldid = $this-getArticleID(); $dbw = wfGetDB( DB_MASTER ); -- To view, visit https://gerrit.wikimedia.org/r/157872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc20d79093eedcdaba1873861e177ca3a6108bca Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] Puppetize icinga log file permission fix. - change (operations/puppet)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/158633 Change subject: Puppetize icinga log file permission fix. .. Puppetize icinga log file permission fix. Change-Id: I33f4f52f94aae0f124671d23144fcd79353c6150 --- M manifests/misc/icinga.pp 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/158633/1 diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp index c7914a2..ebef75d 100644 --- a/manifests/misc/icinga.pp +++ b/manifests/misc/icinga.pp @@ -303,6 +303,19 @@ exec { 'fix_icinga_command_file': command = '/bin/chmod a+rw /var/lib/nagios/rw/nagios.cmd'; } +file { '/var/log/icinga': +ensure = directory, +owner = 'icinga', +mode = '0755', +} +file { '/var/log/icinga/archives': +ensure = directory, +owner = 'icinga', +} +file { '/var/log/icinga/icinga.log': +ensure = file, +owner = 'icinga', +} } class icinga::monitor::files::nagios-plugins { -- To view, visit https://gerrit.wikimedia.org/r/158633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33f4f52f94aae0f124671d23144fcd79353c6150 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] H-4: Rename Close - Lock - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/158634 Change subject: H-4: Rename Close - Lock .. H-4: Rename Close - Lock Change-Id: I07dec52b95f1439030a6661afa15d6ad733a60d2 --- M Flow.php M FlowActions.php M Hooks.php M Resources.php M handlebars/Makefile M handlebars/compiled/flow_block_topic.handlebars.php R handlebars/compiled/flow_block_topic_lock.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php R handlebars/compiled/flow_block_topicsummary_lock.handlebars.php D handlebars/flow_block_topic_close.handlebars A handlebars/flow_block_topic_lock.handlebars R handlebars/flow_block_topicsummary_lock.handlebars M handlebars/flow_topic_titlebar.handlebars M handlebars/flow_topic_titlebar_content.handlebars R handlebars/flow_topic_titlebar_lock.handlebars M i18n/en.json M i18n/qqq.json D includes/Actions/CloseTopicAction.php A includes/Actions/LockTopicAction.php M includes/Block/Topic.php M includes/Block/TopicSummary.php M includes/Formatter/RecentChangesQuery.php M includes/Formatter/RevisionFormatter.php M includes/Model/AbstractRevision.php M includes/UrlGenerator.php M includes/api/ApiFlow.php R includes/api/ApiFlowLockTopic.php M modules/new/components/flow-board.js M modules/new/flow-api.js M modules/new/styles/board/moderated.less A tests/browser/.bundle/config R tests/browser/features/lock_unlock_topics.feature D tests/browser/features/step_definitions/close_reopen_topics_steps.rb A tests/browser/features/step_definitions/lock_unlock_topics_steps.rb M tests/browser/features/support/pages/flow_page.rb M tests/phpunit/PermissionsTest.php 36 files changed, 296 insertions(+), 325 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/34/158634/1 diff --git a/Flow.php b/Flow.php index 53a3065..585963c 100755 --- a/Flow.php +++ b/Flow.php @@ -252,7 +252,7 @@ $wgAutoloadClasses['Flow\Actions\EditTitleAction'] = $dir . 'includes/Actions/EditTitleAction.php'; $wgAutoloadClasses['Flow\Actions\NewTopicAction'] = $dir . 'includes/Actions/NewTopicAction.php'; $wgAutoloadClasses['Flow\Actions\EditPostAction'] = $dir . 'includes/Actions/EditPostAction.php'; -$wgAutoloadClasses['Flow\Actions\CloseTopicAction'] = $dir . 'includes/Actions/CloseTopicAction.php'; +$wgAutoloadClasses['Flow\Actions\LockTopicAction'] = $dir . 'includes/Actions/LockTopicAction.php'; $wgAutoloadClasses['Flow\Actions\RestorePostAction'] = $dir . 'includes/Actions/RestorePostAction.php'; $wgAutoloadClasses['Flow\Actions\RestoreTopicAction'] = $dir . 'includes/Actions/RestoreTopicAction.php'; $wgAutoloadClasses['Flow\Actions\EditAction'] = $dir . 'includes/Actions/EditAction.php'; @@ -280,7 +280,7 @@ $wgAutoloadClasses['ApiFlowBase'] = $dir/includes/api/ApiFlowBase.php; $wgAutoloadClasses['ApiFlowBasePost'] = $dir/includes/api/ApiFlowBasePost.php; $wgAutoloadClasses['ApiFlowBaseGet'] = $dir/includes/api/ApiFlowBaseGet.php; -$wgAutoloadClasses['ApiFlowCloseOpenTopic'] = $dir/includes/api/ApiFlowCloseOpenTopic.php; +$wgAutoloadClasses['ApiFlowLockTopic'] = $dir/includes/api/ApiFlowLockTopic.php; $wgAutoloadClasses['ApiFlowEditHeader'] = $dir/includes/api/ApiFlowEditHeader.php; $wgAutoloadClasses['ApiFlowEditPost'] = $dir/includes/api/ApiFlowEditPost.php; $wgAutoloadClasses['ApiFlowEditTitle'] = $dir/includes/api/ApiFlowEditTitle.php; @@ -357,9 +357,9 @@ // permissions config than what's assumed to test. $wgFlowGroupPermissions = array(); $wgFlowGroupPermissions['user']['flow-hide'] = true; -$wgFlowGroupPermissions['user']['flow-close'] = true; +$wgFlowGroupPermissions['user']['flow-lock'] = true; $wgFlowGroupPermissions['sysop']['flow-hide'] = true; -$wgFlowGroupPermissions['sysop']['flow-close'] = true; +$wgFlowGroupPermissions['sysop']['flow-lock'] = true; $wgFlowGroupPermissions['sysop']['flow-delete'] = true; $wgFlowGroupPermissions['sysop']['flow-edit-post'] = true; $wgFlowGroupPermissions['oversight']['flow-suppress'] = true; diff --git a/FlowActions.php b/FlowActions.php index 9063b0c..7c15c47 100644 --- a/FlowActions.php +++ b/FlowActions.php @@ -77,14 +77,14 @@ 'rc_insert' = true, 'permissions' = array( PostSummary::MODERATED_NONE = '', - PostSummary::MODERATED_CLOSED = array( 'flow-hide', 'flow-close', 'flow-delete', 'flow-suppress' ), + PostSummary::MODERATED_LOCKED = array( 'flow-hide', 'flow-lock', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_HIDDEN = array( 'flow-hide', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_DELETED = array( 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_SUPPRESSED = array( 'flow-suppress' ), ), 'button-method' = 'GET', 'links' = array( 'topic',
[MediaWiki-commits] [Gerrit] Fix TaskRecommendationImpression offset for flyout - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/158635 Change subject: Fix TaskRecommendationImpression offset for flyout .. Fix TaskRecommendationImpression offset for flyout Bug: 70358 Change-Id: Ide9cd83bd2b5d03f2fbc2d9b88c9333866eb887e --- M resources/lightbulb/lightbulb.flyout.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/35/158635/1 diff --git a/resources/lightbulb/lightbulb.flyout.js b/resources/lightbulb/lightbulb.flyout.js index ffd531e..c427551 100644 --- a/resources/lightbulb/lightbulb.flyout.js +++ b/resources/lightbulb/lightbulb.flyout.js @@ -151,7 +151,7 @@ userId: mwConfig.wgUserId, pageId: mwConfig.wgArticleId, 'interface': 'flyout', - offset: pageIndex + offset: pageIndex * MAX_SUGGESTION_PER_PAGE_COUNT } ); } -- To view, visit https://gerrit.wikimedia.org/r/158635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide9cd83bd2b5d03f2fbc2d9b88c9333866eb887e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allocate sandbox vlans for codfw and ulsfo - change (operations/dns)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/158636 Change subject: Allocate sandbox vlans for codfw and ulsfo .. Allocate sandbox vlans for codfw and ulsfo These are not setup yet. The codfw subnet currently overlaps with the Tampa sandbox vlan, which will be gone in a month. Do not use for another few weeks, but feel free to allocate IPs in there. Change-Id: Idc8373c5d6eafcd118820606ab154a8859661018 --- M templates/152.80.208.in-addr.arpa M templates/26.35.198.in-addr.arpa 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/36/158636/1 diff --git a/templates/152.80.208.in-addr.arpa b/templates/152.80.208.in-addr.arpa index cd0cdd3..ae82df0 100644 --- a/templates/152.80.208.in-addr.arpa +++ b/templates/152.80.208.in-addr.arpa @@ -68,3 +68,10 @@ 230 1H IN PTR ts-array4a.mgmt.toolserver.org. 234 1H IN PTR web.amaranth.toolserver.org. + +; TEMP OVERLAP ALLOCATION, do not use yet until Tampa shutdown + +; 208.80.152.240/28 sandbox1-a-codfw (208.80.152.240 - 208.80.152.255) +;241 vrrp ip +;242 cr1-codfw ip +;243 cr2-codfw ip diff --git a/templates/26.35.198.in-addr.arpa b/templates/26.35.198.in-addr.arpa index b5f044a..57a765a 100644 --- a/templates/26.35.198.in-addr.arpa +++ b/templates/26.35.198.in-addr.arpa @@ -69,3 +69,8 @@ ; 198.35.26.208/31 ; 198.35.26.210/31 + +; 198.35.26.240/28 sandbox1-ulsfo (198.35.26.240 - 198.35.26.255) +; 241 vrrp ip +; 242 cr1-ulsfo ip +; 243 cr2-ulsfo ip -- To view, visit https://gerrit.wikimedia.org/r/158636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc8373c5d6eafcd118820606ab154a8859661018 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn off include_optional_ns for gdnsd - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/158637 Change subject: Turn off include_optional_ns for gdnsd .. Turn off include_optional_ns for gdnsd This switches us to gdnsd default behavior of not including an Authority section (or the relevant Additional records) in most typical responses where the protocol doesn't require it. The SOA-record authority section is still always included for e.g. NXDOMAIN and no-data responses, and NS records (and their additionals) are still copied in for referrals. This significantly reduces DNS response packet sizes in common cases. It's a 64 byte reduction for a typical query on en.wp.o (142 - 78) and up to ~100 byte reduction in some other cases, out of a traditional limit of 512. This has a number of positive fallouts for things like traffic rates, likelihood of fragmentation or TCP fallback for larger (e.g. anti-spam TXT) responses, authserver efficiency under attack, anti-reflection, etc. There's no real downside that I see. Caches will have to explicitly refresh our NS data from us or upstream TLD servers more-frequently, but this is outweighed by many orders of magnitude by the reduction in normal traffic. For those that are fans of argument from authority, Google does this optimization too :p Example change in query response (example is on top of the scenario where the DYNA changes in Iefae74d8d are already deployed, which already reduces response size considerably): For en.wp.o: OLD behavior:- $ dig -p 53535 @ns1.wikimedia.org en.wikipedia.org ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 1 ;; ANSWER SECTION: en.wikipedia.org. 3600IN A 208.80.154.224 ;; AUTHORITY SECTION: wikipedia.org. 86400 IN NS ns1.wikimedia.org. wikipedia.org. 86400 IN NS ns2.wikimedia.org. wikipedia.org. 86400 IN NS ns0.wikimedia.org. ;; ADDITIONAL SECTION: en.wikipedia.org. 3600IN 2620:0:861:ed1a::1 ;; MSG SIZE rcvd: 142 NEW behavior:- $ dig -p 53535 @ns1.wikimedia.org en.wikipedia.org ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; ANSWER SECTION: en.wikipedia.org. 3600IN A 208.80.154.224 ;; ADDITIONAL SECTION: en.wikipedia.org. 3600IN 2620:0:861:ed1a::1 ;; MSG SIZE rcvd: 78 Change-Id: I65008db482ad6a8ea6774169a33948d87307952d --- M modules/authdns/templates/config-head.erb 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/158637/1 diff --git a/modules/authdns/templates/config-head.erb b/modules/authdns/templates/config-head.erb index b105c65..00be63f 100644 --- a/modules/authdns/templates/config-head.erb +++ b/modules/authdns/templates/config-head.erb @@ -14,7 +14,6 @@ ::1, ], zones_default_ttl = 43200, - include_optional_ns = true, # don't inotify on zonefiles but wait for HUP zones_rfc1035_auto = false, } -- To view, visit https://gerrit.wikimedia.org/r/158637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65008db482ad6a8ea6774169a33948d87307952d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Kill ifEquals helper, use ifCond instead - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Kill ifEquals helper, use ifCond instead .. Hygiene: Kill ifEquals helper, use ifCond instead Switch to more generic helper. Change-Id: Ie7fb6620b6008d8c4d5f3184daeac80ec73e220f --- M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php A handlebars/compiled/flow_block_topic_reply.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/flow_board_navigation.handlebars M handlebars/flow_post.handlebars M handlebars/flow_post_replies.handlebars M handlebars/flow_reply_form.handlebars M handlebars/flow_topic.handlebars M handlebars/flow_topic_titlebar_content.handlebars M includes/TemplateHelper.php M modules/new/flow-handlebars.js M tests/phpunit/TemplateHelperTest.php M tests/qunit/new/test_flow-handlebars.js 16 files changed, 174 insertions(+), 121 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index 723440f..8229c21 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -21,8 +21,8 @@ ), 'blockhelpers' = Array(), 'hbhelpers' = Array('eachPost' = 'Flow\TemplateHelper::eachPost', -'ifEquals' = 'Flow\TemplateHelper::ifEquals', 'ifAnonymous' = 'Flow\TemplateHelper::ifAnonymous', +'ifCond' = 'Flow\TemplateHelper::ifCond', 'tooltip' = 'Flow\TemplateHelper::tooltip', 'progressiveEnhancement' = 'Flow\TemplateHelper::progressiveEnhancement', ), @@ -49,7 +49,7 @@ h2 class=flow-topic-title data-title='.LCRun3::ch($cx, 'plaintextSnippet', Array(Array(((is_array($in['content']) isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').''.LCRun3::ch($cx, 'escapeContent', Array(Array(((is_array($in['content']) isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').'/h2 '.((LCRun3::ifvar($cx, ((is_array($in) isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' div class=flow-moderated-topic-title flow-ui-text-truncatedspan - class=wikiglyph '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'close'),Array()), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) {return 'wikiglyph-trash';}).'/span + class=wikiglyph '.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'close'),Array(''=((is_array($in) isset($in['=='])) ? $in['=='] : null))), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array(''=((is_array($in) isset($in['=='])) ? $in['=='] : null))), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array(''=((is_array($in) isset($in['=='])) ? $in['=='] : null))), $in, function($cx, $in) {return 'wikiglyph-trash';}).'/span '.LCRun3::ch($cx, 'l10n', Array(Array('post_moderation_state',((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) isset($in['replyToId'])) ? $in['replyToId'] : null),((is_array($in['moderator']) isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').'/div ' : '').' div class=flow-topic-meta @@ -304,7 +304,7 @@ '.((!LCRun3::ifvar($cx, ((is_array($in) isset($in['isPreview'])) ? $in['isPreview'] : null))) ? ' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) isset($in['actions']['reply'])) ? $in['actions']['reply'] : null))) ? ' - '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($cx['scopes'][0]['submitted']) isset($cx['scopes'][0]['submitted']['postId'])) ?
[MediaWiki-commits] [Gerrit] Update list of RTL languages - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/158638 Change subject: Update list of RTL languages .. Update list of RTL languages Hausa is actually LTR. See also bug:745 and https://en.wikipedia.org/wiki/Right-to-left#cite_ref-2 Change-Id: I102669b5c2b823c17cb4c781b9c443b85062e534 --- M wikipedia/src/main/java/org/wikipedia/Utils.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/38/158638/1 diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 7f8781f..cd3ee1f 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -369,7 +369,7 @@ * Ensure that this is always sorted alphabetically. */ private static final String[] RTL_LANGS = { -ar, arc, arz, bcc, bqi, ckb, dv, fa, glk, ha, he, +ar, arc, arz, bcc, bqi, ckb, dv, fa, glk, he, khw, ks, mzn, pnb, ps, sd, ug, ur, yi }; -- To view, visit https://gerrit.wikimedia.org/r/158638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I102669b5c2b823c17cb4c781b9c443b85062e534 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove group parameter from modules - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Remove group parameter from modules .. Remove group parameter from modules I'm unable to find any documentation for this parameter. For what I understand it only prevents combining these modules with other modules during bundling. Change-Id: I54dba1d72dbb54bf35d30f4518cedaa18b273846 --- M Resources.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 9a0ac02..073f9e1 100644 --- a/Resources.php +++ b/Resources.php @@ -11,7 +11,6 @@ $resourcePaths = array( 'localBasePath' = $dir . '/modules', 'remoteExtPath' = 'ContentTranslation/modules', - 'group' = 'ext.cx', ); $wgResourceModules['ext.cx.model'] = array( -- To view, visit https://gerrit.wikimedia.org/r/158352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54dba1d72dbb54bf35d30f4518cedaa18b273846 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Update classes of topic during close/reopen actions. - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Update classes of topic during close/reopen actions. .. Update classes of topic during close/reopen actions. Add tests. Bug: 68328 Change-Id: I15a09c5b057de8e7d24e5c1b953bd36dfe72a40c --- M modules/new/components/flow-board.js M tests/qunit/new/components/test_flow-board.js 2 files changed, 96 insertions(+), 5 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/new/components/flow-board.js b/modules/new/components/flow-board.js index 67a6618..168d89a 100644 --- a/modules/new/components/flow-board.js +++ b/modules/new/components/flow-board.js @@ -605,6 +605,7 @@ var revision, $target = info.$target, $topicTitleBar, topicId, revisionId, + $topic = $target.parents( '.flow-topic' ), self = this, flowBoard = FlowBoardComponent.prototype.getInstanceByElement( $( this ) ), flowId = $( self ).closest( '.flow-topic-titlebar' ).parent().data( 'flow-id' ); @@ -639,11 +640,12 @@ revisionId = result.posts[topicId]; revision = result.revisions[revisionId]; - // FIXME: Api should be returning moderation state. Why not? - revision.isModerated = revision.moderateState === 'close'; - - // FIXME: Hackily remove the moderated class (avoids re-rendering entire post) - $target.parents( '.flow-topic' ).removeClass( 'flow-topic-moderated' ); + if ( revision.isModerated ) { + $topic.addClass( 'flow-topic-moderated' ). + addClass( 'flow-topic-moderatestate-close' ); + } else { + $topic.removeClass( 'flow-topic-moderated flow-topic-moderatestate-close' ); + } // Update view of the title bar $topicTitleBar = $( diff --git a/tests/qunit/new/components/test_flow-board.js b/tests/qunit/new/components/test_flow-board.js index abf78aa..c7d9b91 100644 --- a/tests/qunit/new/components/test_flow-board.js +++ b/tests/qunit/new/components/test_flow-board.js @@ -7,12 +7,101 @@ QUnit.module( 'ext.flow: FlowBoardComponent', { setup: function() { + var stub; this.$el = $( 'div class=flow-component data-flow-component=board' ); this.component = mw.flow.initComponent( this.$el ); + stub = this.sandbox.stub( this.component.API, 'apiCall' ); + stub.withArgs( { + action: 'flow', + submodule: 'view-topic', + workflow: 's18cjkj1bs3rkt13', + page: 'Topic:S18cjkj1bs3rkt13' + } ).returns( + new $.Deferred().resolve( { + flow: { + 'view-topic': { + result: { + topic: { + roots: [ 's18cjkj1bs3rkt13' ], + posts: { + s18cjkj1bs3rkt13: '4' + }, + revisions: { + '4': { + content: { + format: 'html', + content: 'Hi' + }, + changeType: close-topic, + isModerated: false + } + } + } + } + } + } + } ) + ); +
[MediaWiki-commits] [Gerrit] build: Bump grunt-banana-checker to 0.2.0 and fix flagged issue - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump grunt-banana-checker to 0.2.0 and fix flagged issue .. build: Bump grunt-banana-checker to 0.2.0 and fix flagged issue Change-Id: I808384b28684799c89a7c33dd86c3bcf7764cc25 --- M includes/installer/i18n/qqq.json M tests/frontend/package.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index c879843..dc65dd6 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -270,7 +270,7 @@ config-upload-deleted: Prompt for the server directory into which deleted files should be moved., config-upload-deleted-help: Explanation for {{msg|config-upload-deleted}}., config-logo: Prompt for a link to the logo to use for the wiki., - config-logo-help: , + config-logo-help: Help string shown to the user explaining the requirements for the wiki's logo., config-instantcommons: Used as label for the checkbox.\n\nThe help message for this checkbox is:\n* {{msg-mw|Config-instantcommons-help}}, config-instantcommons-help: Used as help message for the checkbox which is labeled {{msg-mw|config-instantcommons}}., config-cc-error: Prompt to manually enter a license when the tool fails to match., diff --git a/tests/frontend/package.json b/tests/frontend/package.json index 386f488..7913363 100644 --- a/tests/frontend/package.json +++ b/tests/frontend/package.json @@ -8,7 +8,7 @@ grunt: 0.4.2, grunt-contrib-jshint: 0.10.0, grunt-contrib-watch: 0.6.1, -grunt-banana-checker: 0.1.0, +grunt-banana-checker: 0.2.0, grunt-jscs: 0.6.1, grunt-jsonlint: 1.0.4 } -- To view, visit https://gerrit.wikimedia.org/r/157631 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I808384b28684799c89a7c33dd86c3bcf7764cc25 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@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] Collect elasticsearch metrics less frequently - change (operations/puppet)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/158639 Change subject: Collect elasticsearch metrics less frequently .. Collect elasticsearch metrics less frequently I've started seeing metric collection show up in Elasticsearch's hot threads. This is probably temporary to Elasticsearch 1.3.2 due to a bug I can't find at the moment in Lucene that has already been resolved and we'll get in Elasticsearch 1.4. Change-Id: Ife3cb6aceffe2df9350edd0b2d6a75ff272011cc --- M modules/elasticsearch/files/ganglia/elasticsearch.pyconf 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/158639/1 diff --git a/modules/elasticsearch/files/ganglia/elasticsearch.pyconf b/modules/elasticsearch/files/ganglia/elasticsearch.pyconf index 7e99924..ed7af12 100644 --- a/modules/elasticsearch/files/ganglia/elasticsearch.pyconf +++ b/modules/elasticsearch/files/ganglia/elasticsearch.pyconf @@ -14,8 +14,8 @@ } collection_group { - collect_every = 10 - time_threshold = 10 + collect_every = 60 + time_threshold = 60 metric { name_match = es_(.+) -- To view, visit https://gerrit.wikimedia.org/r/158639 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife3cb6aceffe2df9350edd0b2d6a75ff272011cc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove .mw-body class - change (mediawiki...parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/158640 Change subject: Remove .mw-body class .. Remove .mw-body class We don't want an indented left column or other styling for things like the page title. We really only want the content styles, which seem to be all keyed of .mw-body-content. Change-Id: I4908bb692b9d4b68d4c18dd2d2ef71fa5b4e71e2 --- M lib/mediawiki.DOMPostProcessor.js 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/40/158640/1 diff --git a/lib/mediawiki.DOMPostProcessor.js b/lib/mediawiki.DOMPostProcessor.js index 0bd1d8b..37bb9e4 100644 --- a/lib/mediawiki.DOMPostProcessor.js +++ b/lib/mediawiki.DOMPostProcessor.js @@ -365,10 +365,8 @@ document.body.classList.add('mw-content-' + dir); document.body.setAttribute('dir', dir); - // Set mw-body and mw-body-content directly on the body. These are the - // designated successors for #content (mw-body) and #bodyContent - // (mw-body-content) in core skins. - document.body.classList.add('mw-body'); + // Set mw-body-content directly on the body. This is the successor for + // #bodyContent in core skins. document.body.classList.add('mw-body-content'); this.emit( 'document', document ); -- To view, visit https://gerrit.wikimedia.org/r/158640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4908bb692b9d4b68d4c18dd2d2ef71fa5b4e71e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Some more refactoring of EntityView - change (mediawiki...Wikibase)
Bene has uploaded a new change for review. https://gerrit.wikimedia.org/r/158641 Change subject: [WIP] Some more refactoring of EntityView .. [WIP] Some more refactoring of EntityView Change-Id: Ic06639c01423a019be91d1a2de78df3af8f21aca --- A repo/includes/EntityParserOutputGeneratorFactory.php M repo/includes/EntityView.php M repo/includes/ItemView.php A repo/includes/View/TocGenerator.php 4 files changed, 172 insertions(+), 139 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/41/158641/1 diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php b/repo/includes/EntityParserOutputGeneratorFactory.php new file mode 100644 index 000..48cc37d --- /dev/null +++ b/repo/includes/EntityParserOutputGeneratorFactory.php @@ -0,0 +1,59 @@ +?php + +namespace Wikibase; + +/** + * Factory to create EntityParserOutputGenerator objects. + * + * @since 0.5 + * + * @license GNU GPL v2+ + * @author Bene* benestar.wikime...@gmail.com + */ +class EntityParserOutputGeneratorFactory { + + public function getEntityParserOutputGenerator() { + + } + + public function getEntityView( + IContextSource $context, + SnakFormatter $snakFormatter, + EntityTitleLookup $entityTitleLookup, + EntityInfoBuilderFactory $entityInfoBuilderFactory + ) { + $sectionEditLinkGenerator = new SectionEditLinkGenerator(); + + $snakHtmlGenerator = new SnakHtmlGenerator( + $snakFormatter, + $entityTitleLookup + ); + + $claimHtmlGenerator = new ClaimHtmlGenerator( + $snakHtmlGenerator, + $entityTitleLookup + ); + + $language = $context-getLanguage(); + + $claimsView = new ClaimsView( + $entityInfoBuilderFactory, + $entityTitleLookup, + $sectionEditLinkGenerator, + $claimHtmlGenerator, + $language-getCode() + ); + + $fingerprintView = new FingerprintView( + $sectionEditLinkGenerator, + $language-getCode() + ); + + return $this-newEntityView( + $fingerprintView, + $claimsView, + $language + ); + } + +} diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 28889a5..3dd24cb 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -3,10 +3,7 @@ namespace Wikibase; use Html; -use InvalidArgumentException; use Language; -use Wikibase\Repo\View\ClaimsView; -use Wikibase\Repo\View\FingerprintView; use Wikibase\Repo\View\TextInjector; /** @@ -27,16 +24,6 @@ abstract class EntityView { /** -* @var FingerprintView -*/ - protected $fingerprintView; - - /** -* @var ClaimsView -*/ - protected $claimsView; - - /** * @var Language */ protected $language; @@ -46,32 +33,8 @@ */ protected $textInjector; - /** -* Maps entity types to the corresponding entity view. -* FIXME: remove this stuff, big OCP violation -* -* @since 0.2 -* -* @var string[] -*/ - public static $typeMap = array( - Item::ENTITY_TYPE = '\Wikibase\ItemView', - Property::ENTITY_TYPE = '\Wikibase\PropertyView', - - // TODO: Query::ENTITY_TYPE - 'query' = '\Wikibase\QueryView', - ); - - public function __construct( - FingerprintView $fingerprintView, - ClaimsView $claimsView, - Language $language - ) { - // @todo: move the $editable flag here, instead of passing it around everywhere - $this-fingerprintView = $fingerprintView; - $this-claimsView = $claimsView; + public function __construct( Language $language ) { $this-language = $language; - $this-textInjector = new TextInjector(); } /** @@ -99,6 +62,7 @@ * @return string HTML */ public function getHtml( EntityRevision $entityRevision, $editable = true ) { + $this-textInjector = new TextInjector(); $entity = $entityRevision-getEntity(); //NOTE: even though $editable is unused at the moment, we will need it for the JS-less editing model. @@ -147,99 +111,8 @@ * @param EntityRevision $entityRevision * @param bool $editable * -* @throws InvalidArgumentException * @return string */ -
[MediaWiki-commits] [Gerrit] mediawiki.api: Actually don't log request error 'abort' - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.api: Actually don't log request error 'abort' .. mediawiki.api: Actually don't log request error 'abort' 173930cb32, once more, with feeling. I'm not sure why the previous version has ever worked, given that our own code (a few lines above this, starting from '// Make the AJAX request') is written in such a way that `code` can never be `'abort'`. Bug: 65442 Change-Id: I34bcaa362806bf9e80fb40bc92723f85bea1fb64 --- M resources/src/mediawiki.api/mediawiki.api.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.api/mediawiki.api.js b/resources/src/mediawiki.api/mediawiki.api.js index f8dc836..51b3238 100644 --- a/resources/src/mediawiki.api/mediawiki.api.js +++ b/resources/src/mediawiki.api/mediawiki.api.js @@ -225,7 +225,7 @@ // Return the Promise return apiDeferred.promise( { abort: xhr.abort } ).fail( function ( code, details ) { - if ( code !== 'abort' ) { + if ( !( code === 'http' details details.textStatus === 'abort' ) ) { mw.log( 'mw.Api error: ', code, details ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/157350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34bcaa362806bf9e80fb40bc92723f85bea1fb64 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski matma@gmail.com Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Krinkle krinklem...@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] Updated credits - change (mediawiki...OAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Updated credits .. Updated credits Change-Id: Idc1f79580a9cd3b17763af3cbe58665feddcef71 --- M OAuth.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/OAuth.php b/OAuth.php index cb396f9..79f10f3 100644 --- a/OAuth.php +++ b/OAuth.php @@ -30,7 +30,7 @@ 'path' = __FILE__, 'name' = 'OAuth', 'descriptionmsg' = 'mwoauth-desc', - 'author' = array( 'Aaron Schulz' ), + 'author' = array( 'Aaron Schulz', 'Chris Steipp', 'Brad Jorsch' ), 'url'= 'https://www.mediawiki.org/wiki/Extension:OAuth', ); -- To view, visit https://gerrit.wikimedia.org/r/158563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc1f79580a9cd3b17763af3cbe58665feddcef71 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@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 relative symlinks for bits/static-master - change (operations/mediawiki-config)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/158643 Change subject: Fix relative symlinks for bits/static-master .. Fix relative symlinks for bits/static-master Followup to I0b1c1f17dc51190dda38529494b1fb2471390285 which made these links relative instead of absolute. The relative traversals stepped out one directory too far. Bug: 70445 Change-Id: I55a01a7126bc29615b4dcf4f80c8533e8d6cbd5a --- M docroot/bits/static-master/extensions M docroot/bits/static-master/resources M docroot/bits/static-master/skins 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/43/158643/1 diff --git a/docroot/bits/static-master/extensions b/docroot/bits/static-master/extensions index b536524..6c9d54e 12 --- a/docroot/bits/static-master/extensions +++ b/docroot/bits/static-master/extensions @@ -1 +1 @@ -../../../../php-master/extensions \ No newline at end of file +../../../php-master/extenstions \ No newline at end of file diff --git a/docroot/bits/static-master/resources b/docroot/bits/static-master/resources index 602fc25..d9300e6 12 --- a/docroot/bits/static-master/resources +++ b/docroot/bits/static-master/resources @@ -1 +1 @@ -../../../../php-master/resources \ No newline at end of file +../../../php-master/resources \ No newline at end of file diff --git a/docroot/bits/static-master/skins b/docroot/bits/static-master/skins index caf277d..3037a38 12 --- a/docroot/bits/static-master/skins +++ b/docroot/bits/static-master/skins @@ -1 +1 @@ -../../../../php-master/skins \ No newline at end of file +../../../php-master/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/158643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55a01a7126bc29615b4dcf4f80c8533e8d6cbd5a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: BryanDavis bda...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix relative symlinks for bits/static-master - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix relative symlinks for bits/static-master .. Fix relative symlinks for bits/static-master Followup to I0b1c1f17dc51190dda38529494b1fb2471390285 which made these links relative instead of absolute. The relative traversals stepped out one directory too far. Bug: 70445 Change-Id: I55a01a7126bc29615b4dcf4f80c8533e8d6cbd5a --- M docroot/bits/static-master/extensions M docroot/bits/static-master/resources M docroot/bits/static-master/skins 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/bits/static-master/extensions b/docroot/bits/static-master/extensions index b536524..6c9d54e 12 --- a/docroot/bits/static-master/extensions +++ b/docroot/bits/static-master/extensions @@ -1 +1 @@ -../../../../php-master/extensions \ No newline at end of file +../../../php-master/extenstions \ No newline at end of file diff --git a/docroot/bits/static-master/resources b/docroot/bits/static-master/resources index 602fc25..d9300e6 12 --- a/docroot/bits/static-master/resources +++ b/docroot/bits/static-master/resources @@ -1 +1 @@ -../../../../php-master/resources \ No newline at end of file +../../../php-master/resources \ No newline at end of file diff --git a/docroot/bits/static-master/skins b/docroot/bits/static-master/skins index caf277d..3037a38 12 --- a/docroot/bits/static-master/skins +++ b/docroot/bits/static-master/skins @@ -1 +1 @@ -../../../../php-master/skins \ No newline at end of file +../../../php-master/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/158643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55a01a7126bc29615b4dcf4f80c8533e8d6cbd5a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: 20after4 mmod...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@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