[MediaWiki-commits] [Gerrit] Mount /dev/md1 on /var/lib/nova/instances for compute nodes. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/110921 Change subject: Mount /dev/md1 on /var/lib/nova/instances for compute nodes. .. Mount /dev/md1 on /var/lib/nova/instances for compute nodes. Also added virt1004 to the set of live compute nodes so I can test this. Change-Id: Ibc14396df81c29e9a1ed5404c56905ea1ac40220 --- M manifests/role/nova.pp M manifests/site.pp 2 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/110921/1 diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp index 2dd4fde..77f2d97 100644 --- a/manifests/role/nova.pp +++ b/manifests/role/nova.pp @@ -379,4 +379,20 @@ include role::nova::api, role::nova::network } + + if $realm == 'production' { + mount { '/var/lib/nova/instances': + ensure = mounted, + device = '/dev/md1', + fstype = 'xfs', + options = 'defaults', + } + } } + + + + +== + + diff --git a/manifests/site.pp b/manifests/site.pp index b183b0c..7c421e0 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2624,7 +2624,7 @@ sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } } -node /virt100[1-3].eqiad.wmnet/ { +node /virt100[1-4].eqiad.wmnet/ { $cluster = virt $openstack_version = havana @@ -2633,7 +2633,7 @@ role::nova::compute } -node /virt100[4-9].eqiad.wmnet/ { +node /virt100[5-9].eqiad.wmnet/ { $cluster = virt # full root for mhoover, Labs migration contractor include admins::labs -- To view, visit https://gerrit.wikimedia.org/r/110921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc14396df81c29e9a1ed5404c56905ea1ac40220 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mount /dev/md1 on /var/lib/nova/instances for compute nodes. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Mount /dev/md1 on /var/lib/nova/instances for compute nodes. .. Mount /dev/md1 on /var/lib/nova/instances for compute nodes. Also added virt1004 to the set of live compute nodes so I can test this. Change-Id: Ibc14396df81c29e9a1ed5404c56905ea1ac40220 --- M manifests/role/nova.pp M manifests/site.pp 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp index 2dd4fde..9e66e85 100644 --- a/manifests/role/nova.pp +++ b/manifests/role/nova.pp @@ -379,4 +379,13 @@ include role::nova::api, role::nova::network } + + if $realm == 'production' { + mount { '/var/lib/nova/instances': + ensure = mounted, + device = '/dev/md1', + fstype = 'xfs', + options = 'defaults', + } + } } diff --git a/manifests/site.pp b/manifests/site.pp index b183b0c..7c421e0 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2624,7 +2624,7 @@ sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } } -node /virt100[1-3].eqiad.wmnet/ { +node /virt100[1-4].eqiad.wmnet/ { $cluster = virt $openstack_version = havana @@ -2633,7 +2633,7 @@ role::nova::compute } -node /virt100[4-9].eqiad.wmnet/ { +node /virt100[5-9].eqiad.wmnet/ { $cluster = virt # full root for mhoover, Labs migration contractor include admins::labs -- To view, visit https://gerrit.wikimedia.org/r/110921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc14396df81c29e9a1ed5404c56905ea1ac40220 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make {{ a parameter in the error message in the editor dialog - change (mediawiki...TemplateData)
jenkins-bot has submitted this change and it was merged. Change subject: Make {{ a parameter in the error message in the editor dialog .. Make {{ a parameter in the error message in the editor dialog Translatewiki warns of an unbalanced parenthesis problem in the translation string. Turning the {{ into a parameter solves this issue. Change-Id: I2fd69b3e901175dad22d285aa2373916acd4f208 --- M TemplateData.i18n.php M modules/ext.templateDataGenerator.core.js 2 files changed, 3 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php index c057ce5..68da8bf 100644 --- a/TemplateData.i18n.php +++ b/TemplateData.i18n.php @@ -41,7 +41,7 @@ 'templatedata-modal-button-cancel' = 'Cancel', 'templatedata-modal-button-delparam' = 'Delete parameter', 'templatedata-modal-button-importParams' = 'Import parameters', - 'templatedata-modal-errormsg' = 'Errors found. Please make sure there are no empty or duplicate parameter names, and that the parameter name does not include |, = or }}.', + 'templatedata-modal-errormsg' = 'Errors found. Please make sure there are no empty or duplicate parameter names, and that the parameter name does not include |, = or $1.', 'templatedata-modal-errormsg-import-noparams' = 'No new parameters found during import.', 'templatedata-modal-notice-import-numparams' = '$1 new {{PLURAL:$1|parameter was|parameters were}} imported.', 'templatedata-modal-table-param-actions' = 'Actions', @@ -131,8 +131,7 @@ 'templatedata-modal-button-delparam' = 'Button to delete a parameter', 'templatedata-modal-button-importParams' = 'Label of the import button', 'templatedata-modal-errormsg' = 'Error message that appears in the TemplateData generator GUI in case there are empty, duplicate or invalid parameter names - -To avoid errors, it may be necessary to escape some of the characters with nowikinowiki/nowiki/nowiki or HTML entity codes.', +* $1 - double curly brackets, supplied as a parameter to avoid parsing errors in translation strings.', 'templatedata-modal-errormsg-import-noparams' = 'message that appears in the TemplateData generator GUI in case no template parameters were found during the import attempt.', 'templatedata-modal-notice-import-numparams' = 'message that appears in the TemplateData generator GUI showing how many new parameters were imported into the GUI from an existing template.', 'templatedata-modal-table-param-actions' = 'Label for a table heading: Parameter actions in the table', diff --git a/modules/ext.templateDataGenerator.core.js b/modules/ext.templateDataGenerator.core.js index d2e8fe6..58581f7 100644 --- a/modules/ext.templateDataGenerator.core.js +++ b/modules/ext.templateDataGenerator.core.js @@ -482,7 +482,7 @@ // Validate if ( !doNotCheckForm ) { if ( !isFormValid() ) { - showErrorModal( mw.msg( 'templatedata-modal-errormsg' ) ); + showErrorModal( mw.msg( 'templatedata-modal-errormsg', '}}' ) ); return; } } -- To view, visit https://gerrit.wikimedia.org/r/110913 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fd69b3e901175dad22d285aa2373916acd4f208 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Mooeypoo mor...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Mooeypoo mor...@gmail.com Gerrit-Reviewer: Siebrand siebr...@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] Correct sequence name for fresh Postgres installation - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/110922 Change subject: Correct sequence name for fresh Postgres installation .. Correct sequence name for fresh Postgres installation Spotted by gebhkla on bug 60083 Bug: 60083 Change-Id: I34283c2539f4ce9d1b85756b3e1c16d255000ed5 (cherry picked from commit 305622fbc95a50fdb83cb9a4dda8c27f61710ede) --- M maintenance/postgres/tables.sql 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/110922/1 diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index bc2428e..0cc1b3d 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -228,9 +228,9 @@ CREATE UNIQUE INDEX cl_from ON categorylinks (cl_from, cl_to); CREATE INDEX cl_sortkey ON categorylinks (cl_to, cl_sortkey, cl_from); -CREATE SEQUENCE externallinks_id_seq; +CREATE SEQUENCE externallinks_el_id_seq; CREATE TABLE externallinks ( - el_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('externallinks_id_seq'), + el_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('externallinks_el_id_seq'), el_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, el_to TEXT NOT NULL, el_index TEXT NOT NULL -- To view, visit https://gerrit.wikimedia.org/r/110922 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34283c2539f4ce9d1b85756b3e1c16d255000ed5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unnecessary exception from Title::getLatestRevID() - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/110924 Change subject: Remove unnecessary exception from Title::getLatestRevID() .. Remove unnecessary exception from Title::getLatestRevID() Bug 37209: An exception was thrown where the data cached in the Title object was inconsistent with the data in LinkCache. It shouldn't be surprising that this happens, since there is no guarantee that the data was derived from the same transaction or even the same DB server. But I don't think it is a problem worth troubling the user over, since with $flags=0, the slave DB server will be used, and no special guarantee of consistency should be expected by callers. If callers do need consistency, then they should make their own arrangements to get it, such as clearing the LinkCache. Since we have to pick a winner, and the choice is mostly arbitrary since it's not possible to tell which is fresher, I think LinkCache is a better choice since the lifetime of its cache entries can be controlled. Change-Id: I0add48463341e56fe8c155b1007487278ad2705d (cherry picked from commit 22e2e96088d81022cb40e9991683a335029e7565) --- M includes/Title.php 1 file changed, 13 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/110924/1 diff --git a/includes/Title.php b/includes/Title.php index ca66aae..65a7926 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2960,11 +2960,13 @@ $linkCache = LinkCache::singleton(); $cached = $linkCache-getGoodLinkFieldObj( $this, 'redirect' ); if ( $cached === null ) { - // TODO: check the assumption that the cache actually knows about this title - // and handle this, such as get the title from the database. - // See https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 - wfDebug( LinkCache doesn't currently know about this title: . $this-getPrefixedDBkey() ); - wfDebug( wfBacktrace() ); + # Trust LinkCache's state over our own + # LinkCache is telling us that the page doesn't exist, despite there being cached + # data relating to an existing page in $this-mArticleID. Updaters should clear + # LinkCache as appropriate, or use $flags = Title::GAID_FOR_UPDATE. If that flag is + # set, then LinkCache will definitely be up to date here, since getArticleID() forces + # LinkCache to refresh its data from the master. + return $this-mRedirect = false; } $this-mRedirect = (bool)$cached; @@ -2989,11 +2991,9 @@ } $linkCache = LinkCache::singleton(); $cached = $linkCache-getGoodLinkFieldObj( $this, 'length' ); - if ( $cached === null ) { # check the assumption that the cache actually knows about this title - # XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 - # as a stop gap, perhaps log this, but don't throw an exception? - wfDebug( LinkCache doesn't currently know about this title: . $this-getPrefixedDBkey() ); - wfDebug( wfBacktrace() ); + if ( $cached === null ) { + # Trust LinkCache's state over our own, as for isRedirect() + return $this-mLength = 0; } $this-mLength = intval( $cached ); @@ -3005,7 +3005,6 @@ * What is the page_latest field for this page? * * @param int $flags a bit field; may be Title::GAID_FOR_UPDATE to select for update -* @throws MWException * @return Int or 0 if the page doesn't exist */ public function getLatestRevID( $flags = 0 ) { @@ -3019,10 +3018,9 @@ $linkCache = LinkCache::singleton(); $linkCache-addLinkObj( $this ); $cached = $linkCache-getGoodLinkFieldObj( $this, 'revision' ); - if ( $cached === null ) { # check the assumption that the cache actually knows about this title - # XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 - # as a stop gap, perhaps log this, but don't throw an exception? - throw new MWException( LinkCache doesn't currently know about this title: . $this-getPrefixedDBkey() ); + if ( $cached === null ) { + # Trust LinkCache's state over our own, as for isRedirect() + return $this-mLatestID = 0; } $this-mLatestID = intval( $cached
[MediaWiki-commits] [Gerrit] Various fixes to job running code in Wiki.php - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/110923 Change subject: Various fixes to job running code in Wiki.php .. Various fixes to job running code in Wiki.php * Make it async on Windows * Fixed possible invalid filename errors on Windows * Redirect output to dev/null to avoid hanging PHP bug: 60231 bug: 58719 Change-Id: If4e52b86fb3a1bff283dfba3dfac213367f47543 (cherry picked from commit 96b678e110f90237d66eb095fa6cf223524d7ff4) --- M includes/Wiki.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/110923/1 diff --git a/includes/Wiki.php b/includes/Wiki.php index ae75bf3..074ec1a 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -653,12 +653,19 @@ } if ( !wfShellExecDisabled() is_executable( $wgPhpCli ) ) { - // Start a background process to run some of the jobs. - // This will be asynchronous on *nix though not on Windows. + // Start a background process to run some of the jobs wfProfileIn( __METHOD__ . '-exec' ); $retVal = 1; $cmd = wfShellWikiCmd( $IP/maintenance/runJobs.php, array( '--maxjobs', $n ) ); - wfShellExec( $cmd , $retVal ); + $cmd .= . wfGetNull() . 21; // don't hang PHP on pipes + if ( wfIsWindows() ) { + // Using START makes this async and also works around a bug where using + // wfShellExec() with a quoted script name causes a filename syntax error. + $cmd = START /B \bg\ $cmd; + } else { + $cmd = $cmd ; + } + wfShellExec( $cmd, $retVal ); wfProfileOut( __METHOD__ . '-exec' ); } else { try { -- To view, visit https://gerrit.wikimedia.org/r/110923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4e52b86fb3a1bff283dfba3dfac213367f47543 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n support in MwTimeIsoFormatter - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add i18n support in MwTimeIsoFormatter .. Add i18n support in MwTimeIsoFormatter Bug: 60100 Change-Id: Id7fa930d02dfc072b353bbe56e650710708ac2cc --- M lib/includes/formatters/MwTimeIsoFormatter.php M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php M repo/Wikibase.i18n.php 3 files changed, 63 insertions(+), 50 deletions(-) Approvals: WikidataJenkins: Verified Adrian Lang: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/MwTimeIsoFormatter.php index 52031c6..bcc1cea 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/MwTimeIsoFormatter.php @@ -4,6 +4,7 @@ use DataValues\TimeValue; use Language; +use Message; use ValueFormatters\FormatterOptions; use ValueFormatters\TimeIsoFormatter; use ValueFormatters\ValueFormatter; @@ -126,59 +127,40 @@ * @return string the formatted year */ private function formatYear( $fullYear, $precision ) { - $beforeYear = ''; - $afterYear = ''; - - //todo i18n below switch( $precision ) { case TimeValue::PRECISION_Ga: $fullYear = round( $fullYear, -9 ); $fullYear = substr( $fullYear, 0, -9 ); - $beforeYear = 'in '; - $afterYear = ' billion years'; - break; + return $this-getMessage( 'wikibase-time-precision-Gannum', $fullYear ); case TimeValue::PRECISION_100Ma: $fullYear = round( $fullYear, -8 ); $fullYear = substr( $fullYear, 0, -6 ); - $beforeYear = 'in '; - $afterYear = ' million years'; - break; + return $this-getMessage( 'wikibase-time-precision-Mannum', $fullYear ); case TimeValue::PRECISION_10Ma: $fullYear = round( $fullYear, -7 ); $fullYear = substr( $fullYear, 0, -6 ); - $beforeYear = 'in '; - $afterYear = ' million years'; - break; + return $this-getMessage( 'wikibase-time-precision-Mannum', $fullYear ); case TimeValue::PRECISION_Ma: $fullYear = round( $fullYear, -6 ); $fullYear = substr( $fullYear, 0, -6 ); - $beforeYear = 'in '; - $afterYear = ' million years'; - break; + return $this-getMessage( 'wikibase-time-precision-Mannum', $fullYear ); case TimeValue::PRECISION_100ka: $fullYear = round( $fullYear, -5 ); - $beforeYear = 'in '; - $afterYear = ' years'; - break; + return $this-getMessage( 'wikibase-time-precision-annum', $fullYear ); case TimeValue::PRECISION_10ka: $fullYear = round( $fullYear, -4 ); - $beforeYear = 'in '; - $afterYear = ' years'; - break; + return $this-getMessage( 'wikibase-time-precision-annum', $fullYear ); case TimeValue::PRECISION_ka: $fullYear = round( $fullYear, -3 ); $fullYear = substr( $fullYear, 0, -3 ); - $afterYear = '.millennium'; - break; + return $this-getMessage( 'wikibase-time-precision-millennium', $fullYear ); case TimeValue::PRECISION_100a: $fullYear = round( $fullYear, -2 ); $fullYear = substr( $fullYear, 0, -2 ); - $afterYear = '.century'; - break; + return $this-getMessage( 'wikibase-time-precision-century', $fullYear ); case TimeValue::PRECISION_10a: $fullYear = round( $fullYear, -1 ); - $afterYear = 's'; -
[MediaWiki-commits] [Gerrit] Revert Replace easter egg by a more explaining message - change (operations/mediawiki-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/110925 Change subject: Revert Replace easter egg by a more explaining message .. Revert Replace easter egg by a more explaining message This reverts commit f4f834ba0ffdc653e9219035be46a3fffa6a5367. Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6 --- M docroot/noc/conf/highlight.php 1 file changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/25/110925/1 diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php index 5a7c3cd..c3e7df4 100644 --- a/docroot/noc/conf/highlight.php +++ b/docroot/noc/conf/highlight.php @@ -4,11 +4,7 @@ $selectableFilepaths = glob( __DIR__ . '/*' ); // Name of file from user input -if( isset($_GET['file']) ){ - $selectedFileName = $_GET['file']; -} else { - $selectedFileName = null; -} +$selectedFileName = $_GET['file']; // Absolute path to file on disk $selectedFilePath = false; @@ -44,9 +40,8 @@ echo File not found\n; exit; } - - //no filename given or filename not existing in this directory - $hlHtml = preNo valid, whitelisted filename in parameter \file\ given./pre; + // Easter egg + $hlHtml = highlight_string( ''.?php\n\$secretSitePassword = 'jgmeidj28gms';\n, true ); } else { // Follow symlink @@ -88,11 +83,17 @@ /head body h1a href=./laquo;/a ?php echo $selectedFileNameEsc; ?/h1 +?php +if ( $selectedFilePath !== false ) : +? p( a href=https://git.wikimedia.org/history/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?version control/a bull; a href=https://git.wikimedia.org/blame/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?blame/a bull; a href=?php echo $selectedFileViewRawUrlEsc; ?raw text/a )/p +?php +endif; +? hr ?php echo $hlHtml; ? /body -- To view, visit https://gerrit.wikimedia.org/r/110925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Replace easter egg by a more explaining message - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Replace easter egg by a more explaining message .. Revert Replace easter egg by a more explaining message As well as follow up Fix test broken by Idda8cff80. For years and years we have build trust among our community by reaching consensus on change. Handling review and merging change on a Sunday despite minus votes is not friendly. Additionally that patch touch a very sensible part of code which need to be carefully reviewed for security issues. Even if it look harmless, it can lead to leak of private data. This reverts commits: f4f834ba0ffdc653e9219035be46a3fffa6a5367 a37d2b42299a7fab75e6dd786374c2ae65d6ceeb Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6 --- M docroot/noc/conf/highlight.php M tests/noc-conf/highlightTest.php 2 files changed, 10 insertions(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php index a2713be..3963508 100644 --- a/docroot/noc/conf/highlight.php +++ b/docroot/noc/conf/highlight.php @@ -44,8 +44,9 @@ echo File not found\n; exit; } - // No filename given or filename not existing in this directory - $hlHtml = preNo valid, whitelisted filename in parameter \file\ given./pre; + // Easter egg + $hlHtml = highlight_string( ''.?php\n\$secretSitePassword = 'jgmeidj28gms';\n, true ); + } else { // Follow symlink if ( !file_exists( $selectedFilePath ) ) { @@ -85,11 +86,17 @@ /head body h1a href=./laquo;/a ?php echo $selectedFileNameEsc; ?/h1 +?php +if ( $selectedFilePath !== false ) : +? p( a href=https://git.wikimedia.org/history/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?version control/a bull; a href=https://git.wikimedia.org/blame/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?blame/a bull; a href=?php echo $selectedFileViewRawUrlEsc; ?raw text/a )/p +?php +endif; +? hr ?php echo $hlHtml; ? /body diff --git a/tests/noc-conf/highlightTest.php b/tests/noc-conf/highlightTest.php index ac7da5b..7d7d58f 100644 --- a/tests/noc-conf/highlightTest.php +++ b/tests/noc-conf/highlightTest.php @@ -78,7 +78,7 @@ /** * @dataProvider provideInvalidCases */ - public function testInvalidCases( $q, $expect = 'No valid, whitelisted filename' ) { + public function testInvalidCases( $q, $expect = 'secretSitePassword' ) { $this-assertContains( $expect, $this-runHighlight( $q ), -- To view, visit https://gerrit.wikimedia.org/r/110925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Se4598 se4...@gmx.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] Replace easter egg by a more explaining message - change (operations/mediawiki-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/110926 Change subject: Replace easter egg by a more explaining message .. Replace easter egg by a more explaining message and make appearance the same Bug: 60741 Change-Id: I24ff4d72a447dae03fa7c92fa6b2189a62105b1d --- M docroot/noc/conf/highlight.php M tests/noc-conf/highlightTest.php 2 files changed, 3 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/26/110926/1 diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php index 3963508..a2713be 100644 --- a/docroot/noc/conf/highlight.php +++ b/docroot/noc/conf/highlight.php @@ -44,9 +44,8 @@ echo File not found\n; exit; } - // Easter egg - $hlHtml = highlight_string( ''.?php\n\$secretSitePassword = 'jgmeidj28gms';\n, true ); - + // No filename given or filename not existing in this directory + $hlHtml = preNo valid, whitelisted filename in parameter \file\ given./pre; } else { // Follow symlink if ( !file_exists( $selectedFilePath ) ) { @@ -86,17 +85,11 @@ /head body h1a href=./laquo;/a ?php echo $selectedFileNameEsc; ?/h1 -?php -if ( $selectedFilePath !== false ) : -? p( a href=https://git.wikimedia.org/history/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?version control/a bull; a href=https://git.wikimedia.org/blame/operations%2Fmediawiki-config.git/HEAD/?php echo urlencode( $selectedFileRepoPathEsc ); ?blame/a bull; a href=?php echo $selectedFileViewRawUrlEsc; ?raw text/a )/p -?php -endif; -? hr ?php echo $hlHtml; ? /body diff --git a/tests/noc-conf/highlightTest.php b/tests/noc-conf/highlightTest.php index 7d7d58f..ac7da5b 100644 --- a/tests/noc-conf/highlightTest.php +++ b/tests/noc-conf/highlightTest.php @@ -78,7 +78,7 @@ /** * @dataProvider provideInvalidCases */ - public function testInvalidCases( $q, $expect = 'secretSitePassword' ) { + public function testInvalidCases( $q, $expect = 'No valid, whitelisted filename' ) { $this-assertContains( $expect, $this-runHighlight( $q ), -- To view, visit https://gerrit.wikimedia.org/r/110926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24ff4d72a447dae03fa7c92fa6b2189a62105b1d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Se4598 se4...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove space that should not be!! - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove space that should not be!! .. Remove space that should not be!! Change-Id: I9241d518cbebaa15f0b5fb26f6490f78482ac3bd --- M lib/includes/formatters/MwTimeIsoFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: WikidataJenkins: Verified Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/MwTimeIsoFormatter.php index bcc1cea..265558e 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/MwTimeIsoFormatter.php @@ -39,7 +39,7 @@ } /** -* @see ValueFormatter::format +* @see ValueFormatter::format */ public function format( $value ) { return $this-formatDate( -- To view, visit https://gerrit.wikimedia.org/r/109691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9241d518cbebaa15f0b5fb26f6490f78482ac3bd Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@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] Support formatting time dataType via API in JS - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Support formatting time dataType via API in JS .. Support formatting time dataType via API in JS Change-Id: Ic41f73e6a116bb8b520a3d40d9729cdf55f9fb4d --- M lib/resources/formatters/wikibase.formatters.register.js 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: WikidataJenkins: Verified Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/formatters/wikibase.formatters.register.js b/lib/resources/formatters/wikibase.formatters.register.js index 9e2efca..5faac21 100644 --- a/lib/resources/formatters/wikibase.formatters.register.js +++ b/lib/resources/formatters/wikibase.formatters.register.js @@ -12,4 +12,9 @@ wb.formatters.QuantityFormatter ); + mw.ext.valueFormatters.valueFormatterProvider.registerFormatter( + dv.TimeValue.TYPE, + wb.formatters.ApiBasedValueFormatter + ); + }( mediaWiki, wikibase, dataValues ) ); -- To view, visit https://gerrit.wikimedia.org/r/109688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic41f73e6a116bb8b520a3d40d9729cdf55f9fb4d Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@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] Correctly register API-based time formatter - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/110927 Change subject: Correctly register API-based time formatter .. Correctly register API-based time formatter Change-Id: I8b7092e2c480cf9421ffe516b761a012df45d9ae --- M lib/resources/formatters/wikibase.formatters.register.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/27/110927/1 diff --git a/lib/resources/formatters/wikibase.formatters.register.js b/lib/resources/formatters/wikibase.formatters.register.js index 5cfd628..a58682b 100644 --- a/lib/resources/formatters/wikibase.formatters.register.js +++ b/lib/resources/formatters/wikibase.formatters.register.js @@ -12,9 +12,9 @@ dv.QuantityValue.TYPE ); - mw.ext.valueFormatters.valueFormatterProvider.registerFormatter( - dv.TimeValue.TYPE, - wb.formatters.ApiBasedValueFormatter + mw.ext.valueFormatters.valueFormatterProvider.registerDataValueFormatter( + wb.formatters.ApiBasedValueFormatter, + dv.TimeValue.TYPE ); }( mediaWiki, wikibase, dataValues ) ); -- To view, visit https://gerrit.wikimedia.org/r/110927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b7092e2c480cf9421ffe516b761a012df45d9ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Account for different font sizes when calculating max-width ... - change (mediawiki...erudite)
Njw has uploaded a new change for review. https://gerrit.wikimedia.org/r/110928 Change subject: Account for different font sizes when calculating max-width of hearer elements .. Account for different font sizes when calculating max-width of hearer elements Change-Id: I6f83b32f759315987dc3c581dc9f3307fa138354 --- M assets/erudite.css 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/erudite refs/changes/28/110928/1 diff --git a/assets/erudite.css b/assets/erudite.css index e788535..ca8e469 100644 --- a/assets/erudite.css +++ b/assets/erudite.css @@ -153,6 +153,8 @@ text-decoration: none; font-size: 2.25em; line-height: 1; + /* make max-width roughly the same as 80em at standard font size */ + max-width: 36em; } #top-wrap a, @@ -162,6 +164,8 @@ #tagline { font-size: 0.875em; + /* make max-width roughly the same as 80em at standard font size */ + max-width: 92em; } /* Menu */ -- To view, visit https://gerrit.wikimedia.org/r/110928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f83b32f759315987dc3c581dc9f3307fa138354 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/erudite Gerrit-Branch: master Gerrit-Owner: Njw nick.wh...@durham.ac.uk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add es3 to catch use of 'new' as object key. - change (mediawiki...Flow)
Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/110929 Change subject: Add es3 to catch use of 'new' as object key. .. Add es3 to catch use of 'new' as object key. This would have caught the IE8 breakage of mw.flow.action.topic.new(); that was fixed in 7c7b7c21a. Change-Id: I6e7ab8de037fb23460fdb13b7bdc83dda093a9ae --- M .jshintrc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/29/110929/1 diff --git a/.jshintrc b/.jshintrc index 20762bc..d495cd7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -17,6 +17,7 @@ curly:true, // requres curly braces around loops and conditionals devel:true, // console, alert, etc. eqeqeq: true, // prohibits == and != + es3: true, // catch foo.new object keys forin:false, // make for-in loops require hasOwnProperty check onevar: true, // only one var declaration per function supernew: true, // suppress warnings about weird object constructions -- To view, visit https://gerrit.wikimedia.org/r/110929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e7ab8de037fb23460fdb13b7bdc83dda093a9ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Spage sp...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix jsduck command for documentation generation. - change (mediawiki...ContentTranslation)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/110930 Change subject: Fix jsduck command for documentation generation. .. Fix jsduck command for documentation generation. * Correct jsduck command * Added docs/ to .gitignore Change-Id: Id29a4258847ae67b5a565bcc917b6e76d82570df --- M .gitignore M CONTRIBUTING.md 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/30/110930/1 diff --git a/.gitignore b/.gitignore index 6465a1b..890ba09 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .*.swp .idea .bundle/ +docs/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 362a167..784d39a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ Creating the documentation is easy: ```sh $ cd ContentTranslation -$ .docs/generate.sh +$ jsduck source --output docs ``` You may need to set `MW_INSTALL_PATH` in your environment to the location of -- To view, visit https://gerrit.wikimedia.org/r/110930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id29a4258847ae67b5a565bcc917b6e76d82570df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] spamd: change to use nrpe::monitor_service - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/110931 Change subject: spamd: change to use nrpe::monitor_service .. spamd: change to use nrpe::monitor_service Change-Id: Ic532195a8c71e91bb598e4afdd9c632b617e0201 --- M manifests/mail.pp M modules/nrpe/templates/nrpe_local.cfg.erb M templates/icinga/checkcommands.cfg.erb 3 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/31/110931/1 diff --git a/manifests/mail.pp b/manifests/mail.pp index c5c4c25..ed8714e 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -356,7 +356,10 @@ ensure = running; } - monitor_service { spamd: description = spamassassin, check_command = nrpe_check_spamd } + nrpe::monitor_service { 'spamd': +description = 'spamassassin', +nrpe_command = '/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1:40 -a spamd', +} } class mailman { @@ -407,7 +410,7 @@ pattern = mailmanctl } - monitor_service { procs_mailman: description = mailman, check_command = nrpe_check_mailman } + monitor_service { 'procs_mailman': description = mailman, check_command = nrpe_check_mailman } } class web-ui { diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb b/modules/nrpe/templates/nrpe_local.cfg.erb index 862a9f2..69310e8 100644 --- a/modules/nrpe/templates/nrpe_local.cfg.erb +++ b/modules/nrpe/templates/nrpe_local.cfg.erb @@ -14,7 +14,6 @@ # process checks, we can't make this generic because we don't pass args via nrpe (security) command[check_mailman]=/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1:35 -a mailman -command[check_spamd]=/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1:40 -a spamd command[check_varnishncsa]=/usr/lib/nagios/plugins/check_procs -w 2:2 -c 2:6 -C varnishncsa command[check_mysqld]=/usr/lib/nagios/plugins/check_procs -c 1:1 -C mysqld command[check_carbon_cache]=/usr/lib/nagios/plugins/check_procs -c 1:2 -a carbon-cache.py diff --git a/templates/icinga/checkcommands.cfg.erb b/templates/icinga/checkcommands.cfg.erb index cfc3103..4a63990 100644 --- a/templates/icinga/checkcommands.cfg.erb +++ b/templates/icinga/checkcommands.cfg.erb @@ -365,10 +365,6 @@ command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_mailman } define command{ - command_namenrpe_check_spamd - command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_spamd -} -define command{ command_namenrpe_check_carbon_cache command_line$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_carbon_cache } -- To view, visit https://gerrit.wikimedia.org/r/110931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic532195a8c71e91bb598e4afdd9c632b617e0201 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New permissions for update/delete of annotations - change (mediawiki...Annotator)
Chiborg has uploaded a new change for review. https://gerrit.wikimedia.org/r/110932 Change subject: New permissions for update/delete of annotations .. New permissions for update/delete of annotations Annotation actions are now checked for the updateannotation and deleteannotation permissions. If they are set, the user can update/edit annotations even if they don't belong to him. This modification overwrites the permission settings that are stored in the DB, but does not strip the permission info on create/update like the patch for bug 53068 in ChangeID I068b356787bc63abe6e2a8bc135eea0c633281dd does. Eventually, the code for stripping the permissions on create/update has to be merged. Bug: 60616 Change-Id: Ib10140fc6fb878f586ec6e02a0a162857ce2 --- M AnnotationRepository.php M Annotator.php A AnnotatorPermissions.php M README.md M api/ApiAnnotatorDestroy.php M api/ApiAnnotatorRead.php M api/ApiAnnotatorSearch.php M api/ApiAnnotatorUpdate.php 8 files changed, 131 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Annotator refs/changes/32/110932/1 diff --git a/AnnotationRepository.php b/AnnotationRepository.php index 95117df..129907c 100644 --- a/AnnotationRepository.php +++ b/AnnotationRepository.php @@ -1,5 +1,20 @@ ?php class AnnotationRepository { + +/** + * + * @var AnnotatorPermissions + */ +protected $permissions; + +/** + * + * @param AnnotatorPermissions $permissions + */ +public function __construct($permissions) { +$this-permissions = $permissions; +} + public function get( $annotation_id ) { $dbr = wfGetDB( DB_SLAVE ); @@ -22,7 +37,7 @@ return null; } - $annotation = AnnotationRepository::populateAnnotation( $result-annotation_json, $annotation_id, $result-annotation_user_id, $result-annotation_user_text ); + $annotation = AnnotationRepository::populateAnnotation( $result-annotation_json, $annotation_id, $result-annotation_user_id, $result-annotation_user_text, $this-permissions ); return $annotation; } @@ -47,18 +62,19 @@ $annotations['rows'] = array(); $total = 0; foreach($res as $result) { - $annotations['rows'][] = AnnotationRepository::populateAnnotation( $result-annotation, $result-id, $result-userId, $result-userText ); + $annotations['rows'][] = AnnotationRepository::populateAnnotation( $result-annotation, $result-id, $result-userId, $result-userText, $this-permissions ); $total = $total + 1; } $annotations['total'] = $total; return $annotations; } - protected function populateAnnotation( $annotation_json, $annotation_id, $userId, $userText ) { + protected function populateAnnotation( $annotation_json, $annotation_id, $userId, $userText, $permissions ) { $annotation = json_decode($annotation_json); $annotation-id = $annotation_id; //update the annotation object with the ID $annotation-user-id = $userId; $annotation-user-userText = $userText; +$annotation-permissions = $permissions-getPermissions($annotation); return $annotation; } } \ No newline at end of file diff --git a/Annotator.php b/Annotator.php index 59b9649..523adea 100755 --- a/Annotator.php +++ b/Annotator.php @@ -38,6 +38,7 @@ //Autoloading $wgAutoloadClasses['AnnotatorHooks'] = $dir . 'Annotator.hooks.php'; +$wgAutoloadClasses['AnnotatorPermissions'] = $dir . 'AnnotatorPermissions.php'; $wgAutoloadClasses['ApiAnnotatorCreate'] = $dir . 'api/ApiAnnotatorCreate.php'; $wgAutoloadClasses['ApiAnnotatorRead'] = $dir . 'api/ApiAnnotatorRead.php'; $wgAutoloadClasses['ApiAnnotatorSearch'] = $dir . 'api/ApiAnnotatorSearch.php'; @@ -55,4 +56,7 @@ $wgAPIModules['annotator-destroy'] = 'ApiAnnotatorDestroy'; $wgAPIModules['annotator-update'] = 'ApiAnnotatorUpdate'; +$wgGroupPermissions['sysop']['updateannotation'] = true; +$wgGroupPermissions['sysop']['deleteannotation'] = true; + unset( $dir ); diff --git a/AnnotatorPermissions.php b/AnnotatorPermissions.php new file mode 100644 index 000..0ea1751 --- /dev/null +++ b/AnnotatorPermissions.php @@ -0,0 +1,81 @@ +?php + +/** + * This file contains the class AnnotatorPermisions + * + * @author birkeg + */ + +/** + * Generate and check permission arrays for annotator objects + * + * @author birkeg + */ +class AnnotatorPermissions { + +/** + * + * @var User + */ +protected $user; + +/** + * + * @var int + */ +protected $userId; + +/** + * + * @param User $user
[MediaWiki-commits] [Gerrit] rewrite db2 test as php unit test - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/110933 Change subject: rewrite db2 test as php unit test .. rewrite db2 test as php unit test Change-Id: I4bcd2c1950fc8facd56f4ca24310fdfab52102ca --- M MathSearch.hooks.php D maintenance/db2test.php A tests/MathDB2ConnectionTest.php 3 files changed, 44 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/33/110933/1 diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index 941f8d6..5f37745 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -40,6 +40,18 @@ } /** +* Checks if the db2 php client is installed +* @return boolean +*/ + public static function isDB2Supported(){ + if ( function_exists('db2_connect') ){ + return true; + } else { + return false; + } + } + + /** * Callback function that is called after a formula was rendered * * @param $content diff --git a/maintenance/db2test.php b/maintenance/db2test.php deleted file mode 100644 index 5cbc3de..000 --- a/maintenance/db2test.php +++ /dev/null @@ -1,37 +0,0 @@ -?php - -require_once( dirname(__FILE__) . '/../../../maintenance/Maintenance.php' ); - -class db2Test extends Maintenance { - - public function execute() { - - global $wgMathSearchDB2ConnStr; - if ($wgMathSearchDB2ConnStr !== false) { - $conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); - - if ($conn) { - echo Connection succeeded.; - db2_close($conn); - } else { - echo Connection failed.; - } - } else { - $message = 'EOT' -Add something like that to LocalSettings.php -$database = 'SAMPLE'; -$user = 'db2inst1'; -$password = 'ibmdb2'; -$hostname = 'localhost'; -$port = 5; -$wgMathSearchDB2ConnStr = DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database; . - HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;; -EOT; - echo $message; - } - } - -} - -$maintClass = db2Test; -require_once( RUN_MAINTENANCE_IF_MAIN ); diff --git a/tests/MathDB2ConnectionTest.php b/tests/MathDB2ConnectionTest.php new file mode 100644 index 000..5b93f05 --- /dev/null +++ b/tests/MathDB2ConnectionTest.php @@ -0,0 +1,32 @@ +?php +/** + * Test the db2 access of MathSearch. +* +* @group MathSearch +* @group Database +*/ +class MathD2ConnectionTest extends MediaWikiTestCase { + public function testConnect() { + global $wgMathSearchDB2ConnStr; + if ( ! MathSearchHooks::isDB2Supported() ) { + $this-markTestSkipped( 'DB2 php client is not installed.' ); + } + if ( $wgMathSearchDB2ConnStr !== false ) { + $conn = db2_connect( $wgMathSearchDB2ConnStr, '', '' ); + $this-assertInternalType( 'resource', $conn, 'Connection failed.' ); + db2_close( $conn ); + } else { + $message = 'EOT' +Add something like that to LocalSettings.php +$database = 'SAMPLE'; +$user = 'db2inst1'; +$password = 'ibmdb2'; +$hostname = 'localhost'; +$port = 5; +$wgMathSearchDB2ConnStr = DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database; . + HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;; +EOT; + echo $message; + } + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/110933 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bcd2c1950fc8facd56f4ca24310fdfab52102ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] switch back to ibm driver (pdo_ibm-ibm_db2) - change (mediawiki...MathSearch)
Physikerwelt has submitted this change and it was merged. Change subject: switch back to ibm driver (pdo_ibm-ibm_db2) .. switch back to ibm driver (pdo_ibm-ibm_db2) * db2pdo seems to be not very well supported event though though the API of PDO is somhow nicer Change-Id: Ib198630e3a0b558407891b96aaa4f01481200c35 --- M maintenance/ExportMathTable.php 1 file changed, 15 insertions(+), 30 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/maintenance/ExportMathTable.php b/maintenance/ExportMathTable.php index cfb4ec4..7f10d6f 100644 --- a/maintenance/ExportMathTable.php +++ b/maintenance/ExportMathTable.php @@ -28,15 +28,13 @@ * */ class ExportMathTable extends IndexBase { - private $db2Pass; private $statment; - private $dbh; + private $conn; private $time; public function __construct() { parent::__construct(); $this-mDescription = 'Exports a db2 compatible math index table.'; - $this-addArg( 'passw', If set, the data is directly imported to db2, false ); $this-addArg( 'truncate', If true, db2 math table is deleted before import, false ); } @@ -51,24 +49,17 @@ $out .= ','. $row-mathindex_page_id .''; $out .= ','. $row-mathindex_anchor.''; $out .= ','.str_replace(array('',\n),array('',' '), $mo-getMathml()).''; - if( $this-db2Pass ) { - try { - $this-statment-execute(array($mo-getMd5(),$mo-getTex(),$row-mathindex_page_id,$row-mathindex_anchor,$mo-getMathml())); - } catch (Exception $e) { - echo($e-getMessage()); - } + $res = db2_execute($this-statment, array($mo-getMd5(),$mo-getTex(),$row-mathindex_page_id,$row-mathindex_anchor,$mo-getMathml())); + if ( $res ){ + echo db2_stmt_errormsg(); } return $out.\n; } protected function wFile( $fn, $min, $inc ) { - if( $this-db2Pass ) { - try{ - $this-dbh-commit(); - } catch (Exception $e) { - echo($e-getMessage()); - } - $this-dbh-beginTransaction(); + $res = db2_commit($this-conn); + if ( $res ){ + echo db2_stmt_errormsg(); } $delta = microtime(true) - $this-time ; $this-time = microtime(true); @@ -77,23 +68,17 @@ } public function execute() { + global $wgMathSearchDB2ConnStr; $this-time = microtime(true); - $this-db2Pass = $this-getOption( 'passw',false ); - if ( $this-db2Pass ){ - try { - $this-dbh = new PDO(ibm:MATH, db2inst1, $this-db2Pass, array( - PDO::ATTR_PERSISTENT = TRUE, - PDO::ATTR_ERRMODE = PDO::ERRMODE_EXCEPTION) - ); - } catch (Exception $e) { - echo($e-getMessage()); - } + $this-conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); + if ( $this-conn ){ if ( $this-getOption('truncate' , false ) ){ -$this-dbh-query('TRUNCATE TABLE wiki.math IMMEDIATE'); + db2_exec($this-conn,'DROP TABLE math'); + db2_exec( $this-conn , 'CREATE TABLE math (math_md5 CHAR(32), math_tex VARCHAR(1000), mathindex_pageid INTEGER, mathindex_anchord INTEGER, math_mathml XML)'); + } - $this-dbh-beginTransaction(); - $this-statment = $this-dbh-prepare('insert into wiki.math (math_md5, math_tex, mathindex_pageid, mathindex_anchord, math_mathml) values(?, ?, ?, ?, ?)'); - + $this-statment = db2_prepare( $this-conn ,'insert into math (math_md5, math_tex, mathindex_pageid, mathindex_anchord, math_mathml) values(?, ?, ?, ?, ?)'); + //db2_autocommit($this-conn , DB2_AUTOCOMMIT_OFF); } parent::execute(); } -- To view, visit https://gerrit.wikimedia.org/r/110895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib198630e3a0b558407891b96aaa4f01481200c35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] rewrite db2 test as php unit test - change (mediawiki...MathSearch)
Physikerwelt has submitted this change and it was merged. Change subject: rewrite db2 test as php unit test .. rewrite db2 test as php unit test Change-Id: I4bcd2c1950fc8facd56f4ca24310fdfab52102ca --- M MathSearch.hooks.php D maintenance/db2test.php A tests/MathDB2ConnectionTest.php 3 files changed, 44 insertions(+), 37 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index 941f8d6..5f37745 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -40,6 +40,18 @@ } /** +* Checks if the db2 php client is installed +* @return boolean +*/ + public static function isDB2Supported(){ + if ( function_exists('db2_connect') ){ + return true; + } else { + return false; + } + } + + /** * Callback function that is called after a formula was rendered * * @param $content diff --git a/maintenance/db2test.php b/maintenance/db2test.php deleted file mode 100644 index 5cbc3de..000 --- a/maintenance/db2test.php +++ /dev/null @@ -1,37 +0,0 @@ -?php - -require_once( dirname(__FILE__) . '/../../../maintenance/Maintenance.php' ); - -class db2Test extends Maintenance { - - public function execute() { - - global $wgMathSearchDB2ConnStr; - if ($wgMathSearchDB2ConnStr !== false) { - $conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); - - if ($conn) { - echo Connection succeeded.; - db2_close($conn); - } else { - echo Connection failed.; - } - } else { - $message = 'EOT' -Add something like that to LocalSettings.php -$database = 'SAMPLE'; -$user = 'db2inst1'; -$password = 'ibmdb2'; -$hostname = 'localhost'; -$port = 5; -$wgMathSearchDB2ConnStr = DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database; . - HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;; -EOT; - echo $message; - } - } - -} - -$maintClass = db2Test; -require_once( RUN_MAINTENANCE_IF_MAIN ); diff --git a/tests/MathDB2ConnectionTest.php b/tests/MathDB2ConnectionTest.php new file mode 100644 index 000..5b93f05 --- /dev/null +++ b/tests/MathDB2ConnectionTest.php @@ -0,0 +1,32 @@ +?php +/** + * Test the db2 access of MathSearch. +* +* @group MathSearch +* @group Database +*/ +class MathD2ConnectionTest extends MediaWikiTestCase { + public function testConnect() { + global $wgMathSearchDB2ConnStr; + if ( ! MathSearchHooks::isDB2Supported() ) { + $this-markTestSkipped( 'DB2 php client is not installed.' ); + } + if ( $wgMathSearchDB2ConnStr !== false ) { + $conn = db2_connect( $wgMathSearchDB2ConnStr, '', '' ); + $this-assertInternalType( 'resource', $conn, 'Connection failed.' ); + db2_close( $conn ); + } else { + $message = 'EOT' +Add something like that to LocalSettings.php +$database = 'SAMPLE'; +$user = 'db2inst1'; +$password = 'ibmdb2'; +$hostname = 'localhost'; +$port = 5; +$wgMathSearchDB2ConnStr = DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database; . + HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;; +EOT; + echo $message; + } + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/110933 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bcd2c1950fc8facd56f4ca24310fdfab52102ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Jack Phoenix. He's been here for about 6 years. - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add Jack Phoenix. He's been here for about 6 years. .. Add Jack Phoenix. He's been here for about 6 years. p.s. Also fix Nemo's username. Change-Id: I74e2793f1e2d0e4e3b4e9685a8951ed949de12d9 --- M layout.yaml 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Alex Monk: Looks good to me, but someone else must approve Bartosz Dziewoński: Looks good to me, but someone else must approve Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index fdf96e9..2e45d13 100644 --- a/layout.yaml +++ b/layout.yaml @@ -37,7 +37,7 @@ # TODO: Figure out a way to not have to repeat this from pipeline 'test'. # This email_filter and the one for 'test' can be removed once we have fixed bug 45499. email_filter: -- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it)).*$ +- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net)).*$ - event: comment-added comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$ success-message: 'Build succeeded.' @@ -160,9 +160,10 @@ - ^d_entous@yahoo\.com$ - ^daniel@nadir-seen-fire\.com$ - ^dereckson@espace-win\.org$ - - ^federicoleva@tiscali\.it$ # Nemo Bis + - ^federicoleva@tiscali\.it$ # Nemo bis - ^hartman\.wiki@gmail\.com$ - ^jamesin\.hongkong\.1@gmail\.com$ # Mwjames + - ^jack@countervandalism\.net$ # Jack Phoenix - ^krenair@gmail\.com$ - ^liangent@gmail\.com$ - ^mah@everybody\.org$ -- To view, visit https://gerrit.wikimedia.org/r/110658 To
[MediaWiki-commits] [Gerrit] Add several users who now have quite a few commits - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add several users who now have quite a few commits .. Add several users who now have quite a few commits This adds: Hydriz, Jackmcbarn, Jarry1250, Platonides, and This, that and the other (TTO). Platonides is of course a trusted person who has been around forever. Some of the other users added here are newer, however all of these users have at least a page worth of merged commits in gerrit. Change-Id: Ic64f9a58173ab79e30ab5459c1648f7b559827f8 --- M layout.yaml 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 2e45d13..3b5518a 100644 --- a/layout.yaml +++ b/layout.yaml @@ -37,7 +37,7 @@ # TODO: Figure out a way to not have to repeat this from pipeline 'test'. # This email_filter and the one for 'test' can be removed once we have fixed bug 45499. email_filter: -- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net)).*$ +- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com)).*$ - event: comment-added comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$ success-message: 'Build succeeded.' @@ -154,6 +154,7 @@ - ^drenfro@vistaprint\.com$ # AlephNull # Trusted long term users: + - ^admin@alphacorp\.tk$ # Hydriz - ^benestar\.wikimedia@googlemail\.com$ - ^bryan\.tongminh@gmail\.com$ - ^codereview@emsenhuber\.ch$ @@
[MediaWiki-commits] [Gerrit] Additional suffixes for PHP code - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Additional suffixes for PHP code .. Additional suffixes for PHP code Drupal likes to hide PHP behind esoteric filename extensions. Ferret these out so they can be checked for lint. We could also implement a new builder to handle Drupal repos exclusively, but these extensions are probably safe for any project. Change-Id: Ifed2155ae7fb711c0de229f64cdffa236b1b9e43 --- M macro.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/macro.yaml b/macro.yaml index c83ac3d..2e967a3 100644 --- a/macro.yaml +++ b/macro.yaml @@ -417,7 +417,7 @@ name: phplint builders: - shell: | -/srv/deployment/integration/slave-scripts/bin/git-changed-in-head php php5 inc phtml \ +/srv/deployment/integration/slave-scripts/bin/git-changed-in-head php php5 inc phtml module install \ | xargs -n1 -t php -l # run phpcs on any .php and .inc files in the workspace -- To view, visit https://gerrit.wikimedia.org/r/110914 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifed2155ae7fb711c0de229f64cdffa236b1b9e43 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Adamw awi...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use new ParsoidService env vars in apiServer.js, bind to loc... - change (mediawiki...parsoid)
Marcoil has uploaded a new change for review. https://gerrit.wikimedia.org/r/110934 Change subject: Use new ParsoidService env vars in apiServer.js, bind to localhost .. Use new ParsoidService env vars in apiServer.js, bind to localhost Change-Id: Ie1bbc85689925c22bcc7c7a5231174910aae47f2 --- M tests/apiServer.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/34/110934/1 diff --git a/tests/apiServer.js b/tests/apiServer.js index f772a5b..c292dc7 100644 --- a/tests/apiServer.js +++ b/tests/apiServer.js @@ -25,7 +25,8 @@ '--config', path.resolve( __dirname, './test.localsettings.js' ) ], { env: { - VCAP_APP_PORT: port, + PARSOID_PORT: port, + PARSOID_HOST: localhost, NODE_PATH: process.env.NODE_PATH } } ); -- To view, visit https://gerrit.wikimedia.org/r/110934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1bbc85689925c22bcc7c7a5231174910aae47f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Marcoil marc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make mmv handle urlencoded hashes - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Make mmv handle urlencoded hashes .. Make mmv handle urlencoded hashes Change-Id: Id05806be4586a3d6f04b92ace2c8195b8de016bc Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/153 --- M resources/mmv/mmv.js M tests/qunit/mmv.test.js 2 files changed, 52 insertions(+), 5 deletions(-) Approvals: Gilles: Looks good to me, approved Aarcos: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index 6d99ffc..c609a13 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -982,17 +982,23 @@ return date.format( 'LL' ); }; - function handleHash( hash ) { - var statedIndex, $foundElement, linkState = hash.split( '/' ); + function handleHash() { + var statedIndex, + $foundElement, + hash = decodeURIComponent( document.location.hash ), + linkState = hash.split( '/' ); + comingFromPopstate = true; if ( linkState[0] === '#mediaviewer' ) { statedIndex = mw.mediaViewer.lightbox.images[linkState[2]]; + if ( statedIndex.filePageTitle.getPrefixedText() === linkState[1] ) { $foundElement = $( imgsSelector ).eq( linkState[2] ); mw.mediaViewer.loadImage( statedIndex, $foundElement.prop( 'src' ) ); } } else { - if ( mw.mediaViewer.lightbox ) { + // If the hash is invalid (not a mmv hash) we check if there's any mmv lightbox open and we close it + if ( mw.mediaViewer mw.mediaViewer.lightbox mw.mediaViewer.lightbox.iface ) { mw.mediaViewer.lightbox.iface.unattach(); } } @@ -1006,8 +1012,8 @@ mw.mediaViewer = viewer; - handleHash( document.location.hash ); - window.addEventListener( 'popstate', function () { handleHash( document.location.hash ); } ); + handleHash(); + window.addEventListener( 'popstate', handleHash ); } ); mw.MultimediaViewer = MultimediaViewer; diff --git a/tests/qunit/mmv.test.js b/tests/qunit/mmv.test.js index 8fb443c..7e73e94 100644 --- a/tests/qunit/mmv.test.js +++ b/tests/qunit/mmv.test.js @@ -529,4 +529,45 @@ profileEvent = 'image-load'; viewer.loadAndSetImage( ui, imageData, targetWidth, requestedWidth, profileEvent ); } ); + + QUnit.test( 'Hash handling', 5, function ( assert ) { + var oldLoadImage = mw.mediaViewer.loadImage, + oldLightbox = mw.mediaViewer.lightbox, + imageSrc = 'Foo bar.jpg', + image = { filePageTitle: new mw.Title( 'File:' + imageSrc ) }; + + document.location.hash = ''; + + mw.mediaViewer.lightbox = { iface: { unattach: function() { + assert.ok( true, 'Interface unattached' ); + } } }; + + // Verify that passing an invalid mmv hash triggers unattach() + document.location.hash = 'Foo'; + + mw.mediaViewer.lightbox = { images: [ image ] }; + + $( '#qunit-fixture' ).append( 'a class=imageimg src=' + imageSrc + '/a' ); + + mw.mediaViewer.loadImage = function( img, src ) { + assert.strictEqual( img, image, 'The image object matches' ); + assert.ok( src.match( encodeURIComponent( imageSrc ) ), 'The image url matches' ); + }; + + // Open a valid mmv hash link and check that the right image is requested. + // imageSrc contains a space without any encoding on purpose + document.location.hash = 'mediaviewer/File:' + imageSrc + '/0'; + + // Reset the hash, because for some browsers switching from the non-URI-encoded to + // the non-URI-encoded version of the same text with a space will not trigger a hash change + document.location.hash = ''; + + // Try again with an URI-encoded imageSrc containing a space + document.location.hash = 'mediaviewer/File:' + encodeURIComponent( imageSrc ) + '/0'; + + mw.mediaViewer.lightbox = oldLightbox; + mw.mediaViewer.loadImage = oldLoadImage; + + document.location.hash = ''; + } ); }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/110522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Remove bad test case - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove bad test case .. Remove bad test case Change-Id: Ia51b1e0917d6ac2405fbd6b4469c5795d11e77e6 --- D lib/tests/phpunit/store/SiteLinkLookupTest.php 1 file changed, 0 insertions(+), 51 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/lib/tests/phpunit/store/SiteLinkLookupTest.php b/lib/tests/phpunit/store/SiteLinkLookupTest.php deleted file mode 100644 index d632348..000 --- a/lib/tests/phpunit/store/SiteLinkLookupTest.php +++ /dev/null @@ -1,51 +0,0 @@ -?php - -namespace Wikibase\Test; - -use Wikibase\Item; -use Wikibase\SiteLinkLookup; -use Wikibase\Client\WikibaseClient; -use Wikibase\StoreFactory; - -/** - * Tests for the Wikibase\SiteLinkLookup implementing classes. - * - * @since 0.1 - * - * @group Wikibase - * @group WikibaseLib - * @group WikibaseStore - * @group Database - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com - */ -class SiteLinkLookupTest extends \MediaWikiTestCase { - - public function instanceProvider() { - $instances = array(); - - if ( defined( 'WB_VERSION' ) ) { - $instances[] = StoreFactory::getStore( 'sqlstore' )-newSiteLinkCache(); - } - - if ( defined( 'WBC_VERSION' ) ) { - $instances[] = WikibaseClient::getDefaultInstance()-getStore( 'sqlstore' )-getSiteLinkTable(); - } - - if ( empty( $instances ) ) { - $this-markTestIncomplete( 'No sitelink lookup tables available' ); - } - - return $this-arrayWrap( $instances ); - } - - /** -* @dataProvider instanceProvider -*/ - public function testGetConflictsForItem( SiteLinkLookup $lookup ) { - $conflicts = $lookup-getConflictsForItem( Item::newEmpty() ); - $this-assertTrue( $conflicts === array() ); - } - -} -- To view, visit https://gerrit.wikimedia.org/r/110890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia51b1e0917d6ac2405fbd6b4469c5795d11e77e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions WikiPage calls out to this in order to get a ParserOptions object for use in WikiPage::doEditUpdates. We need to override it, as we need custom options in there. Bug: 60715 Change-Id: I2541d384fe424190db2514295bfe751961adfa95 --- M repo/includes/content/EntityContent.php M repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/repo/includes/content/EntityHandler.php b/repo/includes/content/EntityHandler.php index a4adfcd..cc37837 100644 --- a/repo/includes/content/EntityHandler.php +++ b/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2541d384fe424190db2514295bfe751961adfa95 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/110935 Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions WikiPage calls out to this in order to get a ParserOptions object for use in WikiPage::doEditUpdates. We need to override it, as we need custom options in there. Bug: 60715 Change-Id: I2541d384fe424190db2514295bfe751961adfa95 (cherry picked from commit 9a8d76d733a2600955a0450c092c5bb1d57a4f15) --- M repo/includes/content/EntityContent.php M repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/35/110935/1 diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/repo/includes/content/EntityHandler.php b/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/repo/includes/content/EntityHandler.php +++ b/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2541d384fe424190db2514295bfe751961adfa95 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.23-wmf11 Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use correct options for GlobeCoordinateFormatter - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/110936 Change subject: Use correct options for GlobeCoordinateFormatter .. Use correct options for GlobeCoordinateFormatter Change-Id: I58fdad1462971ede8efca7785cbde249101e2c1e --- M lib/includes/formatters/WikibaseValueFormatterBuilders.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/36/110936/1 diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 7fe9fb8..b258bc4 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -5,6 +5,8 @@ use Language; use ValueFormatters\DecimalFormatter; use ValueFormatters\FormatterOptions; +use ValueFormatters\GeoCoordinateFormatter; +use ValueFormatters\GlobeCoordinateFormatter; use ValueFormatters\QuantityFormatter; use ValueFormatters\ValueFormatter; use Wikibase\EntityLookup; @@ -58,7 +60,7 @@ // formatters to use for plain text output SnakFormatter::FORMAT_PLAIN = array( 'VT:string' = 'ValueFormatters\StringFormatter', - 'VT:globecoordinate' = 'ValueFormatters\GlobeCoordinateFormatter', + 'VT:globecoordinate' = array( 'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newGlobeCoordinateFormatter' ), 'VT:quantity' = array( 'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newQuantityFormatter' ), 'VT:time' = 'Wikibase\Lib\MwTimeIsoFormatter', 'VT:wikibase-entityid' = array( 'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newEntityIdFormatter' ), -- To view, visit https://gerrit.wikimedia.org/r/110936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58fdad1462971ede8efca7785cbde249101e2c1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikidata)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/110938 Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions Picked from I2541d384fe42 Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 --- M extensions/Wikibase/repo/includes/content/EntityContent.php M extensions/Wikibase/repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/38/110938/1 diff --git a/extensions/Wikibase/repo/includes/content/EntityContent.php b/extensions/Wikibase/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/extensions/Wikibase/repo/includes/content/EntityContent.php +++ b/extensions/Wikibase/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/extensions/Wikibase/repo/includes/content/EntityHandler.php b/extensions/Wikibase/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/extensions/Wikibase/repo/includes/content/EntityHandler.php +++ b/extensions/Wikibase/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: mw1.23-wmf11 Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikidata)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/110937 Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions Picked from I2541d384fe42 Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 --- M extensions/Wikibase/repo/includes/content/EntityContent.php M extensions/Wikibase/repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/37/110937/1 diff --git a/extensions/Wikibase/repo/includes/content/EntityContent.php b/extensions/Wikibase/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/extensions/Wikibase/repo/includes/content/EntityContent.php +++ b/extensions/Wikibase/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/extensions/Wikibase/repo/includes/content/EntityHandler.php b/extensions/Wikibase/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/extensions/Wikibase/repo/includes/content/EntityHandler.php +++ b/extensions/Wikibase/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add an ApiBasedValueFormatter for GlobeCoordinateValues - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/110939 Change subject: Add an ApiBasedValueFormatter for GlobeCoordinateValues .. Add an ApiBasedValueFormatter for GlobeCoordinateValues Change-Id: I836bbfb254530efc1b0290b0027651eed3e38ba8 --- M lib/resources/formatters/wikibase.formatters.register.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/39/110939/1 diff --git a/lib/resources/formatters/wikibase.formatters.register.js b/lib/resources/formatters/wikibase.formatters.register.js index 5cfd628..889ff1c 100644 --- a/lib/resources/formatters/wikibase.formatters.register.js +++ b/lib/resources/formatters/wikibase.formatters.register.js @@ -17,4 +17,8 @@ wb.formatters.ApiBasedValueFormatter ); + mw.ext.valueFormatters.valueFormatterProvider.registerDataValueFormatter( + wb.formatters.ApiBasedValueFormatter, + dv.GlobeCoordinateValue.TYPE + ); }( mediaWiki, wikibase, dataValues ) ); -- To view, visit https://gerrit.wikimedia.org/r/110939 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I836bbfb254530efc1b0290b0027651eed3e38ba8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly register API-based time formatter - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly register API-based time formatter .. Correctly register API-based time formatter Change-Id: I8b7092e2c480cf9421ffe516b761a012df45d9ae --- M lib/resources/formatters/wikibase.formatters.register.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: WikidataJenkins: Verified Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/formatters/wikibase.formatters.register.js b/lib/resources/formatters/wikibase.formatters.register.js index 5cfd628..a58682b 100644 --- a/lib/resources/formatters/wikibase.formatters.register.js +++ b/lib/resources/formatters/wikibase.formatters.register.js @@ -12,9 +12,9 @@ dv.QuantityValue.TYPE ); - mw.ext.valueFormatters.valueFormatterProvider.registerFormatter( - dv.TimeValue.TYPE, - wb.formatters.ApiBasedValueFormatter + mw.ext.valueFormatters.valueFormatterProvider.registerDataValueFormatter( + wb.formatters.ApiBasedValueFormatter, + dv.TimeValue.TYPE ); }( mediaWiki, wikibase, dataValues ) ); -- To view, visit https://gerrit.wikimedia.org/r/110927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b7092e2c480cf9421ffe516b761a012df45d9ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@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] Restore LVS sysctl priority of 50 - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/110940 Change subject: Restore LVS sysctl priority of 50 .. Restore LVS sysctl priority of 50 The default Ubuntu precise sysctl.pp have priority 10, and conflict with the LVS sysctl settings which, until now, had equal priority. Due to file naming, the Ubuntu defaults were executed last, and thus rp_filter was turned on, breaking LVS. Change-Id: I36cf9790362244d996f50cf270c39875939a3b01 --- M modules/lvs/manifests/balancer.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/110940/1 diff --git a/modules/lvs/manifests/balancer.pp b/modules/lvs/manifests/balancer.pp index c3118a3..2737c0c 100644 --- a/modules/lvs/manifests/balancer.pp +++ b/modules/lvs/manifests/balancer.pp @@ -53,6 +53,7 @@ # removed in = 3.6 kernels. 'net.ipv4.rt_cache_rebuild_count' = -1, }, +priority = 50, } generic::upstart_job { enable-rps: install = true, start = true } -- To view, visit https://gerrit.wikimedia.org/r/110940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36cf9790362244d996f50cf270c39875939a3b01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] Restore LVS sysctl priority of 50 - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Restore LVS sysctl priority of 50 .. Restore LVS sysctl priority of 50 The default Ubuntu precise sysctl.pp have priority 10, and conflict with the LVS sysctl settings which, until now, had equal priority. Due to file naming, the Ubuntu defaults were executed last, and thus rp_filter was turned on, breaking LVS. Change-Id: I36cf9790362244d996f50cf270c39875939a3b01 --- M modules/lvs/manifests/balancer.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/lvs/manifests/balancer.pp b/modules/lvs/manifests/balancer.pp index c3118a3..2737c0c 100644 --- a/modules/lvs/manifests/balancer.pp +++ b/modules/lvs/manifests/balancer.pp @@ -53,6 +53,7 @@ # removed in = 3.6 kernels. 'net.ipv4.rt_cache_rebuild_count' = -1, }, +priority = 50, } generic::upstart_job { enable-rps: install = true, start = true } -- To view, visit https://gerrit.wikimedia.org/r/110940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36cf9790362244d996f50cf270c39875939a3b01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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 Libregistry - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Remove Libregistry .. Remove Libregistry Inlined its remaining code at the only location where it is used. Cannot get rid of that without first fixing some other things. Change-Id: I3d47e55eaadf2f008eb443f271280b993783d677 --- D lib/includes/LibRegistry.php M lib/resources/Resources.php 2 files changed, 29 insertions(+), 121 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/lib/includes/LibRegistry.php b/lib/includes/LibRegistry.php deleted file mode 100644 index 501a34d..000 --- a/lib/includes/LibRegistry.php +++ /dev/null @@ -1,119 +0,0 @@ -?php - -namespace Wikibase; - -use DataTypes\DataTypeFactory; -use Wikibase\Client\WikibaseClient; -use Wikibase\DataModel\Entity\BasicEntityIdParser; -use Wikibase\DataModel\Entity\DispatchingEntityIdParser; -use Wikibase\DataModel\Entity\EntityIdParser; -use Wikibase\Lib\WikibaseDataTypeBuilders; -use Wikibase\Repo\WikibaseRepo; - -/** - * Application registry for Wikibase Lib. - * - * TODO: migrate out this class; code should be in client or repo and - * use their respective settings. Same rationale as for moving settings out of lib. - * - * @deprecated - * - * NOTE: - * This application registry is a workaround for design problems in existing code. - * It should only be used to improve existing usage of code and ideally just be - * a stepping stone towards using proper dependency injection where possible. - * This means you should be very careful when adding new components to the registry. - * - * @since 0.4 - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com - */ -final class LibRegistry { - - /** -* @since 0.4 -* -* @var SettingsArray -*/ - protected $settings; - - protected $dataTypeFactory = null; - - /** -* @since 0.4 -* -* @param SettingsArray $settings -*/ - public function __construct( SettingsArray $settings ) { - $this-settings = $settings; - } - - /** -* @since 0.4 -* -* @throws \RuntimeException -* @return DataTypeFactory -*/ - public function getDataTypeFactory() { - if ( $this-dataTypeFactory === null ) { - - // TODO: extreme uglynes here! Get rid of this method! - if ( defined( 'WB_VERSION' ) ) { // repo mode - $repo = WikibaseRepo::getDefaultInstance(); - $entityIdParser = $repo-getEntityIdParser(); - $entityLookup = $repo-getEntityLookup(); - } elseif ( defined( 'WBC_VERSION' ) ) { // client mode - $client = WikibaseClient::getDefaultInstance(); - $entityIdParser = $client-getEntityIdParser(); - $entityLookup = $client-getStore()-getEntityLookup(); - } else { - throw new \RuntimeException( Neither repo nor client found! ); - } - - $urlSchemes = $this-settings-getSetting( 'urlSchemes' ); - $builders = new WikibaseDataTypeBuilders( $entityLookup, $entityIdParser, $urlSchemes ); - - $typeBuilderSpecs = array_intersect_key( - $builders-getDataTypeBuilders(), - array_flip( $this-settings-getSetting( 'dataTypes' ) ) - ); - - $this-dataTypeFactory = new DataTypeFactory( $typeBuilderSpecs ); - } - - return $this-dataTypeFactory; - } - - /** -* Returns a new instance constructed from global settings. -* -* @since 0.4 -* -* @return LibRegistry -*/ - protected static function newInstance() { - return new self( Settings::singleton() ); - } - - /** -* Returns a default instance constructed from global settings. -* IMPORTANT: Use only when it is not feasible to inject an instance properly. -* -* @since 0.4 -* -* @return LibRegistry -*/ - public static function getDefaultInstance() { - static $instance = null; - - if ( $instance === null ) { - $instance = self::newInstance(); - } - - return $instance; - } - - // Do not add new stuff here without reading the notice at the top first. - -} diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index dc89aee..1707abb 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -1,6 +1,10 @@ ?php -use
[MediaWiki-commits] [Gerrit] Add getPossibleErrors method to FormatSnakValue - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/110941 Change subject: Add getPossibleErrors method to FormatSnakValue .. Add getPossibleErrors method to FormatSnakValue Change-Id: Idab013793e67852f00bc7da5c7b40edc2f13ac25 --- M repo/includes/api/FormatSnakValue.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/41/110941/1 diff --git a/repo/includes/api/FormatSnakValue.php b/repo/includes/api/FormatSnakValue.php index 0610f99..5752a93 100644 --- a/repo/includes/api/FormatSnakValue.php +++ b/repo/includes/api/FormatSnakValue.php @@ -160,6 +160,16 @@ } /** +* @see ApiBase::getPossibleErrors() +*/ + public function getPossibleErrors() { + return array_merge( + parent::getPossibleErrors(), + array( array( 'code' = 'baddatavalue', 'info' = 'Failed to decode datavalue' ) ) + ); + } + + /** * @see ApiBase::getAllowedParams * * @since 0.1 -- To view, visit https://gerrit.wikimedia.org/r/110941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idab013793e67852f00bc7da5c7b40edc2f13ac25 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ApiBasedValueFormatter for URLs - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/110942 Change subject: Add ApiBasedValueFormatter for URLs .. Add ApiBasedValueFormatter for URLs Change-Id: Ie9da8dded04b9889ec15c327f42bc155ae84e0f1 --- M lib/resources/formatters/wikibase.formatters.register.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/42/110942/1 diff --git a/lib/resources/formatters/wikibase.formatters.register.js b/lib/resources/formatters/wikibase.formatters.register.js index a58682b..0ebeb45 100644 --- a/lib/resources/formatters/wikibase.formatters.register.js +++ b/lib/resources/formatters/wikibase.formatters.register.js @@ -17,4 +17,9 @@ dv.TimeValue.TYPE ); + mw.ext.valueFormatters.valueFormatterProvider.registerDataTypeFormatter( + wb.formatters.ApiBasedValueFormatter, + 'url' + ); + }( mediaWiki, wikibase, dataValues ) ); -- To view, visit https://gerrit.wikimedia.org/r/110942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9da8dded04b9889ec15c327f42bc155ae84e0f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restore sysctl priorities. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/110943 Change subject: Restore sysctl priorities. .. Restore sysctl priorities. When sysctl behavior was refactored, a lot of priorities were removed. This patch attempts to restore priorities as they were before fa2208b74c4dc0895d7c239c7985ef03a754c2ab. That patch also consolidated and rearranged some sysctl groups, so this isn't a perfect restoration. Nevertheless I think it observes the general rule of making specific settings higher priority than the default settings. Change-Id: I50d929847dfe0c8caed1818d7ae0e73997e5d9e9 --- M manifests/misc/udp2log.pp M manifests/openstack.pp M manifests/role/ipv6relay.pp M manifests/webserver.pp M modules/base/manifests/sysctl.pp M modules/generic/manifests/higher_min_free_kbytes.pp M modules/lvs/manifests/balancer.pp 7 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/110943/1 diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp index db31cc0..816ff15 100644 --- a/manifests/misc/udp2log.pp +++ b/manifests/misc/udp2log.pp @@ -17,6 +17,7 @@ 'net.core.rmem_max' = 536870912, 'net.core.rmem_default' = 4194304, }, + priority = '99', } # include the monitoring scripts diff --git a/manifests/openstack.pp b/manifests/openstack.pp index b906f96..2fc9114 100644 --- a/manifests/openstack.pp +++ b/manifests/openstack.pp @@ -598,6 +598,7 @@ # Disable RA 'net.ipv6.conf.all.accept_ra' = 0, }, + priority = '50', } } diff --git a/manifests/role/ipv6relay.pp b/manifests/role/ipv6relay.pp index ddf9700..9440856 100644 --- a/manifests/role/ipv6relay.pp +++ b/manifests/role/ipv6relay.pp @@ -18,6 +18,7 @@ 'net.ipv6.conf.default.forwarding' = 1, 'net.ipv6.conf.eth0.accept_ra' = 2, }, +priority = '50', } # Teredo diff --git a/manifests/webserver.pp b/manifests/webserver.pp index a5e859c..9ce08a1 100644 --- a/manifests/webserver.pp +++ b/manifests/webserver.pp @@ -24,6 +24,7 @@ 'net.ipv4.tcp_synack_retries' = 2, 'net.ipv4.tcp_syn_retries' = 2, }, + priority = '60', } } diff --git a/modules/base/manifests/sysctl.pp b/modules/base/manifests/sysctl.pp index b77c3dd..231fbf9 100644 --- a/modules/base/manifests/sysctl.pp +++ b/modules/base/manifests/sysctl.pp @@ -50,5 +50,8 @@ 'net.ipv4.tcp_keepalive_intvl' = 1, 'net.ipv4.tcp_keepalive_probes' = 2, }, +# FIXME: 50 is our general 'override' priority, so maybe this should be +# 30 -- more than ubuntu default but less than case-specific overrides? +priority = '50', } } diff --git a/modules/generic/manifests/higher_min_free_kbytes.pp b/modules/generic/manifests/higher_min_free_kbytes.pp index 8d44e12..3881097 100644 --- a/modules/generic/manifests/higher_min_free_kbytes.pp +++ b/modules/generic/manifests/higher_min_free_kbytes.pp @@ -6,4 +6,5 @@ sysctl::parameters { 'higher_min_free_kbytes': values = { 'vm.min_free_kbytes' = 1024 * 256,}, } +priority = '60', } diff --git a/modules/lvs/manifests/balancer.pp b/modules/lvs/manifests/balancer.pp index 2737c0c..9927c9d 100644 --- a/modules/lvs/manifests/balancer.pp +++ b/modules/lvs/manifests/balancer.pp @@ -53,7 +53,7 @@ # removed in = 3.6 kernels. 'net.ipv4.rt_cache_rebuild_count' = -1, }, -priority = 50, +priority = '50', } generic::upstart_job { enable-rps: install = true, start = true } -- To view, visit https://gerrit.wikimedia.org/r/110943 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50d929847dfe0c8caed1818d7ae0e73997e5d9e9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add getPossibleErrors method to FormatSnakValue - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add getPossibleErrors method to FormatSnakValue .. Add getPossibleErrors method to FormatSnakValue Change-Id: Idab013793e67852f00bc7da5c7b40edc2f13ac25 --- M repo/includes/api/FormatSnakValue.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: WikidataJenkins: Verified Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/FormatSnakValue.php b/repo/includes/api/FormatSnakValue.php index 0610f99..5752a93 100644 --- a/repo/includes/api/FormatSnakValue.php +++ b/repo/includes/api/FormatSnakValue.php @@ -160,6 +160,16 @@ } /** +* @see ApiBase::getPossibleErrors() +*/ + public function getPossibleErrors() { + return array_merge( + parent::getPossibleErrors(), + array( array( 'code' = 'baddatavalue', 'info' = 'Failed to decode datavalue' ) ) + ); + } + + /** * @see ApiBase::getAllowedParams * * @since 0.1 -- To view, visit https://gerrit.wikimedia.org/r/110941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idab013793e67852f00bc7da5c7b40edc2f13ac25 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@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] updated IP address of icinga for labs - change (operations/puppet)
Petrb has uploaded a new change for review. https://gerrit.wikimedia.org/r/110944 Change subject: updated IP address of icinga for labs .. updated IP address of icinga for labs Change-Id: Ida5f935ed0f6e652166b8500fd9dfcaad46264cd --- M modules/nrpe/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/110944/1 diff --git a/modules/nrpe/manifests/init.pp b/modules/nrpe/manifests/init.pp index bec74a0..8265a05 100644 --- a/modules/nrpe/manifests/init.pp +++ b/modules/nrpe/manifests/init.pp @@ -29,7 +29,7 @@ if $allowed_hosts == undef { $nrpe_allowed_hosts = $::realm ? { 'production' = '127.0.0.1,208.80.152.185,208.80.152.161,208.80.154.14', -'labs' = '10.4.0.120', +'labs' = '10.4.1.88', default = '127.0.0.1', } } else { -- To view, visit https://gerrit.wikimedia.org/r/110944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida5f935ed0f6e652166b8500fd9dfcaad46264cd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Petrb benap...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Create wiki_testing and wikimetric_testing databases s... - change (analytics/wikimetrics)
Nuria has uploaded a new change for review. https://gerrit.wikimedia.org/r/110945 Change subject: [WIP] Create wiki_testing and wikimetric_testing databases so as not clobber dev database. .. [WIP] Create wiki_testing and wikimetric_testing databases so as not clobber dev database. Change-Id: I448516e983185266f8c54cf102641cea6de2807a --- M scripts/test M tests/__init__.py M tests/fixtures.py M tests/test_controllers/test_cohorts.py M tests/test_core_classes.py M tests/test_metrics/test_revert_rate.py M tests/test_models/test_user.py M tests/test_models/test_validate_cohort.py M tests/test_utils/test_one_off_functions.py M wikimetrics/configurables.py M wikimetrics/controllers/cohorts.py M wikimetrics/database.py M wikimetrics/models/mediawiki/custom_columns.py M wikimetrics/models/mediawiki/logging.py M wikimetrics/models/mediawiki/revision.py M wikimetrics/models/mediawiki/user.py M wikimetrics/models/validate_cohort.py M wikimetrics/templates/forms/metric_configuration.html 18 files changed, 283 insertions(+), 122 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/45/110945/1 diff --git a/scripts/test b/scripts/test index fc20168..5c14275 100755 --- a/scripts/test +++ b/scripts/test @@ -1,4 +1,5 @@ # for example: # scripts/test tests/test_controllers/test_cohorts.py:CohortsControllerTest # rm .coverage *.db -find . -name *.pyc | xargs rm ; nosetests --cover-erase $1 +# nosetest -s : do not capture all stdout +find . -name *.pyc | xargs rm ; nosetests -s --cover-erase $1 diff --git a/tests/__init__.py b/tests/__init__.py index b239005..c56ac06 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,11 +2,76 @@ from os import devnull from signal import SIGINT from time import sleep - -from wikimetrics.configurables import app - +from wikimetrics.configurables import app, db +from wikimetrics.utils import format_date +# CREATE DB IF NOT EXISTS gives a (pretty useless) warning if DB exists +from warnings import filterwarnings +import MySQLdb as mysql +filterwarnings('ignore', category=mysql.Warning) celery_proc = None + + +def create_test_db(dbName, cursor): +sql = CREATE DATABASE IF NOT EXISTS + dbName + ; +cursor.execute(sql) +cursor.fetchone() +sql = GRANT ALL on + dbName + .* TO wikimetrics@'localhost' +cursor.execute(sql) +cursor.fetchone() + + +def compose_connection_string(user, password, host, dbName): +from urlparse import urlparse +# results in ParseResult(scheme='mysql', netloc='root:vagrant@localhost', +# path='/wiki', params='', query='', fragment='') +return mysql:// + user + : + password + @ + host + / + dbName + + +def setUpTestingDB(): + +Set global testing variables, create the databases we need for +testing and grant wikimetrics user +permits in all of them. +By convention testing dbs are development dbs with sufix _testing +Note that wikimetrics user already exists, puppet has created it. + + +# Set TESTING to true so we can know to not check CSRF +# TODO we need a global config object +app.config['TESTING'] = True +db.config['TESTING'] = True + +user = db.config[MEDIAWIKI][USER] +password = db.config[MEDIAWIKI][PASSWORD] +host = db.config[MEDIAWIKI][HOST] + +# hardcode valid projecthostnames for testing +db.config[PROJECT_HOST_NAMES] = ['wiki', 'dewiki'] + +# add testing suffix to db +db.config[WIKIMETRICS][DBNAME] = db.config[WIKIMETRICS][DBNAME] + '_testing' +db.config[MEDIAWIKI][DBNAME] = db.config[MEDIAWIKI][DBNAME] + '_testing' +dbNameMediawiki = db.config[MEDIAWIKI][DBNAME] +dbNameWikimetrics = db.config[WIKIMETRICS][DBNAME] + +# change db connection strings to connect to testing db +db.config[MEDIAWIKI_ENGINE_URL_TEMPLATE] = compose_connection_string( +user, password, host, dbNameMediawiki) +db.config[WIKIMETRICS_ENGINE_URL] = compose_connection_string( +db.config[WIKIMETRICS][USER], +db.config[WIKIMETRICS][PASSWORD], host, dbNameWikimetrics) + +_db = mysql.connect(host=host, user=user, passwd=password) +cursor = _db.cursor() +# create testing dbs +for dbName in (dbNameMediawiki, dbNameWikimetrics, 'dewiki_testing'): +create_test_db(dbName, cursor) +_db.close() + + +#Initializing testing databases before setup method +setUpTestingDB() def celery_is_alive(): @@ -23,9 +88,10 @@ def setUp(): -# Set TESTING to true so we can know to not check CSRF -app.config['TESTING'] = True - + +Set global testing variables and override database names s +so they have _testing as a suffix + celery_out = open(devnull, w) celery_cmd = ['wikimetrics', '--mode', 'queue'] global celery_proc @@ -42,3 +108,10 @@ global celery_proc if celery_proc is not None:
[MediaWiki-commits] [Gerrit] Visual design tweaks. - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/110946 Change subject: Visual design tweaks. .. Visual design tweaks. * Make the onboarding CTA to 510px wide on pages in the main namespace and 365px on pages outside of the main and special namespaces * Make the Fix pages that need easy fixes button 210px wide and remove its text shadow Change-Id: I80df8f918dc563270eda5b0c203bb0c994591dac --- M resources/ext.gettingstarted.return.css 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/46/110946/1 diff --git a/resources/ext.gettingstarted.return.css b/resources/ext.gettingstarted.return.css index 8dd909b..a836399 100644 --- a/resources/ext.gettingstarted.return.css +++ b/resources/ext.gettingstarted.return.css @@ -1,10 +1,10 @@ /* Specific elements */ #mw-gettingstarted-cta-editable-main-page { - width: 600px; + width: 510px; } #mw-gettingstarted-cta-other-page { - width: 450px; + width: 365px; } /* @@ -26,7 +26,7 @@ Have to use width here since min-width will not wrap in this context */ - width: 250px; + width: 210px; } /* Remove right margin on right-most buttons */ @@ -113,7 +113,6 @@ background-image: linear-gradient(top, #fbfbfb, #f8f8f8); } .mw-ui-button.mw-gettingstarted-cta-secondary { -text-shadow: 0 1px 1px rgba(20,20,20,0.15); background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f8f8f8), color-stop(100%, #f0f0f0)); background-image: -webkit-linear-gradient(top, #f8f8f8, #f0f0f0); background-image: -moz-linear-gradient(top, #f8f8f8, #f0f0f0); -- To view, visit https://gerrit.wikimedia.org/r/110946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80df8f918dc563270eda5b0c203bb0c994591dac 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] Whitelist Petr Bena - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/110947 Change subject: Whitelist Petr Bena .. Whitelist Petr Bena Change-Id: I7e4e87932afac20089b3ff7ff3f4746c6a10ec15 --- M layout.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/47/110947/1 diff --git a/layout.yaml b/layout.yaml index 3b5518a..b9f5563 100644 --- a/layout.yaml +++ b/layout.yaml @@ -37,7 +37,7 @@ # TODO: Figure out a way to not have to repeat this from pipeline 'test'. # This email_filter and the one for 'test' can be removed once we have fixed bug 45499. email_filter: -- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com)).*$ +- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com)).*$ - event: comment-added comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$ success-message: 'Build succeeded.' @@ -155,6 +155,7 @@ # Trusted long term users: - ^admin@alphacorp\.tk$ # Hydriz + - ^benapetr@gmail\.com$ # petrb - ^benestar\.wikimedia@googlemail\.com$ - ^bryan\.tongminh@gmail\.com$ - ^codereview@emsenhuber\.ch$ -- To view, visit https://gerrit.wikimedia.org/r/110947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange
[MediaWiki-commits] [Gerrit] Whitelist Petr Bena - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Whitelist Petr Bena .. Whitelist Petr Bena Change-Id: I7e4e87932afac20089b3ff7ff3f4746c6a10ec15 --- M layout.yaml 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 3b5518a..b9f5563 100644 --- a/layout.yaml +++ b/layout.yaml @@ -37,7 +37,7 @@ # TODO: Figure out a way to not have to repeat this from pipeline 'test'. # This email_filter and the one for 'test' can be removed once we have fixed bug 45499. email_filter: -- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com)).*$ +- ^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com)).*$ - event: comment-added comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$ success-message: 'Build succeeded.' @@ -155,6 +155,7 @@ # Trusted long term users: - ^admin@alphacorp\.tk$ # Hydriz + - ^benapetr@gmail\.com$ # petrb - ^benestar\.wikimedia@googlemail\.com$ - ^bryan\.tongminh@gmail\.com$ - ^codereview@emsenhuber\.ch$ -- To view, visit https://gerrit.wikimedia.org/r/110947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e4e87932afac20089b3ff7ff3f4746c6a10ec15
[MediaWiki-commits] [Gerrit] updated IP address of icinga for labs. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: updated IP address of icinga for labs. .. updated IP address of icinga for labs. Change-Id: Ida5f935ed0f6e652166b8500fd9dfcaad46264cd --- M modules/nrpe/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/nrpe/manifests/init.pp b/modules/nrpe/manifests/init.pp index bec74a0..8265a05 100644 --- a/modules/nrpe/manifests/init.pp +++ b/modules/nrpe/manifests/init.pp @@ -29,7 +29,7 @@ if $allowed_hosts == undef { $nrpe_allowed_hosts = $::realm ? { 'production' = '127.0.0.1,208.80.152.185,208.80.152.161,208.80.154.14', -'labs' = '10.4.0.120', +'labs' = '10.4.1.88', default = '127.0.0.1', } } else { -- To view, visit https://gerrit.wikimedia.org/r/110944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida5f935ed0f6e652166b8500fd9dfcaad46264cd Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Petrb benap...@gmail.com Gerrit-Reviewer: Andrew Bogott abog...@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] Disable access for mhoover. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/110948 Change subject: Disable access for mhoover. .. Disable access for mhoover. RT 6752 Change-Id: Icbc89a0a305f417bfc16b93659eefd5a4395bd60 --- M manifests/admins.pp M manifests/site.pp 2 files changed, 4 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/110948/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index 739e4f6..fa259c2 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -3140,6 +3140,7 @@ $username = 'mhoover' $realname = 'Mike Hoover' $uid = 656 + $enabled = false unixaccount { $realname: username = $username, uid = $uid, gid = $gid } @@ -3147,7 +3148,7 @@ Ssh_authorized_key { require = Unixaccount[$realname] } ssh_authorized_key { 'mhoo...@wikimedia.org': -ensure = present, +ensure = absent, user = $username, type = 'ssh-rsa', key= 'B3NzaC1yc2EDAQABAAABAQDHHt80fZmlmhzmFRgT+m0oIOs4h9ZDpqP9a4G79TZfZOA3eCuiq+kucyhdm51ge7GimzE/rhFgw3ZBVXvcdKpwTDyybArM5mOJsyg0GNp0Ns3hlJrvAudIXnxEjGlMuVF0ek3Vexi/hBzci5chqXSXxQJfUnfZnBOMiFyAGGM7KQM2W11SwTxyB9j+2McWm1ZR2rC3DjTsfbsus4BMlNYgaR7hE3ovMiCdke3NorFJ+NjZe2NjoMmSUNnGyTJvwwUncDXLELE4S2QQ4L6Vc71mMAC9VC/+qrpjTN6CEfae8nEcBvrgA1s/ahMI+3OdsWzRU0Gv3+jgqUR/641gXdkB', @@ -3457,7 +3458,7 @@ include accounts::maxsem include accounts::mflaschen include accounts::mholmquist - include accounts::mhoover # Labs migration contractor + include accounts::mhoover # access revoked include accounts::milimetric # promoted per RT 5982 include accounts::mlitn include accounts::mwalker # promoted per RT 4747 @@ -3516,7 +3517,7 @@ $gid = 500 # 'wikidev' by default include groups::wikidev - include accounts::mhoover # Labs migration contractor + include accounts::mhoover # access revoked } class admins::jenkins { diff --git a/manifests/site.pp b/manifests/site.pp index 7c421e0..c32defc 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2544,9 +2544,7 @@ $is_labs_puppet_master = true $openstack_version = havana -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::dns::ldap, @@ -2565,9 +2563,7 @@ $is_labs_puppet_master = true $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::dns::ldap, @@ -2584,9 +2580,7 @@ $cluster = virt $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::nova::network, @@ -2602,9 +2596,7 @@ $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::nova::compute @@ -2619,9 +2611,7 @@ role::neutron::server, role::nova::api -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } } node /virt100[1-4].eqiad.wmnet/ { @@ -2635,9 +2625,7 @@ node /virt100[5-9].eqiad.wmnet/ { $cluster = virt -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard } -- To view, visit https://gerrit.wikimedia.org/r/110948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbc89a0a305f417bfc16b93659eefd5a4395bd60 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add cleanTimeStampFields.php - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/110949 Change subject: Add cleanTimeStampFields.php .. Add cleanTimeStampFields.php A script to convert all the time related columns in mysql to timestamp datatype Bug: 40626 Change-Id: I4d66e86df11ce76d4495a5fc2d7c8fe3b4b9ec7a --- A maintenance/cleanTimestampFields.php 1 file changed, 116 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/110949/1 diff --git a/maintenance/cleanTimestampFields.php b/maintenance/cleanTimestampFields.php new file mode 100644 index 000..40cff0e --- /dev/null +++ b/maintenance/cleanTimestampFields.php @@ -0,0 +1,116 @@ +?php + +require_once 'Maintenance.php'; + +class CleanTimestampFields extends Maintenance { + +public function __construct() { +parent::__construct(); +} + +public function execute() { +$this-output(Cleaning the TimeStampFields in Mysql Database\n); +$dbw = wfGetDB( DB_MASTER ); + +if($dbw-getType() != 'mysql') +{ +$this-output(The database used is not Mysql. This script cannot(and should not) run.\n); +exit(1); +} + +$unCleanFields = array +( +'user' = array( +'user_newpass_time'='', +'user_touched'='NOT NULL', +'user_email_authenticated'='', +'user_email_token_expires'='', +'user_registration'='', +'user_editcount'='', + /* 'user_last_timestamp'='' Reason: not found in db*/ +), +'page' = array( +'page_touched'='NOT NULL', +), +'revision' = array( +'rev_timestamp'='NOT NULL', +), +'archive' = array( + 'ar_timestamp'='NOT NULL', + ), +'categorylinks' = array( + 'cl_timestamp'='NOT NULL' + ), + 'ipblocks' = array( + 'ipb_timestamp'='NOT NULL', + 'ipb_expiry'='NOT NULL', +), + 'image' = array( + 'img_timestamp'='NOT NULL', + ), + 'oldimage' = array( + 'oi_timestamp'='NOT NULL', + ), + 'filearchive'= array( +'fa_deleted_timestamp' = '', +'fa_timestamp' = '', + ), + 'uploadstash'=array( + 'us_timestamp'='NOT NULL', + ), + 'recentchanges' = array( + 'rc_timestamp'='NOT NULL', + 'rc_cur_time'='NOT NULL' + ), + 'watchlist' = array( + 'wl_notificationtimestamp'='', + ), + 'transcache' = array( + 'tc_time'='NOT NULL', + ), + 'logging' = array( +'log_timestamp'='NOT NULL', +), + 'job' = array( +'job_timestamp'='', +), + 'querycache_info' = array( +'qci_timestamp'= 'NOT NULL', +), + 'page_restrictions' = array( + 'pr_expiry'='', + ), + 'protected_titles' = array( + 'pt_timestamp'='NOT NULL', + 'pt_expiry'='NOT NULL', + ), + 'msg_resource' = array( + 'mr_timestamp'='NOT NULL', + ), +); + +foreach($unCleanFields as $table = $columnArray) +{ +foreach($columnArray as $column = $constraints) +{ +$tableName = $dbw-tableName($table); +$query = ALTER TABLE $tableName MODIFY COLUMN $column timestamp $constraints ;; +$result = $dbw-query( $query, __METHOD__, true); +if($result) +{ +$this-output(Successfully modified the $table.$column \n); +} +else +{ +$this-output(ERROR : Could not modify the $table.$column\n); +$errorText = $this-mysqlError($dbw); +$this-output($errorText.'\n'); +
[MediaWiki-commits] [Gerrit] Disable access for mhoover. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Disable access for mhoover. .. Disable access for mhoover. RT 6752 Change-Id: Icbc89a0a305f417bfc16b93659eefd5a4395bd60 --- M manifests/admins.pp M manifests/site.pp 2 files changed, 4 insertions(+), 15 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/admins.pp b/manifests/admins.pp index 739e4f6..fa259c2 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -3140,6 +3140,7 @@ $username = 'mhoover' $realname = 'Mike Hoover' $uid = 656 + $enabled = false unixaccount { $realname: username = $username, uid = $uid, gid = $gid } @@ -3147,7 +3148,7 @@ Ssh_authorized_key { require = Unixaccount[$realname] } ssh_authorized_key { 'mhoo...@wikimedia.org': -ensure = present, +ensure = absent, user = $username, type = 'ssh-rsa', key= 'B3NzaC1yc2EDAQABAAABAQDHHt80fZmlmhzmFRgT+m0oIOs4h9ZDpqP9a4G79TZfZOA3eCuiq+kucyhdm51ge7GimzE/rhFgw3ZBVXvcdKpwTDyybArM5mOJsyg0GNp0Ns3hlJrvAudIXnxEjGlMuVF0ek3Vexi/hBzci5chqXSXxQJfUnfZnBOMiFyAGGM7KQM2W11SwTxyB9j+2McWm1ZR2rC3DjTsfbsus4BMlNYgaR7hE3ovMiCdke3NorFJ+NjZe2NjoMmSUNnGyTJvwwUncDXLELE4S2QQ4L6Vc71mMAC9VC/+qrpjTN6CEfae8nEcBvrgA1s/ahMI+3OdsWzRU0Gv3+jgqUR/641gXdkB', @@ -3457,7 +3458,7 @@ include accounts::maxsem include accounts::mflaschen include accounts::mholmquist - include accounts::mhoover # Labs migration contractor + include accounts::mhoover # access revoked include accounts::milimetric # promoted per RT 5982 include accounts::mlitn include accounts::mwalker # promoted per RT 4747 @@ -3516,7 +3517,7 @@ $gid = 500 # 'wikidev' by default include groups::wikidev - include accounts::mhoover # Labs migration contractor + include accounts::mhoover # access revoked } class admins::jenkins { diff --git a/manifests/site.pp b/manifests/site.pp index 7c421e0..c32defc 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2544,9 +2544,7 @@ $is_labs_puppet_master = true $openstack_version = havana -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::dns::ldap, @@ -2565,9 +2563,7 @@ $is_labs_puppet_master = true $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::dns::ldap, @@ -2584,9 +2580,7 @@ $cluster = virt $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::nova::network, @@ -2602,9 +2596,7 @@ $openstack_version = folsom -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard, role::nova::compute @@ -2619,9 +2611,7 @@ role::neutron::server, role::nova::api -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } } node /virt100[1-4].eqiad.wmnet/ { @@ -2635,9 +2625,7 @@ node /virt100[5-9].eqiad.wmnet/ { $cluster = virt -# full root for mhoover, Labs migration contractor include admins::labs -sudo_user { mhoover: privileges = ['ALL = NOPASSWD: ALL'] } include standard } -- To view, visit https://gerrit.wikimedia.org/r/110948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbc89a0a305f417bfc16b93659eefd5a4395bd60 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@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] i18n: give grep a chance to find the usages - change (mediawiki...Wikibase)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/110950 Change subject: i18n: give grep a chance to find the usages .. i18n: give grep a chance to find the usages Change-Id: I81644dd310b2fb91c0def8a348e91f467654a74a --- M lib/includes/ClaimDifferenceVisualizer.php M lib/includes/changes/EntityChange.php M lib/includes/formatters/QuantityDetailsFormatter.php M repo/includes/ClaimHtmlGenerator.php M repo/includes/MultiLangConstraintDetector.php M repo/includes/content/EntityContent.php M repo/includes/specials/SpecialMergeItems.php M repo/includes/specials/SpecialModifyTerm.php M repo/includes/specials/SpecialMyLanguageFallbackChain.php 9 files changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/110950/1 diff --git a/lib/includes/ClaimDifferenceVisualizer.php b/lib/includes/ClaimDifferenceVisualizer.php index 367dc5a..bbe7980 100644 --- a/lib/includes/ClaimDifferenceVisualizer.php +++ b/lib/includes/ClaimDifferenceVisualizer.php @@ -224,6 +224,8 @@ $rank = ClaimSerializer::serializeRank( $rank ); } + // Messages: wikibase-diffview-rank-preferred, wikibase-diffview-rank-normal, + // wikibase-diffview-rank-deprecated $msg = wfMessage( 'wikibase-diffview-rank-' . $rank ); return $msg-inLanguage( $this-langCode )-parse(); } diff --git a/lib/includes/changes/EntityChange.php b/lib/includes/changes/EntityChange.php index d68e747..d4a3df7 100644 --- a/lib/includes/changes/EntityChange.php +++ b/lib/includes/changes/EntityChange.php @@ -193,6 +193,8 @@ if ( $comment !== null ) { $this-comment = $comment; } else { + // Messages: wikibase-comment-add, wikibase-comment-remove, wikibase-comment-linked, + // wikibase-comment-unlink, wikibase-comment-restore, wikibase-comment-update $this-comment = 'wikibase-comment-' . $this-getAction(); } } diff --git a/lib/includes/formatters/QuantityDetailsFormatter.php b/lib/includes/formatters/QuantityDetailsFormatter.php index 3a5c63d..952c40a 100644 --- a/lib/includes/formatters/QuantityDetailsFormatter.php +++ b/lib/includes/formatters/QuantityDetailsFormatter.php @@ -86,6 +86,8 @@ protected function getFieldLabel( $fieldName ) { $lang = $this-getOption( ValueFormatter::OPT_LANG ); + // Messages: wikibase-quantitydetails-amount, wikibase-quantitydetails-upperbound, + // wikibase-quantitydetails-lowerbound, wikibase-quantitydetails-unit $key = 'wikibase-quantitydetails-' . strtolower( $fieldName ); $msg = wfMessage( $key )-inLanguage( $lang ); diff --git a/repo/includes/ClaimHtmlGenerator.php b/repo/includes/ClaimHtmlGenerator.php index 6cd49dc..3e7e254 100644 --- a/repo/includes/ClaimHtmlGenerator.php +++ b/repo/includes/ClaimHtmlGenerator.php @@ -102,6 +102,8 @@ if( is_a( $claim, 'Wikibase\Statement' ) ) { $serializedRank = ClaimSerializer::serializeRank( $claim-getRank() ); + // Messages: wikibase-statementview-rank-preferred, wikibase-statementview-rank-normal, + // wikibase-statementview-rank-deprecated $rankHtml = wfTemplate( 'wb-rankselector', 'wb-rankselector-' . $serializedRank, wfMessage( 'wikibase-statementview-rank-' . $serializedRank )-text() diff --git a/repo/includes/MultiLangConstraintDetector.php b/repo/includes/MultiLangConstraintDetector.php index 0527454..ab224f1 100644 --- a/repo/includes/MultiLangConstraintDetector.php +++ b/repo/includes/MultiLangConstraintDetector.php @@ -145,7 +145,7 @@ } ); $langValues = $wgLang-semicolonList( $langValues ); - // Give grep a chance to find the usages: wikibase-error-constraint-violation-label, + // Messages: wikibase-error-constraint-violation-label, // wikibase-error-constraint-violation-description, wikibase-error-constraint-violation-aliases $status-fatal( 'wikibase-error-constraint-violation-' . $section, diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 16b71ad..9634e2e 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -719,8 +719,7 @@ */ foreach ( $foundLabels as $foundLabel ) {
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions Picked from I2541d384fe42 Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 --- M extensions/Wikibase/repo/includes/content/EntityContent.php M extensions/Wikibase/repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikibase/repo/includes/content/EntityContent.php b/extensions/Wikibase/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/extensions/Wikibase/repo/includes/content/EntityContent.php +++ b/extensions/Wikibase/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/extensions/Wikibase/repo/includes/content/EntityHandler.php b/extensions/Wikibase/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/extensions/Wikibase/repo/includes/content/EntityHandler.php +++ b/extensions/Wikibase/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com 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] Add EntityHandler::makeParserOptions - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions Picked from I2541d384fe42 Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 --- M extensions/Wikibase/repo/includes/content/EntityContent.php M extensions/Wikibase/repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikibase/repo/includes/content/EntityContent.php b/extensions/Wikibase/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/extensions/Wikibase/repo/includes/content/EntityContent.php +++ b/extensions/Wikibase/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/extensions/Wikibase/repo/includes/content/EntityHandler.php b/extensions/Wikibase/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/extensions/Wikibase/repo/includes/content/EntityHandler.php +++ b/extensions/Wikibase/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic74561766dfbf1a887764ac724de2585b91f9338 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: mw1.23-wmf11 Gerrit-Owner: Addshore addshorew...@gmail.com 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] Added missing contributors - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/110951 Change subject: Added missing contributors .. Added missing contributors Change-Id: I630956de74cc6219748c3f6f58ad209b6631caa8 --- M CREDITS M mediawiki-selenium.gemspec 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/51/110951/1 diff --git a/CREDITS b/CREDITS index fc59409..898b2f7 100644 --- a/CREDITS +++ b/CREDITS @@ -5,4 +5,8 @@ For further details on licensing, see the LICENSE file. == Developers == +* Chris McMahon +* Jeff Hall +* Nikolas Everett +* Tobias Gritschacher * Željko Filipin diff --git a/mediawiki-selenium.gemspec b/mediawiki-selenium.gemspec index dbef1a4..2042dd0 100644 --- a/mediawiki-selenium.gemspec +++ b/mediawiki-selenium.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |spec| spec.name = mediawiki-selenium spec.version = Mediawiki::Selenium::VERSION - spec.authors = [Zeljko Filipin] - spec.email = [zeljko.fili...@gmail.com] + spec.authors = [Chris McMahon, Jeff Hall, Nikolas Everett, Tobias Gritschacher, Željko Filipin] + spec.email = [cmcma...@wikimedia.org, jh...@wikimedia.org, never...@wikimedia.org, tobias.gritschac...@wikimedia.de, zeljko.fili...@gmail.com] spec.description = %q{Several MediaWiki extensions share code that makes it easy to run Selenium tests. This gem makes it easy to update the shared code.} spec.summary = %q{An easy way to run MediaWiki Selenium tests.} -- To view, visit https://gerrit.wikimedia.org/r/110951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I630956de74cc6219748c3f6f58ad209b6631caa8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add EntityHandler::makeParserOptions - change (mediawiki...Wikibase)
Hoo man has submitted this change and it was merged. Change subject: Add EntityHandler::makeParserOptions .. Add EntityHandler::makeParserOptions WikiPage calls out to this in order to get a ParserOptions object for use in WikiPage::doEditUpdates. We need to override it, as we need custom options in there. Bug: 60715 Change-Id: I2541d384fe424190db2514295bfe751961adfa95 (cherry picked from commit 9a8d76d733a2600955a0450c092c5bb1d57a4f15) --- M repo/includes/content/EntityContent.php M repo/includes/content/EntityHandler.php 2 files changed, 25 insertions(+), 2 deletions(-) Approvals: Hoo man: Verified; Looks good to me, approved WikidataJenkins: Verified diff --git a/repo/includes/content/EntityContent.php b/repo/includes/content/EntityContent.php index 979941b..16b71ad 100644 --- a/repo/includes/content/EntityContent.php +++ b/repo/includes/content/EntityContent.php @@ -175,8 +175,6 @@ * @return EntityView */ public function getEntityView( IContextSource $context = null, ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = null ) { - $lang = null; - //TODO: cache last used entity view if ( $context === null ) { diff --git a/repo/includes/content/EntityHandler.php b/repo/includes/content/EntityHandler.php index 71672f7..f68d229 100644 --- a/repo/includes/content/EntityHandler.php +++ b/repo/includes/content/EntityHandler.php @@ -8,6 +8,7 @@ use MWException; use Revision; use Title; +use RequestContext; /** * Base handler class for Wikibase\Entity content classes. @@ -52,6 +53,30 @@ } /** +* @see ContentHandler::makeParserOptions +* +* @since 0.5 +* +* @param IContextSource|User|string $context +* +* @return ParserOptions +*/ + public function makeParserOptions( $context ) { + if ( $context === 'canonical' ) { + // There are no canonical ParserOptions for Wikibase, + // as everything is User-language dependent + $context = RequestContext::getMain(); + } + + $options = parent::makeParserOptions( $context ); + + // The html representation of entities depends on the user language, so we + // have to call ParserOptions::getUserLangObj to split the cache by user language. + $options-getUserLangObj(); + return $options; + } + + /** * Creates a Content object for the given Entity object. * * @since 0.4 -- To view, visit https://gerrit.wikimedia.org/r/110935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2541d384fe424190db2514295bfe751961adfa95 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.23-wmf11 Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable minor edit on NewUserMessage - change (operations/mediawiki-config)
Reza has uploaded a new change for review. https://gerrit.wikimedia.org/r/110953 Change subject: Disable minor edit on NewUserMessage .. Disable minor edit on NewUserMessage Bug: 60763 Change-Id: I8a64ed41c14dd11280c64985f6cd69538de0df99 --- M wmf-config/InitialiseSettings.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/53/110953/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index f739058..1e339e9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10121,6 +10121,7 @@ 'wmgNewUserMinorEdit' = array( 'default' = true, 'arwiki' = false, + 'fawiki' = false, 'incubatorwiki' = false, ), @@ -12928,6 +12929,13 @@ 'foundationwiki' = '!^https?://(www\.)?wikimediafoundation\.org/!', ), +'default' = array( +'IR', // Iran +), +'+wiki' = array( +'CN', // China +), +), 'wmgHTTPSBlacklistCountries' = array( 'default' = array( 'IR', // Iran -- To view, visit https://gerrit.wikimedia.org/r/110953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a64ed41c14dd11280c64985f6cd69538de0df99 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reza reza.ene...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikidata to fix a ParserCache bug - change (mediawiki/core)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/110952 Change subject: Update Wikidata to fix a ParserCache bug .. Update Wikidata to fix a ParserCache bug Change-Id: Iee39ba8d870e9941b99a8a3635dc1b57b67d5637 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/110952/1 diff --git a/extensions/Wikidata b/extensions/Wikidata index 85dfa2d..3a18f0e 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit 85dfa2d113b4427397d8a392b9e72eb5e978fbf8 +Subproject commit 3a18f0e84d68dd656cce711897a4279694020123 -- To view, visit https://gerrit.wikimedia.org/r/110952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee39ba8d870e9941b99a8a3635dc1b57b67d5637 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf12 Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cirrus config updates - change (operations/mediawiki-config)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/110954 Change subject: Cirrus config updates .. Cirrus config updates Cirrus as BetaFeatures for enwiki and huwiki Resize dewiki a bit based on new numbers. It won't take effect until we reindex it. We'll reindex it when dewiki moves to wmf12. Change-Id: I6410e9ceb3a825f23337b59fe07d4e5167e01f0d --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/54/110954/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index f739058..b00e0ec 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12736,8 +12736,6 @@ 'wmgCirrusIsBuilding' = array( 'default' = false, - 'enwiki' = true, - 'huwiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( @@ -12765,7 +12763,7 @@ // Commons is special and has a 'file' index in addition to the regular ones. // File has shards at ~6GB each even with 20 of them. 'commonswiki' = array( 'content' = 1, 'general' = 20, 'file' = 20 ), - 'dewiki' = array( 'content' = 15, 'general' = 13 ), + 'dewiki' = array( 'content' = 20, 'general' = 16 ), 'dewikisource' = array( 'content' = 3, 'general' = 1 ), 'elwiki' = array( 'content' = 2, 'general' = 1 ), // These shards are also signigicantly larger than the target 2GB. @@ -12777,7 +12775,7 @@ 'frwiki' = array( 'content' = 14, 'general' = 13 ), 'frwikisource' = array( 'content' = 12, 'general' = 1 ), 'frwikitionary' = array( 'content' = 2, 'general' = 1 ), - 'huwiki' = array( 'content' = 6, 'general' = 1 ), // Sized before deployment + 'huwiki' = array( 'content' = 4, 'general' = 2 ), 'itwiki' = array( 'content' = 13, 'general' = 9 ), 'mgwiktionary' = array( 'content' = 2, 'general' = 1 ), 'nlwiki' = array( 'content' = 8, 'general' = 4 ), -- To view, visit https://gerrit.wikimedia.org/r/110954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6410e9ceb3a825f23337b59fe07d4e5167e01f0d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master 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] Fix Wikibase data namespace license override - change (operations/mediawiki-config)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/110955 Change subject: Fix Wikibase data namespace license override .. Fix Wikibase data namespace license override Change-Id: I9c0c9716bb8c515cae537418dca010eb8c8e842c --- M wmf-config/Wikibase.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/55/110955/1 diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index 57a9e97..736e212 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -49,8 +49,8 @@ $wgWBRepoSettings['normalizeItemByTitlePageNames'] = true; - $wgWBRepoSettings['datalicensetext'] = 'Creative Commons CC0 License'; - $wgWBRepoSettings['datalicenseurl'] = 'https://creativecommons.org/publicdomain/zero/1.0/'; + $wgWBRepoSettings['dataRightsText'] = 'Creative Commons CC0 License'; + $wgWBRepoSettings['dataRightsUrl'] = 'https://creativecommons.org/publicdomain/zero/1.0/'; $wgWBRepoSettings['specialSiteLinkGroups'] = array( 'commons' ); -- To view, visit https://gerrit.wikimedia.org/r/110955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c0c9716bb8c515cae537418dca010eb8c8e842c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial deb packaging - change (operations...check_ganglia)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/110956 Change subject: Initial deb packaging .. Initial deb packaging Change-Id: Ic9abab10f1c980195172a3bcecca61745daa0d27 --- A debian/changelog A debian/compat A debian/control A debian/gbp.conf A debian/pydist-overrides A debian/rules A debian/source/format 7 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/check_ganglia refs/changes/56/110956/1 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000..c32bf13 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +check-ganglia (0.1-1) unstable; urgency=low + + * Initial release + + -- Andrew Otto (WMF) o...@wikimedia.org Wed, 15 Jan 2014 21:34:23 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000..9aa256f --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: check-ganglia +Maintainer: Andrew Otto (WMF) o...@wikimedia.org +Section: python +Priority: optional +Build-Depends: python, debhelper (= 8) +Standards-Version: 3.9.5 +Vcs-Git: https://gerrit.wikimedia.org/r/operations/debs/check_ganglia -b debian +Vcs-Browser: http://git.wikimedia.org/tree/operations%2Fdebs%2Fcheck_ganglia.git/refs%2Fheads%2Fdebian + +Package: check-ganglia +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, python3-lxml | python-lxml +Provides: ${python:Provides} +Description: check_ganglia plugin for Nagios + This is a Nagios plugin that checks values collected by Ganglia. It can poll + either gmond or use the interactive query interface provided by gmetad. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000..154d37e --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,5 @@ +[git-buildpackage] +upstream-tree=branch +upstream-branch=master +debian-branch=debian +export-dir=../build-area/ diff --git a/debian/pydist-overrides b/debian/pydist-overrides new file mode 100644 index 000..85771df --- /dev/null +++ b/debian/pydist-overrides @@ -0,0 +1 @@ +lxml python-lxml diff --git a/debian/rules b/debian/rules new file mode 100755 index 000..4647c9c --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python2 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000..46ebe02 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/110956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9abab10f1c980195172a3bcecca61745daa0d27 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/check_ganglia Gerrit-Branch: master Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'test' entry to list of wikis - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/110957 Change subject: Add 'test' entry to list of wikis .. Add 'test' entry to list of wikis Makes it easier to test editing functionality. Change-Id: I1ee24b0eabd965e0d4970af4f0575b0ffefed6d2 --- M scripts/generate_wiki_languages.py M wikipedia/res/values/languages_list.xml 2 files changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/57/110957/1 diff --git a/scripts/generate_wiki_languages.py b/scripts/generate_wiki_languages.py index b0728f4..22fcfe6 100644 --- a/scripts/generate_wiki_languages.py +++ b/scripts/generate_wiki_languages.py @@ -27,6 +27,10 @@ lang_local_names.append(row[10].replace(', \\')) lang_eng_names.append(row[1].replace(', \\')) +lang_keys.append('test') +lang_local_names.append('Test') +lang_eng_names.append('Test') + # Generate the XML, for Android x = lb.E diff --git a/wikipedia/res/values/languages_list.xml b/wikipedia/res/values/languages_list.xml index 95ce46f..4c7cb1c 100644 --- a/wikipedia/res/values/languages_list.xml +++ b/wikipedia/res/values/languages_list.xml @@ -26,8 +26,8 @@ itemko/item itemar/item itemhu/item -itemsr/item itemms/item +itemsr/item itemro/item itemtr/item itemmin/item @@ -174,9 +174,9 @@ itemlad/item itemsc/item itemwuu/item -itemlij/item -itemzh-classical/item itemug/item +itemzh-classical/item +itemlij/item itemfur/item itemmt/item itempi/item @@ -239,8 +239,8 @@ itemzu/item itemchy/item itemrmy/item -itemchr/item itemcu/item +itemchr/item itemtn/item itemcdo/item itemroa-rup/item @@ -287,6 +287,7 @@ itemmus/item itemkr/item itemhz/item +itemtest/item /string-array string-array name=preference_language_local_names itemEnglish/item @@ -314,8 +315,8 @@ item#54620;#44397;#50612;/item item#1575;#1604;#1593;#1585;#1576;#1610;#1577;/item itemMagyar/item -item#1057;#1088;#1087;#1089;#1082;#1080; / Srpski/item itemBahasa Melayu/item +item#1057;#1088;#1087;#1089;#1082;#1080; / Srpski/item itemRom#226;n#259;/item itemT#252;rk#231;e/item itemBaso Minangkabau/item @@ -462,9 +463,9 @@ itemDzhudezmo/item itemSardu/item item#21556;#35821;/item -itemL#237;guru/item -item#21476;#25991; / #25991;#35328;#25991;/item item#1574;#1735;#1610;#1594;#1735;#1585; #1578;#1609;#1604;#1609;/item +item#21476;#25991; / #25991;#35328;#25991;/item +itemL#237;guru/item itemFurlan/item itemMalti/item item#2346;#2366;#2356;#2367;/item @@ -527,8 +528,8 @@ itemisiZulu/item itemTsets#234;hest#226;hese/item itemromani - #2352;#2379;#2350;#2366;#2344;#2368;/item -item#5091;#5043;#5033;/item item#1057;#1083;#1086;#1074;#1123;#1085;#1100;#1089;#1082;#1098;/item +item#5091;#5043;#5033;/item itemSetswana/item itemM#236;ng-d#277;#804;ng-ng#7795;#772;/item itemArm#227;neashce/item @@ -575,6 +576,7 @@ itemMuskogee/item itemKanuri/item itemOtsiherero/item +itemTest/item /string-array string-array name=preference_language_canonical_names itemEnglish/item @@ -602,8 +604,8 @@ itemKorean/item itemArabic/item itemHungarian/item -itemSerbian/item itemMalay/item +itemSerbian/item itemRomanian/item itemTurkish/item itemMinangkabau/item @@ -750,9 +752,9 @@ itemLadino/item itemSardinian/item itemWu/item -itemLigurian/item -itemClassical Chinese/item itemUyghur/item +itemClassical Chinese/item +itemLigurian/item itemFriulian/item itemMaltese/item itemPali/item @@ -815,8 +817,8 @@ itemZulu/item itemCheyenne/item itemRomani/item -itemCherokee/item itemOld Church Slavonic/item +itemCherokee/item itemTswana/item itemMin Dong/item itemAromanian/item @@ -863,5 +865,6 @@ itemMuscogee/item itemKanuri/item itemHerero/item +itemTest/item /string-array /resources -- To view, visit https://gerrit.wikimedia.org/r/110957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ee24b0eabd965e0d4970af4f0575b0ffefed6d2 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added missing contributors - change (mediawiki/selenium)
jenkins-bot has submitted this change and it was merged. Change subject: Added missing contributors .. Added missing contributors Change-Id: I630956de74cc6219748c3f6f58ad209b6631caa8 --- M CREDITS M mediawiki-selenium.gemspec 2 files changed, 6 insertions(+), 2 deletions(-) Approvals: Jhall: Looks good to me, approved Manybubbles: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/CREDITS b/CREDITS index fc59409..898b2f7 100644 --- a/CREDITS +++ b/CREDITS @@ -5,4 +5,8 @@ For further details on licensing, see the LICENSE file. == Developers == +* Chris McMahon +* Jeff Hall +* Nikolas Everett +* Tobias Gritschacher * Željko Filipin diff --git a/mediawiki-selenium.gemspec b/mediawiki-selenium.gemspec index dbef1a4..2042dd0 100644 --- a/mediawiki-selenium.gemspec +++ b/mediawiki-selenium.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |spec| spec.name = mediawiki-selenium spec.version = Mediawiki::Selenium::VERSION - spec.authors = [Zeljko Filipin] - spec.email = [zeljko.fili...@gmail.com] + spec.authors = [Chris McMahon, Jeff Hall, Nikolas Everett, Tobias Gritschacher, Željko Filipin] + spec.email = [cmcma...@wikimedia.org, jh...@wikimedia.org, never...@wikimedia.org, tobias.gritschac...@wikimedia.de, zeljko.fili...@gmail.com] spec.description = %q{Several MediaWiki extensions share code that makes it easy to run Selenium tests. This gem makes it easy to update the shared code.} spec.summary = %q{An easy way to run MediaWiki Selenium tests.} -- To view, visit https://gerrit.wikimedia.org/r/110951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I630956de74cc6219748c3f6f58ad209b6631caa8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Jhall jh...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Zfilipin zfili...@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 Wikibase data namespace license override - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix Wikibase data namespace license override .. Fix Wikibase data namespace license override Change-Id: I9c0c9716bb8c515cae537418dca010eb8c8e842c --- M wmf-config/Wikibase.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index 57a9e97..736e212 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -49,8 +49,8 @@ $wgWBRepoSettings['normalizeItemByTitlePageNames'] = true; - $wgWBRepoSettings['datalicensetext'] = 'Creative Commons CC0 License'; - $wgWBRepoSettings['datalicenseurl'] = 'https://creativecommons.org/publicdomain/zero/1.0/'; + $wgWBRepoSettings['dataRightsText'] = 'Creative Commons CC0 License'; + $wgWBRepoSettings['dataRightsUrl'] = 'https://creativecommons.org/publicdomain/zero/1.0/'; $wgWBRepoSettings['specialSiteLinkGroups'] = array( 'commons' ); -- To view, visit https://gerrit.wikimedia.org/r/110955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c0c9716bb8c515cae537418dca010eb8c8e842c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com 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] Rearranging order of configs in kafkatee.conf.example - change (analytics/kafkatee)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/110958 Change subject: Rearranging order of configs in kafkatee.conf.example .. Rearranging order of configs in kafkatee.conf.example I've moved the global configs closer to the top of the file. Outputs and inputs are now all at the bottom, as is the include documentation. By putting the include at the bottom of the file, I believe any subsequently included configs will override any previously set ones. Correct me if I am wrong. Change-Id: Ie4cd0f571bb31cdf89323cb84da2fc8e48de3081 --- M kafkatee.conf.example 1 file changed, 144 insertions(+), 145 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/kafkatee refs/changes/58/110958/1 diff --git a/kafkatee.conf.example b/kafkatee.conf.example index 029d147..c4752b0 100644 --- a/kafkatee.conf.example +++ b/kafkatee.conf.example @@ -24,144 +24,6 @@ ### -### -# # -# Configuration properties# -# # -### - - -### -# # -# Kafka configuration # -# # -# Kafka configuration properties are prefixed with kafka. # -# and topic properties are prefixed with kafka.topic.. # -# # -# For the full range of Kafka handle and topic configuration # -# properties, see:# -# http://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md # -# # -# And the Apache Kafka configuration reference: # -# http://kafka.apache.org/08/configuration.html # -# # -### - -# Initial list of kafka brokers -# Default: none -#kafka.metadata.broker.list = localhost - -# Offset file directory. -# Each topic + partition combination has its own offset file. -# Default: current directory -#kafka.offset.store.path = /var/run/offsets/ - -# If the request offset was not found on broker, or there is no -# initial offset known (no stored offset), then reset the offset according -# to this configuration. -# Values: smallest (oldest/beginning), largest (newest/end), error (fail) -# Default: largest -#kafka.topic.auto.offset.reset = smallest - -# Maximum message size. -# Should be synchronized on all producers, brokers and consumers. -# Default: 400 -#kafka.message.max.bytes = 1000 - -# Kafka debugging -# Default: none -#kafka.debug = msg,topic,broker - - - - - - - -### -# # -# Message transformation # -# # -# A message read from one of the inputs may be transformed before # -# being enqueued on the output queues.# -# # -# Transformation requires that the input and output encoding differs, # -# i.e., 'input [encoding=json] ..' and 'output.encoding=string' # -# # -# While the input encoding is configured per input, the output# -# encoding is configured globally, all outputs will receive the same # -# message.# -# # -# The currently supported transformation(s) are: # -# JSON input - string output: # -#JSON data is formatted according to the output.format# -#configuration. The %{field} syntax references the field in the # -#original JSON object by the same name and outputs its value. # -# # -# If the input and output encoding matches then the message remains # -# untouched. # -# # -#
[MediaWiki-commits] [Gerrit] Add PageImages TextExtracts to MobileFrontend - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Add PageImages TextExtracts to MobileFrontend .. Add PageImages TextExtracts to MobileFrontend These are optional dependencies, but used on the WMF cluster. Change-Id: I62fb84f6193f29f3e1b541ebe222563716bf6a55 --- M puppet/manifests/roles.pp 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp index 2287177..86f893f 100644 --- a/puppet/manifests/roles.pp +++ b/puppet/manifests/roles.pp @@ -172,12 +172,19 @@ include role::mediawiki include role::eventlogging +mediawiki::extension { 'TextExtracts': } +mediawiki::extension { 'PageImages': } + mediawiki::extension { 'MobileFrontend': settings = { wgMFForceSecureLogin = false, wgMFLogEvents= true, wgMFAutodetectMobileView = true, -} +}, +require = [ +Mediawiki::Extension['TextExtracts'], +Mediawiki::Extension['PageImages'] +], } } -- To view, visit https://gerrit.wikimedia.org/r/109865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62fb84f6193f29f3e1b541ebe222563716bf6a55 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add paste rules to surface widget config - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/110959 Change subject: Add paste rules to surface widget config .. Add paste rules to surface widget config Change-Id: If37ede716ca5940f3149237913e410f3de0c1a4f --- M modules/ve/ui/widgets/ve.ui.SurfaceWidget.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/59/110959/1 diff --git a/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js b/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js index 5872bd1..3d19e2e 100644 --- a/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js +++ b/modules/ve/ui/widgets/ve.ui.SurfaceWidget.js @@ -17,6 +17,7 @@ * @param {Object} [config] Configuration options * @cfg {Object[]} [tools] Toolbar configuration * @cfg {string[]} [commands] List of supported commands + * @cfg {Object} [pasteRules] Paste rules */ ve.ui.SurfaceWidget = function VeUiSurfaceWidget( data, config ) { // Config intialization @@ -41,6 +42,9 @@ if ( config.commands ) { this.surface.addCommands( config.commands ); } + if ( config.pasteRules ) { + this.surface.setPasteRules( config.pasteRules ); + } }; /* Inheritance */ -- To view, visit https://gerrit.wikimedia.org/r/110959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If37ede716ca5940f3149237913e410f3de0c1a4f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement surface paste rules for media/ref dialogs - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/110960 Change subject: Implement surface paste rules for media/ref dialogs .. Implement surface paste rules for media/ref dialogs Currently they have unrestricted paste, so give them the same rules as the parent surface. Change-Id: I952f98477219a55d25a2bd817344bde58a4862d4 --- M lib/ve M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js 3 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/60/110960/1 diff --git a/lib/ve b/lib/ve index 5092503..9e674cb 16 --- a/lib/ve +++ b/lib/ve -Subproject commit 5092503046c4232ff4b50e046b3605e94ea8dffa +Subproject commit 9e674cbdfda39869dfe4f41df74c83901e93eea9 diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js index 53cbd56..837bfb7 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js @@ -257,7 +257,8 @@ { '$': this.$, 'tools': this.constructor.static.toolbarGroups, - 'commands': this.constructor.static.surfaceCommands + 'commands': this.constructor.static.surfaceCommands, + 'pasteRules': ve.init.mw.ViewPageTarget.static.pasteRules } ); diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js index ff5814c..b1a3fad 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js @@ -156,7 +156,8 @@ { '$': this.$, 'tools': this.constructor.static.toolbarGroups, - 'commands': this.constructor.static.surfaceCommands + 'commands': this.constructor.static.surfaceCommands, + 'pasteRules': ve.init.mw.ViewPageTarget.static.pasteRules } ); -- To view, visit https://gerrit.wikimedia.org/r/110960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I952f98477219a55d25a2bd817344bde58a4862d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make linkactions into its own module - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/110961 Change subject: Make linkactions into its own module .. Make linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easierMake linkactions into its own module Makes reuse easier Change-Id: I8a6595594909e58af2e6f2df831ca5c3ac8aaefd --- M wikipedia/assets/bundle.js M www/Gruntfile.js A www/js/actions.js A www/js/editaction.js D www/js/linkactions.js 5 files changed, 102 insertions(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/61/110961/1 diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index f893cc3..e826853 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -1,4 +1,37 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==functionrequire;if(!ua)return a(o,!0);if(i)return i(o,!0);throw new Error(Cannot find module '+o+')}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==functionrequire;for(var o=0;or.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ +var bridge = require('./bridge'); + +function ActionsHandler() { +} + +var actionHandlers = {}; + +ActionsHandler.prototype.register = function( action, fun ) { +if ( action in actionHandlers ) { +actionHandlers[action].push( fun ); +} else { +actionHandlers[action] = [ fun ]; +} +}; + +document.onclick = function() { +if ( event.target.tagName === A ) { +if ( event.target.hasAttribute( data-action ) ) { +var action = event.target.getAttribute( data-action ); +var handlers = actionHandlers[ action ]; +for ( var i = 0; i handlers.length; i++ ) { +handlers[i]( event.target, event ); +} +} else { +bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +event.preventDefault(); +} +} +}; + +module.exports = new ActionsHandler(); + +},{./bridge:2}],2:[function(require,module,exports){ function Bridge() { } @@ -36,28 +69,16 @@ window.onload = function() { module.exports.sendMessage( DOMLoaded, {} ); }; -},{}],2:[function(require,module,exports){ +},{}],3:[function(require,module,exports){ +var actions = require('./actions'); var bridge = require('./bridge'); -var actionHandlers = { -edit_section: function( el, event ) { -bridge.sendMessage( 'editSectionClicked', { sectionID: el.getAttribute( 'data-id' ) } ); -event.preventDefault(); -} -}; +actions.register( edit_section, function( el, event ) { +bridge.sendMessage( 'editSectionClicked', { sectionID: el.getAttribute( 'data-id' ) } ); +event.preventDefault(); +} ); -document.onclick = function() { -if ( event.target.tagName === A ) { -if ( event.target.hasAttribute( data-action ) ) { -var action = event.target.getAttribute( data-action ); -actionHandlers[ action ]( event.target, event ); -} else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); -event.preventDefault(); -} -} -}; -},{./bridge:1}],3:[function(require,module,exports){ +},{./actions:1,./bridge:2}],4:[function(require,module,exports){ var bridge = require(./bridge); bridge.registerListener( displayAttribution, function( payload ) { var lastUpdatedA = document.getElementById( lastupdated ); @@ -75,7 +96,7 @@ } bridge.sendMessage( imagesListResponse, { images: imageURLs }); } ); -},{./bridge:1}],4:[function(require,module,exports){ +},{./bridge:2}],5:[function(require,module,exports){ var bridge = require(./bridge); var transformer = require(./transformer); @@ -143,7 +164,7 @@ window.scrollTo(0, scrollY); }); -},{./bridge:1,./transformer:5}],5:[function(require,module,exports){ +},{./bridge:2,./transformer:6}],6:[function(require,module,exports){ function Transformer() { } @@ -167,7 +188,7 @@ module.exports = new Transformer(); -},{}],6:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ var bridge = require(./bridge); var transformer = require(./transformer); @@ -205,4 +226,4 @@ return content; } ); -},{./bridge:1,./transformer:5}]},{},[3,5,6,1,2,4]) \ No newline at end of file +},{./bridge:2,./transformer:6}]},{},[4,6,7,2,1,3,5]) \ No newline at end of file diff --git a/www/Gruntfile.js b/www/Gruntfile.js index
[MediaWiki-commits] [Gerrit] bump mysql-python 1.2.4 - 1.2.5 - change (analytics/wikimetrics)
Milimetric has submitted this change and it was merged. Change subject: bump mysql-python 1.2.4 - 1.2.5 .. bump mysql-python 1.2.4 - 1.2.5 The mysql-python package at 1.2.4 prevents me from running test though the next version works... I have no idea what the impacts. Change-Id: I1be2ba0025b41a411c45c8c7ea970ab8c21fabeb --- M requirements.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Milimetric: Verified; Looks good to me, approved diff --git a/requirements.txt b/requirements.txt index 5b6f3cc..a0a83b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ distribute=0.6.28 sqlalchemy=0.8.1 -mysql-python==1.2.4 +mysql-python==1.2.5 requests==1.2.3 flask==0.9 flask-login==0.2.4 -- To view, visit https://gerrit.wikimedia.org/r/110595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1be2ba0025b41a411c45c8c7ea970ab8c21fabeb Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Milimetric dandree...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Now supporting 'include /etc/kafkatee.d/*.conf' style glob m... - change (analytics/kafkatee)
Ottomata has submitted this change and it was merged. Change subject: Now supporting 'include /etc/kafkatee.d/*.conf' style glob matches for config includes .. Now supporting 'include /etc/kafkatee.d/*.conf' style glob matches for config includes Change-Id: I8dfb3bb817af122d59de57dae35d0792349c995b --- M ezd.c 1 file changed, 19 insertions(+), 3 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved Edenhill: Looks good to me, but someone else must approve diff --git a/ezd.c b/ezd.c index 2f295dc..c0afe3a 100644 --- a/ezd.c +++ b/ezd.c @@ -45,6 +45,7 @@ #include strings.h #include errno.h #include fcntl.h +#include glob.h #include stdio.h #include ctype.h #include stdlib.h @@ -197,6 +198,8 @@ char buf[8192]; int line = 0; static int inc_depth = 0; + glob_t glob_matches; + int g = 0; /* iterator index in glob_matches.gl_pathv */ if (!(fp = fopen(path, r))) { snprintf(errstr, errstr_size, @@ -290,12 +293,25 @@ return -1; } - if (ezd_conf_file_read(t, conf_set_cb, - errstr+errof, errstr_size-errof, - opaque) == -1) { + /* Read in matching include files. */ + if (glob(t, GLOB_ERR, NULL, glob_matches) != 0) { + snprintf(errstr+errof, errstr_size-errof, +Failed to read include file pattern '%s', t); inc_depth--; return -1; +} + + /* For each matched include file, call ezd_conf_file_read. */ + for (g = 0; g glob_matches.gl_pathc; g++) { + if (ezd_conf_file_read(glob_matches.gl_pathv[g], conf_set_cb, + errstr+errof, errstr_size-errof, + opaque) == -1) { + inc_depth--; + globfree(glob_matches); + return -1; + } } + globfree(glob_matches); continue; } -- To view, visit https://gerrit.wikimedia.org/r/110635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8dfb3bb817af122d59de57dae35d0792349c995b Gerrit-PatchSet: 4 Gerrit-Project: analytics/kafkatee Gerrit-Branch: master Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Edenhill mag...@edenhill.se Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rearranging order of configs in kafkatee.conf.example - change (analytics/kafkatee)
Ottomata has submitted this change and it was merged. Change subject: Rearranging order of configs in kafkatee.conf.example .. Rearranging order of configs in kafkatee.conf.example I've moved the global configs closer to the top of the file. Outputs and inputs are now all at the bottom, as is the include documentation. By putting the include at the bottom of the file, I believe any subsequently included configs will override any previously set ones. Correct me if I am wrong. Change-Id: Ie4cd0f571bb31cdf89323cb84da2fc8e48de3081 --- M kafkatee.conf.example 1 file changed, 144 insertions(+), 145 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/kafkatee.conf.example b/kafkatee.conf.example index 029d147..c4752b0 100644 --- a/kafkatee.conf.example +++ b/kafkatee.conf.example @@ -24,144 +24,6 @@ ### -### -# # -# Configuration properties# -# # -### - - -### -# # -# Kafka configuration # -# # -# Kafka configuration properties are prefixed with kafka. # -# and topic properties are prefixed with kafka.topic.. # -# # -# For the full range of Kafka handle and topic configuration # -# properties, see:# -# http://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md # -# # -# And the Apache Kafka configuration reference: # -# http://kafka.apache.org/08/configuration.html # -# # -### - -# Initial list of kafka brokers -# Default: none -#kafka.metadata.broker.list = localhost - -# Offset file directory. -# Each topic + partition combination has its own offset file. -# Default: current directory -#kafka.offset.store.path = /var/run/offsets/ - -# If the request offset was not found on broker, or there is no -# initial offset known (no stored offset), then reset the offset according -# to this configuration. -# Values: smallest (oldest/beginning), largest (newest/end), error (fail) -# Default: largest -#kafka.topic.auto.offset.reset = smallest - -# Maximum message size. -# Should be synchronized on all producers, brokers and consumers. -# Default: 400 -#kafka.message.max.bytes = 1000 - -# Kafka debugging -# Default: none -#kafka.debug = msg,topic,broker - - - - - - - -### -# # -# Message transformation # -# # -# A message read from one of the inputs may be transformed before # -# being enqueued on the output queues.# -# # -# Transformation requires that the input and output encoding differs, # -# i.e., 'input [encoding=json] ..' and 'output.encoding=string' # -# # -# While the input encoding is configured per input, the output# -# encoding is configured globally, all outputs will receive the same # -# message.# -# # -# The currently supported transformation(s) are: # -# JSON input - string output: # -#JSON data is formatted according to the output.format# -#configuration. The %{field} syntax references the field in the # -#original JSON object by the same name and outputs its value. # -# # -# If the input and output encoding matches then the message remains # -# untouched. # -# # -# The output message delimiter (defaults to newline (\n)) is
[MediaWiki-commits] [Gerrit] Add SVG version of search button icon - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add SVG version of search button icon .. Add SVG version of search button icon Bug: 35336 Change-Id: I471edc6c3e4667fa6572bf33e24c64496c1b7005 --- M skins/vector/components/search.less A skins/vector/images/search-ltr.svg A skins/vector/images/search-rtl.svg 3 files changed, 85 insertions(+), 2 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/vector/components/search.less b/skins/vector/components/search.less index 3a74754..f3073f1 100644 --- a/skins/vector/components/search.less +++ b/skins/vector/components/search.less @@ -104,8 +104,9 @@ direction: ltr; white-space: nowrap; overflow: hidden; - /* @embed */ - background: transparent url(images/search-ltr.png) center center no-repeat; + .background-image-svg('images/search-ltr.svg', 'images/search-ltr.png'); + background-position: center center; + background-repeat: no-repeat; } div#simpleSearch #mw-searchButton { diff --git a/skins/vector/images/search-ltr.svg b/skins/vector/images/search-ltr.svg new file mode 100644 index 000..184e0ee --- /dev/null +++ b/skins/vector/images/search-ltr.svg @@ -0,0 +1,41 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with Inkscape (http://www.inkscape.org/) -- + +svg + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; + xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg=http://www.w3.org/2000/svg; + xmlns=http://www.w3.org/2000/svg; + version=1.1 + width=12 + height=13 + id=svg2 + defs + id=defs4 / + metadata + id=metadata7 +rdf:RDF + cc:Work + rdf:about= +dc:formatimage/svg+xml/dc:format +dc:type + rdf:resource=http://purl.org/dc/dcmitype/StillImage; / +dc:title/dc:title + /cc:Work +/rdf:RDF + /metadata + g + transform=translate(-894,-731.57648) + id=layer1 +path + d=m -0.75761414,8.9593897 a 5.177032,5.177032 0 1 1 -10.35406386,0 5.177032,5.177032 0 1 1 10.35406386,0 z + transform=matrix(0.85040896,0,0,0.83575426,904.36465,729.3551) + id=path2996 + style=fill:none;stroke:#6c6c6c;stroke-width:2.13510537;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none / +path + d=m 902.17653,740.39168 2.26569,2.6414 + id=path3766 + style=fill:none;stroke:#6c6c6c;stroke-width:2.2005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none / + /g +/svg diff --git a/skins/vector/images/search-rtl.svg b/skins/vector/images/search-rtl.svg new file mode 100644 index 000..4fd9a47 --- /dev/null +++ b/skins/vector/images/search-rtl.svg @@ -0,0 +1,41 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with Inkscape (http://www.inkscape.org/) -- + +svg + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; + xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg=http://www.w3.org/2000/svg; + xmlns=http://www.w3.org/2000/svg; + version=1.1 + width=12 + height=13 + id=svg2 + defs + id=defs4 / + metadata + id=metadata7 +rdf:RDF + cc:Work + rdf:about= +dc:formatimage/svg+xml/dc:format +dc:type + rdf:resource=http://purl.org/dc/dcmitype/StillImage; / +dc:title/dc:title + /cc:Work +/rdf:RDF + /metadata + g + transform=translate(-894,-731.57648) + id=layer1 +path + d=m -0.75761414,8.9593897 a 5.177032,5.177032 0 1 1 -10.35406386,0 5.177032,5.177032 0 1 1 10.35406386,0 z + transform=matrix(-0.85040896,0,0,0.83575426,895.63918,729.3551) + id=path2996 + style=fill:none;stroke:#6c6c6c;stroke-width:2.13510537;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none / +path + d=m 897.8273,740.39168 -2.26569,2.6414 + id=path3766 + style=fill:none;stroke:#6c6c6c;stroke-width:2.2005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none / + /g +/svg -- To view, visit https://gerrit.wikimedia.org/r/97307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I471edc6c3e4667fa6572bf33e24c64496c1b7005 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: M4tx m...@m4tx.pl Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Waldir wal...@email.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] mediawiki.searchSuggest: Only handle Vector's fulltext hack ... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/110965 Change subject: mediawiki.searchSuggest: Only handle Vector's fulltext hack on Vector .. mediawiki.searchSuggest: Only handle Vector's fulltext hack on Vector I'm not sure why I thought what I did would work, obviously it won't. Let's just slap a class on the button. Follow-up to I5fe0543e. Change-Id: I1b3ff802ae0fc0fb9499a07068aefc2590ae3b66 --- M resources/mediawiki/mediawiki.searchSuggest.js M skins/Vector.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/110965/1 diff --git a/resources/mediawiki/mediawiki.searchSuggest.js b/resources/mediawiki/mediawiki.searchSuggest.js index 9fcd42a..3b360af 100644 --- a/resources/mediawiki/mediawiki.searchSuggest.js +++ b/resources/mediawiki/mediawiki.searchSuggest.js @@ -164,10 +164,7 @@ // make sure paste and cut events from the mouse and dragdrop events // trigger the keypress handler and cause the suggestions to update $( this ).trigger( 'keypress' ); - } ) - // If the forms include any fulltext search thingies, remove them as they - // would interfere with selecting suggestions - .closest( 'form' ).find( '[name=fulltext]' ).remove(); + } ); // Ensure that the thing is actually present! if ( $searchRegion.length === 0 ) { @@ -197,6 +194,9 @@ $region: $searchRegion } ); + // If the form includes any fallback fulltext search buttons, remove them + $searchInput.closest( 'form' ).find( '.mw-fallbackSearchButton' ).remove(); + // In most skins (at least Monobook and Vector), the font-size is messed up in body. // (they use 2 elements to get a sane font-height). So, instead of making exceptions for // each skin or adding more stylesheets, just copy it from the active element so auto-fit. diff --git a/skins/Vector.php b/skins/Vector.php index adf9003..b44b914 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -444,7 +444,7 @@ // * The mediawiki.searchSuggest module, after doing tests for the broken browsers, removes // the 'fulltext' button and handles 'fulltext' search itself; this will reveal the 'go' // button and cause it to be used. - echo $this-makeSearchButton( 'fulltext', array( 'id' = 'mw-searchButton', 'class' = 'searchButton' ) ); + echo $this-makeSearchButton( 'fulltext', array( 'id' = 'mw-searchButton', 'class' = 'searchButton mw-fallbackSearchButton' ) ); echo $this-makeSearchButton( 'go', array( 'id' = 'searchButton', 'class' = 'searchButton' ) ); ? /div -- To view, visit https://gerrit.wikimedia.org/r/110965 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b3ff802ae0fc0fb9499a07068aefc2590ae3b66 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] Vector: Remove spurious CSS rule - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/110963 Change subject: Vector: Remove spurious CSS rule .. Vector: Remove spurious CSS rule It's already stated above. Follow-up to I5fe0543e. Change-Id: I54171bd0106072a63c660e83e15239e9ff40de20 --- M skins/vector/components/search.less 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/110963/1 diff --git a/skins/vector/components/search.less b/skins/vector/components/search.less index f3073f1..3703e85 100644 --- a/skins/vector/components/search.less +++ b/skins/vector/components/search.less @@ -55,10 +55,6 @@ outline: none; } -div#simpleSearch input { - color: black; -} - // Placeholder colors. These rules MAY NOT be merged because of how // CSS requires browsers to parse unrecognized selectors! div#simpleSearch #searchInput.placeholder { -- To view, visit https://gerrit.wikimedia.org/r/110963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54171bd0106072a63c660e83e15239e9ff40de20 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] One scenario step not implemented - change (qa/browsertests)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/110962 Change subject: One scenario step not implemented .. One scenario step not implemented Change-Id: Ic1065fdb142eca26583014c85454f7bdaafd4126 --- M features/step_definitions/preferences_editing_steps.rb M features/support/pages/preferences_editing_page.rb 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/62/110962/1 diff --git a/features/step_definitions/preferences_editing_steps.rb b/features/step_definitions/preferences_editing_steps.rb index 63d8979..a20b344 100644 --- a/features/step_definitions/preferences_editing_steps.rb +++ b/features/step_definitions/preferences_editing_steps.rb @@ -37,6 +37,10 @@ on(PreferencesEditingPage).edit_section_right_click_check_element.when_present.should exist end +Then(/^I can select section editing via edit links$/) do + on(PreferencesEditingPage).edit_section_edit_link_element.when_present.should exist +end + Then(/^I can select show edit toolbar$/) do on(PreferencesEditingPage).show_edit_toolbar_check_element.when_present.should exist end diff --git a/features/support/pages/preferences_editing_page.rb b/features/support/pages/preferences_editing_page.rb index 1b03c2d..cc24299 100644 --- a/features/support/pages/preferences_editing_page.rb +++ b/features/support/pages/preferences_editing_page.rb @@ -17,6 +17,7 @@ select_list(:edit_area_font_style_select, id: mw-input-wpeditfont) checkbox(:edit_section_double_click_check, id: mw-input-wpeditondblclick) + checkbox(:edit_section_edit_link, id: mw-input-wpeditsectiononrightclick) checkbox(:edit_section_right_click_check, id: mw-input-wpeditsectiononrightclick) checkbox(:enhanced_editing_toolbar_check, id: mw-input-wpusebetatoolbar) checkbox(:forced_edit_summary_check, id: mw-input-wpforceeditsummary) -- To view, visit https://gerrit.wikimedia.org/r/110962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1065fdb142eca26583014c85454f7bdaafd4126 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Browsertests for statements with item values - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/110966 Change subject: Browsertests for statements with item values .. Browsertests for statements with item values Change-Id: I8c31e1a68b3bd3c96b42e47d74ccf13324f7e55e --- A tests/browser/features/statements_item.feature M tests/browser/features/statements_string.feature M tests/browser/features/step_definitions/statement_steps.rb M tests/browser/features/support/modules/statement_module.rb M tests/browser/features/support/modules/wikibase_api_module.rb 5 files changed, 61 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/66/110966/1 diff --git a/tests/browser/features/statements_item.feature b/tests/browser/features/statements_item.feature new file mode 100644 index 000..cc82c32 --- /dev/null +++ b/tests/browser/features/statements_item.feature @@ -0,0 +1,38 @@ +# Wikidata UI tests +# +# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de) +# License:: GNU GPL v2+ +# +# feature definition for item type statements tests + +@wikidata.beta.wmflabs.org +Feature: Creating statements of type item + + Background: +Given I am on an item page + And The copyright warning has been dismissed + And Anonymous edit warnings are disabled + + @repo_login @modify_entity + Scenario Outline: Adding a statement of type item +Given There are properties with the following handles and datatypes: + | itemprop | wikibase-item | +Given There are items with the following handles: + | item1 | +When I click the statement add button + And I select the property itemprop + And I enter the label of the item with handle itemhandle as statement value + And I save +Then Statement add button should be there +And Statement cancel button should not be there +And Statement save button should not be there +And Entity selector input element should not be there +And Statement value input element should not be there +And Statement edit button for claim 1 in group 1 should be there +And Statement name of group 1 should be the label of itemprop +And Statement value of claim 1 in group 1 should be the label of the item with handle itemhandle + + Examples: +| itemhandle | save| +#| item1 | click the statement save button | +| item1 | press the RETURN key in the statement value input field | diff --git a/tests/browser/features/statements_string.feature b/tests/browser/features/statements_string.feature index 8b8274e..7414629 100644 --- a/tests/browser/features/statements_string.feature +++ b/tests/browser/features/statements_string.feature @@ -3,10 +3,10 @@ # Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de) # License:: GNU GPL v2+ # -# feature definition for statements tests +# feature definition for string type statements tests @wikidata.beta.wmflabs.org -Feature: Creating statements +Feature: Creating statements of type string Background: Given I am on an item page @@ -19,7 +19,7 @@ | stringprop | string | When I click the statement add button And I select the property stringprop - And I enter value as string statement value + And I enter the string value as statement value And I save Then Statement add button should be there And Statement cancel button should not be there @@ -41,7 +41,7 @@ | stringprop | string | When I click the statement add button And I select the property stringprop - And I enter it's a string as string statement value + And I enter the string it's a string as statement value And I click the statement save button And I reload the page Then Statement add button should be there diff --git a/tests/browser/features/step_definitions/statement_steps.rb b/tests/browser/features/step_definitions/statement_steps.rb index cc67233..44967c9 100644 --- a/tests/browser/features/step_definitions/statement_steps.rb +++ b/tests/browser/features/step_definitions/statement_steps.rb @@ -37,8 +37,16 @@ end end -When /^I enter (.+) as string statement value$/ do |value| +When /^I enter the string (.+) as statement value$/ do |value| on(ItemPage).statement_value_input_field = value +end + +When /^I enter the label of the item with handle (.+) as statement value$/ do |handle| + on(ItemPage) do |page| +page.statement_value_input_field_element.clear +page.statement_value_input_field = @items[handle][label] +page.ajax_wait + end end When /^I enter a too long string as statement value$/ do @@ -114,3 +122,7 @@ Then /^Statement string value of claim (.+) in group (.+) should be (.+)$/ do |claim_index, group_index, value|
[MediaWiki-commits] [Gerrit] Vector: ::-moz-placeholder is a pseudoelement since Firefox 19 - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/110964 Change subject: Vector: ::-moz-placeholder is a pseudoelement since Firefox 19 .. Vector: ::-moz-placeholder is a pseudoelement since Firefox 19 Per http://css-tricks.com/almanac/selectors/p/placeholder/ Change-Id: I33b5f94ae48b17555abacc998bb2c7bdcf7cd4b9 --- M skins/vector/components/search.less 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/110964/1 diff --git a/skins/vector/components/search.less b/skins/vector/components/search.less index 3703e85..c400563 100644 --- a/skins/vector/components/search.less +++ b/skins/vector/components/search.less @@ -66,6 +66,9 @@ div#simpleSearch #searchInput:-moz-placeholder { color: #999; } +div#simpleSearch #searchInput::-moz-placeholder { + color: #999; +} div#simpleSearch #searchInput:-ms-input-placeholder { color: #999; } -- To view, visit https://gerrit.wikimedia.org/r/110964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33b5f94ae48b17555abacc998bb2c7bdcf7cd4b9 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] Use AppCompat for ActionBar everywhere - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Use AppCompat for ActionBar everywhere .. Use AppCompat for ActionBar everywhere A small step towards making this work on Android 2.3 :) Does not work yet in 2.3, though Change-Id: I3f85b229d03870e0a690bcb6c7125d0943537334 --- M pom.xml M wikipedia/pom.xml M wikipedia/res/menu/menu_edit_section.xml M wikipedia/res/menu/menu_history.xml M wikipedia/res/menu/menu_login.xml M wikipedia/res/menu/menu_saved_pages.xml M wikipedia/res/menu/menu_saved_pages_context.xml M wikipedia/res/values/styles.xml M wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java M wikipedia/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java 13 files changed, 58 insertions(+), 24 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/pom.xml b/pom.xml index b2538cd..bbcb693 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,20 @@ version4.4_r1/version scopeprovided/scope /dependency +dependency +groupIdandroid.support/groupId +artifactIdcompatibility-v7-appcompat/artifactId +version19.0.0/version +typeapklib/type +/dependency + +dependency +groupIdandroid.support/groupId +artifactIdcompatibility-v7-appcompat/artifactId +version19.0.0/version +typejar/type +/dependency + dependency groupIdcom.google.android/groupId artifactIdandroid-test/artifactId diff --git a/wikipedia/pom.xml b/wikipedia/pom.xml index b2d8fcc..229bf44 100644 --- a/wikipedia/pom.xml +++ b/wikipedia/pom.xml @@ -50,6 +50,17 @@ artifactIdokhttp/artifactId version1.3.0/version /dependency +dependency +groupIdandroid.support/groupId +artifactIdcompatibility-v7-appcompat/artifactId +typeapklib/type +/dependency + +dependency +groupIdandroid.support/groupId +artifactIdcompatibility-v7-appcompat/artifactId +typejar/type +/dependency /dependencies build finalName${project.artifactId}/finalName diff --git a/wikipedia/res/menu/menu_edit_section.xml b/wikipedia/res/menu/menu_edit_section.xml index 30afb2d..2d76b9a 100644 --- a/wikipedia/res/menu/menu_edit_section.xml +++ b/wikipedia/res/menu/menu_edit_section.xml @@ -1,10 +1,11 @@ ?xml version=1.0 encoding=utf-8? -menu xmlns:android=http://schemas.android.com/apk/res/android; +menu xmlns:android=http://schemas.android.com/apk/res/android; + xmlns:app=http://schemas.android.com/apk/res-auto; item android:id=@+id/menu_save_section android:enabled=true android:icon=@android:drawable/ic_menu_save -android:showAsAction=always / +app:showAsAction=always / /menu \ No newline at end of file diff --git a/wikipedia/res/menu/menu_history.xml b/wikipedia/res/menu/menu_history.xml index 80064d6..3195fae 100644 --- a/wikipedia/res/menu/menu_history.xml +++ b/wikipedia/res/menu/menu_history.xml @@ -1,9 +1,10 @@ ?xml version=1.0 encoding=utf-8? -menu xmlns:android=http://schemas.android.com/apk/res/android; +menu xmlns:android=http://schemas.android.com/apk/res/android; + xmlns:app=http://schemas.android.com/apk/res-auto; item android:id=@+id/menu_clear_all_history android:icon=@android:drawable/ic_menu_delete android:title=@string/menu_clear_all_history - android:showAsAction=always / + app:showAsAction=always / /menu \ No newline at end of file diff --git a/wikipedia/res/menu/menu_login.xml b/wikipedia/res/menu/menu_login.xml index df0aa26..9d4b793 100644 --- a/wikipedia/res/menu/menu_login.xml +++ b/wikipedia/res/menu/menu_login.xml @@ -1,8 +1,9 @@ ?xml version=1.0 encoding=utf-8? -menu xmlns:android=http://schemas.android.com/apk/res/android; +menu xmlns:android=http://schemas.android.com/apk/res/android; + xmlns:app=http://schemas.android.com/apk/res-auto; item android:id=@+id/menu_login android:icon=@android:drawable/ic_menu_send android:title=@string/menu_login - android:showAsAction=always / + app:showAsAction=always / /menu \ No newline at end of file diff --git a/wikipedia/res/menu/menu_saved_pages.xml b/wikipedia/res/menu/menu_saved_pages.xml index 4c4e6fe..fd9554b 100644 --- a/wikipedia/res/menu/menu_saved_pages.xml +++
[MediaWiki-commits] [Gerrit] Get rid of tabs in the pom.xml files - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Get rid of tabs in the pom.xml files .. Get rid of tabs in the pom.xml files - To be consistent with rest of the project, which uses 4 spaces - Also tabs suck Change-Id: Ifa59413fa88c0e64d7763b4e0cf1190c0d749836 --- M pom.xml M wikipedia-it/pom.xml M wikipedia/pom.xml 3 files changed, 153 insertions(+), 153 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/pom.xml b/pom.xml index bbcb693..b77152b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,26 +1,26 @@ ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; - modelVersion4.0.0/modelVersion - groupIdorg.wikimedia/groupId - artifactIdwikipedia-parent/artifactId - version1.0-SNAPSHOT/version - packagingpom/packaging - namewikipedia - Parent/name +xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +groupIdorg.wikimedia/groupId +artifactIdwikipedia-parent/artifactId +version1.0-SNAPSHOT/version +packagingpom/packaging +namewikipedia - Parent/name - modules - modulewikipedia/module - modulewikipedia-it/module - /modules +modules +modulewikipedia/module +modulewikipedia-it/module +/modules - dependencyManagement - dependencies - dependency - groupIdandroid/groupId - artifactIdandroid/artifactId - version4.4_r1/version - scopeprovided/scope - /dependency +dependencyManagement +dependencies +dependency +groupIdandroid/groupId +artifactIdandroid/artifactId +version4.4_r1/version +scopeprovided/scope +/dependency dependency groupIdandroid.support/groupId artifactIdcompatibility-v7-appcompat/artifactId @@ -35,51 +35,51 @@ typejar/type /dependency - dependency - groupIdcom.google.android/groupId - artifactIdandroid-test/artifactId - version4.1.1.4/version - scopeprovided/scope - /dependency - dependency - groupIdjunit/groupId - artifactIdjunit/artifactId - version4.11/version - scopeprovided/scope - /dependency - dependency - groupIdandroid.support/groupId - artifactIdcompatibility-v4/artifactId - version19.0.0/version - /dependency - /dependencies - /dependencyManagement +dependency +groupIdcom.google.android/groupId +artifactIdandroid-test/artifactId +version4.1.1.4/version +scopeprovided/scope +/dependency +dependency +groupIdjunit/groupId +artifactIdjunit/artifactId +version4.11/version +scopeprovided/scope +/dependency +dependency +groupIdandroid.support/groupId +artifactIdcompatibility-v4/artifactId +version19.0.0/version +/dependency +/dependencies +/dependencyManagement - repositories - repository - idtools-repository/id - urlhttps://tools.wmflabs.org/android-maven-repo//url - /repository - /repositories +repositories +repository +idtools-repository/id +urlhttps://tools.wmflabs.org/android-maven-repo//url +/repository +/repositories - build - pluginManagement - plugins - plugin - groupIdcom.jayway.maven.plugins.android.generation2/groupId - artifactIdandroid-maven-plugin/artifactId - version3.8.2/version - configuration - sdk - platform19/platform -
[MediaWiki-commits] [Gerrit] Add 'test' entry to list of wikis - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add 'test' entry to list of wikis .. Add 'test' entry to list of wikis Makes it easier to test editing functionality. Change-Id: I1ee24b0eabd965e0d4970af4f0575b0ffefed6d2 --- M scripts/generate_wiki_languages.py M wikipedia/res/values/languages_list.xml 2 files changed, 19 insertions(+), 12 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/scripts/generate_wiki_languages.py b/scripts/generate_wiki_languages.py index b0728f4..22fcfe6 100644 --- a/scripts/generate_wiki_languages.py +++ b/scripts/generate_wiki_languages.py @@ -27,6 +27,10 @@ lang_local_names.append(row[10].replace(', \\')) lang_eng_names.append(row[1].replace(', \\')) +lang_keys.append('test') +lang_local_names.append('Test') +lang_eng_names.append('Test') + # Generate the XML, for Android x = lb.E diff --git a/wikipedia/res/values/languages_list.xml b/wikipedia/res/values/languages_list.xml index 95ce46f..4c7cb1c 100644 --- a/wikipedia/res/values/languages_list.xml +++ b/wikipedia/res/values/languages_list.xml @@ -26,8 +26,8 @@ itemko/item itemar/item itemhu/item -itemsr/item itemms/item +itemsr/item itemro/item itemtr/item itemmin/item @@ -174,9 +174,9 @@ itemlad/item itemsc/item itemwuu/item -itemlij/item -itemzh-classical/item itemug/item +itemzh-classical/item +itemlij/item itemfur/item itemmt/item itempi/item @@ -239,8 +239,8 @@ itemzu/item itemchy/item itemrmy/item -itemchr/item itemcu/item +itemchr/item itemtn/item itemcdo/item itemroa-rup/item @@ -287,6 +287,7 @@ itemmus/item itemkr/item itemhz/item +itemtest/item /string-array string-array name=preference_language_local_names itemEnglish/item @@ -314,8 +315,8 @@ item#54620;#44397;#50612;/item item#1575;#1604;#1593;#1585;#1576;#1610;#1577;/item itemMagyar/item -item#1057;#1088;#1087;#1089;#1082;#1080; / Srpski/item itemBahasa Melayu/item +item#1057;#1088;#1087;#1089;#1082;#1080; / Srpski/item itemRom#226;n#259;/item itemT#252;rk#231;e/item itemBaso Minangkabau/item @@ -462,9 +463,9 @@ itemDzhudezmo/item itemSardu/item item#21556;#35821;/item -itemL#237;guru/item -item#21476;#25991; / #25991;#35328;#25991;/item item#1574;#1735;#1610;#1594;#1735;#1585; #1578;#1609;#1604;#1609;/item +item#21476;#25991; / #25991;#35328;#25991;/item +itemL#237;guru/item itemFurlan/item itemMalti/item item#2346;#2366;#2356;#2367;/item @@ -527,8 +528,8 @@ itemisiZulu/item itemTsets#234;hest#226;hese/item itemromani - #2352;#2379;#2350;#2366;#2344;#2368;/item -item#5091;#5043;#5033;/item item#1057;#1083;#1086;#1074;#1123;#1085;#1100;#1089;#1082;#1098;/item +item#5091;#5043;#5033;/item itemSetswana/item itemM#236;ng-d#277;#804;ng-ng#7795;#772;/item itemArm#227;neashce/item @@ -575,6 +576,7 @@ itemMuskogee/item itemKanuri/item itemOtsiherero/item +itemTest/item /string-array string-array name=preference_language_canonical_names itemEnglish/item @@ -602,8 +604,8 @@ itemKorean/item itemArabic/item itemHungarian/item -itemSerbian/item itemMalay/item +itemSerbian/item itemRomanian/item itemTurkish/item itemMinangkabau/item @@ -750,9 +752,9 @@ itemLadino/item itemSardinian/item itemWu/item -itemLigurian/item -itemClassical Chinese/item itemUyghur/item +itemClassical Chinese/item +itemLigurian/item itemFriulian/item itemMaltese/item itemPali/item @@ -815,8 +817,8 @@ itemZulu/item itemCheyenne/item itemRomani/item -itemCherokee/item itemOld Church Slavonic/item +itemCherokee/item itemTswana/item itemMin Dong/item itemAromanian/item @@ -863,5 +865,6 @@ itemMuscogee/item itemKanuri/item itemHerero/item +itemTest/item /string-array /resources -- To view, visit https://gerrit.wikimedia.org/r/110957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ee24b0eabd965e0d4970af4f0575b0ffefed6d2 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mark API as a shim which will be replaced - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/110967 Change subject: Mark API as a shim which will be replaced .. Mark API as a shim which will be replaced Adjust the auto-generated API documentation to make it clear to bot owners that the current API is temporary and should not yet be developed against. Change-Id: If85109a1f9d26e08ef58155b2cfc21d9798f2f91 --- M includes/api/ApiFlow.php M includes/api/ApiQueryFlow.php 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/67/110967/1 diff --git a/includes/api/ApiFlow.php b/includes/api/ApiFlow.php index 03e0837..2e2c934 100644 --- a/includes/api/ApiFlow.php +++ b/includes/api/ApiFlow.php @@ -160,6 +160,11 @@ ); } + public function getDescription() { + return 'Shim to connect to the internal Flow API. This API is not suggested ' . + 'for external use and will soon be superseded by an integrated mediawiki api.'; + } + public function getParamDescription() { return array( 'action' = 'The action to take', diff --git a/includes/api/ApiQueryFlow.php b/includes/api/ApiQueryFlow.php index b606d19..1910814 100644 --- a/includes/api/ApiQueryFlow.php +++ b/includes/api/ApiQueryFlow.php @@ -68,6 +68,12 @@ ); } + public function getDescription() { + return 'Shim to query to the internal Flow API. This API is not suggested ' . + 'for external use and will soon be superseded by an integrated mediawiki api.'; + } + + public function getParamDescription() { return array( 'workflow' = 'Hex-encoded ID of the workflow to query', -- To view, visit https://gerrit.wikimedia.org/r/110967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If85109a1f9d26e08ef58155b2cfc21d9798f2f91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make linkactions into its own module - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Make linkactions into its own module .. Make linkactions into its own module Makes reuse easier Change-Id: I8a6595594909e58af2e6f2df831ca5c3ac8aaefd --- M wikipedia/assets/bundle.js M www/Gruntfile.js A www/js/actions.js A www/js/editaction.js D www/js/linkactions.js 5 files changed, 102 insertions(+), 47 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index f893cc3..e826853 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -1,4 +1,37 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==functionrequire;if(!ua)return a(o,!0);if(i)return i(o,!0);throw new Error(Cannot find module '+o+')}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==functionrequire;for(var o=0;or.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ +var bridge = require('./bridge'); + +function ActionsHandler() { +} + +var actionHandlers = {}; + +ActionsHandler.prototype.register = function( action, fun ) { +if ( action in actionHandlers ) { +actionHandlers[action].push( fun ); +} else { +actionHandlers[action] = [ fun ]; +} +}; + +document.onclick = function() { +if ( event.target.tagName === A ) { +if ( event.target.hasAttribute( data-action ) ) { +var action = event.target.getAttribute( data-action ); +var handlers = actionHandlers[ action ]; +for ( var i = 0; i handlers.length; i++ ) { +handlers[i]( event.target, event ); +} +} else { +bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +event.preventDefault(); +} +} +}; + +module.exports = new ActionsHandler(); + +},{./bridge:2}],2:[function(require,module,exports){ function Bridge() { } @@ -36,28 +69,16 @@ window.onload = function() { module.exports.sendMessage( DOMLoaded, {} ); }; -},{}],2:[function(require,module,exports){ +},{}],3:[function(require,module,exports){ +var actions = require('./actions'); var bridge = require('./bridge'); -var actionHandlers = { -edit_section: function( el, event ) { -bridge.sendMessage( 'editSectionClicked', { sectionID: el.getAttribute( 'data-id' ) } ); -event.preventDefault(); -} -}; +actions.register( edit_section, function( el, event ) { +bridge.sendMessage( 'editSectionClicked', { sectionID: el.getAttribute( 'data-id' ) } ); +event.preventDefault(); +} ); -document.onclick = function() { -if ( event.target.tagName === A ) { -if ( event.target.hasAttribute( data-action ) ) { -var action = event.target.getAttribute( data-action ); -actionHandlers[ action ]( event.target, event ); -} else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); -event.preventDefault(); -} -} -}; -},{./bridge:1}],3:[function(require,module,exports){ +},{./actions:1,./bridge:2}],4:[function(require,module,exports){ var bridge = require(./bridge); bridge.registerListener( displayAttribution, function( payload ) { var lastUpdatedA = document.getElementById( lastupdated ); @@ -75,7 +96,7 @@ } bridge.sendMessage( imagesListResponse, { images: imageURLs }); } ); -},{./bridge:1}],4:[function(require,module,exports){ +},{./bridge:2}],5:[function(require,module,exports){ var bridge = require(./bridge); var transformer = require(./transformer); @@ -143,7 +164,7 @@ window.scrollTo(0, scrollY); }); -},{./bridge:1,./transformer:5}],5:[function(require,module,exports){ +},{./bridge:2,./transformer:6}],6:[function(require,module,exports){ function Transformer() { } @@ -167,7 +188,7 @@ module.exports = new Transformer(); -},{}],6:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ var bridge = require(./bridge); var transformer = require(./transformer); @@ -205,4 +226,4 @@ return content; } ); -},{./bridge:1,./transformer:5}]},{},[3,5,6,1,2,4]) \ No newline at end of file +},{./bridge:2,./transformer:6}]},{},[4,6,7,2,1,3,5]) \ No newline at end of file diff --git a/www/Gruntfile.js b/www/Gruntfile.js index 1f5e148..01e162e 100644 --- a/www/Gruntfile.js +++ b/www/Gruntfile.js @@ -4,7 +4,8 @@ js/tranformer.js, js/transforms.js, js/bridge.js, -js/linkactions.js, +js/actions.js, +js/editaction.js, js/sections.js, tests/*.js ]; @@ -20,9 +21,24 @@ browserify: { dist: { files: { -bundle.js: [ js/main.js, js/transformer.js,
[MediaWiki-commits] [Gerrit] Mark API as a shim which will be replaced - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Mark API as a shim which will be replaced .. Mark API as a shim which will be replaced Adjust the auto-generated API documentation to make it clear to bot owners that the current API is temporary and should not yet be developed against. Change-Id: If85109a1f9d26e08ef58155b2cfc21d9798f2f91 --- M includes/api/ApiFlow.php M includes/api/ApiQueryFlow.php 2 files changed, 11 insertions(+), 8 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiFlow.php b/includes/api/ApiFlow.php index 03e0837..5aa56d1 100644 --- a/includes/api/ApiFlow.php +++ b/includes/api/ApiFlow.php @@ -135,10 +135,6 @@ return $output; } - public function getDescription() { -return 'Allows actions to be taken on Flow Workflows'; - } - public function getAllowedParams() { return array( 'flowaction' = array( @@ -160,6 +156,11 @@ ); } + public function getDescription() { + return 'Shim to perform actions against the internal Flow API. This API is not suggested ' . + 'for external use and will soon be superseded by an integrated mediawiki api.'; + } + public function getParamDescription() { return array( 'action' = 'The action to take', diff --git a/includes/api/ApiQueryFlow.php b/includes/api/ApiQueryFlow.php index b606d19..0656707 100644 --- a/includes/api/ApiQueryFlow.php +++ b/includes/api/ApiQueryFlow.php @@ -68,6 +68,12 @@ ); } + public function getDescription() { + return 'Shim to query to the internal Flow API. This API is not suggested ' . + 'for external use and will soon be superseded by an integrated mediawiki api.'; + } + + public function getParamDescription() { return array( 'workflow' = 'Hex-encoded ID of the workflow to query', @@ -75,10 +81,6 @@ 'action' = 'The view-type action to take', 'params' = 'View parameters to pass to each block, indexed by block name', ); - } - - public function getDescription() { - return 'Queries the Flow subsystem for data'; } public function getExamples() { -- To view, visit https://gerrit.wikimedia.org/r/110967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If85109a1f9d26e08ef58155b2cfc21d9798f2f91 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Fixed lot of stuff in nagios builder - change (labs/nagios-builder)
Petrb has uploaded a new change for review. https://gerrit.wikimedia.org/r/110968 Change subject: Fixed lot of stuff in nagios builder .. Fixed lot of stuff in nagios builder * The ignored hosts are now in separate file instead of being hardcoded, that makes it easier to maintain, the default template should be included (now is missing in git repo, but filename is ignored.host) * Implemented some default files that must not be removed from icinga objects like ido2db, if you remove them, icinga will not start * Don't create config files for empty groups, which makes faulty config Whole this commit is uggly and messy piece of shit but it's 6:40 pm, I am still sitting here in the office, despite I should have been home already, working on this python nightmare (the code is surely cute, but anything written in python gives me creeps) so I really need to commit it anyway, so that I can go home finally :-) If you don't like anything in this patch, fix it 3 Change-Id: Ib0a51c39a246855fc8240dddba500a5c751c4fa3 --- M labsnagiosbuilder/build.py 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/nagios-builder refs/changes/68/110968/1 diff --git a/labsnagiosbuilder/build.py b/labsnagiosbuilder/build.py index a0d6b07..0338e7f 100755 --- a/labsnagiosbuilder/build.py +++ b/labsnagiosbuilder/build.py @@ -31,6 +31,7 @@ nagios_config_dir = /etc/nagios3/conf.d # Instances to ignore +''' ignored_fqdns = [ # Suspended instances 'wikiversity-sandbox-frontend.pmtpa.wmflabs', @@ -57,6 +58,9 @@ 'nova-precise1.pmtpa.wmflabs', 'labs-nfs1.pmtpa.wmflabs', ] +''' + +ignored_fqdns = [line.strip() for line in open('ignored.host')] # How much to spam logging_level = logging.INFO @@ -280,6 +284,9 @@ template = jinja2_env.get_template('group.cfg') for group in groups.keys(): +if len(groups[group]['hosts']) == 0: + logger.info('Skipping group %s because it doesn\'t contain any hosts', group) + continue file_path = os.path.join(nagios_config_dir, 'group-%s.cfg' % group) with open(file_path, 'w') as fh: logger.debug('Writing out group %s to %s' % (group, file_path)) @@ -303,7 +310,14 @@ ''' Simple function to remove old instances ''' -ok_hosts = [] +ok_hosts = [ 'localhost_icinga', +'services_icinga', +'ido2db_check_proc', +'hostgroups_icinga', +'extinfo_icinga', +'contacts_icinga', +'timeperiods_icinga' ] + remove_files = [] for host in hosts: @@ -314,7 +328,7 @@ cfg = file_path[:-4] # Old instances -if not cfg.startswith('group-') and cfg not in ok_hosts: +if not cfg.startswith('group-') and not cfg.startswith('generic') and cfg not in ok_hosts: remove_files.append(file_path) # Old groups @@ -331,7 +345,7 @@ ''' Simple function to reload nagios ''' -if subprocess.call(nagios3 -v /etc/nagios3/nagios.cfg, shell=True) != 0: +if subprocess.call(icinga -v /etc/icinga/icinga.cfg, shell=True) != 0: logger.error('Nagios config validation failed') return -- To view, visit https://gerrit.wikimedia.org/r/110968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0a51c39a246855fc8240dddba500a5c751c4fa3 Gerrit-PatchSet: 1 Gerrit-Project: labs/nagios-builder Gerrit-Branch: master Gerrit-Owner: Petrb benap...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lots of kick fixes - change (mediawiki...MediaWikiChat)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/110969 Change subject: Lots of kick fixes .. Lots of kick fixes Move links outside useritem-header Fix click handler Fix kick input disabling Change-Id: Ie72288efc22977aae9e9c8195406e40747d1fa9a --- M GetNew.api.php M MediaWikiChat.css M MediaWikiChat.js M MediaWikiChat.php 4 files changed, 11 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat refs/changes/69/110969/1 diff --git a/GetNew.api.php b/GetNew.api.php index 58b1b6e..31d0412 100644 --- a/GetNew.api.php +++ b/GetNew.api.php @@ -100,7 +100,7 @@ $users[$toid] = true; // ensure pm receiver is in users list } elseif ( $row-chat_type == MediaWikiChat::TYPE_KICK ) { - if ( $row-chat_to_name == $wgUser-getName() ) { + if ( $row-chat_to_id == $wgUser-getId() ) { $result-addValue( $mName, 'kick', true ); } $timestamp = $row-chat_timestamp; diff --git a/MediaWikiChat.css b/MediaWikiChat.css index 261d365..0c90e56 100644 --- a/MediaWikiChat.css +++ b/MediaWikiChat.css @@ -76,6 +76,7 @@ background-color: #FFF; transition: background-color 0.5s; -webkit-transition: background-color 0.5s; + position: relative; } .mwchat-useritem[data-read=true] { background-color: #FDD; @@ -94,8 +95,10 @@ .mwchat-item-message * { display: inline; } -.mwchat-useritem-header-right { - float: right; +.mwchat-useritem-header-links { + top: 5px; + right: 5px; + position: absolute; } .mwchat-useritem-blocklink, .mwchat-useritem-kicklink { color: #000 !important; diff --git a/MediaWikiChat.js b/MediaWikiChat.js index cffadbb..3da009f 100644 --- a/MediaWikiChat.js +++ b/MediaWikiChat.js @@ -345,8 +345,7 @@ var add = true; var html = 'div class=mwchat-useritem noshow data-unread= data-name=' + user.name + ' data-id=' + userId + ' id=' + userE + ''; - html += 'div class=mwchat-useritem-header'; - html += 'span class=mwchat-useritem-header-left title=' + mw.message( 'chat-private-message' ).text() + ''; + html += 'div class=mwchat-useritem-header title=' + mw.message( 'chat-private-message' ).text() + ''; if ( mw.config.get( 'wgChatSocialAvatars' ) ) { html += 'img src=' + user.avatar + ' /'; @@ -358,7 +357,7 @@ html += 'img src=' + mw.message( 'chat-mod-image').escaped() + ' height=16px alt= title='; html += mw.message( 'chat-user-is-moderator' ).text() + ' /'; } - html += '/spanspan class=mwchat-useritem-header-right'; + html += '/divspan class=mwchat-useritem-header-links'; if ( MediaWikiChat.amIMod ( !user.mod ) ) { html += 'a class=mwchat-useritem-blocklink href=' + mw.config.get( 'wgArticlePath' ).replace( '$1', 'Special:UserRights/' + user.name ); @@ -370,7 +369,7 @@ } } - html += '/span/div'; + html += '/span'; html += 'div class=mwchat-useritem-window style=display:none;'; html += 'div class=mwchat-useritem-content/div'; html += 'input type=text placeholder=' + mw.message( 'chat-type-your-private-message' ).text() + ' /'; @@ -401,7 +400,7 @@ $( '#mwchat-users #' + userE + ' input' ).keypress( MediaWikiChat.userKeypress ); $( '.mwchat-useritem-kicklink' ).click( function() { - var parent = $( this ).parent(); + var parent = $( this ).parent().parent(); $.ajax({ type: 'POST', diff --git a/MediaWikiChat.php b/MediaWikiChat.php index 9fa591d..04c4cdb 100644 --- a/MediaWikiChat.php +++ b/MediaWikiChat.php @@ -17,7 +17,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'MediaWikiChat', - 'version' = '2.5.1', + 'version' = '2.5.2', 'author' = 'Adam Carter/UltrasonicNXT', 'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat', 'descriptionmsg' = 'chat-desc', -- To view, visit https://gerrit.wikimedia.org/r/110969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie72288efc22977aae9e9c8195406e40747d1fa9a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiChat Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
[MediaWiki-commits] [Gerrit] Cirrus config updates - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Cirrus config updates .. Cirrus config updates Cirrus as BetaFeatures for enwiki and huwiki Resize dewiki a bit based on new numbers. It won't take effect until we reindex it. We'll reindex it when dewiki moves to wmf12. Change-Id: I6410e9ceb3a825f23337b59fe07d4e5167e01f0d --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index f739058..b00e0ec 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12736,8 +12736,6 @@ 'wmgCirrusIsBuilding' = array( 'default' = false, - 'enwiki' = true, - 'huwiki' = true, ), 'wmgCirrusSearchPreferRecentDefaultDecayPortion' = array( @@ -12765,7 +12763,7 @@ // Commons is special and has a 'file' index in addition to the regular ones. // File has shards at ~6GB each even with 20 of them. 'commonswiki' = array( 'content' = 1, 'general' = 20, 'file' = 20 ), - 'dewiki' = array( 'content' = 15, 'general' = 13 ), + 'dewiki' = array( 'content' = 20, 'general' = 16 ), 'dewikisource' = array( 'content' = 3, 'general' = 1 ), 'elwiki' = array( 'content' = 2, 'general' = 1 ), // These shards are also signigicantly larger than the target 2GB. @@ -12777,7 +12775,7 @@ 'frwiki' = array( 'content' = 14, 'general' = 13 ), 'frwikisource' = array( 'content' = 12, 'general' = 1 ), 'frwikitionary' = array( 'content' = 2, 'general' = 1 ), - 'huwiki' = array( 'content' = 6, 'general' = 1 ), // Sized before deployment + 'huwiki' = array( 'content' = 4, 'general' = 2 ), 'itwiki' = array( 'content' = 13, 'general' = 9 ), 'mgwiktionary' = array( 'content' = 2, 'general' = 1 ), 'nlwiki' = array( 'content' = 8, 'general' = 4 ), -- To view, visit https://gerrit.wikimedia.org/r/110954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6410e9ceb3a825f23337b59fe07d4e5167e01f0d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@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] Lots of kick fixes - change (mediawiki...MediaWikiChat)
UltrasonicNXT has submitted this change and it was merged. Change subject: Lots of kick fixes .. Lots of kick fixes Move links outside useritem-header Fix click handler Fix kick input disabling Change-Id: Ie72288efc22977aae9e9c8195406e40747d1fa9a --- M GetNew.api.php M MediaWikiChat.css M MediaWikiChat.js M MediaWikiChat.php 4 files changed, 11 insertions(+), 9 deletions(-) Approvals: UltrasonicNXT: Verified; Looks good to me, approved diff --git a/GetNew.api.php b/GetNew.api.php index 58b1b6e..31d0412 100644 --- a/GetNew.api.php +++ b/GetNew.api.php @@ -100,7 +100,7 @@ $users[$toid] = true; // ensure pm receiver is in users list } elseif ( $row-chat_type == MediaWikiChat::TYPE_KICK ) { - if ( $row-chat_to_name == $wgUser-getName() ) { + if ( $row-chat_to_id == $wgUser-getId() ) { $result-addValue( $mName, 'kick', true ); } $timestamp = $row-chat_timestamp; diff --git a/MediaWikiChat.css b/MediaWikiChat.css index 261d365..0c90e56 100644 --- a/MediaWikiChat.css +++ b/MediaWikiChat.css @@ -76,6 +76,7 @@ background-color: #FFF; transition: background-color 0.5s; -webkit-transition: background-color 0.5s; + position: relative; } .mwchat-useritem[data-read=true] { background-color: #FDD; @@ -94,8 +95,10 @@ .mwchat-item-message * { display: inline; } -.mwchat-useritem-header-right { - float: right; +.mwchat-useritem-header-links { + top: 5px; + right: 5px; + position: absolute; } .mwchat-useritem-blocklink, .mwchat-useritem-kicklink { color: #000 !important; diff --git a/MediaWikiChat.js b/MediaWikiChat.js index cffadbb..3da009f 100644 --- a/MediaWikiChat.js +++ b/MediaWikiChat.js @@ -345,8 +345,7 @@ var add = true; var html = 'div class=mwchat-useritem noshow data-unread= data-name=' + user.name + ' data-id=' + userId + ' id=' + userE + ''; - html += 'div class=mwchat-useritem-header'; - html += 'span class=mwchat-useritem-header-left title=' + mw.message( 'chat-private-message' ).text() + ''; + html += 'div class=mwchat-useritem-header title=' + mw.message( 'chat-private-message' ).text() + ''; if ( mw.config.get( 'wgChatSocialAvatars' ) ) { html += 'img src=' + user.avatar + ' /'; @@ -358,7 +357,7 @@ html += 'img src=' + mw.message( 'chat-mod-image').escaped() + ' height=16px alt= title='; html += mw.message( 'chat-user-is-moderator' ).text() + ' /'; } - html += '/spanspan class=mwchat-useritem-header-right'; + html += '/divspan class=mwchat-useritem-header-links'; if ( MediaWikiChat.amIMod ( !user.mod ) ) { html += 'a class=mwchat-useritem-blocklink href=' + mw.config.get( 'wgArticlePath' ).replace( '$1', 'Special:UserRights/' + user.name ); @@ -370,7 +369,7 @@ } } - html += '/span/div'; + html += '/span'; html += 'div class=mwchat-useritem-window style=display:none;'; html += 'div class=mwchat-useritem-content/div'; html += 'input type=text placeholder=' + mw.message( 'chat-type-your-private-message' ).text() + ' /'; @@ -401,7 +400,7 @@ $( '#mwchat-users #' + userE + ' input' ).keypress( MediaWikiChat.userKeypress ); $( '.mwchat-useritem-kicklink' ).click( function() { - var parent = $( this ).parent(); + var parent = $( this ).parent().parent(); $.ajax({ type: 'POST', diff --git a/MediaWikiChat.php b/MediaWikiChat.php index 9fa591d..04c4cdb 100644 --- a/MediaWikiChat.php +++ b/MediaWikiChat.php @@ -17,7 +17,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'MediaWikiChat', - 'version' = '2.5.1', + 'version' = '2.5.2', 'author' = 'Adam Carter/UltrasonicNXT', 'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat', 'descriptionmsg' = 'chat-desc', -- To view, visit https://gerrit.wikimedia.org/r/110969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie72288efc22977aae9e9c8195406e40747d1fa9a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiChat Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com
[MediaWiki-commits] [Gerrit] Add COPYING - change (mediawiki...ApiSandbox)
jenkins-bot has submitted this change and it was merged. Change subject: Add COPYING .. Add COPYING Change-Id: I6bb6c44bbdde99de14d0fef2c103c909eeb386fd --- A COPYING 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/COPYING b/COPYING new file mode 100644 index 000..b808640 --- /dev/null +++ b/COPYING @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +Version 2, December 2004 + + Copyright (C) 2014 + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. -- To view, visit https://gerrit.wikimedia.org/r/108986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bb6c44bbdde99de14d0fef2c103c909eeb386fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ApiSandbox Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.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] getMWVersion.php prints its result, don't print it here too - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: getMWVersion.php prints its result, don't print it here too .. getMWVersion.php prints its result, don't print it here too Change-Id: Ie5e46a9feb6437088d1d425fea68950630d59b7a --- M multiversion/getMWVersion 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/getMWVersion b/multiversion/getMWVersion index 1eefb30..2f73e3b 100755 --- a/multiversion/getMWVersion +++ b/multiversion/getMWVersion @@ -2,4 +2,4 @@ ?php require_once( __DIR__ . '/getMWVersion.php' ); -echo getWikiVersion( $argv[1] ) . \n; +getWikiVersion( $argv[1] ); -- To view, visit https://gerrit.wikimedia.org/r/110672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5e46a9feb6437088d1d425fea68950630d59b7a Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Tim Starling tstarl...@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] Be more assertive about missing arguments to unsubscribe - change (wikimedia...crm)
Mwalker has submitted this change and it was merged. Change subject: Be more assertive about missing arguments to unsubscribe .. Be more assertive about missing arguments to unsubscribe Change-Id: Ic77263b8a98a5d129b7ae8566dc7d8a42e120295 --- M sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mwalker: Looks good to me, approved diff --git a/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module b/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module index ef3aa99..793a69e 100644 --- a/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module +++ b/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module @@ -109,7 +109,7 @@ // Sanity checking :) $body = json_decode($msg-body, TRUE); -if (( !array_key_exists('email', $body) ) || (!array_key_exists('contribution-id', $body) )) { +if ( empty($body['email']) or empty( $body['contribution-id'] ) ) { $error = $txnid: Required field not present! Dropping message on floor.; throw new WmfException( 'UNSUBSCRIBE', $error ); } -- To view, visit https://gerrit.wikimedia.org/r/110906 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic77263b8a98a5d129b7ae8566dc7d8a42e120295 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw awi...@wikimedia.org Gerrit-Reviewer: Katie Horn kh...@wikimedia.org Gerrit-Reviewer: Mwalker mwal...@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 echo at bottom of multiversion/getMWVersion.php - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Remove echo at bottom of multiversion/getMWVersion.php .. Remove echo at bottom of multiversion/getMWVersion.php Moved to multiversion/getMWVersion Change-Id: Iab2289fa54125fa20a6cd11ea1ba1deff7a6f037 --- M multiversion/getMWVersion M multiversion/getMWVersion.php 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/getMWVersion b/multiversion/getMWVersion index 2f73e3b..1eefb30 100755 --- a/multiversion/getMWVersion +++ b/multiversion/getMWVersion @@ -2,4 +2,4 @@ ?php require_once( __DIR__ . '/getMWVersion.php' ); -getWikiVersion( $argv[1] ); +echo getWikiVersion( $argv[1] ) . \n; diff --git a/multiversion/getMWVersion.php b/multiversion/getMWVersion.php index d682fd4..979b4f6 100644 --- a/multiversion/getMWVersion.php +++ b/multiversion/getMWVersion.php @@ -37,5 +37,3 @@ print Unable to open $cdbFilename.\n; exit( 1 ); } - -echo getWikiVersion( $argv[1] ) . \n; -- To view, visit https://gerrit.wikimedia.org/r/110970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab2289fa54125fa20a6cd11ea1ba1deff7a6f037 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove echo at bottom of multiversion/getMWVersion.php - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/110970 Change subject: Remove echo at bottom of multiversion/getMWVersion.php .. Remove echo at bottom of multiversion/getMWVersion.php Moved to multiversion/getMWVersion Change-Id: Iab2289fa54125fa20a6cd11ea1ba1deff7a6f037 --- M multiversion/getMWVersion M multiversion/getMWVersion.php 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/70/110970/1 diff --git a/multiversion/getMWVersion b/multiversion/getMWVersion index 2f73e3b..1eefb30 100755 --- a/multiversion/getMWVersion +++ b/multiversion/getMWVersion @@ -2,4 +2,4 @@ ?php require_once( __DIR__ . '/getMWVersion.php' ); -getWikiVersion( $argv[1] ); +echo getWikiVersion( $argv[1] ) . \n; diff --git a/multiversion/getMWVersion.php b/multiversion/getMWVersion.php index d682fd4..979b4f6 100644 --- a/multiversion/getMWVersion.php +++ b/multiversion/getMWVersion.php @@ -37,5 +37,3 @@ print Unable to open $cdbFilename.\n; exit( 1 ); } - -echo getWikiVersion( $argv[1] ) . \n; -- To view, visit https://gerrit.wikimedia.org/r/110970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab2289fa54125fa20a6cd11ea1ba1deff7a6f037 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master 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] Requested additional options - change (mediawiki...Collection)
Mwalker has submitted this change and it was merged. Change subject: Requested additional options .. Requested additional options TOC checkbox and number-of-columns selector. Change-Id: I2d78c26e07bb2c122d0ea64d640494cf605fc956 --- M Collection.i18n.php M Collection.php 2 files changed, 43 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve Mwalker: Looks good to me, approved diff --git a/Collection.i18n.php b/Collection.i18n.php index 610975e..5f68ba0 100644 --- a/Collection.i18n.php +++ b/Collection.i18n.php @@ -215,6 +215,10 @@ 'coll-setting-papersize'= 'Paper size:', 'coll-setting-papersize-a4' = 'A4', 'coll-setting-papersize-letter' = 'Letter', + 'coll-setting-showtoc' = 'Include a table of contents', + 'coll-setting-columns' = 'Columns:', + 'coll-setting-columns-1'= '1', + 'coll-setting-columns-2'= '2', ); /** Message documentation (Message documentation) @@ -535,18 +539,39 @@ {{Identical|Empty}}', 'coll-user_book_prefix' = '{{notranslate}}', 'coll-community_book_prefix' = '{{notranslate}}', - 'coll-setting-papersize' = 'See also: + + 'coll-setting-papersize' = 'Label for the paper size option. + +See also: * {{msg-mw|Coll-setting-papersize-a4}} * {{msg-mw|Coll-setting-papersize-letter}} {{Identical|Paper size}}', - 'coll-setting-papersize-a4' = '{{optional}} + 'coll-setting-papersize-a4' = '{{optional}} Name for the A4 paper size See also: * {{msg-mw|Coll-setting-papersize}} * {{msg-mw|Coll-setting-papersize-letter}}', - 'coll-setting-papersize-letter' = 'See also: + 'coll-setting-papersize-letter' = 'Name for the US Letter paper size + +See also: * {{msg-mw|Coll-setting-papersize}} * {{msg-mw|Coll-setting-papersize-a4}} {{Identical|Letter}}', + 'coll-setting-showtoc' = 'Label for the include a table of contents checkbox', + 'coll-setting-columns' = 'Label for the number of columns option + +See also: +* {{msg-mw|Coll-setting-columns-1}} +* {{msg-mw|Coll-setting-columns-2}}', + 'coll-setting-columns-1'= '{{optional}} + +See also: +* {{msg-mw|Coll-setting-columns}} +* {{msg-mw|Coll-setting-columns-2}}', + 'coll-setting-columns-2'= '{{optional}} + +See also: +* {{msg-mw|Coll-setting-columns}} +* {{msg-mw|Coll-setting-columns-1}}', ); /** Abkhazian (Аҧсшәа) diff --git a/Collection.php b/Collection.php index cd0343d..8874255 100644 --- a/Collection.php +++ b/Collection.php @@ -117,7 +117,21 @@ 'default' = 'A4', 'options' = array( 'coll-setting-papersize-a4' = 'A4', - 'coll-setting-papersize-letter' = 'Letter' + 'coll-setting-papersize-letter' = 'Letter', + ), + ), + 'showtoc' = array( + 'type' = 'check', + 'label-message' = 'coll-setting-showtoc', + 'default' = true, + ), + 'columns' = array( + 'type' = 'select', + 'label-message' = 'coll-setting-columns', + 'default' = 1, + 'options' = array( + 'coll-setting-columns-1' = '1', + 'coll-setting-columns-2' = '2', ), ), ); -- To view, visit https://gerrit.wikimedia.org/r/107620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d78c26e07bb2c122d0ea64d640494cf605fc956 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Mwalker mwal...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@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] logstash: Parse apache2 events where day of month 10 - change (operations/puppet)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/110971 Change subject: logstash: Parse apache2 events where day of month 10 .. logstash: Parse apache2 events where day of month 10 The date format used in the apache2 log stream pads the day of month field of it's timestamp with spaces rather than zeros or leaving the value as a variable width string. The logstash grok filter we were using previously did not account for the space padding. Also adds date parsing support for the space padded dates. The changeset also corrects an obvious typo in the date format for fatal events. Bug:60772 Change-Id: I0546094fb0a3fb266515e2aeeb55ba7b303b560c --- M files/logstash/filter-mw-via-udp2log.conf 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/110971/1 diff --git a/files/logstash/filter-mw-via-udp2log.conf b/files/logstash/filter-mw-via-udp2log.conf index 40400bb..2dc8a06 100644 --- a/files/logstash/filter-mw-via-udp2log.conf +++ b/files/logstash/filter-mw-via-udp2log.conf @@ -115,7 +115,7 @@ grok { match = [ message, - ^(?logdate%{MONTH} %{MONTHDAY} %{TIME}) %{NOTSPACE:host}:%{SPACE}%{GREEDYDATA:message}$ + ^(?logdate%{MONTH}\s+%{MONTHDAY} %{TIME}) %{NOTSPACE:host}:%{SPACE}%{GREEDYDATA:message}$ ] overwrite = [ host, message ] named_captures_only = true @@ -132,7 +132,7 @@ if !(_grokparsefailure in [tags]) { # Use the parsed timestamp as canonical for the event date { - match = [ logdate, MMM dd HH:mm:ss ] + match = [ logdate, MMM dd HH:mm:ss, MMM d HH:mm:ss ] remove_field = [ logdate ] add_tag = [ logdate ] } @@ -243,7 +243,7 @@ if !(_grokparsefailure in [tags]) { # Use the parsed timestamp as canonical for the event date { - match = [ logdate, dd-MMM--MM HH:mm:ss ] + match = [ logdate, dd-MMM- HH:mm:ss ] remove_field = [ logdate ] add_tag = [ logdate ] } -- To view, visit https://gerrit.wikimedia.org/r/110971 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0546094fb0a3fb266515e2aeeb55ba7b303b560c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] Bump to latest master - change (mediawiki...deploy)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/110972 Change subject: Bump to latest master .. Bump to latest master Change-Id: I5591bf44928a255d65d04072b85f9c0d9f344ab3 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/72/110972/1 diff --git a/src b/src index 2d663eb..4d5d9a0 16 --- a/src +++ b/src -Subproject commit 2d663ebe5938956df278ccace78fafba3b014f2e +Subproject commit 4d5d9a0a569c558a054c9992418317d99958d2ca -- To view, visit https://gerrit.wikimedia.org/r/110972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5591bf44928a255d65d04072b85f9c0d9f344ab3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy 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] Rewrite search.less again with nesting - change (mediawiki/core)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/110973 Change subject: Rewrite search.less again with nesting .. Rewrite search.less again with nesting Follow up to I5fe0543e273aab4fbfb88f8ce933bc49872d4793 LESS nesting allows us to merge the -webkit-appearance rule with its identical rule above. Change-Id: I724ea8221e225895f1429a12eea3be111feeef32 --- M skins/vector/components/search.less 1 file changed, 72 insertions(+), 76 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/110973/1 diff --git a/skins/vector/components/search.less b/skins/vector/components/search.less index f3073f1..b810dfe 100644 --- a/skins/vector/components/search.less +++ b/skins/vector/components/search.less @@ -29,90 +29,86 @@ .background-image('images/search-fade.png'); background-position: top left; background-repeat: repeat-x; -} + // Styles for both the search input and the button + input { + position: absolute; + margin: 0; + padding: 0; + border: 0; + color: black; + background-color: transparent; + } -// Styles for both the search input and the button -div#simpleSearch input { - position: absolute; - margin: 0; - padding: 0; - border: 0; - color: black; - background-color: transparent; -} + // The search input + #searchInput { + top: 0; + left: 0; + width: 90%; + padding: 0.2em 0 0.2em 0.2em; + font-size: 13px; + direction: ltr; + // Undo the styles Webkit browsers apply to type=search fields, + // we provide our own + -webkit-appearance: textfield; -// The search input -div#simpleSearch #searchInput { - top: 0; - left: 0; - width: 90%; - padding: 0.2em 0 0.2em 0.2em; - font-size: 13px; - direction: ltr; -} + ::-webkit-search-decoration, + ::-webkit-search-cancel-button, + ::-webkit-search-results-button, + ::-webkit-search-results-decoration { + -webkit-appearance: textfield; + } -div#simpleSearch #searchInput:focus { - outline: none; -} + :focus { + outline: none; + } -div#simpleSearch input { - color: black; -} + // Placeholder colors. These rules MAY NOT be merged because of how + // CSS requires browsers to parse unrecognized selectors! + .placeholder { + color: #999; + } + ::-webkit-input-placeholder { + color: #999; + } + :-moz-placeholder { + color: #999; + } + :-ms-input-placeholder { + color: #999; + } + } -// Placeholder colors. These rules MAY NOT be merged because of how -// CSS requires browsers to parse unrecognized selectors! -div#simpleSearch #searchInput.placeholder { - color: #999; -} -div#simpleSearch #searchInput::-webkit-input-placeholder { - color: #999; -} -div#simpleSearch #searchInput:-moz-placeholder { - color: #999; -} -div#simpleSearch #searchInput:-ms-input-placeholder { - color: #999; -} + input { + color: black; + } -// Undo the styles Webkit browsers apply to type=search fields, -// we provide our own -div#simpleSearch #searchInput { - -webkit-appearance: textfield; -} -div#simpleSearch #searchInput::-webkit-search-decoration, -div#simpleSearch #searchInput::-webkit-search-cancel-button, -div#simpleSearch #searchInput::-webkit-search-results-button, -div#simpleSearch #searchInput::-webkit-search-results-decoration { - -webkit-appearance: textfield; -} + // The buttons. They are displayed in the same position, and if both are + // present the fulltext search one obscures the 'Go' one. + #searchButton, + #mw-searchButton { + top: 0; + right: 0; + width: 10%; + height: 100%; + cursor: pointer; + /* Hide button text and replace it with the image. */ + text-indent: 100%; + /* Needed to make IE6 respect the text-indent. */ + line-height: 1; + /* Opera 12 on RTL flips the text in a funny way without this. */ + /* @noflip */ + direction: ltr; + white-space: nowrap; + overflow: hidden; + .background-image-svg('images/search-ltr.svg', 'images/search-ltr.png'); + background-position: center center; +
[MediaWiki-commits] [Gerrit] WIP: Phase 2 of switching to the new Parsoid deploy system - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: WIP: Phase 2 of switching to the new Parsoid deploy system .. WIP: Phase 2 of switching to the new Parsoid deploy system Follow-up to Iad299f0e43f309409a98d3f32d1ac9a3851228c3. - forcfully kill nodejs - remove custom deploy script that is no longer needed - switch to upstart by default and remove references to init file and old repo Change-Id: I2b3cc40ef2ede8d0212d4039d240c214e4a30866 --- M files/misc/parsoid.upstart M manifests/role/parsoid.pp D modules/deployment/files/modules/parsoid.py 3 files changed, 12 insertions(+), 40 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved GWicke: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/files/misc/parsoid.upstart b/files/misc/parsoid.upstart index a1aded7..cdd43ce 100644 --- a/files/misc/parsoid.upstart +++ b/files/misc/parsoid.upstart @@ -28,6 +28,11 @@ respawn script +# kill any init-based instances for init - upstart transition +if [ -x /etc/init.d/parsoid ] ; then +/etc/init.d/parsoid stop +fi + if [ -f $DEFAULTFILE ] ; then . $DEFAULTFILE fi diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp index 576ebcb..6a54265 100644 --- a/manifests/role/parsoid.pp +++ b/manifests/role/parsoid.pp @@ -65,9 +65,8 @@ # upstart config prep, will replace sysv init above # Use name that does not match the 'parsoid' service name for now to avoid # it taking precedence over the init script -# TODO: remove init script and rename back to parsoid.conf -file { '/etc/init/parsoid-test.conf': -ensure = absent, +file { '/etc/init/parsoid.conf': +ensure = present, owner = root, group = root, mode= '0444', @@ -108,7 +107,11 @@ hasstatus = true, hasrestart = true, enable = true, -require= File['/etc/init.d/parsoid'], +provider = 'upstart', +subscribe = [ +File['/etc/default/parsoid'], +File['/etc/init/parsoid.conf'], +], } monitor_service { 'parsoid': diff --git a/modules/deployment/files/modules/parsoid.py b/modules/deployment/files/modules/parsoid.py deleted file mode 100644 index ce1d68e..000 --- a/modules/deployment/files/modules/parsoid.py +++ /dev/null @@ -1,36 +0,0 @@ -''' -Parsoid deployment module for git-deploy / salt -''' - -import os -import subprocess - - -def config_symlink(repo): -''' -Put a localsettings.js symlink in the Parsoid checkout pointing to the -config checkout -''' -config = __salt__['deploy.get_config'](repo) -lsSymlinkPath = config['location'] + '/js/api/localsettings.js' -nmSymlinkPath = config['location'] + '/js/node_modules' -if not __salt__['file.file_exists'](lsSymlinkPath): -try: -os.symlink('../../../config/localsettings.js', lsSymlinkPath) -except OSError: -return 1 -if not __salt__['file.file_exists'](nmSymlinkPath): -try: -os.symlink('../../config/node_modules', nmSymlinkPath) -except OSError: -return 1 - -return 0 - - -def restart_parsoid(repo): -''' -restart the parsoid service -''' -ret = subprocess.call(/etc/init.d/parsoid restart, shell=True) -return ret -- To view, visit https://gerrit.wikimedia.org/r/110617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b3cc40ef2ede8d0212d4039d240c214e4a30866 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org Gerrit-Reviewer: Subramanya Sastry ssas...@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] Rename some global variables that violate the naming convention - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Rename some global variables that violate the naming convention .. Rename some global variables that violate the naming convention * $wg(.*) variables from extension should start with the extension name i.e. for extension Math $wgMath(.*) * But keep $wgUseMathJax, because it has been used for 2 years now. * Add release notes Change-Id: Ib70a9f7767890cc4618bc10c2610784f5b17e670 --- M Math.php M MathLaTeXML.php A RELEASE-NOTES-2.0 M tests/MathLaTeXMLTest.php 4 files changed, 33 insertions(+), 20 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/Math.php b/Math.php index d55fe66..6ed0d6c 100644 --- a/Math.php +++ b/Math.php @@ -96,6 +96,8 @@ * that's scalable for zooming, printing, and high-resolution displays. * * Not guaranteed to be stable at this time. + * + * @todo Rename to $wgMathJax */ $wgUseMathJax = false; @@ -104,15 +106,15 @@ * http://latexml.mathweb.org/help * * If you want or need to run your own server, follow these installation - * instructions and override $wgLaTeXMLUrl: - * https://svn.mathweb.org/repos/LaTeXML/branches/arXMLiv/INSTALL + * instructions and override $wgMathLaTeXMLUrl: + * http://www.formulasearchengine.com/LaTeXML * * If you expect heavy load you can specify multiple servers. In that case one * server is randomly chosen for each rendering process. Specify the list of - * servers in an array e.g $wgLaTeXMLUrl = array ( 'http://latexml.example.com/convert', + * servers in an array e.g $wgMathLaTeXMLUrl = array ( 'http://latexml.example.com/convert', * 'http://latexml2.example.com/convert'); */ -$wgLaTeXMLUrl = 'http://latexml.mathweb.org/convert'; +$wgMathLaTeXMLUrl = 'http://latexml.mathweb.org/convert'; /** * Allows to use LaTeXML as renderer for mathematical equation. @@ -123,12 +125,12 @@ * The timeout for the HTTP-Request sent to the LaTeXML to render an equation, * in seconds. */ -$wgLaTeXMLTimeout = 240; +$wgMathLaTeXMLTimeout = 240; /** * Setting for the LaTeXML renderer. * See http://dlmf.nist.gov/LaTeXML/manual/commands/latexmlpost.xhtml for details. */ -$wgDefaultLaTeXMLSetting = 'format=xhtmlwhatsin=mathwhatsout=mathpmmlcmmlnodefaultresourcespreload=LaTeX.poolpreload=article.clspreload=amsmath.stypreload=amsthm.stypreload=amstext.stypreload=amssymb.stypreload=eucal.stypreload=[dvipsnames]xcolor.stypreload=url.stypreload=hyperref.stypreload=[ids]latexml.stypreload=texvc'; +$wgMathDefaultLaTeXMLSetting = 'format=xhtmlwhatsin=mathwhatsout=mathpmmlcmmlnodefaultresourcespreload=LaTeX.poolpreload=article.clspreload=amsmath.stypreload=amsthm.stypreload=amstext.stypreload=amssymb.stypreload=eucal.stypreload=[dvipsnames]xcolor.stypreload=url.stypreload=hyperref.stypreload=[ids]latexml.stypreload=texvc'; /** * The link to the texvc executable */ diff --git a/MathLaTeXML.php b/MathLaTeXML.php index 14aea29..f3dce52 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -35,15 +35,15 @@ } /** * Gets the settings for the LaTeXML daemon. -* +* @global type $wgMathDefaultLaTeXMLSetting * @return string */ public function getLaTeXMLSettings() { - global $wgDefaultLaTeXMLSetting; + global $wgMathDefaultLaTeXMLSetting; if ( $this-LaTeXMLSettings ) { return $this-LaTeXMLSettings; } else { - return $wgDefaultLaTeXMLSetting; + return $wgMathDefaultLaTeXMLSetting; } } @@ -106,10 +106,11 @@ /** * Performs a HTTP Post request to the given host. -* Uses $wgLaTeXMLTimeout as timeout. +* Uses $wgMathLaTeXMLTimeout as timeout. * Generates error messages on failure * @see Http::post() * +* @global type $wgMathLaTeXMLTimeout * @param string $host * @param string $post the encoded post request * @param mixed $res the result @@ -118,12 +119,12 @@ * @return boolean success */ public function makeRequest( $host, $post, $res, $error = '', $httpRequestClass = 'MWHttpRequest' ) { - global $wgLaTeXMLTimeout; + global $wgMathLaTeXMLTimeout; wfProfileIn( __METHOD__ ); $error = ''; $res = null; - $options = array( 'method' = 'POST', 'postData' = $post, 'timeout' = $wgLaTeXMLTimeout ); + $options = array( 'method' = 'POST', 'postData' = $post, 'timeout' = $wgMathLaTeXMLTimeout ); $req = $httpRequestClass::factory( $host, $options ); $status = $req-execute(); if ( $status-isGood() ) { @@ -136,7 +137,7 @@ $res = false;
[MediaWiki-commits] [Gerrit] Bump to latest master - change (mediawiki...deploy)
jenkins-bot has submitted this change and it was merged. Change subject: Bump to latest master .. Bump to latest master Change-Id: I5591bf44928a255d65d04072b85f9c0d9f344ab3 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/src b/src index 2d663eb..4d5d9a0 16 --- a/src +++ b/src -Subproject commit 2d663ebe5938956df278ccace78fafba3b014f2e +Subproject commit 4d5d9a0a569c558a054c9992418317d99958d2ca -- To view, visit https://gerrit.wikimedia.org/r/110972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5591bf44928a255d65d04072b85f9c0d9f344ab3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Subramanya Sastry ssas...@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] Story 1621: Fixing VE content area typography/design for mobile - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Story 1621: Fixing VE content area typography/design for mobile .. Story 1621: Fixing VE content area typography/design for mobile Lots of changes to make sure that page content looks the same in VE as it does in regular page view on mobile: * Add VisualEditorOverlay.less to override some VE specific styling * Change h3 selector to more specific .mw-mf-overlay-header in OverlayNew.less so that it doesn't apply to regular h3s in VE. * Move thumbcaption styles out of thumb selector since thumb captions aren't inside thumb divs in VE :( * Add rellink to hatnote styles since it should be styled the same as dablinks. * Change margin to padding in hatnote styles, so that it doesn't affect position of floated elements below them. * Changing all #content selectors to .content since the ID doesn't exist in VE. * Make sure appropriate header styles are applied in VisualEditor. Change-Id: Ie5084349a5f5edc5f9a05c93bdcf9786a07b49f6 --- M includes/Resources.php M less/common/OverlayNew.less M less/common/commonNew.less M less/common/hacks.less M less/common/typographyNew.less A less/modules/editor/VisualEditorOverlay.less R less/modules/editor/editor.less M less/tablet/hacks.less 8 files changed, 82 insertions(+), 23 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index a9628e9..cffe597 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -266,7 +266,7 @@ 'javascripts/modules/editor/EditorOverlayBase.js', ), 'styles' = array( - 'less/modules/editor.less', + 'less/modules/editor/editor.less', ), 'templates' = array( 'modules/editor/EditorOverlayBase', @@ -309,6 +309,9 @@ 'scripts' = array( 'javascripts/modules/editor/VisualEditorOverlay.js', ), + 'styles' = array( + 'less/modules/editor/VisualEditorOverlay.less', + ), 'templates' = array( 'modules/editor/VisualEditorOverlay', ), diff --git a/less/common/OverlayNew.less b/less/common/OverlayNew.less index bc24103..9394669 100644 --- a/less/common/OverlayNew.less +++ b/less/common/OverlayNew.less @@ -277,7 +277,7 @@ line-height: 1.4; } - h3 { + .mw-mf-overlay-header { font-weight: normal; font-size: .9em; padding: .3em @contentMargin; diff --git a/less/common/commonNew.less b/less/common/commonNew.less index fea228c..208204d 100644 --- a/less/common/commonNew.less +++ b/less/common/commonNew.less @@ -16,15 +16,16 @@ .thumbinner { margin: 0 auto; } + } - .thumbcaption { - margin: 0; - font-size: .8em; - line-height: 1.5; - text-align: left; - padding: 0 !important; - color: @grayMedium; - } + // Although .thumbcaption is normally inside .thumb, it isn't in VisualEditor + .thumbcaption { + margin: 0; + font-size: .8em; + line-height: 1.5; + text-align: left; + padding: 0 !important; + color: @grayMedium; } // Avoid line-height issues caused by sup diff --git a/less/common/hacks.less b/less/common/hacks.less index e975cfe..59fb6b3 100644 --- a/less/common/hacks.less +++ b/less/common/hacks.less @@ -13,7 +13,7 @@ @import minerva.mixins; /* Hide some on-wiki defined classes */ -#content { +.content { // Hide cleanup templates by default to non-javascript users as these stop them from reading the article itself // Note not in issues.less as that is only loaded via JavaScript .ambox, @@ -51,10 +51,6 @@ .editsection, .mw-editsection { display: none; -} - -.dablink { - margin-bottom: 10px; } /* force portals to use a one column layout on mobile */ @@ -102,9 +98,11 @@ } .beta, .alpha { - .dablink { - margin-bottom: .6em; - padding-left: 0; + .dablink, + .rellink { + // Use bottom padding instead of bottom margin so that it doesn't affect the + // position of floated elements below the hatnotes. + padding: 0 0 .6em 0; color: @grayMedium; font-size: .8em; font-style: italic; diff --git a/less/common/typographyNew.less b/less/common/typographyNew.less index e6664df..e7cc0f1 100644 ---