[MediaWiki-commits] [Gerrit] Add task to get a preview + tests - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/115115 Change subject: Add task to get a preview + tests .. Add task to get a preview + tests Change-Id: Iad4b6d1d13ad534f81afd751d4bad609d980123a --- A wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java A wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java 2 files changed, 79 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/15/115115/1 diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java new file mode 100644 index 000..0a53872 --- /dev/null +++ b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java @@ -0,0 +1,42 @@ + +package org.wikipedia.test; + +import android.content.*; +import android.test.*; +import android.util.*; +import org.wikipedia.*; +import org.wikipedia.editing.*; + +import java.util.concurrent.*; + +public class PreviewTaskTests extends ActivityUnitTestCase { +private static final int TASK_COMPLETION_TIMEOUT = 2; + +public PreviewTaskTests() { +super(TestDummyActivity.class); +} + +public void testPreview() throws Throwable { +startActivity(new Intent(), null, null); +final PageTitle title = new PageTitle(null, "Test_page_for_app_testing/Section1", new Site("test.wikipedia.org")); +final String wikitext = "== Section 2 ==\n\nEditing section INSERT RANDOM & HERE test at " + System.currentTimeMillis(); +final String expected = "Section 2Edit\nEditing section INSERT RANDOM\n\n\n\n"; +final WikipediaApp app = (WikipediaApp)getInstrumentation().getTargetContext().getApplicationContext(); +final CountDownLatch completionLatch = new CountDownLatch(1); +runTestOnUiThread(new Runnable() { +@Override +public void run() { +new EditPreviewTask(getInstrumentation().getTargetContext(), wikitext, title) { +@Override +public void onFinish(String result) { +assertNotNull(result); +assertEquals(result, expected); +completionLatch.countDown(); +} +}.execute(); +} +}); +assertTrue(completionLatch.await(TASK_COMPLETION_TIMEOUT, TimeUnit.MILLISECONDS)); +} +} + diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java new file mode 100644 index 000..856e23f --- /dev/null +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java @@ -0,0 +1,37 @@ +package org.wikipedia.editing; + +import android.content.*; +import org.mediawiki.api.json.*; +import org.wikipedia.*; +import org.wikipedia.concurrency.*; + + +public class EditPreviewTask extends ApiTask { +private final String wikiText; +private final PageTitle title; + +public EditPreviewTask(Context context, String wikiText, PageTitle title) { +super( + ExecutorService.getSingleton().getExecutor(EditPreviewTask.class, 1), + ((WikipediaApp)context.getApplicationContext()).getAPIForSite(title.getSite()) +); +this.wikiText = wikiText; +this.title = title; +} + +@Override +public RequestBuilder buildRequest(Api api) { +return api.action("parse") +.param("sectionpreview", "true") +.param("pst", "true") +.param("mobileformat", "true") +.param("prop", "text") +.param("title", title.getPrefixedText()) +.param("text", wikiText); +} + +@Override +public String processResult(ApiResult result) throws Throwable { +return result.asObject().optJSONObject("parse").optJSONObject("text").optString("*"); +} +} -- To view, visit https://gerrit.wikimedia.org/r/115115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad4b6d1d13ad534f81afd751d4bad609d980123a Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Small fixes/cleanup - change (apps...wikipedia)
Yuvipanda has submitted this change and it was merged. Change subject: Small fixes/cleanup .. Small fixes/cleanup - Renamed StylizedButton and StylizedEditText to StyledButton and StyledEditText to be consistent - Colsolodated the constructors for all of the Styled* classes to ease maintenance - Changed instances where instances of WikipediaApp were used to access static class methods - Simplified an instance where a boolean return value was checked before returning it to simple return the result of the function call itself Change-Id: Ie10a13897a147d34cef5ab76d0839aba3b20d1ff --- M wikipedia/res/layout/activity_create_account.xml M wikipedia/res/layout/activity_edit_section.xml M wikipedia/res/layout/activity_langlinks.xml M wikipedia/res/layout/activity_login.xml M wikipedia/res/layout/dialog_preference_languages.xml M wikipedia/res/layout/fragment_page.xml M wikipedia/res/layout/fragment_search.xml M wikipedia/res/layout/group_captcha.xml M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/networking/ConnectionChangeReceiver.java M wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageProperties.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java A wikipedia/src/main/java/org/wikipedia/styledviews/StyledButton.java M wikipedia/src/main/java/org/wikipedia/styledviews/StyledCheckBox.java A wikipedia/src/main/java/org/wikipedia/styledviews/StyledEditText.java M wikipedia/src/main/java/org/wikipedia/styledviews/StyledTextView.java D wikipedia/src/main/java/org/wikipedia/styledviews/StylizedButton.java D wikipedia/src/main/java/org/wikipedia/styledviews/StylizedEditText.java 21 files changed, 88 insertions(+), 122 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/wikipedia/res/layout/activity_create_account.xml b/wikipedia/res/layout/activity_create_account.xml index 489a051..7491f22 100644 --- a/wikipedia/res/layout/activity_create_account.xml +++ b/wikipedia/res/layout/activity_create_account.xml @@ -11,7 +11,7 @@ android:orientation="vertical" android:padding="16dp" > - - - - - - - - - - - - - - - isConnected(), but let's call isConnected as documentation suggests. We don't need to check against the zeroconfig API unless the (latest) W0 state is *on* (true). */ -if (app.getWikipediaZeroDisposition() && +if (WikipediaApp.getWikipediaZeroDisposition() && (currentState == NetworkInfo.State.CONNECTED || currentState == NetworkInfo.State.DISCONNECTED) && networkInfo.isConnected() ) { diff --git a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java index f7ce8f2..2bff0c3 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/LinkHandler.java @@ -32,9 +32,9 @@ } private void handleExternalLink(final Uri uri) { -if (WikipediaApp.isWikipediaZeroDevmodeOn() && app.getWikipediaZeroDisposition()) { +if (WikipediaApp.isWikipediaZeroDevmodeOn() && WikipediaApp.getWikipediaZeroDisposition()) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context); -if (sharedPref.getBoolean(app.PREFERENCE_ZERO_INTERSTITIAL, true)) { +if (sharedPref.getBoolean(WikipediaApp.PREFERENCE_ZERO_INTERSTITIAL, true)) { bus.post(new WikipediaZeroInterstitialEvent(uri)); } else { visitExternalLink(uri); diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java index 3aff503..4c65676 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java @@ -3,21 +3,16 @@ import android.content.*; import android.net.*; import android.os.*; -import android.support.v4.widget.*; -import android.support.v7.app.*; import com.squareup.otto.*; import org.wikipedia.*; import org.wikipedia.events.*; import org.wikipedia.history.*; import org.wikipedia.interlanguage.*; -import org.wikipedia.networking.*; import org.wikipedia.recurring.*; import org.wikipedia.search.*; import android.app.AlertDialog; -import android.app.DialogFragment; import android.preference.PreferenceManager; -import android.support.v4.app.FragmentActivity; import android.support.v4.widget.DrawerLayout; import android.suppor
[MediaWiki-commits] [Gerrit] txStatsD: add dependency on python-twisted-web - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115121 Change subject: txStatsD: add dependency on python-twisted-web .. txStatsD: add dependency on python-twisted-web Required by the Python module but not expressed as a dependency in the package. Grr. Change-Id: Ic8e3a9556600a93b9bd2e0bf7d5b9bc36066e39c --- M modules/txstatsd/manifests/init.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/115121/1 diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index 713d7b7..09943f0 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -23,7 +23,7 @@ # } # class txstatsd($settings) { -package { 'python-txstatsd': } +package { [ 'python-txstatsd', 'python-twisted-web' ]: } file { '/etc/init/txstatsd.conf': source => 'puppet:///modules/txstatsd/txstatsd.conf', @@ -56,7 +56,7 @@ subscribe => File['/etc/txstatsd/txstatsd.cfg'], require => [ File['/etc/init/txstatsd.conf'], -Package['python-txstatsd'], +Package['python-txstatsd', 'python-twisted-web'], User['txstatsd'], ], } -- To view, visit https://gerrit.wikimedia.org/r/115121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8e3a9556600a93b9bd2e0bf7d5b9bc36066e39c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] txStatsD: add dependency on python-twisted-web - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: txStatsD: add dependency on python-twisted-web .. txStatsD: add dependency on python-twisted-web Required by the Python module but not expressed as a dependency in the package. Grr. Change-Id: Ic8e3a9556600a93b9bd2e0bf7d5b9bc36066e39c --- M modules/txstatsd/manifests/init.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index 713d7b7..09943f0 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -23,7 +23,7 @@ # } # class txstatsd($settings) { -package { 'python-txstatsd': } +package { [ 'python-txstatsd', 'python-twisted-web' ]: } file { '/etc/init/txstatsd.conf': source => 'puppet:///modules/txstatsd/txstatsd.conf', @@ -56,7 +56,7 @@ subscribe => File['/etc/txstatsd/txstatsd.cfg'], require => [ File['/etc/init/txstatsd.conf'], -Package['python-txstatsd'], +Package['python-txstatsd', 'python-twisted-web'], User['txstatsd'], ], } -- To view, visit https://gerrit.wikimedia.org/r/115121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8e3a9556600a93b9bd2e0bf7d5b9bc36066e39c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes hash handling issues - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Fixes hash handling issues .. Fixes hash handling issues * Fixes the bug where the browser hash would get nuked on foreign anchor clicks * Moves the hash handling back into the mmv itself * Adds test coverage for the hash nuking bug Change-Id: Iea57d0f4b9090f96e622418223d3f774923e8038 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/254 --- M resources/mmv/mmv.bootstrap.js M resources/mmv/mmv.js M tests/qunit/mmv.bootstrap.test.js M tests/qunit/mmv.test.js 4 files changed, 204 insertions(+), 160 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 1b69b69..cad5a87 100755 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -19,12 +19,12 @@ var bootstrap, MMVB; /** -* Bootstrap code listening to thumb clicks and location.hash +* Bootstrap code listening to thumb clicks checking the initial location.hash * Loads the mmv and opens it if necessary * @class mw.mmv.MultimediaViewerBootstrap */ function MultimediaViewerBootstrap () { - var bs = this; + var self = this; this.validExtensions = { 'jpg' : true, @@ -41,19 +41,12 @@ this.processThumbs(); this.hash(); - $( window ).on( 'popstate.mmv', function() { - bs.hash(); + $( window ).on( 'popstate.mmvb', function () { + self.hash(); } ); } MMVB = MultimediaViewerBootstrap.prototype; - - /** -* Stops the boostrap -*/ - MMVB.shutdown = function () { - $( window ).off( 'popstate.mmv' ); - }; /** * Loads the mmv module asynchronously and passes the thumb data to it @@ -166,22 +159,18 @@ }; /** -* Handles the browser's location.hash +* Handles the browser location hash on pageload or popstate */ MMVB.hash = function () { - var hash = decodeURIComponent( document.location.hash ), - linkState = hash.split( '/' ); - - if ( linkState[0] === '#mediaviewer' ) { - this.loadViewer().then( function () { - mw.mediaViewer.loadImageByTitle( linkState[ 1 ] ); - } ); - } else { - // If the hash is invalid (not a mmv hash) we close any open mmv - if ( mw.mediaViewer ) { - mw.mediaViewer.shutdown(); - } + // There is no point loading the mmv if it isn't loaded yet for hash changes unrelated to the mmv + // Such as anchor links on the page + if ( !this.viewerInitialized && window.location.hash.indexOf( '#mediaviewer/') !== 0 ) { + return; } + + this.loadViewer().then( function () { + mw.mediaViewer.hash(); + } ); }; mw.mmv.MultimediaViewerBootstrap = MultimediaViewerBootstrap; diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index 7871a92..23e57e3 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -551,28 +551,39 @@ }; /** -* Shuts down the viewer +* Handles a hash change coming from the browser */ - MMVP.shutdown = function () { - if ( this.lightbox && this.lightbox.iface ) { - this.lightbox.iface.unattach(); + MMVP.hash = function () { + var hash = decodeURIComponent( document.location.hash ), + linkState = hash.split( '/' ); + + if ( linkState[0] === '#mediaviewer' ) { + this.loadImageByTitle( linkState[ 1 ] ); + } else if ( this.isOpen ) { + // This allows us to avoid the pushState that normally happens on close + comingFromPopstate = true; + + if ( this.lightbox && this.lightbox.iface ) { + this.lightbox.iface.unattach(); + } else { + this.close(); + } } }; /** -* Registers all event handlers, on the document, for various MMV-specific -* events. +* Registers all event handlers */ MMVP.setupEventHandlers = function () { var viewer = this; - $( document ).on( 'mmv-close', function () { + $( document ).on( 'mmv-close.
[MediaWiki-commits] [Gerrit] Add views for flagged regressions in rt-server - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Add views for flagged regressions in rt-server .. Add views for flagged regressions in rt-server Change-Id: I2680135911e1d47a536896d05db24102cba144c3 --- M tests/server/server.js M tests/server/static/style.css M tests/server/views/index.html M tests/server/views/table.html 4 files changed, 177 insertions(+), 14 deletions(-) Approvals: Marcoil: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/server/server.js b/tests/server/server.js index a51af5f..cef2a4a 100755 --- a/tests/server/server.js +++ b/tests/server/server.js @@ -411,6 +411,52 @@ 'JOIN stats AS s2 ON s2.page_id = pages.id ' + 'WHERE s1.commit_hash = ? AND s2.commit_hash = ? AND s1.score > s2.score '; +var dbNumOneDiffRegressionsBetweenRevs = + 'SELECT count(*) AS numFlaggedRegressions ' + + 'FROM pages ' + + 'JOIN stats AS s1 ON s1.page_id = pages.id ' + + 'JOIN stats AS s2 ON s2.page_id = pages.id ' + + 'WHERE s1.commit_hash = ? AND s2.commit_hash = ? AND s1.score > s2.score ' + + 'AND s2.fails = 0 AND s2.skips = 0 ' + + 'AND s1.fails = ? AND s1.skips = ? '; + +var dbOneDiffRegressionsBetweenRevs = + 'SELECT pages.title, pages.prefix, ' + + 's1.commit_hash AS new_commit, ' + + 's2.commit_hash AS old_commit ' + + 'FROM pages ' + + 'JOIN stats AS s1 ON s1.page_id = pages.id ' + + 'JOIN stats AS s2 ON s2.page_id = pages.id ' + + 'WHERE s1.commit_hash = ? AND s2.commit_hash = ? AND s1.score > s2.score ' + + 'AND s2.fails = 0 AND s2.skips = 0 ' + + 'AND s1.fails = ? AND s1.skips = ? ' + + 'ORDER BY s1.score - s2.score DESC ' + + 'LIMIT 40 OFFSET ?'; + +var dbNumNewFailsRegressionsBetweenRevs = + 'SELECT count(*) AS numFlaggedRegressions ' + + 'FROM pages ' + + 'JOIN stats AS s1 ON s1.page_id = pages.id ' + + 'JOIN stats AS s2 ON s2.page_id = pages.id ' + + 'WHERE s1.commit_hash = ? AND s2.commit_hash = ? AND s1.score > s2.score ' + + 'AND s2.fails = 0 AND s1.fails > 0 ' + + // exclude cases introducing exactly one skip/fail to a perfect + 'AND (s1.skips > 0 OR s1.fails <> 1 OR s2.skips > 0)'; + +var dbNewFailsRegressionsBetweenRevs = + 'SELECT pages.title, pages.prefix, ' + + 's1.commit_hash AS new_commit, s1.errors AS errors, s1.fails AS fails, s1.skips AS skips, ' + + 's2.commit_hash AS old_commit, s2.errors AS old_errors, s2.fails AS old_fails, s2.skips AS old_skips ' + + 'FROM pages ' + + 'JOIN stats AS s1 ON s1.page_id = pages.id ' + + 'JOIN stats AS s2 ON s2.page_id = pages.id ' + + 'WHERE s1.commit_hash = ? AND s2.commit_hash = ? AND s1.score > s2.score ' + + 'AND s2.fails = 0 AND s1.fails > 0 ' + + // exclude cases introducing exactly one skip/fail to a perfect + 'AND (s1.skips > 0 OR s1.fails <> 1 OR s2.skips > 0) ' + + 'ORDER BY s1.score - s2.score DESC ' + + 'LIMIT 40 OFFSET ?'; + var dbResultsQuery = 'SELECT result FROM results'; @@ -858,10 +904,21 @@ { description: 'Test Results', value: row[0].maxresults }, { description: 'Crashers', value: row[0].crashers, url: '/crashers' }, - { description: 'Regressions', value: numRegressions, - url: '/regressions/between/' + row[0].secondhash + '/' + row[0].maxhash }, { description: 'Fixes', value: numFixes, url: '/topfixes/between/' + row[0].secondhash + '/' + row[0].maxhash }, + { description: 'Regressions', value: numRegressions, + url: '/regressions/between/' + row[0].secondhash + '/' + row[0].maxhash } + ], + flaggedReg: [ + { description: 'one fail', + info: 'one new semantic diff, previously perfect', + url: 'onefailregressions/between/' + row[0].secondhash + '/' + row[0].maxhash }, + { description: 'one skip', + info: 'one new syntactic diff, previously perfect', + url: 'oneskipregressions/between/' + row[0].secondhash + '/' + row[0].maxhash }, + { description: 'other new fails', + info: 'other cases with semantic diffs, previously only syntactic diffs', + url: 'newfailsregressions/between/' + row[0].secondhas
[MediaWiki-commits] [Gerrit] Add jobs for Persona and OpenBadges extensions - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115125 Change subject: Add jobs for Persona and OpenBadges extensions .. Add jobs for Persona and OpenBadges extensions Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 --- M mediawiki-extensions.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/25/115125/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index a302016..829d6bc 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -402,6 +402,7 @@ - OATHAuth - OAuth - Offline + - OpenBadges - OpenID - OpenSearchXml - OpenStackManager @@ -411,6 +412,7 @@ - ParserFunctions - ParserHooks - Parsoid + - Persona - PdfHandler - PHPExcel - PhpTags -- To view, visit https://gerrit.wikimedia.org/r/115125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add projects for Persona and OpenBadges extensions - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add projects for Persona and OpenBadges extensions .. Add projects for Persona and OpenBadges extensions Added template extensions for the Persona and OpenBadges extensions. Note that jslint was not set as non-voting because this is an empty project and I think our team can hold themselves to good standards with new code. Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 --- M layout.yaml 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 3898922..50f6ab2 100644 --- a/layout.yaml +++ b/layout.yaml @@ -2698,6 +2698,16 @@ - name: extension-unittests extname: TwoFactorAuthentication + - name: mediawiki/extensions/Persona +template: + - name: extension-unittests +extname: Persona + + - name: mediawiki/extensions/OpenBadges +template: + - name: extension-unittests +extname: OpenBadges + - name: mediawiki/extensions/UnicodeConverter template: - name: extension-checks -- To view, visit https://gerrit.wikimedia.org/r/115092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 Gerrit-PatchSet: 3 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Parent5446 Gerrit-Reviewer: Hashar Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add jobs for Persona and OpenBadges extensions - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add jobs for Persona and OpenBadges extensions .. Add jobs for Persona and OpenBadges extensions Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 --- M mediawiki-extensions.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index a302016..829d6bc 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -402,6 +402,7 @@ - OATHAuth - OAuth - Offline + - OpenBadges - OpenID - OpenSearchXml - OpenStackManager @@ -411,6 +412,7 @@ - ParserFunctions - ParserHooks - Parsoid + - Persona - PdfHandler - PHPExcel - PhpTags -- To view, visit https://gerrit.wikimedia.org/r/115125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1518ba5ea44ce608e4b58b209c879b1f1b859d7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...Persona)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115127 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: I7de085370e2975afe98e01317ed91233dabe2693 --- A JENKINS A jenkins-testfile.py A jenkins.js A jenkins.php A jenkins.rb 5 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Persona refs/changes/27/115127/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS diff --git a/jenkins-testfile.py b/jenkins-testfile.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins-testfile.py diff --git a/jenkins.js b/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.js diff --git a/jenkins.php b/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.php diff --git a/jenkins.rb b/jenkins.rb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.rb -- To view, visit https://gerrit.wikimedia.org/r/115127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7de085370e2975afe98e01317ed91233dabe2693 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Persona Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...OpenBadges)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115126 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: Idac941ccad272bad3294d4e8b32c405799880d35 --- A JENKINS A jenkins-testfile.py A jenkins.js A jenkins.php A jenkins.rb 5 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenBadges refs/changes/26/115126/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS diff --git a/jenkins-testfile.py b/jenkins-testfile.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins-testfile.py diff --git a/jenkins.js b/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.js diff --git a/jenkins.php b/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.php diff --git a/jenkins.rb b/jenkins.rb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.rb -- To view, visit https://gerrit.wikimedia.org/r/115126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idac941ccad272bad3294d4e8b32c405799880d35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenBadges Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: use "int:" for consistency - change (mediawiki/core)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/115128 Change subject: i18n: use "int:" for consistency .. i18n: use "int:" for consistency - {{int:config-mssql-windowsauth}} - update comment for grep Change-Id: Id4749ab3e0c9e6cc9f1af5877cffe614adce2b8d --- M includes/installer/Installer.i18n.php M includes/installer/WebInstallerPage.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/115128/1 diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 9f39a87..2539f0c 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -358,9 +358,9 @@ 'config-mssql-auth' => 'Authentication type:', 'config-mssql-install-auth' => 'Select the authentication type that will be used to connect to the database during the installation process. -If you select "Windows Authentication", the credentials of whatever user the webserver is running as will be used.', +If you select "{{int:config-mssql-windowsauth}}", the credentials of whatever user the webserver is running as will be used.', 'config-mssql-web-auth' => 'Select the authentication type that the web server will use to connect to the database server, during ordinary operation of the wiki. -If you select "Windows Authentication", the credentials of whatever user the webserver is running as will be used.', +If you select "{{int:config-mssql-windowsauth}}", the credentials of whatever user the webserver is running as will be used.', 'config-mssql-sqlauth'=> 'SQL Server Authentication', 'config-mssql-windowsauth'=> 'Windows Authentication', 'config-site-name'=> 'Name of wiki:', diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index f83db54..4bc6cad 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -482,7 +482,7 @@ $defaultType = $this->getVar( 'wgDBtype' ); // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-oracle, - // config-dbsupport-sqlite + // config-dbsupport-sqlite, config-dbsupport-mssql $dbSupport = ''; foreach ( Installer::getDBTypes() as $type ) { $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n"; -- To view, visit https://gerrit.wikimedia.org/r/115128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4749ab3e0c9e6cc9f1af5877cffe614adce2b8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Shirayuki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes hash self-reaction - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/115129 Change subject: Fixes hash self-reaction .. Fixes hash self-reaction * Fixes bug where the mmv would react to its own hash changes * Adds jquery.hashchange for older browser support Change-Id: I2d23699bb444d9eb533d239e25bc47fa96c902a9 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/254 --- M .jshintignore M MultimediaViewer.php A resources/jquery.hashchange/jquery.hashchange.js M resources/mmv/mmv.bootstrap.js M resources/mmv/mmv.js M resources/mmv/mmv.lightboxinterface.js M tests/qunit/mmv.bootstrap.test.js M tests/qunit/mmv.lightboxinterface.test.js M tests/qunit/mmv.test.js 9 files changed, 474 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/29/115129/1 diff --git a/.jshintignore b/.jshintignore index bbac23b..bc13f20 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,3 @@ resources/jquery.scrollTo -resources/jquery.throttle.debounce +resources/jquery.hashchange docs/js/* diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 29abb0e..b47866e 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -452,6 +452,7 @@ 'mediawiki.Title', 'mmv.logger', 'mmv.ui', + 'jquery.hashchange', ), ), $moduleInfo( 'mmv' ) ); @@ -461,6 +462,12 @@ ), ), $moduleInfo( 'jquery.scrollTo' ) ); + $wgResourceModules['jquery.hashchange'] = array_merge( array( + 'scripts' => array( + 'jquery.hashchange.js', + ), + ), $moduleInfo( 'jquery.hashchange' ) ); + $wgExtensionFunctions[] = function () { global $wgResourceModules; diff --git a/resources/jquery.hashchange/jquery.hashchange.js b/resources/jquery.hashchange/jquery.hashchange.js new file mode 100644 index 000..1f0592b --- /dev/null +++ b/resources/jquery.hashchange/jquery.hashchange.js @@ -0,0 +1,390 @@ +/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ + +// Script: jQuery hashchange event +// +// *Version: 1.3, Last updated: 7/21/2010* +// +// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/ +// GitHub - http://github.com/cowboy/jquery-hashchange/ +// Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js +// (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped) +// +// About: License +// +// Copyright (c) 2010 "Cowboy" Ben Alman, +// Dual licensed under the MIT and GPL licenses. +// http://benalman.com/about/license/ +// +// About: Examples +// +// These working examples, complete with fully commented code, illustrate a few +// ways in which this plugin can be used. +// +// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/ +// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/ +// +// About: Support and Testing +// +// Information about what version or versions of jQuery this plugin has been +// tested with, what browsers it has been tested in, and where the unit tests +// reside (so you can test it yourself). +// +// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2 +// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5, +// Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5. +// Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/ +// +// About: Known issues +// +// While this jQuery hashchange event implementation is quite stable and +// robust, there are a few unfortunate browser bugs surrounding expected +// hashchange event-based behaviors, independent of any JavaScript +// window.onhashchange abstraction. See the following examples for more +// information: +// +// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/ +// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/ +// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/ +// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/ +// +// Also note that should a browser natively support the window.onhashchange +// event, but not report that it does, the fallback polling loop will be used. +// +// About: Release History +// +// 1.3
[MediaWiki-commits] [Gerrit] Use cross-origin img attribute instead of data URI - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Use cross-origin img attribute instead of data URI .. Use cross-origin img attribute instead of data URI After lots of experimenting with Wireshark and current Chrome + Firefox on Ubuntu 13.10, this is my current understanding of the caching when preloading images with AJAX requests: * on Chrome, the image request always comes from browser cache * Firefox makes two separate requests by default * Firefox with img.crossOrigin = 'anonymous' makes two separate requests, but the second one is a 304 (does not load the image twice) * when the image has already been cached by the browser (but not in this session), Chrome skips both requests; Firefox skips the AJAX request, but sends the normal one, and it returns with 304. "wish I knew this when I started" things: * the Chrome DevTools has an option to disable cache. When this is enabled, requests in the same document context still come from cache (so if I load the page, fire an AJAX request, then without reloading the page, fire an AJAX request to the same URL, then the second request will be cached), but an AJAX request - image request pair is an exception from this. * when using Ctrl-F5 in Firefox, requests on that page will never hit the cache (even AJAX request fired after user activity; even if two identical requests follow each other). When using clear cache + normal reload, this is not the case. * if the image does not have an Allow-Origin header and is loaded with crossOrigin=true, Firefox will refuse to load it. Chrome will log an error in the console saying it refused to load it, but will actually load it. * Wireshark rocks. Pushed some tech debt (browser + domain whitelist) into other tickets: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/232 https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/233 Reverted commits: 8a8d74f01d3dbd6d0c43b7fadc5284d204091761. 63021d0b0e95442cce101f9f92de8f0ff97d5f49. Change-Id: I84ab2f3ac0a9706926adf7fe8726ecd9e9f843e0 Bug: 61542 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/207 --- M resources/mmv/mmv.performance.js M resources/mmv/provider/mmv.provider.Image.js M tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb M tests/qunit/mmv.performance.test.js M tests/qunit/provider/mmv.provider.Image.test.js 5 files changed, 206 insertions(+), 128 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.performance.js b/resources/mmv/mmv.performance.js index 5c98f3e..a6b6403 100755 --- a/resources/mmv/mmv.performance.js +++ b/resources/mmv/mmv.performance.js @@ -29,12 +29,6 @@ P = Performance.prototype; /** -* How long to wait to ensure window.performance is populated -* @property {number} -*/ - P.delay = 1000; - - /** * Global setup that should be done while the page loads */ P.init = function () { @@ -53,39 +47,30 @@ * cached by the browser, as it will consume unnecessary bandwidth for the user. * @param {string} type the type of request to be measured * @param {string} url URL to be measured -* @param {string} responseType responseType for the XHR options * @returns {jQuery.Promise} A promise that resolves when the contents of the URL have been fetched */ - P.record = function ( type, url, responseType ) { + P.record = function ( type, url ) { var deferred = $.Deferred(), request, perf = this, start; - request = this.newXHR(); - - request.onreadystatechange = function () { - var total = $.now() - start; - - if ( request.readyState === 4 ) { - deferred.resolve( request.response ); - - perf.recordEntryDelayed( type, total, url, request ); - } - }; - - start = $.now(); - try { + request = this.newXHR(); + request.onreadystatechange = function () { + var total = $.now() - start; + + if ( request.readyState === 4 ) { + deferred.resolve( request.response ); + perf.recordEntryDelayed( type, total, url, request ); + } + }; + + start = $.now(); request.open( 'GET', url, true ); - - if ( responseType !== undefined ) { - request.responseType = responseT
[MediaWiki-commits] [Gerrit] New Wikidata Build - 24/02/2014 10:00 - change (mediawiki...Wikidata)
wikidata-servi...@wikimedia.de has uploaded a new change for review. https://gerrit.wikimedia.org/r/115130 Change subject: New Wikidata Build - 24/02/2014 10:00 .. New Wikidata Build - 24/02/2014 10:00 Change-Id: Ief1b585bf4d7820ce46ef1b0aefb9d1288f299bb --- M composer.lock M extensions/Wikibase/client/WikibaseClient.i18n.php M extensions/Wikibase/lib/WikibaseLib.i18n.php M extensions/Wikibase/repo/Wikibase.i18n.alias.php M extensions/Wikibase/repo/Wikibase.i18n.php M vendor/autoload.php M vendor/composer/autoload_classmap.php M vendor/composer/autoload_real.php M vendor/composer/installed.json M vendor/composer/installers/README.md M vendor/composer/installers/composer.json M vendor/composer/installers/src/Composer/Installers/Installer.php A vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php M vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php 14 files changed, 80 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/30/115130/1 diff --git a/composer.lock b/composer.lock index d9c85ef..5301ec9 100644 --- a/composer.lock +++ b/composer.lock @@ -7,16 +7,16 @@ "packages": [ { "name": "composer/installers", -"version": "v1.0.11", +"version": "v1.0.12", "source": { "type": "git", "url": "https://github.com/composer/installers.git";, -"reference": "9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94" +"reference": "4127333b03e8b4c08d081958548aae5419d1a2fa" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/composer/installers/zipball/9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94";, -"reference": "9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94", +"url": "https://api.github.com/repos/composer/installers/zipball/4127333b03e8b4c08d081958548aae5419d1a2fa";, +"reference": "4127333b03e8b4c08d081958548aae5419d1a2fa", "shasum": "" }, "replace": { @@ -57,6 +57,7 @@ "Hurad", "MODX Evo", "OXID", +"WolfCMS", "agl", "annotatecms", "cakephp", @@ -86,7 +87,7 @@ "zend", "zikula" ], -"time": "2014-02-12 21:21:55" +"time": "2014-02-24 04:21:34" }, { "name": "data-values/common", @@ -850,12 +851,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "fbb5f87dadee007cfe1604b9f05f274ebdca0e1c" +"reference": "6f0a738c800a766ded4d398152f862d2e815d645" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/fbb5f87dadee007cfe1604b9f05f274ebdca0e1c";, -"reference": "fbb5f87dadee007cfe1604b9f05f274ebdca0e1c", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/6f0a738c800a766ded4d398152f862d2e815d645";, +"reference": "6f0a738c800a766ded4d398152f862d2e815d645", "shasum": "" }, "require": { @@ -914,7 +915,7 @@ "wikibaserepo", "wikidata" ], -"time": "2014-02-23 12:06:58" +"time": "2014-02-23 21:50:27" } ], "packages-dev": [ diff --git a/extensions/Wikibase/client/WikibaseClient.i18n.php b/extensions/Wikibase/client/WikibaseClient.i18n.php index d0e66df..c53d571 100644 --- a/extensions/Wikibase/client/WikibaseClient.i18n.php +++ b/extensions/Wikibase/client/WikibaseClient.i18n.php @@ -2320,6 +2320,7 @@ /** Georgian (ქართული) * @author David1010 + * @author Tokoko */ $messages['ka'] = array( 'wikibase-client-desc' => 'ვიკიბაზის გაფართოების კლიენტი', @@ -2347,7 +2348,7 @@ 'wikibase-linkitem-selectlink' => 'გთხოვთ, აირჩიოთ საიტი და გვერდი, რომელზეც გსურთ აქედან ბმულის გაკეთება.', 'wikibase-linkitem-input-site' => 'ენა:', 'wikibase-linkitem-input-page' => 'გვერდი:', - 'wikibase-linkitem-confirmitem-text' => 'თქვენ მიერ არჩეული გვერდი უკვე დაკავშირებულია [$1 ჩვენი მონაცემების ცენტრალური რეპოზიტორიის ელემენტთან]. გთხოვთ, დაადასტუროთ, რომ ქვემოთ ნაჩვენებ გვერდებს შორის არის ის, რომელზეც გსურთ ბმულის გაკეთება აქედან.', # Fuzzy + 'wikibase-linkitem-confirmitem-text' => 'თქვენ მიერ არჩეული გვერდი უკვე დაკავშირებულია [$1 ჩვენი მონაცემების ცენტრალური რეპოზიტორიის ელემენტთან]. გთხოვთ, დაადასტუროთ, რომ ქვემოთ ნაჩვენები {{PLURAL:$2|გვერდი|გვერდები}} არის ის
[MediaWiki-commits] [Gerrit] Move JsonDumpGenerator from lib to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move JsonDumpGenerator from lib to repo .. Move JsonDumpGenerator from lib to repo Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de --- R repo/includes/Dumpers/JsonDumpGenerator.php R repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php 2 files changed, 13 insertions(+), 12 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/lib/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php similarity index 90% rename from lib/includes/Dumpers/JsonDumpGenerator.php rename to repo/includes/Dumpers/JsonDumpGenerator.php index 8fc6539..8c50232 100644 --- a/lib/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -3,6 +3,7 @@ namespace Wikibase\Dumpers; use ExceptionHandler; +use InvalidArgumentException; use MessageReporter; use MWException; use NullMessageReporter; @@ -75,14 +76,14 @@ /** * @param resource $out -* @param \Wikibase\EntityLookup $lookup +* @param EntityLookup $lookup * @param Serializer $entitySerializer * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function __construct( $out, EntityLookup $lookup, Serializer $entitySerializer ) { if ( !is_resource( $out ) ) { - throw new \InvalidArgumentException( '$out must be a file handle!' ); + throw new InvalidArgumentException( '$out must be a file handle!' ); } $this->out = $out; @@ -126,14 +127,14 @@ } /** -* @param \ExceptionHandler $exceptionHandler +* @param ExceptionHandler $exceptionHandler */ public function setExceptionHandler( ExceptionHandler $exceptionHandler ) { $this->exceptionHandler = $exceptionHandler; } /** -* @return \ExceptionHandler +* @return ExceptionHandler */ public function getExceptionHandler() { return $this->exceptionHandler; @@ -148,19 +149,19 @@ * @param int $shardingFactor * @param int $shard * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setShardingFilter( $shardingFactor, $shard ) { if ( !is_int( $shardingFactor ) || $shardingFactor < 1 ) { - throw new \InvalidArgumentException( '$shardingFactor must be an integer > 0' ); + throw new InvalidArgumentException( '$shardingFactor must be an integer > 0' ); } if ( !is_int( $shard ) || $shard < 0 ) { - throw new \InvalidArgumentException( '$shard must be an integer >= 0' ); + throw new InvalidArgumentException( '$shard must be an integer >= 0' ); } if ( $shard >= $shardingFactor ) { - throw new \InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); + throw new InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); } $this->shardingFactor = $shardingFactor; @@ -172,7 +173,7 @@ * * @param string|null $type The desired type (use null for any type). * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setEntityTypeFilter( $type ) { $this->entityType = $type; @@ -256,7 +257,7 @@ * @param $data * * @return string -* @throws \MWException +* @throws MWException */ public function encode( $data ) { $json = json_encode( $data, $this->jsonFlags ); diff --git a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php similarity index 99% rename from lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php rename to repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php index 6ab4d86..c09d84a 100644 --- a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php +++ b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php @@ -20,7 +20,7 @@ * @covers Wikibase\Dumpers\JsonDumpGenerator * * @group Wikibase - * @group WikibaseLib + * @group WikibaseRepo * @group JsonDump * * @license GPL 2+ -- To view, visit https://gerrit.wikimedia.org/r/113350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: A
[MediaWiki-commits] [Gerrit] New Wikidata Build - 24/02/2014 10:00 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 24/02/2014 10:00 .. New Wikidata Build - 24/02/2014 10:00 Change-Id: Ief1b585bf4d7820ce46ef1b0aefb9d1288f299bb --- M composer.lock M extensions/Wikibase/client/WikibaseClient.i18n.php M extensions/Wikibase/lib/WikibaseLib.i18n.php M extensions/Wikibase/repo/Wikibase.i18n.alias.php M extensions/Wikibase/repo/Wikibase.i18n.php M vendor/autoload.php M vendor/composer/autoload_classmap.php M vendor/composer/autoload_real.php M vendor/composer/installed.json M vendor/composer/installers/README.md M vendor/composer/installers/composer.json M vendor/composer/installers/src/Composer/Installers/Installer.php A vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php M vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php 14 files changed, 80 insertions(+), 37 deletions(-) Approvals: WikidataJenkins: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index d9c85ef..5301ec9 100644 --- a/composer.lock +++ b/composer.lock @@ -7,16 +7,16 @@ "packages": [ { "name": "composer/installers", -"version": "v1.0.11", +"version": "v1.0.12", "source": { "type": "git", "url": "https://github.com/composer/installers.git";, -"reference": "9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94" +"reference": "4127333b03e8b4c08d081958548aae5419d1a2fa" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/composer/installers/zipball/9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94";, -"reference": "9a1fd4e191beaa5cab79c05f923d8bcdd01b4e94", +"url": "https://api.github.com/repos/composer/installers/zipball/4127333b03e8b4c08d081958548aae5419d1a2fa";, +"reference": "4127333b03e8b4c08d081958548aae5419d1a2fa", "shasum": "" }, "replace": { @@ -57,6 +57,7 @@ "Hurad", "MODX Evo", "OXID", +"WolfCMS", "agl", "annotatecms", "cakephp", @@ -86,7 +87,7 @@ "zend", "zikula" ], -"time": "2014-02-12 21:21:55" +"time": "2014-02-24 04:21:34" }, { "name": "data-values/common", @@ -850,12 +851,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "fbb5f87dadee007cfe1604b9f05f274ebdca0e1c" +"reference": "6f0a738c800a766ded4d398152f862d2e815d645" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/fbb5f87dadee007cfe1604b9f05f274ebdca0e1c";, -"reference": "fbb5f87dadee007cfe1604b9f05f274ebdca0e1c", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/6f0a738c800a766ded4d398152f862d2e815d645";, +"reference": "6f0a738c800a766ded4d398152f862d2e815d645", "shasum": "" }, "require": { @@ -914,7 +915,7 @@ "wikibaserepo", "wikidata" ], -"time": "2014-02-23 12:06:58" +"time": "2014-02-23 21:50:27" } ], "packages-dev": [ diff --git a/extensions/Wikibase/client/WikibaseClient.i18n.php b/extensions/Wikibase/client/WikibaseClient.i18n.php index d0e66df..c53d571 100644 --- a/extensions/Wikibase/client/WikibaseClient.i18n.php +++ b/extensions/Wikibase/client/WikibaseClient.i18n.php @@ -2320,6 +2320,7 @@ /** Georgian (ქართული) * @author David1010 + * @author Tokoko */ $messages['ka'] = array( 'wikibase-client-desc' => 'ვიკიბაზის გაფართოების კლიენტი', @@ -2347,7 +2348,7 @@ 'wikibase-linkitem-selectlink' => 'გთხოვთ, აირჩიოთ საიტი და გვერდი, რომელზეც გსურთ აქედან ბმულის გაკეთება.', 'wikibase-linkitem-input-site' => 'ენა:', 'wikibase-linkitem-input-page' => 'გვერდი:', - 'wikibase-linkitem-confirmitem-text' => 'თქვენ მიერ არჩეული გვერდი უკვე დაკავშირებულია [$1 ჩვენი მონაცემების ცენტრალური რეპოზიტორიის ელემენტთან]. გთხოვთ, დაადასტუროთ, რომ ქვემოთ ნაჩვენებ გვერდებს შორის არის ის, რომელზეც გსურთ ბმულის გაკეთება აქედან.', # Fuzzy + 'wikibase-linkitem-confirmitem-text' => 'თქვენ მიერ არჩეული გვერდი უკვე დაკავშირებულია [$1 ჩვენი მონაცემების ცენტრალური რეპოზიტორიის ელემენტთან]. გთხოვთ, დაადასტუროთ, რომ ქვემოთ ნაჩვენები {{PLURAL:$2|გვერდი|გვერდები}} არის ის, რომელთანაც გსურთ ამ გვერდის დაკავშირება.', 'wikiba
[MediaWiki-commits] [Gerrit] Browsertests: minor fixes to tags and sitelinks.feature - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/115131 Change subject: Browsertests: minor fixes to tags and sitelinks.feature .. Browsertests: minor fixes to tags and sitelinks.feature Added @wikidata.beta.wmflabs.org tag to sitelinks.feature, means that sitelink tests will now also run regularely on beta. Introduced a new tag @performance_testing for easy grouping of performance related tests. Change-Id: Ifef2d2fc286a0060d03096074a352db967131bb0 --- M tests/browser/features/performance_test.feature M tests/browser/features/sitelinks.feature 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/31/115131/1 diff --git a/tests/browser/features/performance_test.feature b/tests/browser/features/performance_test.feature index 029eebf..a8950ed 100644 --- a/tests/browser/features/performance_test.feature +++ b/tests/browser/features/performance_test.feature @@ -4,6 +4,7 @@ # # testing loading time of huge entities +@performance_testing Feature: High performance Background: diff --git a/tests/browser/features/sitelinks.feature b/tests/browser/features/sitelinks.feature index 8abd524..9032790 100644 --- a/tests/browser/features/sitelinks.feature +++ b/tests/browser/features/sitelinks.feature @@ -5,6 +5,7 @@ # # feature definition for item sitelinks tests +@wikidata.beta.wmflabs.org Feature: Edit sitelinks Background: @@ -118,7 +119,7 @@ | press the RETURN key in the pagename input field | @save_sitelink @modify_entity - Scenario Outline: Save sitelink & reload + Scenario Outline: Save sitelink and reload Given The following sitelinks do not exist: | enwiki | Asia | When I click the sitelink add button -- To view, visit https://gerrit.wikimedia.org/r/115131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifef2d2fc286a0060d03096074a352db967131bb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove clutter unused api debug/test settings - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove clutter unused api debug/test settings .. Remove clutter unused api debug/test settings These do not really help us much and everything can easily be tested without these options Change-Id: I1d42826d1ca18a3f32eca4e25b69ee886ab1df8a --- M docs/options.wiki M repo/config/Wikibase.default.php M repo/config/Wikibase.example.php M repo/includes/api/ApiWikibase.php M repo/tests/phpunit/includes/api/BotEditTest.php M repo/tests/phpunit/includes/api/PermissionsTestCase.php M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php 7 files changed, 4 insertions(+), 73 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/docs/options.wiki b/docs/options.wiki index f1a9f1f..5c5fc9c 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -51,10 +51,6 @@ ;dataRightsText: Text for data license link. Defaults to $wgRightsText setting. === Expert Settings === -;apiInDebug: Put Wikibase API into debug mode. Boolean, default is false. '''Deprecated'''. -;apiDebugWithPost: Allow GET requests to Wikibase API modules that would normally require POST. Boolean, default is false. '''Deprecated'''. -;apiDebugWithRights: Bypass permission checks for Wikibase API modules. Boolean, default is false. '''Deprecated'''. -;apiDebugWithTokens: Bypass token checks for Wikibase API modules. Boolean, default is false. '''Deprecated'''. ;defaultStore: The storage engine to use for storing entities. Default: 'sqlstore'. The is currently no alternative. ;idBlacklist: A list of IDs to reserve and skip for new entities. IDs are given as integers, the blacklist applies to all types of entities. '''Note:''' this may change in the future to allow separate blacklists for different kinds of entities. ;withoutTermSearchKey: Allow the terms table to work without the term_search_key field, for sites that can not easily roll out schema changes on large tables. This means that all searches will use exact matching (depending on the database's collation). Default: false. This is only needed for compatibility with old database layouts. diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php index 8f90558..ec96eb6 100644 --- a/repo/config/Wikibase.default.php +++ b/repo/config/Wikibase.default.php @@ -15,17 +15,6 @@ global $wgSquidMaxage; $defaults = array( - - // Set API in debug mode - // do not turn on in production! - 'apiInDebug' => false, - - // Additional settings for API when debugging is on to - // facilitate testing. - 'apiDebugWithPost' => false, - 'apiDebugWithRights' => false, - 'apiDebugWithTokens' => false, - 'defaultStore' => 'sqlstore', 'idBlacklist' => array( diff --git a/repo/config/Wikibase.example.php b/repo/config/Wikibase.example.php index 01df9d3..1068690 100644 --- a/repo/config/Wikibase.example.php +++ b/repo/config/Wikibase.example.php @@ -48,12 +48,6 @@ // Tell MediaWIki to search the item namespace $wgNamespacesToBeSearchedDefault[WB_NS_ITEM] = true; - // More things to play with - $wgWBRepoSettings['apiInDebug'] = false; - $wgWBRepoSettings['apiInTest'] = false; - $wgWBRepoSettings['apiWithRights'] = true; - $wgWBRepoSettings['apiWithTokens'] = true; - $wgGroupPermissions['wbeditor']['item-set'] = true; $wgWBRepoSettings['normalizeItemByTitlePageNames'] = true; diff --git a/repo/includes/api/ApiWikibase.php b/repo/includes/api/ApiWikibase.php index ad6360b..d70fdd8 100644 --- a/repo/includes/api/ApiWikibase.php +++ b/repo/includes/api/ApiWikibase.php @@ -13,7 +13,6 @@ use Wikibase\EntityContent; use Wikibase\EntityFactory; use Wikibase\Lib\Serializers\SerializerFactory; -use Wikibase\Settings; use Wikibase\EditEntity; use Wikibase\Repo\WikibaseRepo; use Wikibase\Summary; @@ -102,14 +101,14 @@ * @see ApiBase::needsToken() */ public function needsToken() { - return $this->isWriteMode() && ( !Settings::get( 'apiInDebug' ) || Settings::get( 'apiDebugWithTokens' ) ); + return $this->isWriteMode(); } /** * @see ApiBase::mustBePosted() */ public function mustBePosted() { - return $this->isWriteMode() && ( !Settings::get( 'apiInDebug' ) || Settings::get( 'apiDebugWithPost' ) ); + return $this->isWriteMode(); } /** @@ -156,10 +155,6 @@ * @todo: use this also to check for read access in ApiGetEntities, etc */ public function checkPermissions( EntityContent $entityContent, User $user, array $params ) { - if ( Settings::get( 'apiInDebug' ) && !Settings::get(
[MediaWiki-commits] [Gerrit] Redis data store for the CX data model - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115132 Change subject: Redis data store for the CX data model .. Redis data store for the CX data model A very simple redis strore that stores the data model in json string with key as the source page. Change-Id: Idca80f88e42ccc2e385bd24ced0b61013ef84033 --- M server/ContentTranslationService.js M server/models/dataModelManager.js M server/package.json 3 files changed, 73 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/32/115132/1 diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js index ea87685..9269c41 100644 --- a/server/ContentTranslationService.js +++ b/server/ContentTranslationService.js @@ -14,40 +14,51 @@ 'use strict'; -var app, instanceName, server, io, port, context, +var instanceName, context, express = require( 'express' ); -port = process.argv[2] || 8000; +var port = process.argv[2] || 8000; -app = express(); -server = require( 'http' ).createServer( app ); -io = require( 'socket.io' ).listen( server ); +var app = express(); +var server = require( 'http' ).createServer( app ); +var io = require( 'socket.io' ).listen( server ); +var redis = require( 'redis' ); + +instanceName = 'worker(' + process.pid + ')'; // socket.io connection establishment io.sockets.on( 'connection', function ( socket ) { var datamodelManager, - PageLoader, - CXDataModelManager; - console.log( '[CX] Client connected to worker(' + process.pid + '). Socket: ' + socket.id ); + CXDataModelManager, + redisSub = redis.createClient(); + + console.log( '[CX] Client connected to ' + instanceName + '). Socket: ' + socket.id ); + redisSub.subscribe( 'cx' ); + redisSub.on( 'message', function( channel, message ) { + socket.emit( 'cx.data.update', JSON.parse( message ) ); + console.log('[CX] Received from channel #' + channel + ':' + message ); + } ); + socket.on( 'cx.init', function ( data ) { - var pageloader; CXDataModelManager = require( __dirname + '/models/dataModelManager.js').CXDataModelManager; context = { sourceLanguage: data.sourceLanguage, targetLanguage: data.targetLanguage, sourcePage: data.sourcePage, - socket: socket + pub: redis.createClient(), + store: redis.createClient() }; - PageLoader = require( __dirname + '/pageloader/PageLoader.js').PageLoader; - pageloader = new PageLoader( context.sourcePage ); - pageloader.load().done( function ( data ) { - context.sourceText = data; - // Inject the session context to dataModelManager - // It should take care of managing the data model and pushing - // it to the client through socket. - datamodelManager = new CXDataModelManager( context ); - } ); + // Inject the session context to dataModelManager + // It should take care of managing the data model and pushing + // it to the client through socket. + datamodelManager = new CXDataModelManager( context ); } ); + + socket.on( 'disconnect', function () { + console.warn( '[CX] Dsconnecting from redis' ); + redisSub.quit(); + } ); + } ); // Everything else goes through this. diff --git a/server/models/dataModelManager.js b/server/models/dataModelManager.js index 346bd62..501af26 100644 --- a/server/models/dataModelManager.js +++ b/server/models/dataModelManager.js @@ -25,27 +25,53 @@ * Initialize */ CXDataModelManager.prototype.init = function () { - var dataModelManager = this, segmenter; + var dataModelManager = this, + segmenter, + PageLoader, pageloader; - segmenter = new CXSegmenter( this.context.sourceText ); - segmenter.segment(); - this.dataModel = { - version: 0, - sourceLanguage: this.context.sourceLanguage, - targetLanguage: this.context.targetLanguage, - sourceLocation: this.context.sourceTitle, - segments: segmenter.getSegments(), - segmentedContent: segmenter.getSegmentedContent(), - links: segmenter.getLinks() - }; - dataModelManager.refresh(); + // TODO: refactor this + this.context.store.get( this.context.sourcePage, function ( err, data ) { + dataModelManager.dataModel = JSON.parse( data ); + if ( dataModelMa
[MediaWiki-commits] [Gerrit] Send Vary header on http to http redirect - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Send Vary header on http to http redirect .. Send Vary header on http to http redirect The doc.wikimedia.org and integration.wikimedia.org hosts are pointing on the misc-varnish. HTTPS connections are terminated there and forwarded to gallium Apache on port 80. The Apache should redirect any request originally made with HTTP to its HTTPS version (that is the case when X-Forwarded-Proto is NOT https). The HTTP and HTTPS url thus need to vary in Varnish cache. We achieve that by always adding a header Vary: X-Forwarded-Proto. That would solve redirects loops and should ensure everyone is sent to HTTPS. Bug: 60822 Change-Id: I83cef4b4d1c956ede13b9e124a046015962d7458 --- M modules/contint/files/apache/doc.wikimedia.org M modules/contint/manifests/website.pp M modules/contint/templates/apache/integration.wikimedia.org.erb 3 files changed, 13 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Verified; Looks good to me, approved diff --git a/modules/contint/files/apache/doc.wikimedia.org b/modules/contint/files/apache/doc.wikimedia.org index feeecc4..ff09439 100644 --- a/modules/contint/files/apache/doc.wikimedia.org +++ b/modules/contint/files/apache/doc.wikimedia.org @@ -27,10 +27,12 @@ RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.) https://doc.wikimedia.org%{REQUEST_URI} [R=301] + Header always merge Vary X-Forwarded-Proto + DocumentRoot /srv/org/wikimedia/doc # Favicon proxy RewriteEngine On RewriteRule ^/favicon\.ico$ /favicon.php [L] - \ No newline at end of file + diff --git a/modules/contint/manifests/website.pp b/modules/contint/manifests/website.pp index 2184910..ce81f06 100644 --- a/modules/contint/manifests/website.pp +++ b/modules/contint/manifests/website.pp @@ -7,6 +7,10 @@ require contint::publish-console + # Need to send Vary: X-Forwarded-Proto since most sites are forced to HTTPS + # and behind a varnish cache. See also bug 60822 + apache_module { 'headers': name => 'headers' } + # Static files in these docroots are in integration/docroot.git file { '/srv/org': diff --git a/modules/contint/templates/apache/integration.wikimedia.org.erb b/modules/contint/templates/apache/integration.wikimedia.org.erb index a265916..7859e28 100644 --- a/modules/contint/templates/apache/integration.wikimedia.org.erb +++ b/modules/contint/templates/apache/integration.wikimedia.org.erb @@ -15,6 +15,11 @@ RewriteEngine On RewriteRule ^/favicon\.ico$ /favicon.php [L] + # Force any request to HTTPS if not passed via https (misc web varnish) + RewriteCond %{HTTP:X-Forwarded-Proto} !https + RewriteRule (.) https://integration.wikimedia.org%{REQUEST_URI} [R=301] + + Header always merge Vary X-Forwarded-Proto Include *_proxy @@ -69,4 +74,4 @@ - \ No newline at end of file + -- To view, visit https://gerrit.wikimedia.org/r/111917 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83cef4b4d1c956ede13b9e124a046015962d7458 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Describe Math related packages in a class - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115133 Change subject: Describe Math related packages in a class .. Describe Math related packages in a class This introduce the new mediawiki::packages::math puppet class which migrates the texvc related dependencies out of wikimedia-task-appserver. We need texlive packages installed on continuous integration server to run Math tests (bug 61090). Unfortunately we can not install the wikimedia-task-appserver there since it ship php-apc which we do not want on contint. Bug: 61090 Change-Id: Ifcf184b2f016f3dab6a1d32feab4162b7de51ca6 --- M modules/contint/manifests/browsertests.pp M modules/contint/manifests/packages.pp M modules/mediawiki/manifests/packages.pp A modules/mediawiki/manifests/packages/math.pp 4 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/115133/1 diff --git a/modules/contint/manifests/browsertests.pp b/modules/contint/manifests/browsertests.pp index a22d250..cee1654 100644 --- a/modules/contint/manifests/browsertests.pp +++ b/modules/contint/manifests/browsertests.pp @@ -20,6 +20,8 @@ } # Set up all packages required for MediaWiki (includes Apache) +include mediawiki::packages::math + package { [ 'chromium-browser', 'firefox', diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index 8a3b6d2..933f842 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -188,6 +188,9 @@ ensure => present; } +# Math related packages +include mediawiki::packages::math + package { [ 'ocaml-nox', ]: diff --git a/modules/mediawiki/manifests/packages.pp b/modules/mediawiki/manifests/packages.pp index 9c570a9..dbc7f76 100644 --- a/modules/mediawiki/manifests/packages.pp +++ b/modules/mediawiki/manifests/packages.pp @@ -11,6 +11,8 @@ } } + include mediawiki::packages::math + package { 'wikimedia-task-appserver': ensure => latest; } diff --git a/modules/mediawiki/manifests/packages/math.pp b/modules/mediawiki/manifests/packages/math.pp new file mode 100644 index 000..b8df3c7 --- /dev/null +++ b/modules/mediawiki/manifests/packages/math.pp @@ -0,0 +1,48 @@ +# == mediawiki::packages::math +# +# Packages needed to render math using texvc. +# +# Extracted from the wikimedia-task-appserver package we used before puppet. +# +# This is a separate class so we can install the texlive packages without +# having to install wikimedia-task-appserver, for example when we do not want +# to get its dependencies installed (such as php5-apc on contint servers). + +class mediawiki::packages::math { + +package { [ +'dvipng', +'gsfonts', +'texlive', +'texlive-bibtex-extra', +'texlive-font-utils', +'texlive-fonts-extra', +'texlive-lang-croatian', +'texlive-lang-cyrillic', +'texlive-lang-czechslovak', +'texlive-lang-danish', +'texlive-lang-dutch', +'texlive-lang-finnish', +'texlive-lang-french', +'texlive-lang-german', +'texlive-lang-greek', +'texlive-lang-hungarian', +'texlive-lang-italian', +'texlive-lang-latin', +'texlive-lang-mongolian', +'texlive-lang-norwegian', +'texlive-lang-other', +'texlive-lang-polish', +'texlive-lang-portuguese', +'texlive-lang-spanish', +'texlive-lang-swedish', +'texlive-lang-vietnamese', +'texlive-latex-extra', +'texlive-math-extra', +'texlive-pictures', +'texlive-pstricks', +'texlive-publishers', +]: ensure => present +} + +} -- To view, visit https://gerrit.wikimedia.org/r/115133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcf184b2f016f3dab6a1d32feab4162b7de51ca6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use NFS by default on non-Windows hosts - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Use NFS by default on non-Windows hosts .. Use NFS by default on non-Windows hosts NFS is dramatically faster than VirtualBox Shared Folders, so use it where possible, which currently means everywhere except Windows. Tell Facter who the owner / group of the shared folder is likely to be, so Puppet can set permissions correctly. Change-Id: Iacaf59b6fc6bbc92637788ba3fdece28d5633649 --- M Vagrantfile M puppet/manifests/base.pp M puppet/modules/mediawiki/manifests/init.pp M puppet/modules/mediawiki/manifests/settings.pp 4 files changed, 32 insertions(+), 36 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/Vagrantfile b/Vagrantfile index c451c97..9447246 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -36,19 +36,12 @@ config.vm.hostname = 'mediawiki-vagrant.dev' config.package.name = 'mediawiki.box' -# Note: If you rely on Vagrant to retrieve the box, it will not -# verify SSL certificates. If this concerns you, you can retrieve -# the file using another tool that implements SSL properly, and then -# point Vagrant to the downloaded file: -# $ vagrant box add precise-cloud /path/to/file/precise.box config.vm.box = 'precise-cloud' -config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box' -if config.vm.respond_to? 'box_download_insecure' # Vagrant 1.2.6+ -config.vm.box_download_insecure = true -end +config.vm.box_download_insecure = true +config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/precise/current/'\ +'precise-server-cloudimg-amd64-vagrant-disk1.box' -config.vm.network :private_network, -ip: '10.11.12.13' +config.vm.network :private_network, ip: '10.11.12.13' # The port on the host that should be forwarded to the guest's HTTP server. FORWARDED_PORT = 8080 @@ -56,21 +49,22 @@ config.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT, id: 'http' -config.vm.synced_folder '.', '/vagrant', -id: 'vagrant-root', -owner: 'vagrant', -group: 'www-data' +share_options = {:id => 'vagrant-root'} -# www-data needs to write to the logs, but doesn't need write -# access for all of /vagrant -config.vm.synced_folder './logs', '/vagrant/logs', -id: 'vagrant-logs', -owner: 'www-data', -group: 'www-data' +if Vagrant::Util::Platform.windows? +share_options[:owner] = 'vagrant' +share_options[:group] = 'www-data' +else +share_options[:type] = :nfs +config.nfs.map_uid = Process.uid +config.nfs.map_gid = Process.gid +end + +config.vm.synced_folder '.', '/vagrant', share_options config.vm.provider :virtualbox do |vb| # See http://www.virtualbox.org/manual/ch08.html for additional options. -vb.customize ['modifyvm', :id, '--memory', '768'] +vb.customize ['modifyvm', :id, '--memory', '2048'] vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu_64'] vb.customize ['modifyvm', :id, '--ioapic', 'on'] # Bug 51473 @@ -99,13 +93,22 @@ # puppet.options << '--debug' # Windows's Command Prompt has poor support for ANSI escape sequences. -puppet.options << '--color=false' if windows? +puppet.options << '--color=false' if Vagrant::Util::Platform.windows? puppet.facter = $FACTER = { 'fqdn' => config.vm.hostname, 'forwarded_port' => FORWARDED_PORT, 'shared_apt_cache' => '/vagrant/apt-cache/', } + +if Vagrant::Util::Platform.windows? +$FACTER['share_owner'] = 'vagrant' +$FACTER['share_group'] = 'www-data' +else +$FACTER['share_owner'] = Process.uid +$FACTER['share_group'] = Process.gid +end + end end diff --git a/puppet/manifests/base.pp b/puppet/manifests/base.pp index ff2f3b5..fcd1249 100644 --- a/puppet/manifests/base.pp +++ b/puppet/manifests/base.pp @@ -45,9 +45,6 @@ # tells Puppet not to back up configuration files by default. File { backup => false, -owner => 'root', -group => 'root', -mode => '0644', } file { '/srv': diff --git a/puppet/modules/mediawiki/manifests/init.pp b/puppet/modules/mediawiki/manifests/init.pp index b9030f5..dbf9f18 100644 --- a/puppet/modules/mediawiki/manifests/init.pp +++ b/puppet/modules/mediawiki/manifests/init.pp @@ -89,9 +89,8 @@ file { $settings_dir: ensure => directory, -owner => 'vagrant', -group => 'www-data', -mode => '0755', +owner => $::share_owner, +group => $::share_group, } file { $upload_dir: @@ -103,8 +102,8 @@
[MediaWiki-commits] [Gerrit] HHVM role: use "hhvm-fastcgi" package - change (mediawiki/vagrant)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115134 Change subject: HHVM role: use "hhvm-fastcgi" package .. HHVM role: use "hhvm-fastcgi" package 'nightly' isn't compiled for fastcgi. Bug: 60384 Change-Id: Ib1fd0c854a5d9fc8b3dabf2bae500422b83dab92 --- M puppet/modules/hhvm/manifests/init.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/34/115134/1 diff --git a/puppet/modules/hhvm/manifests/init.pp b/puppet/modules/hhvm/manifests/init.pp index 68afb7a..65aee70 100644 --- a/puppet/modules/hhvm/manifests/init.pp +++ b/puppet/modules/hhvm/manifests/init.pp @@ -10,7 +10,7 @@ include ::apache::mods::alias include ::apache::mods::fastcgi -package { 'hhvm-nightly': +package { 'hhvm-fastcgi': require => Apache::Mod['actions', 'alias', 'fastcgi'], } @@ -25,7 +25,7 @@ file { '/etc/hhvm/server.hdf': ensure => file, content => template( 'hhvm/server.hdf.erb'), -require => Package['hhvm-nightly'], +require => Package['hhvm-fastcgi'], notify => Service['hhvm'], } -- To view, visit https://gerrit.wikimedia.org/r/115134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1fd0c854a5d9fc8b3dabf2bae500422b83dab92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HHVM role: use "hhvm-fastcgi" package - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: HHVM role: use "hhvm-fastcgi" package .. HHVM role: use "hhvm-fastcgi" package 'nightly' isn't compiled for fastcgi. Bug: 60384 Change-Id: Ib1fd0c854a5d9fc8b3dabf2bae500422b83dab92 --- M puppet/modules/hhvm/manifests/init.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/hhvm/manifests/init.pp b/puppet/modules/hhvm/manifests/init.pp index 68afb7a..65aee70 100644 --- a/puppet/modules/hhvm/manifests/init.pp +++ b/puppet/modules/hhvm/manifests/init.pp @@ -10,7 +10,7 @@ include ::apache::mods::alias include ::apache::mods::fastcgi -package { 'hhvm-nightly': +package { 'hhvm-fastcgi': require => Apache::Mod['actions', 'alias', 'fastcgi'], } @@ -25,7 +25,7 @@ file { '/etc/hhvm/server.hdf': ensure => file, content => template( 'hhvm/server.hdf.erb'), -require => Package['hhvm-nightly'], +require => Package['hhvm-fastcgi'], notify => Service['hhvm'], } -- To view, visit https://gerrit.wikimedia.org/r/115134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1fd0c854a5d9fc8b3dabf2bae500422b83dab92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move math related packages to a puppet class - change (operations...wikimedia-task-appserver)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115135 Change subject: Move math related packages to a puppet class .. Move math related packages to a puppet class Get rid of texlive*, dvipng and gsfonts dependencies in favor of a puppet class mediawiki::packages::math. Puppet change is: https://gerrit.wikimedia.org/r/115133 This patch will let us install math packages without having to install wikimedia-task-appserver. Bug: 61090 Change-Id: Ifcf184b2f016f3dab6a1d32feab4162b7de51ca6 --- M debian/changelog M debian/control 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikimedia-task-appserver refs/changes/35/115135/1 diff --git a/debian/changelog b/debian/changelog index b4e3753..a618108 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +wikimedia-task-appserver (2.10-1) precise-wikimedia; urgency=low + + * Get rid of texlive*, dvipng and gsfonts dependencies in favor of a puppet +class mediawiki::packages::math + + -- Antoine Musso Mon, 24 Feb 2014 10:43:33 + + wikimedia-task-appserver (2.9-1) precise-wikimedia; urgency=low * make apache-graceful-all also restart API servers by changing diff --git a/debian/control b/debian/control index 9e4f439..d138b49 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Package: wikimedia-task-appserver Architecture: all -Depends: apache2-mpm-prefork, librsvg2-bin, dvipng, gsfonts, ocaml, ploticus, php5-mysql, php5-curl, php5-xmlrpc, php5-cli, php-apc, php-wikidiff2, php5-fss, php5-geoip, libapache2-mod-php5, file, djvulibre-bin, tidy (>= 20070821), libtidy-0.99-0 (>= 20070821), php-pear, rsync, make, xpdf-utils, libtiff-tools, texlive, texlive-bibtex-extra, texlive-font-utils, texlive-fonts-extra, texlive-lang-croatian, texlive-lang-cyrillic, texlive-lang-czechslovak, texlive-lang-danish, texlive-lang-dutch, texlive-lang-finnish, texlive-lang-french, texlive-lang-german, texlive-lang-greek, texlive-lang-hungarian, texlive-lang-italian, texlive-lang-latin, texlive-lang-mongolian, texlive-lang-norwegian, texlive-lang-other, texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish, texlive-lang-swedish, texlive-lang-vietnamese, texlive-latex-extra, texlive-math-extra, texlive-pictures, texlive-pstricks, texlive-publishers, php5-redis, php5-memcached, libmemcached10, php5-igbinary, lilypond, timidity, imagemagick +Depends: apache2-mpm-prefork, librsvg2-bin, ocaml, ploticus, php5-mysql, php5-curl, php5-xmlrpc, php5-cli, php-apc, php-wikidiff2, php5-fss, php5-geoip, libapache2-mod-php5, file, djvulibre-bin, tidy (>= 20070821), libtidy-0.99-0 (>= 20070821), php-pear, rsync, make, xpdf-utils, libtiff-tools, php5-redis, php5-memcached, libmemcached10, php5-igbinary, lilypond, timidity, imagemagick Description: Wikimedia application server This package depends on all packages needed to setup a standard application server, and contains the necessary deployment scripts. -- To view, visit https://gerrit.wikimedia.org/r/115135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcf184b2f016f3dab6a1d32feab4162b7de51ca6 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/wikimedia-task-appserver Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly construct edit-links to SpecialPages in EntityView - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly construct edit-links to SpecialPages in EntityView .. Correctly construct edit-links to SpecialPages in EntityView Bug: 50890 Change-Id: If59fd705eb8b9ed7fb2954c34f7013235ab428d1 --- M repo/includes/EntityView.php 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, but someone else must approve WikidataJenkins: Verified Thiemo Mättig (WMDE): Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 418ce84..be02a8d 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -611,14 +611,15 @@ } if ( $entity->getId() ) { - $id = $this->getFormattedIdForEntity( $entity ); + $subpage = $this->getFormattedIdForEntity( $entity ); } else { - $id = ''; // can't skip this, that would confuse the order of parameters! + $subpage = ''; // can't skip this, that would confuse the order of parameters! } - return $specialpage->getPageTitle()->getLocalURL() - . '/' . wfUrlencode( $id ) - . ( $lang === null ? '' : '/' . wfUrlencode( $lang->getCode() ) ); + if ( $lang !== null ) { + $subpage .= '/' . $lang->getCode(); + } + return $specialpage->getPageTitle( $subpage )->getLocalURL(); } /** -- To view, visit https://gerrit.wikimedia.org/r/114751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If59fd705eb8b9ed7fb2954c34f7013235ab428d1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: WikidataJenkins 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 crash when rotating phone with multiple pages - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/115136 Change subject: Fix crash when rotating phone with multiple pages .. Fix crash when rotating phone with multiple pages - This stops replacing fragments, and just adds them. This *must* be fixed at some point since otherwise it will lead to unreasonable memory pressure. Change-Id: I847053b3e38096ee0eb3fc5d2988c3157135d29a --- M wikipedia/res/layout/fragment_page.xml M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java 2 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/36/115136/1 diff --git a/wikipedia/res/layout/fragment_page.xml b/wikipedia/res/layout/fragment_page.xml index b4477cf..20dd0f0 100644 --- a/wikipedia/res/layout/fragment_page.xml +++ b/wikipedia/res/layout/fragment_page.xml @@ -3,7 +3,9 @@ http://schemas.android.com/apk/res/android"; android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:background="@color/window_background_color" +> https://gerrit.wikimedia.org/r/115136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I847053b3e38096ee0eb3fc5d2988c3157135d29a Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use the super-evil Settings singleton in client/repo - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/115137 Change subject: Don't use the super-evil Settings singleton in client/repo .. Don't use the super-evil Settings singleton in client/repo Change-Id: I50692c8091bcf4e2e0cbb23e50dd5b67b5d428a2 --- M client/includes/store/sql/DirectSqlStore.php M lib/tests/phpunit/NoBadDependencyUsageTest.php M repo/Wikibase.hooks.php M repo/includes/MultiLangConstraintDetector.php M repo/includes/NamespaceUtils.php M repo/includes/api/ApiWikibase.php M repo/includes/api/EditEntity.php M repo/includes/api/GetEntities.php M repo/includes/api/LinkTitles.php M repo/includes/api/ModifyEntity.php M repo/includes/api/SetSiteLink.php M repo/includes/specials/SpecialItemByTitle.php M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialSetSiteLink.php M repo/includes/store/StoreFactory.php M repo/includes/store/sql/SqlIdGenerator.php M repo/includes/store/sql/SqlStore.php M repo/tests/phpunit/includes/api/TermTestHelper.php M repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php M repo/tests/phpunit/includes/store/sql/TermSearchKeyBuilderTest.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 21 files changed, 109 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/37/115137/1 diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 1a0b639..eb74c22 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -5,6 +5,7 @@ use Language; use Site; use ObjectCache; +use Wikibase\Repo\WikibaseRepo; /** * Implementation of the client store interface using direct access to the repository's @@ -86,7 +87,7 @@ $this->repoWiki = $repoWiki; $this->language = $wikiLanguage; - $settings = Settings::singleton(); + $settings = WikibaseRepo::getDefaultInstance()->getSettings(); $cachePrefix = $settings->getSetting( 'sharedCacheKeyPrefix' ); $cacheDuration = $settings->getSetting( 'sharedCacheDuration' ); $cacheType = $settings->getSetting( 'sharedCacheType' ); @@ -312,7 +313,10 @@ * @return PropertyInfoTable */ protected function newPropertyInfoTable() { - if ( Settings::get( 'usePropertyInfoTable' ) ) { + $usePropertyInfoTable = WikibaseRepo::getDefaultInstance() + ->getSettings()->getSetting( 'usePropertyInfoTable' ); + + if ( $usePropertyInfoTable ) { $table = new PropertyInfoTable( true, $this->repoWiki ); $key = $this->cachePrefix . ':CachingPropertyInfoStore'; return new CachingPropertyInfoStore( $table, ObjectCache::getInstance( $this->cacheType ), diff --git a/lib/tests/phpunit/NoBadDependencyUsageTest.php b/lib/tests/phpunit/NoBadDependencyUsageTest.php index 8aa7522..1318f9d 100644 --- a/lib/tests/phpunit/NoBadDependencyUsageTest.php +++ b/lib/tests/phpunit/NoBadDependencyUsageTest.php @@ -28,8 +28,8 @@ public function testNoSettingsUsageOutsideLib() { // Increasing this allowance is forbidden - $this->assertStringNotInRepo( 'Settings::', 21 ); - $this->assertStringNotInClient( 'Settings::', 3 ); + $this->assertStringNotInRepo( 'Settings::', 1 ); + $this->assertStringNotInClient( 'Settings::', 1 ); } private function assertStringNotInLib( $string, $maxAllowance ) { diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 8979730..e167296 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -7,7 +7,6 @@ use Content; use ContentHandler; use DatabaseUpdater; -use EditPage; use HistoryPager; use Html; use Language; @@ -77,7 +76,8 @@ wfProfileIn( __METHOD__ ); global $wgNamespaceContentModels; - $namespaces = Settings::get( 'entityNamespaces' ); + $namespaces = WikibaseRepo::getDefaultInstance()-> + getSettings()->getSetting( 'entityNamespaces' ); if ( empty( $namespaces ) ) { wfProfileOut( __METHOD__ ); @@ -137,7 +137,10 @@ wfWarn( "Database type '$type' is not supported by the Wikibase repository." ); } - if ( Settings::get( 'defaultStore' ) === 'sqlstore' ) { + $defaultStore = WikibaseRepo::getDefaultInstance()-> + getSettings()->getSetting( 'defaultStore' ); + + if ( $defaultStore === 'sqlstore' ) { /** * @var SQLStore $store */ diff --git a/repo/includes/M
[MediaWiki-commits] [Gerrit] Log page creations with the PageCreation schema - change (mediawiki...WikimediaEvents)
jenkins-bot has submitted this change and it was merged. Change subject: Log page creations with the PageCreation schema .. Log page creations with the PageCreation schema Change-Id: I083316c89a152238b2d704335d6426edb22bb67e --- M WikimediaEvents.php 1 file changed, 31 insertions(+), 0 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaEvents.php b/WikimediaEvents.php index 8aa1469..2685ec0 100644 --- a/WikimediaEvents.php +++ b/WikimediaEvents.php @@ -202,3 +202,34 @@ ) ); return true; }; + +/** + * Logs page creations with the PageCreation schema. + * + * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentInsertComplete + * @see https://meta.wikimedia.org/wiki/Schema:PageCreation + * @param WikiPage $wikipage page just created + * @param User $user user who created the page + * @param Content $content content of new page + * @param string $summary summary given by creating user + * @param bool $isMinor whether the edit is marked as minor (not actually possible for new + * pages) + * @param $isWatch not used + * @param $section not used + * @param int $flags bit flags about page creation + * @param Revision $revision first revision of new page + */ +$wgHooks['PageContentInsertComplete'][] = function ( WikiPage $wikiPage, User $user, + Content $content, $summary, $isMinor, $isWatch, $section, $flags, Revision $revision ) { + + $title = $wikiPage->getTitle(); + efLogServerSideEvent( 'PageCreation', 7481635, array( + 'userId' => $user->getId(), + 'userText' => $user->getName(), + 'pageId' => $wikiPage->getId(), + 'namespace' => $title->getNamespace(), + 'title' => $title->getDBkey(), + 'revId' => $revision->getId(), + ) ); + return true; +}; -- To view, visit https://gerrit.wikimedia.org/r/114905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I083316c89a152238b2d704335d6426edb22bb67e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Halfak Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Swalling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use @include as that supresses useful error output - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/115138 Change subject: Don't use @include as that supresses useful error output .. Don't use @include as that supresses useful error output Change-Id: Iafcc7c188841d2710f0eea925a901dd59aac813a --- M client/WikibaseClient.php M repo/Wikibase.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/38/115138/1 diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index b009543..a898993 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -35,7 +35,7 @@ // Include the WikibaseLib extension if that hasn't been done yet, since it's required for WikibaseClient to work. if ( !defined( 'WBL_VERSION' ) ) { - @include_once( __DIR__ . '/../lib/WikibaseLib.php' ); + include_once( __DIR__ . '/../lib/WikibaseLib.php' ); } if ( !defined( 'WBL_VERSION' ) ) { diff --git a/repo/Wikibase.php b/repo/Wikibase.php index ad7028f..1262202 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -27,7 +27,7 @@ // Include the WikibaseLib extension if that hasn't been done yet, since it's required for Wikibase to work. if ( !defined( 'WBL_VERSION' ) ) { - @include_once( __DIR__ . '/../lib/WikibaseLib.php' ); + include_once( __DIR__ . '/../lib/WikibaseLib.php' ); } if ( !defined( 'WBL_VERSION' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/115138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iafcc7c188841d2710f0eea925a901dd59aac813a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup wikibase-listdatatypes-* i18n keys - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/115139 Change subject: Cleanup wikibase-listdatatypes-* i18n keys .. Cleanup wikibase-listdatatypes-* i18n keys Change-Id: I895d50983f1a8b80cf48b24aa107608ff06089d7 --- M repo/Wikibase.i18n.php 1 file changed, 16 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/39/115139/1 diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index c29c98b..1f7ee92 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -375,38 +375,39 @@ // datatype descriptions 'wikibase-listdatatypes-wikibase-item-head' => 'Item', - 'wikibase-listdatatypes-wikibase-item-body' => 'Link to other items at the project. During entry the "Item" namespace on Wikidata will be searched for matching entries. It consists of a single text entry field. -* scheme – implicit part of the Iri-string -* hierarchicalpart – implicit part of the Iri-string -* query – implicit part of the Iri-string -* fragment – implicit part of the Iri-string', + 'wikibase-listdatatypes-wikibase-item-body' => 'Link to other items at the project. During entry the "Item" namespace on Wikidata will be searched for matching entries. It consists of a single text entry field.', + 'wikibase-listdatatypes-commonsmedia-head' => 'Commons media', - 'wikibase-listdatatypes-commonsmedia-body' => 'Link to files stored at Wikimedia Commons. During entry the "File" namespace on Commons will be searched for matching entries. -* scheme – implicit part of the Iri-string -* hierarchicalpart – implicit part of the Iri-string -* query – implicit part of the Iri-string -* fragment – implicit part of the Iri-string', + 'wikibase-listdatatypes-commonsmedia-body' => 'Link to files stored at Wikimedia Commons. During entry the "File" namespace on Commons will be searched for matching entries.', + 'wikibase-listdatatypes-globe-coordinate-head' => 'Globe coordinate', 'wikibase-listdatatypes-globe-coordinate-body' => 'Literal data for a geographical position given as a latitude-longitude pair in gms or decimal degrees for the given stellar body. Defaults to "Earth" and then "WGS84". It adds a resolution and range. * latitude – implicit first part (float, dms, dm, dd) of the coordinate string, direction is either given by prefixed sign or by postfixed N/S * longitude – implicit second part (float, dms, dm, dd) of the coordinate string, direction is either given by prefixed sign or by postfixed E/W -* globe – explicit (?) data value, given as stellar body that defaults to "Earth" and then "WGS84"', +* globe – explicit (?) data value, given as stellar body that defaults to Earth "http://www.wikidata.org/entity/Q2"; +* precision - numeric precision of the coordinate', + 'wikibase-listdatatypes-quantity-head' => 'Quantity', 'wikibase-listdatatypes-quantity-body' => 'Literal data field for a quantity that relates to some kind of well-defined unit. The actual unit goes in the data values that is entered. -* value – implicit part of the string (mapping of unit prefix is unclear) -* unit – implicit part of the string (mapping to standardizing body is unclear) -* accuracy (optional) – explicit data value, has the same unit as the value', +* amount – implicit part of the string (mapping of unit prefix is unclear) +* unit – implicit part of the string that defaults to "1" (mapping to standardizing body is unclear) +* upperbound - quantity\'s upper bound +* lowerbound - quantity\'s lower bound', + 'wikibase-listdatatypes-monolingual-text-head' => 'Monolingual text', 'wikibase-listdatatypes-monolingual-text-body' => 'Literal data field for a string that is not translated into other languages. This type of string is defined once and reused across all languages. Typical use is a geographical names written in the local language, an identifier of some kind, a chemical formula or a Latin scientific name. * language – explicit value for identifying the language for the text part * value – explicit value for the language specific variant string', + 'wikibase-listdatatypes-multilingual-text-head' => 'Multilingual text', 'wikibase-listdatatypes-multilingual-text-body' => 'Literal data field for a string that must be translated into other languages. Typical use is an entity name of global interest that has non-local written forms. Those can differ both in languages and script systems. * language – explicit value for identifying the language for the text part * value – explicit value for the language specific variant string', + 'wikibase-listdatatypes-string-head' => 'String', 'wikibase-listdatatypes-string-body' => 'Literal data field for a string of glyphs. Typical use are identifiers that have written forms which do not dep
[MediaWiki-commits] [Gerrit] Jobs for mw/ext/FlaggedRev - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115140 Change subject: Jobs for mw/ext/FlaggedRev .. Jobs for mw/ext/FlaggedRev Bug: 59918 Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 --- M mediawiki-extensions.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/40/115140/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 829d6bc..93df6b2 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -343,6 +343,7 @@ - ExpandTemplates - ExtensionDistributor - FeaturedFeeds + - FlaggedRevs - Flow - FormPreloadPostCache - FundraiserLandingPage -- To view, visit https://gerrit.wikimedia.org/r/115140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove usage of wikiGetlink deprecated function - change (mediawiki...Echo)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/115141 Change subject: Remove usage of wikiGetlink deprecated function .. Remove usage of wikiGetlink deprecated function Change-Id: I59ecfdcdf834d265b9a911c37fd9a35fd2588ec7 --- M modules/overlay/ext.echo.overlay.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/41/115141/1 diff --git a/modules/overlay/ext.echo.overlay.js b/modules/overlay/ext.echo.overlay.js index 8161649..d29ca32 100644 --- a/modules/overlay/ext.echo.overlay.js +++ b/modules/overlay/ext.echo.overlay.js @@ -2,6 +2,9 @@ ( function ( $, mw ) { 'use strict'; + // backwards compatibility <= MW 1.21 + var getUrl = mw.util.getUrl || mw.util.wikiGetlink; + mw.echo.overlay = { /** @@ -210,7 +213,7 @@ $( '' ) .attr( 'id', 'mw-echo-overlay-link' ) .addClass( 'mw-echo-grey-link' ) - .attr( 'href', mw.util.wikiGetlink( 'Special:Notifications' ) ) + .attr( 'href', getUrl( 'Special:Notifications' ) ) .text( mw.msg( 'echo-overlay-link' ) ) .click( function () { mw.echo.logInteraction( 'ui-archive-link-click', 'flyout' ); -- To view, visit https://gerrit.wikimedia.org/r/115141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59ecfdcdf834d265b9a911c37fd9a35fd2588ec7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jobs for mw/ext/FlaggedRev - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Jobs for mw/ext/FlaggedRev .. Jobs for mw/ext/FlaggedRev Bug: 59918 Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 --- M mediawiki-extensions.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 829d6bc..93df6b2 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -343,6 +343,7 @@ - ExpandTemplates - ExtensionDistributor - FeaturedFeeds + - FlaggedRevs - Flow - FormPreloadPostCache - FundraiserLandingPage -- To view, visit https://gerrit.wikimedia.org/r/115140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Triggers jobs for mw/ext/FlaggedRev - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115142 Change subject: Triggers jobs for mw/ext/FlaggedRev .. Triggers jobs for mw/ext/FlaggedRev Bug: 59918 Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/42/115142/1 diff --git a/layout.yaml b/layout.yaml index 3898922..8463c6e 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1770,6 +1770,11 @@ - name: extension-checks extname: FeaturedFeeds + - name: mediawiki/extensions/FlaggedRevs +template: + - name: extension-unittests +extname: FlaggedRevs + - name: mediawiki/extensions/Flow check: - mwext-Flow-jslint -- To view, visit https://gerrit.wikimedia.org/r/115142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Triggers jobs for mw/ext/FlaggedRev - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Triggers jobs for mw/ext/FlaggedRev .. Triggers jobs for mw/ext/FlaggedRev Bug: 59918 Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 50f6ab2..e28dd31 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1770,6 +1770,11 @@ - name: extension-checks extname: FeaturedFeeds + - name: mediawiki/extensions/FlaggedRevs +template: + - name: extension-unittests +extname: FlaggedRevs + - name: mediawiki/extensions/Flow check: - mwext-Flow-jslint -- To view, visit https://gerrit.wikimedia.org/r/115142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c0b815e7be706108a4c34ccfaca5c2d047f4fc8 Gerrit-PatchSet: 2 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...FlaggedRevs)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115143 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Bug: 59918 Change-Id: I0780676a0eda95624571a243522749224e1b12bd --- A JENKINS A jenkins-testfile.py A jenkins.js A jenkins.php A jenkins.rb 5 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/43/115143/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS diff --git a/jenkins-testfile.py b/jenkins-testfile.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins-testfile.py diff --git a/jenkins.js b/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.js diff --git a/jenkins.php b/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.php diff --git a/jenkins.rb b/jenkins.rb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.rb -- To view, visit https://gerrit.wikimedia.org/r/115143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0780676a0eda95624571a243522749224e1b12bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] User Redis as storage for socket.io - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115144 Change subject: User Redis as storage for socket.io .. User Redis as storage for socket.io So that the instances can share the socket information Change-Id: I28ceacb472d168140ef044ca8aad1926b24fb999 --- M server/ContentTranslationService.js 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/44/115144/1 diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js index 9269c41..be067bc 100644 --- a/server/ContentTranslationService.js +++ b/server/ContentTranslationService.js @@ -1,5 +1,5 @@ /** - * ContentTranslation server + * ContentTranslation server * * @file * @copyright See AUTHORS.txt @@ -22,8 +22,17 @@ var app = express(); var server = require( 'http' ).createServer( app ); var io = require( 'socket.io' ).listen( server ); - var redis = require( 'redis' ); + +// Use Redis as the store for socket.io +var RedisStore = require( 'socket.io/lib/stores/redis' ); +io.set( 'store', + new RedisStore( { + redisPub: redis.createClient(), + redisSub: redis.createClient(), + redisClient: redis.createClient() + } ) +); instanceName = 'worker(' + process.pid + ')'; // socket.io connection establishment @@ -34,13 +43,13 @@ console.log( '[CX] Client connected to ' + instanceName + '). Socket: ' + socket.id ); redisSub.subscribe( 'cx' ); - redisSub.on( 'message', function( channel, message ) { + redisSub.on( 'message', function ( channel, message ) { socket.emit( 'cx.data.update', JSON.parse( message ) ); console.log('[CX] Received from channel #' + channel + ':' + message ); } ); socket.on( 'cx.init', function ( data ) { - CXDataModelManager = require( __dirname + '/models/dataModelManager.js').CXDataModelManager; + CXDataModelManager = require( __dirname + '/models/dataModelManager.js').CXDataModelManager; context = { sourceLanguage: data.sourceLanguage, targetLanguage: data.targetLanguage, -- To view, visit https://gerrit.wikimedia.org/r/115144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28ceacb472d168140ef044ca8aad1926b24fb999 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Client: Subscribe for cx.data.update only once - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115145 Change subject: Client: Subscribe for cx.data.update only once .. Client: Subscribe for cx.data.update only once Change-Id: Iab0940c9b0a880cb505c932c91bc62e332cdc17b --- M server/public/js/main.js 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/45/115145/1 diff --git a/server/public/js/main.js b/server/public/js/main.js index ec8ab4c..44c5a09 100644 --- a/server/public/js/main.js +++ b/server/public/js/main.js @@ -15,6 +15,13 @@ $( document ).ready( function () { var socket = io.connect( '/', { port: 8000 } ); $( 'progress' ).hide(); + socket.on( 'cx.data.update', function ( data ) { + cxdata = data; + $( 'progress' ).hide(); + $( '.status' ).text( 'Recieved version '+ cxdata.version + '. Click on the content segments to inspect.'); + $( '.article' ).html( cxdata.segmentedContent ); + console.log( cxdata ); + } ); $( 'button' ).click( function () { $( 'progress' ).show(); $( '.status' ).text( 'Connecting to server...' ); @@ -22,13 +29,6 @@ sourcePage: $('input[name=sourcePage').val(), sourceLanguage: $('input[name=sourceLanguage').val(), targetLanguage: $('input[name=targetLanguage').val() - } ); - socket.on( 'cx.data.update', function ( data ) { - cxdata = data; - $( 'progress' ).hide(); - $( '.status' ).text( 'Recieved version '+ cxdata.version + '. Click on the content segments to inspect.'); - $( '.article' ).html( cxdata.segmentedContent ); - console.log( cxdata ); } ); } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/115145 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab0940c9b0a880cb505c932c91bc62e332cdc17b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Client: For connecting to socket, port is optional, remove it - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115146 Change subject: Client: For connecting to socket, port is optional, remove it .. Client: For connecting to socket, port is optional, remove it Change-Id: I914a32def6de39e04c7212dfd699dfc65998a77a --- M server/public/js/main.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/46/115146/1 diff --git a/server/public/js/main.js b/server/public/js/main.js index 44c5a09..0fc6675 100644 --- a/server/public/js/main.js +++ b/server/public/js/main.js @@ -13,7 +13,7 @@ /* global io */ $( document ).ready( function () { - var socket = io.connect( '/', { port: 8000 } ); + var socket = io.connect( '/' ); $( 'progress' ).hide(); socket.on( 'cx.data.update', function ( data ) { cxdata = data; -- To view, visit https://gerrit.wikimedia.org/r/115146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I914a32def6de39e04c7212dfd699dfc65998a77a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mwext-FlaggedRevs-testextensions-master is not passing - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115147 Change subject: mwext-FlaggedRevs-testextensions-master is not passing .. mwext-FlaggedRevs-testextensions-master is not passing FlaggablePageTest::testPageDataFromTitle triggers an uncommitted transaction. Bug: 61848 Change-Id: Ife5494223d4b0afb40b1d93645e5c8ed10993b11 --- M layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/47/115147/1 diff --git a/layout.yaml b/layout.yaml index e28dd31..d2a3427 100644 --- a/layout.yaml +++ b/layout.yaml @@ -646,6 +646,12 @@ - name: ^mwext-GWToolset-testextensions.* voting: false + # Bug 61848 + # FlaggablePageTest::testPageDataFromTitle triggers an uncommitted + # transaction. + - name: ^mwext-FlaggedRevs-testextensions.* +voting: false + # mwext-SideBarMenu-testextensions-master - name: ^mwext-SideBarMenu-testextensions-.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife5494223d4b0afb40b1d93645e5c8ed10993b11 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mwext-FlaggedRevs-testextensions-master is not passing - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: mwext-FlaggedRevs-testextensions-master is not passing .. mwext-FlaggedRevs-testextensions-master is not passing FlaggablePageTest::testPageDataFromTitle triggers an uncommitted transaction. Bug: 61848 Change-Id: Ife5494223d4b0afb40b1d93645e5c8ed10993b11 --- M layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index e28dd31..d2a3427 100644 --- a/layout.yaml +++ b/layout.yaml @@ -646,6 +646,12 @@ - name: ^mwext-GWToolset-testextensions.* voting: false + # Bug 61848 + # FlaggablePageTest::testPageDataFromTitle triggers an uncommitted + # transaction. + - name: ^mwext-FlaggedRevs-testextensions.* +voting: false + # mwext-SideBarMenu-testextensions-master - name: ^mwext-SideBarMenu-testextensions-.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife5494223d4b0afb40b1d93645e5c8ed10993b11 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar 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 some extension jobs voting - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115148 Change subject: Make some extension jobs voting .. Make some extension jobs voting The following jobs are now voting since their test suite got fixed somehow: mwext-cldr-testextensions-master mwext-ContributionTracking-testextensions-master mwext-GeoData-testextensions-master mwext-GWToolset-testextensions-master mwext-LabeledSectionTransclusion-testextensions-master/ Change-Id: I9cde6f9ecd5e1a35c795fec393477557045d53ae --- M layout.yaml 1 file changed, 0 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/48/115148/1 diff --git a/layout.yaml b/layout.yaml index d2a3427..4a7fe3b 100644 --- a/layout.yaml +++ b/layout.yaml @@ -628,24 +628,6 @@ - name: mediawiki-core-jsduck-publish branch: ^(REL1_21|REL1_22|master)$ - # not working yet, might need some dependency - - name: ^mwext-ContributionTracking-testextensions-.* -voting: false - - # GeoMathTest::testRectWrapAround() fails as of Dec 5th 2012 - - name: ^mwext-GeoData-testextensions.* -voting: false - - # LabeledSectionTransclusion has only parser tests which does not - # play well for now. https://gerrit.wikimedia.org/r/#/c/38114 should - # let PHPUnit load in the parser tests though. See bug 42506. - - name: ^mwext-LabeledSectionTransclusion-testextensions.* -voting: false - - # sqlite updater is not working: - - name: ^mwext-GWToolset-testextensions.* -voting: false - # Bug 61848 # FlaggablePageTest::testPageDataFromTitle triggers an uncommitted # transaction. @@ -703,8 +685,6 @@ # Extensions for which tests are non-functional or absent: - name: ^mwext-EtherEditor-testextensions.* -voting: false - - name: ^mwext-cldr-testextensions.* voting: false - name: ^mwext-DonationInterface-runtests.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cde6f9ecd5e1a35c795fec393477557045d53ae Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make some extension jobs voting - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make some extension jobs voting .. Make some extension jobs voting The following jobs are now voting since their test suite got fixed somehow: mwext-cldr-testextensions-master mwext-ContributionTracking-testextensions-master mwext-GeoData-testextensions-master mwext-GWToolset-testextensions-master mwext-LabeledSectionTransclusion-testextensions-master/ Change-Id: I9cde6f9ecd5e1a35c795fec393477557045d53ae --- M layout.yaml 1 file changed, 0 insertions(+), 20 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index d2a3427..4a7fe3b 100644 --- a/layout.yaml +++ b/layout.yaml @@ -628,24 +628,6 @@ - name: mediawiki-core-jsduck-publish branch: ^(REL1_21|REL1_22|master)$ - # not working yet, might need some dependency - - name: ^mwext-ContributionTracking-testextensions-.* -voting: false - - # GeoMathTest::testRectWrapAround() fails as of Dec 5th 2012 - - name: ^mwext-GeoData-testextensions.* -voting: false - - # LabeledSectionTransclusion has only parser tests which does not - # play well for now. https://gerrit.wikimedia.org/r/#/c/38114 should - # let PHPUnit load in the parser tests though. See bug 42506. - - name: ^mwext-LabeledSectionTransclusion-testextensions.* -voting: false - - # sqlite updater is not working: - - name: ^mwext-GWToolset-testextensions.* -voting: false - # Bug 61848 # FlaggablePageTest::testPageDataFromTitle triggers an uncommitted # transaction. @@ -703,8 +685,6 @@ # Extensions for which tests are non-functional or absent: - name: ^mwext-EtherEditor-testextensions.* -voting: false - - name: ^mwext-cldr-testextensions.* voting: false - name: ^mwext-DonationInterface-runtests.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9cde6f9ecd5e1a35c795fec393477557045d53ae Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar 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 the toolbar controller's own event system - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/115149 Change subject: Remove the toolbar controller's own event system .. Remove the toolbar controller's own event system The toolbar controller has an own event system which is complex, extremely slow and not used. For me, this change reduces loading time of the Italy item from ~170s to ~18s. Also, there were several bugs in this implementation. Event handlers were called multiple times and the filtering on selector did not work at all. Change-Id: Idb6432e6857069058d4e6fe519ebbc31c883acf2 --- M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 1 file changed, 9 insertions(+), 156 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/49/115149/1 diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js index 96643eb..514a9e9 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js @@ -56,11 +56,6 @@ }, /** -* @type {Object} -*/ - _registeredEventHandlers: {}, - - /** * @see jQuery.Widget._create * * @throws {Error} in case a given toolbar ID is not registered for the toolbar type given. @@ -94,151 +89,27 @@ * for a toolbar type with a specific id: For one toolbar, no additional * handler should be registered with exactly the same eventNames string. * @param {Function} callback -* @param {boolean} [replace] If true, the event handler currently registered for the -* specified argument combination will be replaced. * * @throws {Error} if the callback provided in an event definition is not a function. */ - registerEventHandler: function( toolbarType, toolbarId, eventNames, callback, replace ) { + registerEventHandler: function( toolbarType, toolbarId, eventNames, callback ) { if( !$.isFunction( callback ) ) { throw new Error( 'No callback or known default action given for event "' + eventNames + '"' ); } - if( !this._registeredEventHandlers[toolbarType] ) { - this._registeredEventHandlers[toolbarType] = {}; - } - - if( !this._registeredEventHandlers[toolbarType][toolbarId] ) { - this._registeredEventHandlers[toolbarType][toolbarId] = {}; - } - - if( !replace && this._registeredEventHandlers[toolbarType][toolbarId][eventNames] ) { - return; - } - var self = this; + var def = $.wikibase.toolbarcontroller.definition( toolbarType, toolbarId ); - // The namespace needs to be very specific since instances of the the same - // toolbar may listen to the same event(s) on the same node: - var eventNamespaces = [this.widgetName, this.widgetName + toolbarType + toolbarId], - namespacedEventNames = assignNamespaces( eventNames, eventNamespaces ); + this.element.on( eventNames, def.selector, function( event ) { + event.data = event.data || {}; + event.data.toolbar = { + id: toolbarId, + type: toolbarType + }; - this.element - // Prevent attaching event handlers twice: - .off( namespacedEventNames ) - .on( namespacedEventNames, function( event ) { - var callbacks = self._findCallbacks( event ); - - if( callbacks ) { - event.data = event.data || {}; - - event.data.toolbar = { - id: toolbarId, - type: toolbarType - }; - - for( var i = 0; i < callbacks.length; i++ ) { - callbacks[i]( event, self ); - } - } +
[MediaWiki-commits] [Gerrit] Server: Basic socket.io setup - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Server: Basic socket.io setup .. Server: Basic socket.io setup Change-Id: I61db71ab1617e714f43c540a49eb9398340df3cb --- M server/ContentTranslationService.js D server/config.js M server/package.json M server/public/index.html A server/public/js/main.js 5 files changed, 69 insertions(+), 87 deletions(-) Approvals: KartikMistry: Looks good to me, approved Nikerabbit: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js index d72799a..c94c1e7 100644 --- a/server/ContentTranslationService.js +++ b/server/ContentTranslationService.js @@ -14,59 +14,38 @@ 'use strict'; -// global includes -var config, - express = require( 'express' ), - cluster = require( 'cluster' ), - CXMTInterface = require( __dirname+ '/mt/CXMTInterface.js' ).CXMTInterface; -try { - var config; - config = require( __dirname + '/config.js' ); -} catch ( e ) { - config = { port: 8000 }; -} +var app, instanceName, server, io, port, context, + express = require( 'express' ); + +port = process.argv[2] || 8000; /** * The name of this instance. * @property {string} */ -var instanceName = cluster.isWorker ? 'worker(' + process.pid + ')' : 'master'; +instanceName = 'worker(' + process.pid + ')'; +app = express(); +server = require( 'http' ).createServer( app ); +io = require( 'socket.io' ).listen( server ); -console.log( ' - ' + instanceName + ' loading...' ); - -/* web app access points below - */ - -var app = express(); - -app.translator = new CXMTInterface( config ); - -app.use( express.urlencoded() ); - -// robots.txt: no indexing. -app.get( /^\/robots.txt$/, function ( req, res ) { - res.end( 'User-agent: *\nDisallow: /\n' ); -} ); - -app.post( /^\/$/, function ( req, res ) { - var sourceLang = req.body.sourcelang, - targetLang = req.body.targetlang, - sourceText = req.body.sourcetext; - - res.setHeader( 'Content-Type', 'text/plain; charset=UTF-8' ); - // TODO: create configurable access control list for production - res.setHeader( 'Access-Control-Allow-Origin', '*' ); - res.end( app.translator.translate( - sourceLang, - targetLang, - sourceText - ) ); +// socket.io connection establishment +io.sockets.on( 'connection', function ( socket ) { + console.log( '[CX] Client connected to ' + instanceName + '. Socket: ' + socket.id ); + socket.on( 'cx.init', function ( data ) { + context = { + sourceLanguage: data.sourceLanguage, + targetLanguage: data.targetLanguage, + sourceText: data.sourceText, + socket: socket + }; + socket.emit( 'cx.initialized', true ); + } ); } ); // Everything else goes through this. -app.use(express.static(__dirname + '/public')); - -console.log( ' - ' + instanceName + ' ready' ); - -app.listen( config.port ); +app.use( express.static( __dirname + '/public') ); +console.log( '[CX] ' + instanceName + ' ready. Listening on port: ' + port ); +server.listen( port ); module.exports = app; + diff --git a/server/config.js b/server/config.js deleted file mode 100644 index d8395e0..000 --- a/server/config.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var config = {}; -config.port = 8000; - -module.exports = config; diff --git a/server/package.json b/server/package.json index e88c7fb..e99e683 100644 --- a/server/package.json +++ b/server/package.json @@ -3,7 +3,8 @@ "description": "Server for Content Translation", "version": "0.1.0", "dependencies": { - "express": "3.x" + "express": "3.x", + "socket.io": "0.9.x" }, "devDependencies": { "colors": "~0.6.2", diff --git a/server/public/index.html b/server/public/index.html index 2fb00a1..c38253c 100644 --- a/server/public/index.html +++ b/server/public/index.html @@ -1,29 +1,26 @@ + Content Translation Server - body { - width: 50%; - margin-left: 25%; + width: 80%; + margin-left: 10%; } label { float: left; width: 20%; } - input, textarea { - float: left; - width: 80%; + input { + width: 10%; padding: 5px; } button { - width: 100%; + width:
[MediaWiki-commits] [Gerrit] Give manybubbles and demon sudo on logstash100X - change (operations/puppet)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/115150 Change subject: Give manybubbles and demon sudo on logstash100X .. Give manybubbles and demon sudo on logstash100X They can fix it if there is a problema and the other sudoers aren't around. RT 6896 Change-Id: Id3c1dba2eb2f5a6330c6da5643011e08af3b7aca --- M manifests/site.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/115150/1 diff --git a/manifests/site.pp b/manifests/site.pp index 02354dd..5f09853 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2701,8 +2701,10 @@ include groups::wikidev include accounts::aaron include accounts::bd808 +include accounts::manybubbles +include accounts::demon -sudo_user { ['aaron', 'bd808']: # RT 6366 +sudo_user { ['aaron', 'bd808', 'manybubbles', 'demon']: # RT 6366, 6896 privileges => ['ALL = NOPASSWD: ALL'], } } -- To view, visit https://gerrit.wikimedia.org/r/115150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3c1dba2eb2f5a6330c6da5643011e08af3b7aca Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Server: Simple data model manager - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Server: Simple data model manager .. Server: Simple data model manager Change-Id: I38c326b0d8649e6c10b7fb996ad6c9fd97bf5a6c --- M server/ContentTranslationService.js A server/models/dataModelManager.js M server/public/js/main.js 3 files changed, 77 insertions(+), 11 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js index c94c1e7..a0d2f50 100644 --- a/server/ContentTranslationService.js +++ b/server/ContentTranslationService.js @@ -19,26 +19,27 @@ port = process.argv[2] || 8000; -/** - * The name of this instance. - * @property {string} - */ -instanceName = 'worker(' + process.pid + ')'; app = express(); server = require( 'http' ).createServer( app ); io = require( 'socket.io' ).listen( server ); // socket.io connection establishment io.sockets.on( 'connection', function ( socket ) { - console.log( '[CX] Client connected to ' + instanceName + '. Socket: ' + socket.id ); + var datamodelManager, + CXDataModelManager; + console.log( '[CX] Client connected to worker(' + process.pid + '). Socket: ' + socket.id ); socket.on( 'cx.init', function ( data ) { + CXDataModelManager = require( __dirname + '/models/dataModelManager.js').CXDataModelManager; context = { sourceLanguage: data.sourceLanguage, targetLanguage: data.targetLanguage, sourceText: data.sourceText, socket: socket }; - socket.emit( 'cx.initialized', true ); + // Inject the session context to dataModelManager + // It should take care of managing the data model and pushing + // it to the client through socket. + datamodelManager = new CXDataModelManager( context ); } ); } ); @@ -48,4 +49,3 @@ server.listen( port ); module.exports = app; - diff --git a/server/models/dataModelManager.js b/server/models/dataModelManager.js new file mode 100644 index 000..9c60840 --- /dev/null +++ b/server/models/dataModelManager.js @@ -0,0 +1,66 @@ +/** + * ContentTranslation Server + +* @file + * @ingroup Extensions + * @copyright See AUTHORS.txt + * @license GPL-2.0+ + */ + +'use strict'; + +/** + * CXDataModelManager + * @class + */ +function CXDataModelManager( context ) { + this.context = context; + this.dataModel = null; + this.init(); +} + +/** + * Initialize + */ +CXDataModelManager.prototype.init = function () { + var dataModelManager = this; + + this.dataModel = { + version: 0, + sourceLang: this.context.sourceLanguage, + targetLang: this.context.targetLanguage, + sourceLocation: this.context.sourceTitle, + segments: [], + segmentedContent: [], + segmentCount: 0, + dictionary: null, + glossary: null, + links: null + }; + dataModelManager.refresh(); +}; + +/** + * Refresh the data model. Syncs the data with the socket, updates version + */ +CXDataModelManager.prototype.refresh = function () { + this.context.socket.emit( 'cx.data.update', this.getDataModel() ); + console.log( '[CX] Sending data. Version: ' + this.dataModel.version ); + this.updateVersion(); +}; + +/** + * Update the version + */ +CXDataModelManager.prototype.updateVersion = function () { + this.dataModel.version += 1; +}; + +/** + * Get the data model + */ +CXDataModelManager.prototype.getDataModel = function () { + return this.dataModel; +}; + +module.exports.CXDataModelManager = CXDataModelManager; diff --git a/server/public/js/main.js b/server/public/js/main.js index 72d24ce..349bb31 100644 --- a/server/public/js/main.js +++ b/server/public/js/main.js @@ -11,10 +11,10 @@ sourceLanguage: $('input[name=sourceLanguage').val(), targetLanguage: $('input[name=targetLanguage').val() } ); - socket.on( 'cx.initialized', function ( data ) { - $( '.status' ).text( 'Connected to server' ); + socket.on( 'cx.data.update', function ( data ) { + $( '.status' ).text( 'Recieved version ' + data.version ); console.log( data ); } ); } ); } ); -}( jQuery ) ); \ No newline at end of file +}( jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/114134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38c326b0d8649e6c
[MediaWiki-commits] [Gerrit] Log Elasticsearch hot_threads - change (operations/puppet)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/115151 Change subject: Log Elasticsearch hot_threads .. Log Elasticsearch hot_threads Logs them once every five minutes when under low load and once every minute when load goes above half of CPUs. Change-Id: I436c91a60bcc93d6b8ca6c40409784b6649f0916 --- M manifests/role/elasticsearch.pp A modules/elasticsearch/files/elasticsearch_hot_threads_logger.py A modules/elasticsearch/manifests/hot-threads-log.pp 3 files changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/115151/1 diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp index f0a8be6..074207e 100644 --- a/manifests/role/elasticsearch.pp +++ b/manifests/role/elasticsearch.pp @@ -65,5 +65,6 @@ deployment::target { 'elasticsearchplugins': } include ::elasticsearch::ganglia +include ::elasticsearch::hot-threads-log include ::elasticsearch::nagios::check } diff --git a/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py b/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py new file mode 100644 index 000..a4a09f1 --- /dev/null +++ b/modules/elasticsearch/files/elasticsearch_hot_threads_logger.py @@ -0,0 +1,33 @@ +# Quick and dirty script to print hot_threads once then again every minute if +# the load average is more than half the number of CPUs. It scans for 5 +# minutes then exits. Cron it to run every five minutes and you'll get +# periodic snapshots of the hot_threads with more frequent ones under load. + +from os import getloadavg +from multiprocessing import cpu_count +from time import gmtime, sleep, strftime, time +from sys import stdout +from urllib import urlopen + + +def print_hot_threads(): +print(strftime("%Y-%m-%d %H:%M:%S", gmtime())) +hot_threads = urlopen('http://localhost:9200/_nodes/_local/hot_threads') +try: +for line in hot_threads.readlines(): +stdout.write(line) +stdout.flush() +finally: +hot_threads.close() + + +print_hot_threads() +end = time() + 5 * 60 +max_load = cpu_count() / 2.0 +while time() < end: +one_minute_load = getloadavg()[0] +if one_minute_load > max_load: +print("Load average: %s" % one_minute_load) +print_hot_threads() +sleep(50) +sleep(10) diff --git a/modules/elasticsearch/manifests/hot-threads-log.pp b/modules/elasticsearch/manifests/hot-threads-log.pp new file mode 100644 index 000..a091af4 --- /dev/null +++ b/modules/elasticsearch/manifests/hot-threads-log.pp @@ -0,0 +1,26 @@ +# == Class: elasticsearch::hot-threads-log +# +# Install a cron job to log the hot threads. +# +class elasticsearch::hot-threads-log { +$script_name = 'elasticsearch_hot_threads_logger.py' +$script = "/usr/local/bin/$script_name" +$log = '/var/log/elasticsearch/elasticsearch_hot_threads.log' +file { $script: +ensure => file, +owner => root, +group => root, +source => "puppet:///modules/elasticsearch/$script_name", +mode => '0555', +} + +cron { 'elasticsearch-hot-threads-log': +command => "python $script 2>&1 >> $log", +require => Package[elasticsearch], #So the destination directory exists +user=> elasticsearch, +minute => '*/5', +} + +# The logrotate configuration for Elasticsearch will roll these logs just +# fine. +} -- To view, visit https://gerrit.wikimedia.org/r/115151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I436c91a60bcc93d6b8ca6c40409784b6649f0916 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Crats should not add users to import on frwiktionary - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/115152 Change subject: Crats should not add users to import on frwiktionary .. Crats should not add users to import on frwiktionary This patch removes the ability to add users to, and remove from, the 'import' group from bureaucrats on the French Wiktionary. This ability was granted to bureaucrats in bug 23545, apparently by mistake. Removal requested by steward Quentinv57; see bug for more information. Bug: 61829 Change-Id: Ic17196c5699c5200ea2a6bdbf0470d41a63b9306 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/52/115152/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cc877f0..f1a48b1 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7879,7 +7879,7 @@ 'sysop' => array( 'patroller' ), ), '+frwiktionary' => array( - 'bureaucrat' => array( 'accountcreator', 'import', 'patroller', 'transwiki', 'autopatrolled', 'confirmed', 'abusefilter', 'botadmin' ), + 'bureaucrat' => array( 'accountcreator', 'patroller', 'transwiki', 'autopatrolled', 'confirmed', 'abusefilter', 'botadmin' ), ), '+gawiki' => array( 'sysop' => array( 'rollbacker' ), @@ -8359,7 +8359,7 @@ 'sysop' => array( 'patroller' ), ), '+frwiktionary' => array( - 'bureaucrat' => array( 'accountcreator', 'import', 'patroller', 'transwiki', 'autopatrolled', 'confirmed', 'abusefilter', 'botadmin' ), + 'bureaucrat' => array( 'accountcreator', 'patroller', 'transwiki', 'autopatrolled', 'confirmed', 'abusefilter', 'botadmin' ), ), '+gawiki' => array( 'sysop' => array( 'rollbacker' ), -- To view, visit https://gerrit.wikimedia.org/r/115152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic17196c5699c5200ea2a6bdbf0470d41a63b9306 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable web fonts by default on Hebrew Wikisource - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/115153 Change subject: Enable web fonts by default on Hebrew Wikisource .. Enable web fonts by default on Hebrew Wikisource Doing just that; see bug for URL with on-wiki consensus for the change. Bug: 60939 Change-Id: I7b6e5c2d73171c76a3a068c33bcb2825bfebe4dc --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/53/115153/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cc877f0..5539657 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12712,6 +12712,7 @@ // Whether web fonts are enabled *by default* 'wmgULSWebfontsEnabled' => array( 'default' => false, + 'hewikisource' => true, // bug 60939 ), 'wmgULSEventLogging' => array( -- To view, visit https://gerrit.wikimedia.org/r/115153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b6e5c2d73171c76a3a068c33bcb2825bfebe4dc Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder 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 and rewrite PageGenerator's query string - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix and rewrite PageGenerator's query string .. Fix and rewrite PageGenerator's query string The old code has a flaw when, for example, iiprop is in kwargs. Instead of "xxx|timestamp|...", the query string will be "xxxtimestamp|..." which is wrong. This patch fixes the problem and remove redundancy of the code. Change-Id: I7d496a612d32c70ccb53d2cdcf95cc036944d808 --- M pywikibot/data/api.py 1 file changed, 11 insertions(+), 18 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index a574935..45c5d04 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -769,27 +769,20 @@ version of each Page (default False) """ +def appendParams(params, key, value): +if key in params: +params[key] += '|' + value +else: +params[key] = value # get some basic information about every page generated -if 'prop' in kwargs: -kwargs['prop'] += "|info|imageinfo|categoryinfo" -else: -kwargs['prop'] = 'info|imageinfo|categoryinfo' +appendParams(kwargs, 'prop', 'info|imageinfo|categoryinfo') if g_content: # retrieve the current revision -kwargs['prop'] += "|revisions" -if "rvprop" in kwargs: -kwargs["rvprop"] += "ids|timestamp|flags|comment|user|content" -else: -kwargs["rvprop"] = "ids|timestamp|flags|comment|user|content" -if "inprop" in kwargs: -if "protection" not in kwargs["inprop"]: -kwargs["inprop"] += "|protection" -else: -kwargs['inprop'] = 'protection' -if "iiprop" in kwargs: -kwargs["iiprop"] += 'timestamp|user|comment|url|size|sha1|metadata' -else: -kwargs['iiprop'] = 'timestamp|user|comment|url|size|sha1|metadata' +appendParams(kwargs, 'prop', 'revisions') +appendParams(kwargs, 'rvprop', 'ids|timestamp|flags|comment|user|content') +if not ('inprop' in kwargs and 'protection' in kwargs['inprop']): +appendParams(kwargs, 'inprop', 'protection') +appendParams(kwargs, 'iiprop', 'timestamp|user|comment|url|size|sha1|metadata') QueryGenerator.__init__(self, generator=generator, **kwargs) self.resultkey = "pages" # element to look for in result -- To view, visit https://gerrit.wikimedia.org/r/114949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d496a612d32c70ccb53d2cdcf95cc036944d808 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Nullzero Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Mpaa Gerrit-Reviewer: Pyfisch Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DHCP configuration for private1-d-eqiad - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/115154 Change subject: DHCP configuration for private1-d-eqiad .. DHCP configuration for private1-d-eqiad Adding the dhcpd.conf Change-Id: I3bae7614fbdd938e341ba6ab4822e7e47dd5562b --- M modules/install-server/files/dhcpd/dhcpd.conf 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/115154/1 diff --git a/modules/install-server/files/dhcpd/dhcpd.conf b/modules/install-server/files/dhcpd/dhcpd.conf index 9c956e2..bc55fe2 100644 --- a/modules/install-server/files/dhcpd/dhcpd.conf +++ b/modules/install-server/files/dhcpd/dhcpd.conf @@ -184,6 +184,17 @@ next-server 208.80.154.10; # carbon (tftp server) } +# private1-d-eqiad +subnet 10.64.48.0 netmask 255.255.252.0 { + authoritative; + + option subnet-mask 255.255.252.0; + option broadcast-address 10.64.51.255; + option routers 10.64.48.1; + option domain-name "eqiad.wmnet"; + + next-server 208.80.154.10; # carbon (tftp server) +} # labs-hosts1-b-eqiad subnet subnet 10.64.20.0 netmask 255.255.255.0 { -- To view, visit https://gerrit.wikimedia.org/r/115154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bae7614fbdd938e341ba6ab4822e7e47dd5562b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly format commons links with spaces - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Correctly format commons links with spaces .. Correctly format commons links with spaces Spaces should be replaced with underscores in URLs, underscores should be replaced with spaces for link texts, plus signs should stay what they are. Using Title here is probably not completely sane since it takes the local configuration into account. It works, though. Bug: 61738 Bug: 45046 Change-Id: I4cac81188e5a09bd1a4cbf5ccdf3c579fce9821a --- M lib/includes/formatters/CommonsLinkFormatter.php M lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php M repo/tests/phpunit/includes/api/FormatSnakValueTest.php 4 files changed, 33 insertions(+), 7 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/lib/includes/formatters/CommonsLinkFormatter.php b/lib/includes/formatters/CommonsLinkFormatter.php index 254246c..d406216 100644 --- a/lib/includes/formatters/CommonsLinkFormatter.php +++ b/lib/includes/formatters/CommonsLinkFormatter.php @@ -5,6 +5,7 @@ use DataValues\StringValue; use Html; use InvalidArgumentException; +use Title; use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; @@ -49,9 +50,14 @@ } $fileName = $value->getValue(); + // We are using NS_MAIN only because makeTitleSafe requires a valid namespace + // We cannot use makeTitle because it does not secureAndSplit() + $title = Title::makeTitleSafe( NS_MAIN, $fileName ); - $attributes = array_merge( $this->attributes, array( 'href' => '//commons.wikimedia.org/wiki/' . wfUrlencode( 'File:' . $fileName ) ) ); - $html = Html::element( 'a', $attributes, $fileName ); + $attributes = array_merge( $this->attributes, array( + 'href' => '//commons.wikimedia.org/wiki/' . 'File:' . $title->getPartialURL() + ) ); + $html = Html::element( 'a', $attributes, $title->getText() ); return $html; } diff --git a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php index f816ffb..7fd4a0d 100644 --- a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php +++ b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php @@ -25,9 +25,29 @@ return array( array( - new StringValue( 'example.jpg' ), + new StringValue( 'example.jpg' ), // Lower-case file name $options, - '@.*example.jpg.*@' + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example.jpg' ), + $options, + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example space.jpg' ), + $options, + '@.*Example space.jpg.*@' + ), + array( + new StringValue( 'Example_underscore.jpg' ), + $options, + '@.*Example underscore.jpg.*@' + ), + array( + new StringValue( 'Example+plus.jpg' ), + $options, + '@.*Example\+plus.jpg.*@' ), ); } diff --git a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php index ccfde58..2a268db 100644 --- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php +++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php @@ -125,8 +125,8 @@ 'commons link' => array( SnakFormatter::FORMAT_HTML, $options, - new StringValue( 'example.jpg' ), - '@^example\\.jpg$@', + new StringValue( 'Example.jpg' ), + '@^Example\\.jpg$@', 'commonsMedia' ), ); diff --git a/repo/tests/phpunit/includes/api/FormatSnakValueTest.php b/repo/tests/phpunit/includes/api/FormatSnakValueTest.php index 3f4e196..4c70191 100644 --- a/repo/tests/phpunit/includes/api/FormatSnakValueTest.php +++ b/repo/tests/ph
[MediaWiki-commits] [Gerrit] Add 'preview' functionality - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/115158 Change subject: Add 'preview' functionality .. Add 'preview' functionality - Tapping save first takes you to preview, and then tapping again actually saves. This might be changed in the future Change-Id: Ic356af5878e3a177706f307b56ac5855534fc19c --- A wikipedia/assets/preview.css A wikipedia/assets/preview.html A wikipedia/assets/preview.js M wikipedia/res/layout/activity_edit_section.xml A wikipedia/res/layout/fragment_preview_edit.xml M wikipedia/res/values/strings.xml A wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java M www/Gruntfile.js A www/js/preview.js A www/preview.css A www/preview.html A www/preview.js 13 files changed, 568 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/58/115158/1 diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css new file mode 100644 index 000..3124f5c --- /dev/null +++ b/wikipedia/assets/preview.css @@ -0,0 +1,114 @@ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url(fonts/OpenSans.ttf) format('truetype'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), url(fonts/OpenSans-Bold.ttf) format('truetype'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), url(fonts/OpenSans-Italic.ttf) format('truetype'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 700; + src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(fonts/OpenSans-BoldItalic.ttf) format('truetype'); +} + +/* Should be moved out to the MobileApp extension at some point */ +body { + background-color: #F2F2F2; + color: #333; + font-family: "Open Sans", sans-serif; + font-size: 16px; + line-height: 160%; + margin: 0; + padding: 0; + margin-top: 48px; +} +#content { + padding: 8px 24px; +} +a { + color: #347BFF; + text-decoration: none; +} +/* Headers */ +h1 { + font-family: serif; + color: #064AAD; + font-size: 26px; + line-height: 36px; + margin-bottom: 24px; + font-weight: bold; +} +h2, +h3, +h4, +h5, +h6 { + font-family: "Open Sans", sans-serif; +} +h2 { + font-size: 22px; +} +h3 { + font-size: 20px; +} +h4 { + font-size: 18px; +} +h5, +h6 { + font-size: 16px; +} +/* Basic Thumbnails */ +.thumb { + /* Don't stick thumbnails to the text above and below it */ + margin: 8px 0px; + /* Align everything inside a thumbnail to be centered */ + text-align: center; +} +.thumb .thumbinner { + /* Make sure that thumb takes up full width */ + width: 100% !important; +} +.thumb .magnify { + display: none; + /* Our parser is STUPID */ +} +.thumb .noresize { + overflow-x: auto; + /* Scrollbars for images that shouldn't be squished */ +} +/* Makes sure that we don't have horizontal scrollbars for the entire page because + an image is too wide to fit in to the current viewport */ +img { + max-width: 100% !important; + height: auto !important; +} +/* Basic tables */ +table { + width: 100% !important; + overflow-x: auto; + display: block; + border: 1px solid #ccc; + margin-top: 4px; + margin-bottom: 4px; +} +/* Last updated info */ +#attribution { + border-top: 1px solid #ccc; + padding: 8px; + text-align: center; + color: #888; + font-size: 80%; +} diff --git a/wikipedia/assets/preview.html b/wikipedia/assets/preview.html new file mode 100644 index 000..7f72815 --- /dev/null +++ b/wikipedia/assets/preview.html @@ -0,0 +1,13 @@ + + + +https://wikipedia.org"; /> + + + + + + + + + \ No newline at end of file diff --git a/wikipedia/assets/preview.js b/wikipedia/assets/preview.js new file mode 100644 index 000..da569cf --- /dev/null +++ b/wikipedia/assets/preview.js @@ -0,0 +1,80 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)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=="function"&&require;for(var o=0;o + + diff --git a/wikipedia/res/layout/fragment_preview_edit.xml b/wikipedia/res/layout/fragment_preview_edit.xml new file mode 100644 index 000..6289500 --- /dev/null +++ b/wikipedia/res/layout/fragment_preview_edit.xml @@ -0,0 +1,16 @@ + + +http://schemas.android.com/apk/res/android"; + android:id="@+id/edit_preview_container" + android:orientation="vertical" + android:layout_
[MediaWiki-commits] [Gerrit] Cleanup webviews when we no longer require them - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/115159 Change subject: Cleanup webviews when we no longer require them .. Cleanup webviews when we no longer require them Change-Id: I55f3d58b80887131d76f71288d05d34833b82d6f --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/59/115159/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index 41461b9..8c5e16a 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -320,4 +320,10 @@ } return false; } + +@Override +public void onDestroyView() { +super.onDestroyView(); +webView.destroy(); +} } -- To view, visit https://gerrit.wikimedia.org/r/115159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55f3d58b80887131d76f71288d05d34833b82d6f Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require at least 0.3.2 of ValueView - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/115160 Change subject: Require at least 0.3.2 of ValueView .. Require at least 0.3.2 of ValueView Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/115160/1 diff --git a/composer.json b/composer.json index eef6eeb..d41cc26 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "data-values/data-types": "~0.1", "data-values/serialization": "~0.1", "data-values/javascript": "~0.3", - "data-values/value-view": "~0.3", + "data-values/value-view": "~0.3,>=0.3.2", "wikibase/data-model": "0.6.*", "diff/diff": ">=0.9", "wikibase/easyrdf_lite": "*" -- To view, visit https://gerrit.wikimedia.org/r/115160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move $wgValueParsers to repo - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/115161 Change subject: move $wgValueParsers to repo .. move $wgValueParsers to repo only used by wbparsevalue api module in repo Change-Id: I131ab938fb3ff21f9d1108aaf3bfeccc4a584297 --- M lib/WikibaseLib.php M repo/Wikibase.php 2 files changed, 26 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/61/115161/1 diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index 77757cf..e3b3581 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -44,7 +44,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgExtensionMessagesFiles; - global $wgValueParsers, $wgJobClasses, $wgHooks, $wgResourceModules; + global $wgJobClasses, $wgHooks, $wgResourceModules; $wgExtensionCredits['wikibase'][] = array( 'path' => __DIR__, @@ -61,30 +61,6 @@ // i18n $wgExtensionMessagesFiles['WikibaseLib'] = __DIR__ . '/WikibaseLib.i18n.php'; - - // This is somewhat hackish, make WikibaseValueParserBuilders, analogous to WikibaseValueFormatterBuilders - $wgValueParsers['wikibase-entityid'] = function( ValueParsers\ParserOptions $options ) { - //TODO: make ID builders configurable. - $builders = \Wikibase\DataModel\Entity\BasicEntityIdParser::getBuilders(); - return new \Wikibase\Lib\EntityIdValueParser( - new \Wikibase\DataModel\Entity\DispatchingEntityIdParser( $builders, $options ), - $options - ); - }; - - $wgValueParsers['quantity'] = function( ValueParsers\ParserOptions $options ) { - $unlocalizer = new Wikibase\Lib\MediaWikiNumberUnlocalizer(); - return new \ValueParsers\QuantityParser( - new \ValueParsers\DecimalParser( $options, $unlocalizer ), - $options ); - }; - - $wgValueParsers['bool'] = 'ValueParsers\BoolParser'; - $wgValueParsers['float'] = 'ValueParsers\FloatParser'; - $wgValueParsers['globecoordinate'] = 'ValueParsers\GlobeCoordinateParser'; - $wgValueParsers['int'] = 'ValueParsers\IntParser'; - $wgValueParsers['null'] = 'ValueParsers\NullParser'; - $wgValueParsers['decimal'] = 'ValueParsers\DecimalParser'; $wgJobClasses['ChangeNotification'] = 'Wikibase\ChangeNotificationJob'; $wgJobClasses['UpdateRepoOnMove'] = 'Wikibase\UpdateRepoOnMoveJob'; diff --git a/repo/Wikibase.php b/repo/Wikibase.php index ad7028f..39fa782 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -37,7 +37,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgGroupPermissions, $wgExtensionMessagesFiles; global $wgAPIModules, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgContentHandlers; - global $wgWBStores, $wgWBRepoSettings, $wgResourceModules; + global $wgWBStores, $wgWBRepoSettings, $wgResourceModules, $wgValueParsers; $wgExtensionCredits['wikibase'][] = array( 'path' => __DIR__, @@ -78,6 +78,30 @@ $wgExtensionMessagesFiles['WikibaseAlias'] = __DIR__ . '/Wikibase.i18n.alias.php'; $wgExtensionMessagesFiles['WikibaseNS'] = __DIR__ . '/Wikibase.i18n.namespaces.php'; + // This is somewhat hackish, make WikibaseValueParserBuilders, analogous to WikibaseValueFormatterBuilders + $wgValueParsers['wikibase-entityid'] = function( ValueParsers\ParserOptions $options ) { + //TODO: make ID builders configurable. + $builders = \Wikibase\DataModel\Entity\BasicEntityIdParser::getBuilders(); + return new \Wikibase\Lib\EntityIdValueParser( + new \Wikibase\DataModel\Entity\DispatchingEntityIdParser( $builders, $options ), + $options + ); + }; + + $wgValueParsers['quantity'] = function( ValueParsers\ParserOptions $options ) { + $unlocalizer = new Wikibase\Lib\MediaWikiNumberUnlocalizer(); + return new \ValueParsers\QuantityParser( + new \ValueParsers\DecimalParser( $options, $unlocalizer ), + $options ); + }; + + $wgValueParsers['bool'] = 'ValueParsers\BoolParser'; + $wgValueParsers['float'] = 'ValueParsers\FloatParser'; + $wgValueParsers['globecoordinate'] = 'ValueParsers\GlobeCoordinateParser'; + $wgValueParsers['int'] = 'ValueParsers\IntParser'; + $wgValueParsers['null'] = 'ValueParsers\NullParser'; + $wgValueParsers['decimal'] = 'ValueParsers\DecimalParser'; + // API module registration $wgAPIModules['wbgetentities'] = 'Wikibase\Api\GetEntities'; $wgAPIM
[MediaWiki-commits] [Gerrit] contint: bring elasticsearch for browsertests - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115162 Change subject: contint: bring elasticsearch for browsertests .. contint: bring elasticsearch for browsertests CirrusSearch browser tests need Elastic search and redis installed. Change-Id: I2854a2208ec2076721265c0571cfc0da774599b8 --- M manifests/role/ci.pp 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/115162/1 diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index d2235fd..30be89f 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -244,6 +244,25 @@ require => File['/mnt/localhost-browsertests'], } + # For CirrusSearch testing: + class { '::elasticsearch': +multicast_group => , # no multicast on labs :( + master_eligible => , + minimum_master_nodes => , + cluster_name => , + heap_memory => , + plugins_dir => , +} + +class { '::redis': + maxmemory => '128mb', + persist => 'aof', + redis_replication => undef, + password => 'notsecure', + dir => '/var/lib/redis', + auto_aof_rewrite_min_size => '32mb', +} + } class role::ci::slave::labs { -- To view, visit https://gerrit.wikimedia.org/r/115162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2854a2208ec2076721265c0571cfc0da774599b8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove bad instructions - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/115163 Change subject: Remove bad instructions .. Remove bad instructions These are no longer required. Change-Id: I13f7bfd5317b4e14df1d20d6d9f0c5f728f747d1 --- M tests/browser/README 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/63/115163/1 diff --git a/tests/browser/README b/tests/browser/README index 208aca7..d3d50ef 100644 --- a/tests/browser/README +++ b/tests/browser/README @@ -39,9 +39,6 @@ export MW_INSTALL_PATH=/srv/mediawiki pushd $MW_INSTALL_PATH/.. if [ ! -d Elastica ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Elastica; fi - pushd Elastica - git submodule update --init --recursive - popd if [ ! -d CirrusSearch ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CirrusSearch; fi if [ ! -d TimedMediaHandler ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TimedMediaHandler; fi if [ ! -d MwEmbedSupport ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MwEmbedSupport; fi -- To view, visit https://gerrit.wikimedia.org/r/115163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13f7bfd5317b4e14df1d20d6d9f0c5f728f747d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Browser tests jobs for CirrusSearch - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115164 Change subject: Browser tests jobs for CirrusSearch .. Browser tests jobs for CirrusSearch Generates: mwext-browsertests-CirrusSearch-firefox mwext-browsertests-CirrusSearch-phantomjs Will need some tweaks though. Change-Id: Ia86ec5ff13a61b45e1613984148b42f908790081 --- M mediawiki-extensions.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/64/115164/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 93df6b2..815827e 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -659,7 +659,7 @@ - phantomjs #- chromium # Unsupported by Watir yet (bug 61262) ext-name: - #- CirrusSearch + - CirrusSearch #- ContentTranslation - Flow - MobileFrontend -- To view, visit https://gerrit.wikimedia.org/r/115164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia86ec5ff13a61b45e1613984148b42f908790081 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DHCP configurations for eqiad Row D - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: DHCP configurations for eqiad Row D .. DHCP configurations for eqiad Row D Adding the dhcpd.conf needed stanzas Adding autoinstall subnets (private1-d-eqiad was already there) Adding autoinstall public subnet for row C that was missing Updating preseed.cfg as well Change-Id: I3bae7614fbdd938e341ba6ab4822e7e47dd5562b --- M modules/install-server/files/autoinstall/netboot.cfg A modules/install-server/files/autoinstall/subnets/public1-c-eqiad.cfg A modules/install-server/files/autoinstall/subnets/public1-d-eqiad.cfg M modules/install-server/files/dhcpd/dhcpd.conf 4 files changed, 51 insertions(+), 0 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install-server/files/autoinstall/netboot.cfg b/modules/install-server/files/autoinstall/netboot.cfg index 5ff1bb5..4ff407a 100755 --- a/modules/install-server/files/autoinstall/netboot.cfg +++ b/modules/install-server/files/autoinstall/netboot.cfg @@ -18,6 +18,8 @@ 10.4.16.255) echo subnets/pmtpa-virt.cfg ;; \ 208.80.154.63) echo subnets/public1-a-eqiad.cfg ;; \ 208.80.154.191) echo subnets/public1-b-eqiad.cfg ;; \ + 208.80.154.127) echo subnets/public1-c-eqiad.cfg ;; \ + 208.80.155.127) echo subnets/public1-d-eqiad.cfg ;; \ 208.80.155.79) echo subnets/sandbox1-b-eqiad.cfg ;; \ 10.64.3.255) echo subnets/private1-a-eqiad.cfg ;; \ 10.64.19.255) echo subnets/private1-b-eqiad.cfg ;; \ diff --git a/modules/install-server/files/autoinstall/subnets/public1-c-eqiad.cfg b/modules/install-server/files/autoinstall/subnets/public1-c-eqiad.cfg new file mode 100644 index 000..7087b72 --- /dev/null +++ b/modules/install-server/files/autoinstall/subnets/public1-c-eqiad.cfg @@ -0,0 +1,13 @@ +# subnet specific configuration settings + +# get_domain should be set, get_hostname is overwritten by DHCP +d-inetcfg/get_domain string wikimedia.org + +# ip address is taken from DHCP, rest is set here +d-inetcfg/get_netmask string 255.255.255.192 +d-inetcfg/get_gateway string 208.80.154.65 +d-inetcfg/get_nameservers string 208.80.154.239 208.80.152.131 +d-inetcfg/confirm_static boolean true + +# NTP +d-iclock-setup/ntp-server string ntp.eqiad.wmnet diff --git a/modules/install-server/files/autoinstall/subnets/public1-d-eqiad.cfg b/modules/install-server/files/autoinstall/subnets/public1-d-eqiad.cfg new file mode 100644 index 000..90f8eca --- /dev/null +++ b/modules/install-server/files/autoinstall/subnets/public1-d-eqiad.cfg @@ -0,0 +1,13 @@ +# subnet specific configuration settings + +# get_domain should be set, get_hostname is overwritten by DHCP +d-inetcfg/get_domain string wikimedia.org + +# ip address is taken from DHCP, rest is set here +d-inetcfg/get_netmask string 255.255.255.224 +d-inetcfg/get_gateway string 208.80.155.97 +d-inetcfg/get_nameservers string 208.80.154.239 208.80.152.131 +d-inetcfg/confirm_static boolean true + +# NTP +d-iclock-setup/ntp-server string ntp.eqiad.wmnet diff --git a/modules/install-server/files/dhcpd/dhcpd.conf b/modules/install-server/files/dhcpd/dhcpd.conf index 9c956e2..51549d1 100644 --- a/modules/install-server/files/dhcpd/dhcpd.conf +++ b/modules/install-server/files/dhcpd/dhcpd.conf @@ -136,6 +136,18 @@ next-server 208.80.154.10; # carbon (tftp server) } +# public1-d-eqiad +subnet 208.80.155.96 netmask 255.255.255.224 { + authoritative; + + option subnet-mask 255.255.255.224; + option broadcast-address 208.80.155.127; + option routers 208.80.155.97; + option domain-name "wikimedia.org"; + + next-server 208.80.154.10; # carbon (tftp server) +} + # sandbox1-b-eqiad subnet 208.80.155.64 netmask 255.255.255.240 { authoritative; @@ -184,6 +196,17 @@ next-server 208.80.154.10; # carbon (tftp server) } +# private1-d-eqiad +subnet 10.64.48.0 netmask 255.255.252.0 { + authoritative; + + option subnet-mask 255.255.252.0; + option broadcast-address 10.64.51.255; + option routers 10.64.48.1; + option domain-name "eqiad.wmnet"; + + next-server 208.80.154.10; # carbon (tftp server) +} # labs-hosts1-b-eqiad subnet subnet 10.64.20.0 netmask 255.255.255.0 { -- To view, visit https://gerrit.wikimedia.org/r/115154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3bae7614fbdd938e341ba6ab4822e7e47dd5562b Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailin
[MediaWiki-commits] [Gerrit] don't use backend coordinate formatter yet - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/115165 Change subject: don't use backend coordinate formatter yet .. don't use backend coordinate formatter yet it's not quite as good or the same yet as the frontend formatter Change-Id: I9a8bb4dfb0e3bffc2846efb0b089bdf284d6aeea --- M repo/resources/wikibase.ui.scrapeFormattedValues.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/115165/1 diff --git a/repo/resources/wikibase.ui.scrapeFormattedValues.js b/repo/resources/wikibase.ui.scrapeFormattedValues.js index 91ceb96..d993f57 100644 --- a/repo/resources/wikibase.ui.scrapeFormattedValues.js +++ b/repo/resources/wikibase.ui.scrapeFormattedValues.js @@ -15,7 +15,7 @@ // re-constructing the DOM in JavaScript. var DATA_VALUE_TYPES_TO_SCRAPE = [ - 'globecoordinate', +// 'globecoordinate', 'quantity', 'string', 'wikibase-entityid' -- To view, visit https://gerrit.wikimedia.org/r/115165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a8bb4dfb0e3bffc2846efb0b089bdf284d6aeea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove bad instructions - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Remove bad instructions .. Remove bad instructions Some are outdated and some ask you to do things in the wrong order. Change-Id: I13f7bfd5317b4e14df1d20d6d9f0c5f728f747d1 --- M tests/browser/README 1 file changed, 9 insertions(+), 10 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/README b/tests/browser/README index 208aca7..76f8c64 100644 --- a/tests/browser/README +++ b/tests/browser/README @@ -39,9 +39,6 @@ export MW_INSTALL_PATH=/srv/mediawiki pushd $MW_INSTALL_PATH/.. if [ ! -d Elastica ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Elastica; fi - pushd Elastica - git submodule update --init --recursive - popd if [ ! -d CirrusSearch ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CirrusSearch; fi if [ ! -d TimedMediaHandler ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TimedMediaHandler; fi if [ ! -d MwEmbedSupport ]; then git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MwEmbedSupport; fi @@ -59,13 +56,6 @@ rm /tmp/www-data-crontab sudo apt-get install -y oggvideotools ffmpeg ffmpeg2theora libav-tools libavcodec-extra-53 imagemagick ghostscript xpdf-utils php5-curl php5-redis popd - php CirrusSearch/maintenance/updateSearchIndexConfig.php - php CirrusSearch/maintenance/forceSearchIndex.php --forceUpdate --skipLinks --indexOnSkip - php CirrusSearch/maintenance/forceSearchIndex.php --forceUpdate --skipParse - popd - sudo /etc/init.d/apache2 restart - - Then add this to your LocalSettings.php: require( "$IP/extensions/Elastica/Elastica.php" ); require( "$IP/extensions/CirrusSearch/CirrusSearch.php" ); @@ -80,6 +70,15 @@ $wgDebugLogFile = '/tmp/mw-log'; $wgCapitalLinks = false; +Finally, go back to the console: + php CirrusSearch/maintenance/updateSearchIndexConfig.php + php CirrusSearch/maintenance/forceSearchIndex.php --forceUpdate --skipLinks --indexOnSkip + php CirrusSearch/maintenance/forceSearchIndex.php --forceUpdate --skipParse + popd + sudo /etc/init.d/apache2 restart + + + Replace: $wgUseInstantCommons = false with -- To view, visit https://gerrit.wikimedia.org/r/115163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13f7bfd5317b4e14df1d20d6d9f0c5f728f747d1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] don't use backend coordinate formatter yet - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: don't use backend coordinate formatter yet .. don't use backend coordinate formatter yet it's not quite as good or the same yet as the frontend formatter Change-Id: I9a8bb4dfb0e3bffc2846efb0b089bdf284d6aeea --- M repo/resources/wikibase.ui.scrapeFormattedValues.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/resources/wikibase.ui.scrapeFormattedValues.js b/repo/resources/wikibase.ui.scrapeFormattedValues.js index 91ceb96..10a378a 100644 --- a/repo/resources/wikibase.ui.scrapeFormattedValues.js +++ b/repo/resources/wikibase.ui.scrapeFormattedValues.js @@ -15,7 +15,8 @@ // re-constructing the DOM in JavaScript. var DATA_VALUE_TYPES_TO_SCRAPE = [ - 'globecoordinate', + // backend coordinate formatter is not ready, as of 24 Feb 2014 + // 'globecoordinate', 'quantity', 'string', 'wikibase-entityid' -- To view, visit https://gerrit.wikimedia.org/r/115165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a8bb4dfb0e3bffc2846efb0b089bdf284d6aeea Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Better way to detect CORS support - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/115166 Change subject: Better way to detect CORS support .. Better way to detect CORS support The old technique doesn't work in Firefox and doesn't always work in Chrome depending on when you call it. https://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/ Change-Id: I0a9d6b5654efb169860ddf7e5e0551efb825920c --- M resources/mmv/provider/mmv.provider.Image.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/66/115166/1 diff --git a/resources/mmv/provider/mmv.provider.Image.js b/resources/mmv/provider/mmv.provider.Image.js index ee9a2f9..e257c74 100644 --- a/resources/mmv/provider/mmv.provider.Image.js +++ b/resources/mmv/provider/mmv.provider.Image.js @@ -104,7 +104,8 @@ */ Image.prototype.imagePreloadingSupported = function () { // FIXME this is a *very* rough guess, but it'll work as the first estimation. - return 'crossOrigin' in new Image(); + + return 'withCredentials' in new XMLHttpRequest(); }; mw.mmv.provider.Image = Image; -- To view, visit https://gerrit.wikimedia.org/r/115166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a9d6b5654efb169860ddf7e5e0551efb825920c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add partial login method for browsertests login regression test - change (mediawiki/selenium)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/115167 Change subject: add partial login method for browsertests login regression test .. add partial login method for browsertests login regression test Change-Id: I45a50fcf034cdf3949157d00c8ed657f14aa4283 --- M lib/mediawiki_selenium/support/pages/login_page.rb 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/67/115167/1 diff --git a/lib/mediawiki_selenium/support/pages/login_page.rb b/lib/mediawiki_selenium/support/pages/login_page.rb index ce8b615..e403d51 100644 --- a/lib/mediawiki_selenium/support/pages/login_page.rb +++ b/lib/mediawiki_selenium/support/pages/login_page.rb @@ -34,4 +34,10 @@ login_element.when_present.click logout_link_element.when_present end + def partial_login_with(username, password) +self.username_element.when_present.send_keys(username) +self.password_element.when_present.send_keys(password) +login_element.fire_event("onfocus") +login_element.when_present.click + end end -- To view, visit https://gerrit.wikimedia.org/r/115167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45a50fcf034cdf3949157d00c8ed657f14aa4283 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use partial login from https://gerrit.wikimedia.org/r/#/c/11... - change (qa/browsertests)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/115168 Change subject: use partial login from https://gerrit.wikimedia.org/r/#/c/115167/ .. use partial login from https://gerrit.wikimedia.org/r/#/c/115167/ Change-Id: Iae1aa20e695ec865b49cd577efbfdb36b07ecd3a --- M tests/browser/features/step_definitions/login_steps.rb 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/68/115168/1 diff --git a/tests/browser/features/step_definitions/login_steps.rb b/tests/browser/features/step_definitions/login_steps.rb index d90b119..45cae16 100644 --- a/tests/browser/features/step_definitions/login_steps.rb +++ b/tests/browser/features/step_definitions/login_steps.rb @@ -14,16 +14,16 @@ end When(/^I log in with incorrect password$/) do - on(LoginPage).login_with(ENV["MEDIAWIKI_USER"], "incorrect password") + on(LoginPage).partial_login_with(ENV["MEDIAWIKI_USER"], "incorrect password") end When(/^I log in with incorrect username$/) do - on(LoginPage).login_with("incorrect username", ENV["MEDIAWIKI_PASSWORD"]) + on(LoginPage).partial_login_with("incorrect username", ENV["MEDIAWIKI_PASSWORD"]) end When(/^I log in without entering credentials$/) do - on(LoginPage).login_with("", "") + on(LoginPage).partial_login_with("", "") end When(/^I log in without entering password$/) do - on(LoginPage).login_with(ENV["MEDIAWIKI_USER"], "") + on(LoginPage).partial_login_with(ENV["MEDIAWIKI_USER"], "") end When(/^Log in as (.+)$/) do |username| on(LoginPage).login_with(username, ENV["MEDIAWIKI_PASSWORD"]) -- To view, visit https://gerrit.wikimedia.org/r/115168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae1aa20e695ec865b49cd577efbfdb36b07ecd3a Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ticking 'Search in all namespaces' in prefs should disable o... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Ticking 'Search in all namespaces' in prefs should disable other checkboxes .. Ticking 'Search in all namespaces' in prefs should disable other checkboxes Ticking 'Search in all namespaces' will disable all other checkboxes below. They will regain their original state once it is unticked. Bug: 60285 Change-Id: Ie62b9186e98dd770de4282ea57d7248158a6e782 --- M resources/mediawiki.special/mediawiki.special.preferences.js 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mediawiki.special/mediawiki.special.preferences.js b/resources/mediawiki.special/mediawiki.special.preferences.js index 0078724..7f1fd43 100644 --- a/resources/mediawiki.special/mediawiki.special.preferences.js +++ b/resources/mediawiki.special/mediawiki.special.preferences.js @@ -4,7 +4,8 @@ jQuery( function ( $ ) { var $preftoc, $preferences, $fieldsets, $legends, hash, labelFunc, - $tzSelect, $tzTextbox, $localtimeHolder, servertime; + $tzSelect, $tzTextbox, $localtimeHolder, servertime, + $checkBoxes; labelFunc = function () { return this.id.replace( /^mw-prefsection/g, 'preftab' ); @@ -253,4 +254,18 @@ sessionStorage.setItem( 'mediawikiPreferencesTab', storageData ); } ); } + + // To disable all 'namespace' checkboxes in Search preferences + // when 'Search in all namespaces' checkbox is ticked. + $checkBoxes = $( '#mw-htmlform-advancedsearchoptions input[id^=mw-input-wpsearchnamespaces]' ); + if ( $( '#mw-input-wpsearcheverything' ).prop( 'checked' ) ) { + $checkBoxes.prop( 'disabled', true ); + } + $( '#mw-input-wpsearcheverything' ).change( function () { + if ( $( this ).prop( 'checked' ) ) { + $checkBoxes.prop( 'disabled', true ); + } else { + $checkBoxes.prop( 'disabled', false ); + } + } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/110610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie62b9186e98dd770de4282ea57d7248158a6e782 Gerrit-PatchSet: 15 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: Technical 13 Gerrit-Reviewer: Umherirrender 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 possible error list for action=query&list=blocks - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix possible error list for action=query&list=blocks .. Fix possible error list for action=query&list=blocks possible errors for requireMaxOneParameter are generated with getRequireMaxOneParameterErrorMessages, not getRequireOnlyOneParameterErrorMessages Change-Id: Ia3d705ddf2f2d969b3112962a13f27dc9a106037 --- M includes/api/ApiQueryBlocks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 57f76bc..47768cb 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -415,7 +415,7 @@ global $wgBlockCIDRLimit; return array_merge( parent::getPossibleErrors(), - $this->getRequireOnlyOneParameterErrorMessages( array( 'users', 'ip' ) ), + $this->getRequireMaxOneParameterErrorMessages( array( 'users', 'ip' ) ), array( array( 'code' => 'cidrtoobroad', -- To view, visit https://gerrit.wikimedia.org/r/112734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3d705ddf2f2d969b3112962a13f27dc9a106037 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Anomie Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fetch-mw-ext: fallback to git.wikimedia.org zip - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115169 Change subject: fetch-mw-ext: fallback to git.wikimedia.org zip .. fetch-mw-ext: fallback to git.wikimedia.org zip When adding extension dependencies on a labs instance we do not have access to /srv/ssd/gerrit, so fallback to git.wikimedia.org tarballs. Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e --- M tools/fetch-mw-ext 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/69/115169/1 diff --git a/tools/fetch-mw-ext b/tools/fetch-mw-ext index 8486249..ee52f10 100755 --- a/tools/fetch-mw-ext +++ b/tools/fetch-mw-ext @@ -28,11 +28,17 @@ # Recreate the directory for 'git archive' mkdir -p "$DEST" - echo "Copying '$1' in '$DEST'" - echo "Git archive of 'master' from $GIT_BARE_DIR" - git archive --remote="$GIT_BARE_DIR" master \ - | (cd "$DEST" && tar xf -) - echo "Copy complete." + if [ -d "$GIT_BARE_DIR" ]; then + echo "Copying '$1' in '$DEST'" + echo "Git archive of 'master' from $GIT_BARE_DIR" + git archive --remote="$GIT_BARE_DIR" master \ + | (cd "$DEST" && tar xf -) + echo "Copy complete." + else + echo "Getting tarball of '$1' from git.wikimedia.org to '$DEST'" + curl "https://git.wikimedia.org/zip/?r=mediawiki/extensions/${1}.git&format=gz&h=master"; \ + | (cd "$DEST" && tar xzf -) + fi } # Pre checks -- To view, visit https://gerrit.wikimedia.org/r/115169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fetch-mw-ext: fallback to git.wikimedia.org zip - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: fetch-mw-ext: fallback to git.wikimedia.org zip .. fetch-mw-ext: fallback to git.wikimedia.org zip When adding extension dependencies on a labs instance we do not have access to /srv/ssd/gerrit, so fallback to git.wikimedia.org tarballs. Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e --- M tools/fetch-mw-ext 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tools/fetch-mw-ext b/tools/fetch-mw-ext index 8486249..ee52f10 100755 --- a/tools/fetch-mw-ext +++ b/tools/fetch-mw-ext @@ -28,11 +28,17 @@ # Recreate the directory for 'git archive' mkdir -p "$DEST" - echo "Copying '$1' in '$DEST'" - echo "Git archive of 'master' from $GIT_BARE_DIR" - git archive --remote="$GIT_BARE_DIR" master \ - | (cd "$DEST" && tar xf -) - echo "Copy complete." + if [ -d "$GIT_BARE_DIR" ]; then + echo "Copying '$1' in '$DEST'" + echo "Git archive of 'master' from $GIT_BARE_DIR" + git archive --remote="$GIT_BARE_DIR" master \ + | (cd "$DEST" && tar xf -) + echo "Copy complete." + else + echo "Getting tarball of '$1' from git.wikimedia.org to '$DEST'" + curl "https://git.wikimedia.org/zip/?r=mediawiki/extensions/${1}.git&format=gz&h=master"; \ + | (cd "$DEST" && tar xzf -) + fi } # Pre checks -- To view, visit https://gerrit.wikimedia.org/r/115169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Permissions on test2wiki make this test troublesome - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/115170 Change subject: Permissions on test2wiki make this test troublesome .. Permissions on test2wiki make this test troublesome Change-Id: Id9e914501beb2a5474e2b1e78c5925377d69fbeb --- M tests/browser/features/flow_logged_in.feature 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/70/115170/1 diff --git a/tests/browser/features/flow_logged_in.feature b/tests/browser/features/flow_logged_in.feature index f129483..bfe20b3 100644 --- a/tests/browser/features/flow_logged_in.feature +++ b/tests/browser/features/flow_logged_in.feature @@ -1,4 +1,4 @@ -@test2.wikipedia.org @ee-prototype.wmflabs.org @en.wikipedia.beta.wmflabs.org @login +@ee-prototype.wmflabs.org @en.wikipedia.beta.wmflabs.org @login Feature: Create new topic logged in -- To view, visit https://gerrit.wikimedia.org/r/115170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9e914501beb2a5474e2b1e78c5925377d69fbeb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "don't use backend coordinate formatter yet" - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/115171 Change subject: Revert "don't use backend coordinate formatter yet" .. Revert "don't use backend coordinate formatter yet" instead we need change in value view This reverts commit 3954475954b3b845158202415485272f28c555de. Change-Id: I497aa349c40c175467d2a274bb913fcc3f67ac56 --- M repo/resources/wikibase.ui.scrapeFormattedValues.js 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/71/115171/1 diff --git a/repo/resources/wikibase.ui.scrapeFormattedValues.js b/repo/resources/wikibase.ui.scrapeFormattedValues.js index 10a378a..91ceb96 100644 --- a/repo/resources/wikibase.ui.scrapeFormattedValues.js +++ b/repo/resources/wikibase.ui.scrapeFormattedValues.js @@ -15,8 +15,7 @@ // re-constructing the DOM in JavaScript. var DATA_VALUE_TYPES_TO_SCRAPE = [ - // backend coordinate formatter is not ready, as of 24 Feb 2014 - // 'globecoordinate', + 'globecoordinate', 'quantity', 'string', 'wikibase-entityid' -- To view, visit https://gerrit.wikimedia.org/r/115171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I497aa349c40c175467d2a274bb913fcc3f67ac56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Images: use first alignment, but last size and caption. - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Images: use first alignment, but last size and caption. .. Images: use first alignment, but last size and caption. Note that we don't wt2wt cleanly when multiple conflicting options are present; we drop all but the active one. Failing selser tests are false reports because of wt2wt failures -- selser output is correct. Bug: 48664 Change-Id: I11d27e61f47630861231f72be8328236a9968adc --- M lib/ext.core.LinkHandler.js M lib/mediawiki.WikitextSerializer.js M tests/parserTests-blacklist.js M tests/parserTests.txt 4 files changed, 83 insertions(+), 4 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js index 1bb87e6..b451ba3 100644 --- a/lib/ext.core.LinkHandler.js +++ b/lib/ext.core.LinkHandler.js @@ -1124,9 +1124,9 @@ // For the values of the caption and options, see // getOptionInfo's documentation above. // - // FIXME: If there are multiple captions, this code always - // picks the last entry. Is this the spec? If so, explicitly - // document it here. If not, fix the code. + // If there are multiple captions, this code always + // picks the last entry. This is the spec; see + // "Image with multiple captions" parserTest. if ( oText.constructor !== String || optInfo === null ) { // No valid option found!? // Record for RT-ing @@ -1147,6 +1147,7 @@ if ( optInfo.s === true ) { // Default: Simple image option + if (optInfo.ck in opts) { continue; } // first option wins opts[optInfo.ck] = { v: optInfo.v }; } else { // Map short canonical name to the localized version used. @@ -1154,6 +1155,7 @@ // The MediaWiki magic word for image dimensions is called 'width' // for historical reasons + // Unlike other options, use last-specified width. if ( optInfo.ck === 'width' ) { // We support a trailing 'px' here for historical reasons // (bug 13500, 51628) @@ -1165,6 +1167,7 @@ opts.size.src = oContent.vsrc || optInfo.ak; } } else { + if (optInfo.ck in opts) { continue; } // first option wins opts[optInfo.ck] = { v: optInfo.v, src: oContent.vsrc || optInfo.ak diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index ca40839..be3b66f 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -1700,6 +1700,15 @@ } return outerDP.optList.find(function(o) { return o.ck === key; }); }, + getLastOpt = function(key) { + var o = outerDP.optList || [], i; + for (i=o.length-1; i>=0; i--) { + if (o[i].ck === key) { + return o[i]; + } + } + return null; + }, sizeUnmodified = ww.fromDataMW || (!ww.modified && !wh.modified), upright = getOpt('upright'); @@ -1721,7 +1730,7 @@ } if ( !(outerElt && outerElt.classList.contains('mw-default-size')) ) { - var size = getOpt('width'), + var size = getLastOpt('width'), sizeString = (size && size.ak) || (ww.fromDataMW && ww.value); if (sizeUnmodified && sizeString) { // preserve original width/height string if not touched diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index b8e39b2..aec9323 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -610,6 +610,8 @@ add("wt2wt", "pre-save transform: Signature expansion", "* ~~~\n* ~~~\n* ~~~\n* ~~~"); add("wt2wt", "Allow empty links in image captions (Bug 60753) (parsoid)", "[[File:Foobar.jpg|thumb|Caption [[Link1]]\n[[]]\n[[Link2]]\n]]"); add("wt2wt", "Image with multiple captions -- only last one is accepted (parsoid)", "[[File:Foobar.jpg|right|Caption3 - accepted]]"); +add("wt2wt", "Image with multiple widths -- use last (parsoid)", "[[File:Foobar.jpg|300px|caption]]\n"); +add("wt2wt", "Image with multiple alignments --
[MediaWiki-commits] [Gerrit] Require 0.3.3 ValueView or higher - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Require 0.3.3 ValueView or higher .. Require 0.3.3 ValueView or higher Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index eef6eeb..582790f 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "data-values/data-types": "~0.1", "data-values/serialization": "~0.1", "data-values/javascript": "~0.3", - "data-values/value-view": "~0.3", + "data-values/value-view": "~0.3,>=0.3.3", "wikibase/data-model": "0.6.*", "diff/diff": ">=0.9", "wikibase/easyrdf_lite": "*" -- To view, visit https://gerrit.wikimedia.org/r/115160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: WikidataJenkins Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require 0.3.3 ValueView or higher - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/115173 Change subject: Require 0.3.3 ValueView or higher .. Require 0.3.3 ValueView or higher Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b (cherry picked from commit 4edda49cd704a32556196df18d676319639896cc) --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/73/115173/1 diff --git a/composer.json b/composer.json index eef6eeb..582790f 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "data-values/data-types": "~0.1", "data-values/serialization": "~0.1", "data-values/javascript": "~0.3", - "data-values/value-view": "~0.3", + "data-values/value-view": "~0.3,>=0.3.3", "wikibase/data-model": "0.6.*", "diff/diff": ">=0.9", "wikibase/easyrdf_lite": "*" -- To view, visit https://gerrit.wikimedia.org/r/115173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.23-wmf15 Gerrit-Owner: Addshore ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly format commons links with spaces - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/115172 Change subject: Correctly format commons links with spaces .. Correctly format commons links with spaces Spaces should be replaced with underscores in URLs, underscores should be replaced with spaces for link texts, plus signs should stay what they are. Using Title here is probably not completely sane since it takes the local configuration into account. It works, though. Bug: 61738 Bug: 45046 Change-Id: I4cac81188e5a09bd1a4cbf5ccdf3c579fce9821a (cherry picked from commit 24984f6f2e13c5e006c4f9ec1c57c0a194845a6a) --- M lib/includes/formatters/CommonsLinkFormatter.php M lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php M repo/tests/phpunit/includes/api/FormatSnakValueTest.php 4 files changed, 33 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/72/115172/1 diff --git a/lib/includes/formatters/CommonsLinkFormatter.php b/lib/includes/formatters/CommonsLinkFormatter.php index 254246c..d406216 100644 --- a/lib/includes/formatters/CommonsLinkFormatter.php +++ b/lib/includes/formatters/CommonsLinkFormatter.php @@ -5,6 +5,7 @@ use DataValues\StringValue; use Html; use InvalidArgumentException; +use Title; use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; @@ -49,9 +50,14 @@ } $fileName = $value->getValue(); + // We are using NS_MAIN only because makeTitleSafe requires a valid namespace + // We cannot use makeTitle because it does not secureAndSplit() + $title = Title::makeTitleSafe( NS_MAIN, $fileName ); - $attributes = array_merge( $this->attributes, array( 'href' => '//commons.wikimedia.org/wiki/' . wfUrlencode( 'File:' . $fileName ) ) ); - $html = Html::element( 'a', $attributes, $fileName ); + $attributes = array_merge( $this->attributes, array( + 'href' => '//commons.wikimedia.org/wiki/' . 'File:' . $title->getPartialURL() + ) ); + $html = Html::element( 'a', $attributes, $title->getText() ); return $html; } diff --git a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php index f816ffb..7fd4a0d 100644 --- a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php +++ b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php @@ -25,9 +25,29 @@ return array( array( - new StringValue( 'example.jpg' ), + new StringValue( 'example.jpg' ), // Lower-case file name $options, - '@.*example.jpg.*@' + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example.jpg' ), + $options, + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example space.jpg' ), + $options, + '@.*Example space.jpg.*@' + ), + array( + new StringValue( 'Example_underscore.jpg' ), + $options, + '@.*Example underscore.jpg.*@' + ), + array( + new StringValue( 'Example+plus.jpg' ), + $options, + '@.*Example\+plus.jpg.*@' ), ); } diff --git a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php index ccfde58..2a268db 100644 --- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php +++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php @@ -125,8 +125,8 @@ 'commons link' => array( SnakFormatter::FORMAT_HTML, $options, - new StringValue( 'example.jpg' ), - '@^example\\.jpg$@', + new StringValue( 'Example.jpg' ), + '@^Example\\.jpg$@', 'commonsMedia' ), ); diff --git a/repo/tests/phpunit/includes/api/FormatSnakValueTest.php b/repo/tests/phpunit/includes/api/FormatSnakValueTest.php index 3f4e19
[MediaWiki-commits] [Gerrit] contint: bring elasticsearch for browsertests - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: contint: bring elasticsearch for browsertests .. contint: bring elasticsearch for browsertests CirrusSearch browser tests need Elastic search and redis installed. Change-Id: I2854a2208ec2076721265c0571cfc0da774599b8 --- M manifests/role/ci.pp 1 file changed, 38 insertions(+), 0 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index d2235fd..f1eacfa 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -244,6 +244,44 @@ require => File['/mnt/localhost-browsertests'], } + # For CirrusSearch testing: + file { '/mnt/elasticsearch': +ensure => 'directory', + } + file { '/var/lib/elasticsearch': +ensure => 'link', +require => '/mnt/elasticsearch', +target => '/mnt/elasticsearch', + } + class { '::elasticsearch': +cluster_name => 'jenkins', +heap_memory => '1G', #We have small data in test +require => File['/var/lib/elasticsearch'], +# We don't have reliable multicast in labs but we don't mind because we +# only use a single instance + +# Right now we're not testing with any of the plugins we plan to install +# later. We'll cross that bridge when we come to it. + } + + # For CirrusSearch testing: + file { '/mnt/redis': +ensure => 'directory', + } + file { '/var/lib/redis': +ensure => 'link', +require => '/mnt/redis', +target => '/mnt/redis', + } + class { '::redis': +maxmemory => '128mb', +persist => 'aof', +redis_replication => undef, +password => 'notsecure', +dir => '/var/lib/redis', +auto_aof_rewrite_min_size => '32mb', +require => File['/var/lib/redis'], + } } class role::ci::slave::labs { -- To view, visit https://gerrit.wikimedia.org/r/115162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2854a2208ec2076721265c0571cfc0da774599b8 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: Ottomata Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "don't use backend coordinate formatter yet" - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "don't use backend coordinate formatter yet" .. Revert "don't use backend coordinate formatter yet" instead we need change in value view This reverts commit 3954475954b3b845158202415485272f28c555de. Change-Id: I497aa349c40c175467d2a274bb913fcc3f67ac56 --- M repo/resources/wikibase.ui.scrapeFormattedValues.js 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/resources/wikibase.ui.scrapeFormattedValues.js b/repo/resources/wikibase.ui.scrapeFormattedValues.js index 10a378a..91ceb96 100644 --- a/repo/resources/wikibase.ui.scrapeFormattedValues.js +++ b/repo/resources/wikibase.ui.scrapeFormattedValues.js @@ -15,8 +15,7 @@ // re-constructing the DOM in JavaScript. var DATA_VALUE_TYPES_TO_SCRAPE = [ - // backend coordinate formatter is not ready, as of 24 Feb 2014 - // 'globecoordinate', + 'globecoordinate', 'quantity', 'string', 'wikibase-entityid' -- To view, visit https://gerrit.wikimedia.org/r/115171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I497aa349c40c175467d2a274bb913fcc3f67ac56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use the super-evil Settings singleton in client/repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use the super-evil Settings singleton in client/repo .. Don't use the super-evil Settings singleton in client/repo Change-Id: I50692c8091bcf4e2e0cbb23e50dd5b67b5d428a2 --- M client/includes/store/sql/DirectSqlStore.php M lib/tests/phpunit/NoBadDependencyUsageTest.php M repo/Wikibase.hooks.php M repo/includes/MultiLangConstraintDetector.php M repo/includes/NamespaceUtils.php M repo/includes/api/ApiWikibase.php M repo/includes/api/EditEntity.php M repo/includes/api/GetEntities.php M repo/includes/api/LinkTitles.php M repo/includes/api/ModifyEntity.php M repo/includes/api/SetSiteLink.php M repo/includes/specials/SpecialItemByTitle.php M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialSetSiteLink.php M repo/includes/store/StoreFactory.php M repo/includes/store/sql/SqlIdGenerator.php M repo/includes/store/sql/SqlStore.php M repo/tests/phpunit/includes/api/TermTestHelper.php M repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php M repo/tests/phpunit/includes/store/sql/TermSearchKeyBuilderTest.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 21 files changed, 108 insertions(+), 53 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 1a0b639..eb74c22 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -5,6 +5,7 @@ use Language; use Site; use ObjectCache; +use Wikibase\Repo\WikibaseRepo; /** * Implementation of the client store interface using direct access to the repository's @@ -86,7 +87,7 @@ $this->repoWiki = $repoWiki; $this->language = $wikiLanguage; - $settings = Settings::singleton(); + $settings = WikibaseRepo::getDefaultInstance()->getSettings(); $cachePrefix = $settings->getSetting( 'sharedCacheKeyPrefix' ); $cacheDuration = $settings->getSetting( 'sharedCacheDuration' ); $cacheType = $settings->getSetting( 'sharedCacheType' ); @@ -312,7 +313,10 @@ * @return PropertyInfoTable */ protected function newPropertyInfoTable() { - if ( Settings::get( 'usePropertyInfoTable' ) ) { + $usePropertyInfoTable = WikibaseRepo::getDefaultInstance() + ->getSettings()->getSetting( 'usePropertyInfoTable' ); + + if ( $usePropertyInfoTable ) { $table = new PropertyInfoTable( true, $this->repoWiki ); $key = $this->cachePrefix . ':CachingPropertyInfoStore'; return new CachingPropertyInfoStore( $table, ObjectCache::getInstance( $this->cacheType ), diff --git a/lib/tests/phpunit/NoBadDependencyUsageTest.php b/lib/tests/phpunit/NoBadDependencyUsageTest.php index 8aa7522..1318f9d 100644 --- a/lib/tests/phpunit/NoBadDependencyUsageTest.php +++ b/lib/tests/phpunit/NoBadDependencyUsageTest.php @@ -28,8 +28,8 @@ public function testNoSettingsUsageOutsideLib() { // Increasing this allowance is forbidden - $this->assertStringNotInRepo( 'Settings::', 21 ); - $this->assertStringNotInClient( 'Settings::', 3 ); + $this->assertStringNotInRepo( 'Settings::', 1 ); + $this->assertStringNotInClient( 'Settings::', 1 ); } private function assertStringNotInLib( $string, $maxAllowance ) { diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 8979730..e167296 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -7,7 +7,6 @@ use Content; use ContentHandler; use DatabaseUpdater; -use EditPage; use HistoryPager; use Html; use Language; @@ -77,7 +76,8 @@ wfProfileIn( __METHOD__ ); global $wgNamespaceContentModels; - $namespaces = Settings::get( 'entityNamespaces' ); + $namespaces = WikibaseRepo::getDefaultInstance()-> + getSettings()->getSetting( 'entityNamespaces' ); if ( empty( $namespaces ) ) { wfProfileOut( __METHOD__ ); @@ -137,7 +137,10 @@ wfWarn( "Database type '$type' is not supported by the Wikibase repository." ); } - if ( Settings::get( 'defaultStore' ) === 'sqlstore' ) { + $defaultStore = WikibaseRepo::getDefaultInstance()-> + getSettings()->getSetting( 'defaultStore' ); + + if ( $defaultStore === 'sqlstore' ) { /** * @var SQLStore $store */ diff --git a/repo/i
[MediaWiki-commits] [Gerrit] contint: get redis under /mnt/redis - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115174 Change subject: contint: get redis under /mnt/redis .. contint: get redis under /mnt/redis The redis class takes care of creating the directory so we do not need a symlink from /var/lib/redis to /mnt/redis. That even produce a duplicate definition error: File[/var/lib/redis] is already defined in file /etc/puppet/manifests/role/ci.pp at line 275; cannot redefine at /etc/puppet/modules/redis/manifests/init.pp:38 Change-Id: Ia5ce396795f1d1d0fb8de572c1bee558a712f34b --- M manifests/role/ci.pp 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/115174/1 diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index f1eacfa..c40c65f 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -265,22 +265,13 @@ } # For CirrusSearch testing: - file { '/mnt/redis': -ensure => 'directory', - } - file { '/var/lib/redis': -ensure => 'link', -require => '/mnt/redis', -target => '/mnt/redis', - } class { '::redis': maxmemory => '128mb', persist => 'aof', redis_replication => undef, password => 'notsecure', -dir => '/var/lib/redis', +dir => '/mnt/redis', auto_aof_rewrite_min_size => '32mb', -require => File['/var/lib/redis'], } } -- To view, visit https://gerrit.wikimedia.org/r/115174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5ce396795f1d1d0fb8de572c1bee558a712f34b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move $wgValueParsers to repo - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: move $wgValueParsers to repo .. move $wgValueParsers to repo only used by wbparsevalue api module in repo also, if you happen to explicitly require/load the WikibaseLib.php entry point before loading repo (Wikibase.php), then $wgValueParsers gets reset to array() and things break. The way we check if ( !defined( 'WBL_VERSION' ) ) { @include_once( __DIR__ . '/../lib/WikibaseLib.php' ); } in repo indicates it *might* be okay or allowed to explicitly require WikibaseLib.php before repo. It is not okay with how $wgValueParsers was defined. This makes things work in such situation, and anyway lib has no use for the global. Change-Id: I131ab938fb3ff21f9d1108aaf3bfeccc4a584297 --- M lib/WikibaseLib.php M repo/Wikibase.php 2 files changed, 26 insertions(+), 26 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index 77757cf..e3b3581 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -44,7 +44,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgExtensionMessagesFiles; - global $wgValueParsers, $wgJobClasses, $wgHooks, $wgResourceModules; + global $wgJobClasses, $wgHooks, $wgResourceModules; $wgExtensionCredits['wikibase'][] = array( 'path' => __DIR__, @@ -61,30 +61,6 @@ // i18n $wgExtensionMessagesFiles['WikibaseLib'] = __DIR__ . '/WikibaseLib.i18n.php'; - - // This is somewhat hackish, make WikibaseValueParserBuilders, analogous to WikibaseValueFormatterBuilders - $wgValueParsers['wikibase-entityid'] = function( ValueParsers\ParserOptions $options ) { - //TODO: make ID builders configurable. - $builders = \Wikibase\DataModel\Entity\BasicEntityIdParser::getBuilders(); - return new \Wikibase\Lib\EntityIdValueParser( - new \Wikibase\DataModel\Entity\DispatchingEntityIdParser( $builders, $options ), - $options - ); - }; - - $wgValueParsers['quantity'] = function( ValueParsers\ParserOptions $options ) { - $unlocalizer = new Wikibase\Lib\MediaWikiNumberUnlocalizer(); - return new \ValueParsers\QuantityParser( - new \ValueParsers\DecimalParser( $options, $unlocalizer ), - $options ); - }; - - $wgValueParsers['bool'] = 'ValueParsers\BoolParser'; - $wgValueParsers['float'] = 'ValueParsers\FloatParser'; - $wgValueParsers['globecoordinate'] = 'ValueParsers\GlobeCoordinateParser'; - $wgValueParsers['int'] = 'ValueParsers\IntParser'; - $wgValueParsers['null'] = 'ValueParsers\NullParser'; - $wgValueParsers['decimal'] = 'ValueParsers\DecimalParser'; $wgJobClasses['ChangeNotification'] = 'Wikibase\ChangeNotificationJob'; $wgJobClasses['UpdateRepoOnMove'] = 'Wikibase\UpdateRepoOnMoveJob'; diff --git a/repo/Wikibase.php b/repo/Wikibase.php index ad7028f..39fa782 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -37,7 +37,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgGroupPermissions, $wgExtensionMessagesFiles; global $wgAPIModules, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgContentHandlers; - global $wgWBStores, $wgWBRepoSettings, $wgResourceModules; + global $wgWBStores, $wgWBRepoSettings, $wgResourceModules, $wgValueParsers; $wgExtensionCredits['wikibase'][] = array( 'path' => __DIR__, @@ -78,6 +78,30 @@ $wgExtensionMessagesFiles['WikibaseAlias'] = __DIR__ . '/Wikibase.i18n.alias.php'; $wgExtensionMessagesFiles['WikibaseNS'] = __DIR__ . '/Wikibase.i18n.namespaces.php'; + // This is somewhat hackish, make WikibaseValueParserBuilders, analogous to WikibaseValueFormatterBuilders + $wgValueParsers['wikibase-entityid'] = function( ValueParsers\ParserOptions $options ) { + //TODO: make ID builders configurable. + $builders = \Wikibase\DataModel\Entity\BasicEntityIdParser::getBuilders(); + return new \Wikibase\Lib\EntityIdValueParser( + new \Wikibase\DataModel\Entity\DispatchingEntityIdParser( $builders, $options ), + $options + ); + }; + + $wgValueParsers['quantity'] = function( ValueParsers\ParserOptions $options ) { + $unlocalizer = new Wikibase\Lib\MediaWikiNumberUnlocalizer(); + return new \ValueParsers\QuantityParser( + new \ValueParsers\DecimalParser( $options, $unlocalizer ), + $options ); + }; + + $wgValueParsers['bool'] = 'ValueParsers\BoolParser'; + $wgValueP
[MediaWiki-commits] [Gerrit] jquery.suggestions: Do not duplicate keypress logic - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: jquery.suggestions: Do not duplicate keypress logic .. jquery.suggestions: Do not duplicate keypress logic This is handled in keyup/keypress handlers, no need to repeat it twice. Change-Id: I3ddcd21136b44eedcec53b1ecc91bad38f697402 --- M resources/jquery/jquery.suggestions.js 1 file changed, 0 insertions(+), 18 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/jquery/jquery.suggestions.js b/resources/jquery/jquery.suggestions.js index 3774d0c..c4e95a4 100644 --- a/resources/jquery/jquery.suggestions.js +++ b/resources/jquery/jquery.suggestions.js @@ -591,24 +591,6 @@ // Store key pressed to handle later context.data.keypressed = e.which; context.data.keypressedCount = 0; - - switch ( context.data.keypressed ) { - // This preventDefault logic is duplicated from - // $.suggestions.keypress(), which sucks - // Arrow down - case 40: - e.preventDefault(); - e.stopImmediatePropagation(); - break; - // Arrow up, Escape and Enter - case 38: - case 27: - case 13: - if ( context.data.$container.is( ':visible' ) ) { - e.preventDefault(); - e.stopImmediatePropagation(); - } - } } ) .keypress( function ( e ) { context.data.keypressedCount++; -- To view, visit https://gerrit.wikimedia.org/r/82814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ddcd21136b44eedcec53b1ecc91bad38f697402 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jquery.suggestions, mediawiki.searchSuggest: Fix form submis... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: jquery.suggestions, mediawiki.searchSuggest: Fix form submission .. jquery.suggestions, mediawiki.searchSuggest: Fix form submission Don't override form submission behavior (by capturing the Enter key on search box, preventing default behavior, and then manually submitting the form); just let it happen if it's wanted. Then swap out a few unjustified stopImmediatePropagation() calls to stopPropagation() so that the event can be actually fired. Add some comments while we're at it. This allows the user to use Ctrl+Enter (or Shift+Enter) to submit the form into a new tab (or new window) on browsers that support this (currently Opera and Chrome). Bug: 34756 Bug: 35974 Change-Id: I49ef7cc89400032505bc444f21d522d5b5d47586 --- M resources/jquery/jquery.suggestions.js M resources/mediawiki/mediawiki.searchSuggest.js 2 files changed, 21 insertions(+), 15 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/jquery/jquery.suggestions.js b/resources/jquery/jquery.suggestions.js index c4e95a4..f967a1d 100644 --- a/resources/jquery/jquery.suggestions.js +++ b/resources/jquery/jquery.suggestions.js @@ -421,20 +421,26 @@ selected = context.data.$container.find( '.suggestions-result-current' ); $.suggestions.hide( context ); if ( selected.length === 0 || context.data.selectedWithMouse ) { - // if nothing is selected OR if something was selected with the mouse, - // cancel any current requests and submit the form + // If nothing is selected or if something was selected with the mouse + // cancel any current requests and allow the form to be submitted + // (simply don't prevent default behavior). $.suggestions.cancel( context ); - context.config.$region.closest( 'form' ).submit(); + preventDefault = false; } else if ( selected.is( '.suggestions-special' ) ) { if ( typeof context.config.special.select === 'function' ) { - context.config.special.select.call( selected, context.data.$textbox ); + // Allow the callback to decide whether to prevent default or not + if ( context.config.special.select.call( selected, context.data.$textbox ) === true ) { + preventDefault = false; + } } } else { + $.suggestions.highlight( context, selected, true ); + if ( typeof context.config.result.select === 'function' ) { - $.suggestions.highlight( context, selected, true ); - context.config.result.select.call( selected, context.data.$textbox ); - } else { - $.suggestions.highlight( context, selected, true ); + // Allow the callback to decide whether to prevent default or not + if ( context.config.result.select.call( selected, context.data.$textbox ) === true ) { + preventDefault = false; + } } } break; @@ -444,7 +450,7 @@ } if ( preventDefault ) { e.preventDefault(); - e.stopImmediatePropagation(); + e.stopPropagation(); } } }; diff --git a/resources/mediawiki/mediawiki.searchSuggest.js b/resources/mediawiki/mediawiki.searchSuggest.js index 8d950a0..e22a3d3 100644 --- a/resources/mediawiki/mediawiki.searchSuggest.js +++ b/resources/mediawiki/mediawiki.searchSuggest.js @@ -153,8 +153,8 @@ }, result: { render: renderFunction, - select: function ( $input ) { - $input.closest( 'form' ).submit(); +
[MediaWiki-commits] [Gerrit] contint: get redis under /mnt/redis - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: contint: get redis under /mnt/redis .. contint: get redis under /mnt/redis The redis class takes care of creating the directory so we do not need a symlink from /var/lib/redis to /mnt/redis. That even produce a duplicate definition error: File[/var/lib/redis] is already defined in file /etc/puppet/manifests/role/ci.pp at line 275; cannot redefine at /etc/puppet/modules/redis/manifests/init.pp:38 Change-Id: Ia5ce396795f1d1d0fb8de572c1bee558a712f34b --- M manifests/role/ci.pp 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index f1eacfa..c40c65f 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -265,22 +265,13 @@ } # For CirrusSearch testing: - file { '/mnt/redis': -ensure => 'directory', - } - file { '/var/lib/redis': -ensure => 'link', -require => '/mnt/redis', -target => '/mnt/redis', - } class { '::redis': maxmemory => '128mb', persist => 'aof', redis_replication => undef, password => 'notsecure', -dir => '/var/lib/redis', +dir => '/mnt/redis', auto_aof_rewrite_min_size => '32mb', -require => File['/var/lib/redis'], } } -- To view, visit https://gerrit.wikimedia.org/r/115174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5ce396795f1d1d0fb8de572c1bee558a712f34b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: require => needs File[], not just the path - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115175 Change subject: contint: require => needs File[], not just the path .. contint: require => needs File[], not just the path Change-Id: I6cd224cb8194af514e818dc06d02e0b2042e8777 --- M manifests/role/ci.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/115175/1 diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index c40c65f..5cbd305 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -250,7 +250,7 @@ } file { '/var/lib/elasticsearch': ensure => 'link', -require => '/mnt/elasticsearch', +require => File['/mnt/elasticsearch'], target => '/mnt/elasticsearch', } class { '::elasticsearch': -- To view, visit https://gerrit.wikimedia.org/r/115175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cd224cb8194af514e818dc06d02e0b2042e8777 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly format commons links with spaces - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly format commons links with spaces .. Correctly format commons links with spaces Spaces should be replaced with underscores in URLs, underscores should be replaced with spaces for link texts, plus signs should stay what they are. Using Title here is probably not completely sane since it takes the local configuration into account. It works, though. Bug: 61738 Bug: 45046 Change-Id: I4cac81188e5a09bd1a4cbf5ccdf3c579fce9821a (cherry picked from commit 24984f6f2e13c5e006c4f9ec1c57c0a194845a6a) --- M lib/includes/formatters/CommonsLinkFormatter.php M lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php M repo/tests/phpunit/includes/api/FormatSnakValueTest.php 4 files changed, 33 insertions(+), 7 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/lib/includes/formatters/CommonsLinkFormatter.php b/lib/includes/formatters/CommonsLinkFormatter.php index 254246c..d406216 100644 --- a/lib/includes/formatters/CommonsLinkFormatter.php +++ b/lib/includes/formatters/CommonsLinkFormatter.php @@ -5,6 +5,7 @@ use DataValues\StringValue; use Html; use InvalidArgumentException; +use Title; use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; @@ -49,9 +50,14 @@ } $fileName = $value->getValue(); + // We are using NS_MAIN only because makeTitleSafe requires a valid namespace + // We cannot use makeTitle because it does not secureAndSplit() + $title = Title::makeTitleSafe( NS_MAIN, $fileName ); - $attributes = array_merge( $this->attributes, array( 'href' => '//commons.wikimedia.org/wiki/' . wfUrlencode( 'File:' . $fileName ) ) ); - $html = Html::element( 'a', $attributes, $fileName ); + $attributes = array_merge( $this->attributes, array( + 'href' => '//commons.wikimedia.org/wiki/' . 'File:' . $title->getPartialURL() + ) ); + $html = Html::element( 'a', $attributes, $title->getText() ); return $html; } diff --git a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php index f816ffb..7fd4a0d 100644 --- a/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php +++ b/lib/tests/phpunit/formatters/CommonsLinkFormatterTest.php @@ -25,9 +25,29 @@ return array( array( - new StringValue( 'example.jpg' ), + new StringValue( 'example.jpg' ), // Lower-case file name $options, - '@.*example.jpg.*@' + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example.jpg' ), + $options, + '@.*Example.jpg.*@' + ), + array( + new StringValue( 'Example space.jpg' ), + $options, + '@.*Example space.jpg.*@' + ), + array( + new StringValue( 'Example_underscore.jpg' ), + $options, + '@.*Example underscore.jpg.*@' + ), + array( + new StringValue( 'Example+plus.jpg' ), + $options, + '@.*Example\+plus.jpg.*@' ), ); } diff --git a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php index ccfde58..2a268db 100644 --- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php +++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php @@ -125,8 +125,8 @@ 'commons link' => array( SnakFormatter::FORMAT_HTML, $options, - new StringValue( 'example.jpg' ), - '@^example\\.jpg$@', + new StringValue( 'Example.jpg' ), + '@^Example\\.jpg$@', 'commonsMedia' ), ); diff --git a/repo/tests/phpunit/includes/api/FormatSnakValueTest.php b/repo/tests/phpunit/includes/api/FormatSnakValueTest.php index 3f4e196..4c70191 100644 --- a/repo/te
[MediaWiki-commits] [Gerrit] Implement expiry in protect() - change (pywikibot/core)
Nullzero has uploaded a new change for review. https://gerrit.wikimedia.org/r/115177 Change subject: Implement expiry in protect() .. Implement expiry in protect() This patch implements a way to set the duration of protection, like that in block(). Change-Id: I4981f4f094c082ce75ae2973b581bdc3063b10ee --- M pywikibot/page.py M pywikibot/site.py 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/77/115177/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index b75bbc3..f633cb2 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1411,7 +1411,7 @@ @deprecate_arg("throttle", None) def protect(self, edit='sysop', move='sysop', unprotect=False, -reason=None, prompt=True): +reason=None, prompt=True, expiry=None): """(Un)protect a wiki page. Requires administrator status. Valid protection levels (in MediaWiki 1.12) are '' (equivalent to @@ -1423,6 +1423,7 @@ all protection levels to '') @param reason: Edit summary. @param prompt: If true, ask user for confirmation. +@param expiry: When the block should expire """ if reason is None: @@ -1447,7 +1448,7 @@ answer = 'y' self.site._noProtectPrompt = True if answer in ['y', 'Y']: -return self.site.protect(self, edit, move, reason) +return self.site.protect(self, edit, move, reason, expiry) def change_category(self, oldCat, newCat, comment=None, sortKey=None, inPlace=True): diff --git a/pywikibot/site.py b/pywikibot/site.py index 3d85c6b..8824a06 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3099,7 +3099,7 @@ } @must_be(group='sysop') -def protect(self, page, edit, move, summary): +def protect(self, page, edit, move, summary, expiry=None): """(Un)protect a wiki page. Requires administrator status. Valid protection levels (in MediaWiki 1.12) are '' (equivalent to @@ -3111,6 +3111,7 @@ all protection levels to '') @param reason: Edit summary. @param prompt: If true, ask user for confirmation. +@param expiry: When the block should expire """ token = self.token(page, "protect") @@ -3119,6 +3120,10 @@ title=page.title(withSection=False), protections="edit=" + edit + "|" + "move=" + move, reason=summary) +if isinstance(expiry, pywikibot.Timestamp): +expiry = expiry.toISOformat() +if expiry: +req['expiry'] = expiry try: result = req.submit() except api.APIError as err: -- To view, visit https://gerrit.wikimedia.org/r/115177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4981f4f094c082ce75ae2973b581bdc3063b10ee Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Nullzero ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: require => needs File[], not just the path - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: contint: require => needs File[], not just the path .. contint: require => needs File[], not just the path Change-Id: I6cd224cb8194af514e818dc06d02e0b2042e8777 --- M manifests/role/ci.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index c40c65f..5cbd305 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -250,7 +250,7 @@ } file { '/var/lib/elasticsearch': ensure => 'link', -require => '/mnt/elasticsearch', +require => File['/mnt/elasticsearch'], target => '/mnt/elasticsearch', } class { '::elasticsearch': -- To view, visit https://gerrit.wikimedia.org/r/115175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cd224cb8194af514e818dc06d02e0b2042e8777 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require 0.3.3 ValueView or higher - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Require 0.3.3 ValueView or higher .. Require 0.3.3 ValueView or higher Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b (cherry picked from commit 4edda49cd704a32556196df18d676319639896cc) --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/composer.json b/composer.json index eef6eeb..582790f 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "data-values/data-types": "~0.1", "data-values/serialization": "~0.1", "data-values/javascript": "~0.3", - "data-values/value-view": "~0.3", + "data-values/value-view": "~0.3,>=0.3.3", "wikibase/data-model": "0.6.*", "diff/diff": ">=0.9", "wikibase/easyrdf_lite": "*" -- To view, visit https://gerrit.wikimedia.org/r/115173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77e1f5b32f8fb3a8d8dcf69c1ee625a00502130b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.23-wmf15 Gerrit-Owner: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: WikidataJenkins 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 the toolbar respond to a content overflow - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/115176 Change subject: Make the toolbar respond to a content overflow .. Make the toolbar respond to a content overflow The breakpoint defined in ext.gettingstarted.taskToolbar.lowWidth.less is fixed and therefore doesn't handle long translations well. Instead, calculate the point of overflow when the toolbar is inserted into the DOM and monitor the width of the toolbar so that the appropriate styles can be applied when the breakpoint is reached. Bug: 61230 Change-Id: I87b89f49f45e65f2f178565ca60a306ed80fbf9f --- M GettingStarted.php M resources/ext.gettingstarted.taskToolbar.js M resources/ext.gettingstarted.taskToolbar.less D resources/ext.gettingstarted.taskToolbar.lowWidth.less 4 files changed, 62 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/76/115176/1 diff --git a/GettingStarted.php b/GettingStarted.php index 2cdfcb2..9d85330 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -181,8 +181,6 @@ 'scripts' => 'ext.gettingstarted.taskToolbar.js', 'styles' => array( 'ext.gettingstarted.taskToolbar.less' => array( 'media' => 'screen ' ), - 'ext.gettingstarted.taskToolbar.lowWidth.less' => - array( 'media' => 'only screen and (min-width: 851px) and (max-width: 1150px)' ), // Requires fix for https://bugzilla.wikimedia.org/show_bug.cgi?id=49722 and // https://bugzilla.wikimedia.org/show_bug.cgi?id=49851 to work on printable=yes view. diff --git a/resources/ext.gettingstarted.taskToolbar.js b/resources/ext.gettingstarted.taskToolbar.js index ee64177..a2d6294 100644 --- a/resources/ext.gettingstarted.taskToolbar.js +++ b/resources/ext.gettingstarted.taskToolbar.js @@ -38,7 +38,8 @@ function displayToolbar( toolbarInfo, suggestedTitle ) { var $toolbar, $center, $centerMessage, $right, $tryAnother, $close, $relativeElements, $marginElements, tryAnotherUrl, $showGuide, - fullTask, afterRemovalHookInstalled; + fullTask, afterRemovalHookInstalled, $centerMessageClone, + centerMessageWidth, centerMinWidth, isToolbarExpanded; fullTask = 'gettingstarted-' + toolbarInfo.taskName; @@ -130,24 +131,33 @@ $( document.body ).prepend( $toolbar ); $relativeElements = $( '#mw-page-base, #mw-head-base, #content, #footer' ); + $relativeElements.css( 'position', 'relative' ); + $marginElements = $( '#mw-head, #mw-panel' ); + function pushPageDown() { + var offset = $toolbar.outerHeight() + 1; + $relativeElements.css( 'top', offset + 'px' ); + $marginElements.css( 'margin-top', offset + 'px' ); + } + + function pullPageUp() { + $relativeElements.css( 'top', '' ); + $marginElements.css( 'margin-top', '' ); + } // This intentionally logs again if the toolbar redisplays after VE is hidden, // either due to a save or simply returning to Read. function showToolbarInternal() { - $relativeElements.addClass( 'mw-gettingstarted-relative-vshift' ); - $marginElements.addClass( 'mw-gettingstarted-margin-vshift' ); - $toolbar.slideDown( 200, function () { + pushPageDown(); mw.libs.guiders.reposition(); } ); } function hideToolbar() { $toolbar.slideUp( 200, function () { - $relativeElements.removeClass( 'mw-gettingstarted-relative-vshift' ); - $marginElements.removeClass( 'mw-gettingstarted-margin-vshift' ); + pullPageUp(); mw.libs.guiders.reposition(); } ); } @@ -189,6 +199,43 @@ mw.hook( 've.activationComplete' ).add( hideToolbar ); mw.hook( 've.deactivationComplete' ).add( showToolbar ); + + // Calculate the width of the task description. + $centerMessageClone = $centerMessage.clone(); + $centerMessageClone.css( { + position: 'absolute', + left: - + } ); + $( document.body ).append( $centerMessageClone ); + centerMessageWidth = $centerMessageClone.width(); + $centerMessageClone.remove(); + centerMinWidth = centerMessageWidth + $showGuide.outerWidth( true );
[MediaWiki-commits] [Gerrit] temporarily disable failing login msg test - change (qa/browsertests)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/115178 Change subject: temporarily disable failing login msg test .. temporarily disable failing login msg test Change-Id: I4e0af2ef372fed403cedc2d081d37d39e07b9ed6 --- M tests/browser/features/login.feature 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/78/115178/1 diff --git a/tests/browser/features/login.feature b/tests/browser/features/login.feature index bb09a41..3edaf2b 100644 --- a/tests/browser/features/login.feature +++ b/tests/browser/features/login.feature @@ -9,7 +9,7 @@ # qa-browsertests top-level directory and at # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS # -@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org + Feature: Log in Background: -- To view, visit https://gerrit.wikimedia.org/r/115178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e0af2ef372fed403cedc2d081d37d39e07b9ed6 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] temporarily disable failing login msg test - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: temporarily disable failing login msg test .. temporarily disable failing login msg test Change-Id: I4e0af2ef372fed403cedc2d081d37d39e07b9ed6 --- M tests/browser/features/login.feature 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/login.feature b/tests/browser/features/login.feature index bb09a41..3edaf2b 100644 --- a/tests/browser/features/login.feature +++ b/tests/browser/features/login.feature @@ -9,7 +9,7 @@ # qa-browsertests top-level directory and at # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS # -@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org + Feature: Log in Background: -- To view, visit https://gerrit.wikimedia.org/r/115178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e0af2ef372fed403cedc2d081d37d39e07b9ed6 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon Gerrit-Reviewer: Cmcmahon Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger mwext-browsertests-CirrusSearch-phantomjs non voting - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115179 Change subject: Trigger mwext-browsertests-CirrusSearch-phantomjs non voting .. Trigger mwext-browsertests-CirrusSearch-phantomjs non voting Being experimented.. Change-Id: I83683a1456e78fe49049d8fd83e08224ad2282c7 --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/79/115179/1 diff --git a/layout.yaml b/layout.yaml index 4a7fe3b..a657056 100644 --- a/layout.yaml +++ b/layout.yaml @@ -692,6 +692,10 @@ - name: mwext-DonationInterface-testextensions-master voting: false + # Being worked on with Nik + - name: mwext-browsertests-CirrusSearch-phantomjs +voting: false + - name: mwext-UploadWizard-pep8 voting: true - name: mwext-UploadWizard-pyflakes @@ -1430,6 +1434,7 @@ - mwext-CirrusSearch-lint: - mwext-CirrusSearch-testextensions-master - mwext-CirrusSearch-ruby1.9.3lint + - mwext-browsertests-CirrusSearch-phantomjs # experimental gate-and-submit: - mwext-CirrusSearch-jslint - mwext-CirrusSearch-lint: -- To view, visit https://gerrit.wikimedia.org/r/115179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83683a1456e78fe49049d8fd83e08224ad2282c7 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger mwext-browsertests-CirrusSearch-phantomjs non voting - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Trigger mwext-browsertests-CirrusSearch-phantomjs non voting .. Trigger mwext-browsertests-CirrusSearch-phantomjs non voting Being experimented.. Change-Id: I83683a1456e78fe49049d8fd83e08224ad2282c7 --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Manybubbles: 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 4a7fe3b..a657056 100644 --- a/layout.yaml +++ b/layout.yaml @@ -692,6 +692,10 @@ - name: mwext-DonationInterface-testextensions-master voting: false + # Being worked on with Nik + - name: mwext-browsertests-CirrusSearch-phantomjs +voting: false + - name: mwext-UploadWizard-pep8 voting: true - name: mwext-UploadWizard-pyflakes @@ -1430,6 +1434,7 @@ - mwext-CirrusSearch-lint: - mwext-CirrusSearch-testextensions-master - mwext-CirrusSearch-ruby1.9.3lint + - mwext-browsertests-CirrusSearch-phantomjs # experimental gate-and-submit: - mwext-CirrusSearch-jslint - mwext-CirrusSearch-lint: -- To view, visit https://gerrit.wikimedia.org/r/115179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83683a1456e78fe49049d8fd83e08224ad2282c7 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes to last commit, based on comments from Nikerabbit - change (mediawiki...ApprovedRevs)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/115180 Change subject: Fixes to last commit, based on comments from Nikerabbit .. Fixes to last commit, based on comments from Nikerabbit Change-Id: Idd011293cf141c972e980801c7c0628ce7ba034c --- M ApprovedRevs.hooks.php M SpecialApprovedRevs.php 2 files changed, 23 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs refs/changes/80/115180/1 diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php index 9001201..2091e81 100644 --- a/ApprovedRevs.hooks.php +++ b/ApprovedRevs.hooks.php @@ -268,7 +268,7 @@ $text = Xml::element( 'span', array( 'class' => 'approvedAndLatestMsg' ), - wfMessage( 'approvedrevs-approvedandlatest' )->parse() + wfMessage( 'approvedrevs-approvedandlatest' )->text() ); } else { $text = wfMessage( 'approvedrevs-notlatest' )->parse(); @@ -314,8 +314,9 @@ $latestRevID = $title->getLatestRevID(); if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { ApprovedRevs::addCSS(); - global $wgOut; - $wgOut->addHTML( '' . wfMessage( 'approvedrevs-editwarning' )->parse() . "\n" ); + // A lengthy way to avoid not calling $wgOut... + // hopefully this is better! + $editPage->getArticle()->getContext()->getOutput()->wrapWikiMsg( "$1\n", 'approvedrevs-editwarning' ); } return true; } @@ -335,7 +336,7 @@ ApprovedRevs::addCSS(); $preFormHTML .= Xml::element ( 'p', array( 'style' => 'font-weight: bold' ), - wfMessage( 'approvedrevs-editwarning' )->parse() ) . "\n"; + wfMessage( 'approvedrevs-editwarning' )->text() ) . "\n"; } return true; } @@ -421,12 +422,12 @@ $url = $title->getLocalUrl( array( 'action' => 'unapprove' ) ); - $msg = wfMessage( 'approvedrevs-unapprove' )->parse(); + $msg = wfMessage( 'approvedrevs-unapprove' )->text(); } else { $url = $title->getLocalUrl( array( 'action' => 'approve', 'oldid' => $row->rev_id ) ); - $msg = wfMessage( 'approvedrevs-approve' )->parse(); + $msg = wfMessage( 'approvedrevs-approve' )->text(); } $s .= ' (' . Xml::element( 'a', @@ -466,7 +467,7 @@ $wgOut->addHTML( "\t\t" . Xml::element( 'div', array( 'class' => 'successbox' ), - wfMessage( 'approvedrevs-approvesuccess' )->parse() + wfMessage( 'approvedrevs-approvesuccess' )->text() ) . "\n" ); $wgOut->addHTML( "\t\t" . Xml::element( 'p', @@ -508,9 +509,9 @@ // a blank right now or not global $egApprovedRevsBlankIfUnapproved; if ( $egApprovedRevsBlankIfUnapproved ) { - $successMsg = wfMessage( 'approvedrevs-unapprovesuccess2' )->parse(); + $successMsg = wfMessage( 'approvedrevs-unapprovesuccess2' )->text(); } else { - $successMsg = wfMessage( 'approvedrevs-unapprovesuccess' )->parse(); + $successMsg = wfMessage( 'approvedrevs-unapprovesuccess' )->text(); } global $wgOut; @@ -577,7 +578,7 @@ * 'Special:AdminLinks', defined by the Admin Links extension. */ static function addToAdminLinks( &$admin_links_tree ) { - $general_section = $admin_links_tree->getSection( wfMessage( 'adminlinks_general' )->parse() ); + $general_section = $admin_links_tree->getSection( wfMessage( 'adminlinks_general' )->text() ); $extensions_row = $general_section->getRow( 'extensions' ); if ( is_null( $extensions_row ) ) { $extensions_row = new ALRow( 'extensions' ); @@ -670,19 +671,19 @@ 'oldid' => $wgRequest->getInt( 'oldid' ) )
[MediaWiki-commits] [Gerrit] localize wmgBabelCategoryNames and wmgBabelMainCategory for ... - change (operations/mediawiki-config)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/115181 Change subject: localize wmgBabelCategoryNames and wmgBabelMainCategory for oswiki .. localize wmgBabelCategoryNames and wmgBabelMainCategory for oswiki for consistency purposes: see also https://www.mediawiki.org/wiki/Thread:Extension_talk:Babel/Problem_with_local_categories Change-Id: I97a13b5577b51f112f1cdfa359a17dd40ee8893e --- M wmf-config/InitialiseSettings.php 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/81/115181/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cc877f0..1bbe0d2 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11738,13 +11738,13 @@ 'N' => 'Bruker %code%-N', ), 'oswiki' => array( - '0' => 'User %code%-0', - '1' => 'User %code%-1', - '2' => 'User %code%-2', - '3' => 'User %code%-3', - '4' => 'User %code%-4', - '5' => 'User %code%-5', - 'N' => 'User %code%-N', + '0' => 'Архайджытæ %code%-0', + '1' => 'Архайджытæ %code%-1', + '2' => 'Архайджытæ %code%-2', + '3' => 'Архайджытæ %code%-3', + '4' => 'Архайджытæ %code%-4', + '5' => 'Архайджытæ %code%-5', + 'N' => 'Архайджытæ %code%-N', ), 'plwiki' => array( '0' => false, @@ -12002,7 +12002,7 @@ 'metawiki' => 'User %code%', 'minwiki' => 'Pengguna %code%', 'nowiki' => 'Bruker %code%', - 'oswiki' => 'User %code%', + 'oswiki' => 'Архайджытæ %code%', 'otrs_wikiwiki' => 'User %code%', 'plwiki' => 'User %code%', 'plwikisource' => 'User %code%', // Bug 39225 -- To view, visit https://gerrit.wikimedia.org/r/115181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97a13b5577b51f112f1cdfa359a17dd40ee8893e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes to last commit, based on comments from Nikerabbit - change (mediawiki...ApprovedRevs)
jenkins-bot has submitted this change and it was merged. Change subject: Fixes to last commit, based on comments from Nikerabbit .. Fixes to last commit, based on comments from Nikerabbit Change-Id: Idd011293cf141c972e980801c7c0628ce7ba034c --- M ApprovedRevs.hooks.php M SpecialApprovedRevs.php 2 files changed, 23 insertions(+), 22 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php index 9001201..2091e81 100644 --- a/ApprovedRevs.hooks.php +++ b/ApprovedRevs.hooks.php @@ -268,7 +268,7 @@ $text = Xml::element( 'span', array( 'class' => 'approvedAndLatestMsg' ), - wfMessage( 'approvedrevs-approvedandlatest' )->parse() + wfMessage( 'approvedrevs-approvedandlatest' )->text() ); } else { $text = wfMessage( 'approvedrevs-notlatest' )->parse(); @@ -314,8 +314,9 @@ $latestRevID = $title->getLatestRevID(); if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { ApprovedRevs::addCSS(); - global $wgOut; - $wgOut->addHTML( '' . wfMessage( 'approvedrevs-editwarning' )->parse() . "\n" ); + // A lengthy way to avoid not calling $wgOut... + // hopefully this is better! + $editPage->getArticle()->getContext()->getOutput()->wrapWikiMsg( "$1\n", 'approvedrevs-editwarning' ); } return true; } @@ -335,7 +336,7 @@ ApprovedRevs::addCSS(); $preFormHTML .= Xml::element ( 'p', array( 'style' => 'font-weight: bold' ), - wfMessage( 'approvedrevs-editwarning' )->parse() ) . "\n"; + wfMessage( 'approvedrevs-editwarning' )->text() ) . "\n"; } return true; } @@ -421,12 +422,12 @@ $url = $title->getLocalUrl( array( 'action' => 'unapprove' ) ); - $msg = wfMessage( 'approvedrevs-unapprove' )->parse(); + $msg = wfMessage( 'approvedrevs-unapprove' )->text(); } else { $url = $title->getLocalUrl( array( 'action' => 'approve', 'oldid' => $row->rev_id ) ); - $msg = wfMessage( 'approvedrevs-approve' )->parse(); + $msg = wfMessage( 'approvedrevs-approve' )->text(); } $s .= ' (' . Xml::element( 'a', @@ -466,7 +467,7 @@ $wgOut->addHTML( "\t\t" . Xml::element( 'div', array( 'class' => 'successbox' ), - wfMessage( 'approvedrevs-approvesuccess' )->parse() + wfMessage( 'approvedrevs-approvesuccess' )->text() ) . "\n" ); $wgOut->addHTML( "\t\t" . Xml::element( 'p', @@ -508,9 +509,9 @@ // a blank right now or not global $egApprovedRevsBlankIfUnapproved; if ( $egApprovedRevsBlankIfUnapproved ) { - $successMsg = wfMessage( 'approvedrevs-unapprovesuccess2' )->parse(); + $successMsg = wfMessage( 'approvedrevs-unapprovesuccess2' )->text(); } else { - $successMsg = wfMessage( 'approvedrevs-unapprovesuccess' )->parse(); + $successMsg = wfMessage( 'approvedrevs-unapprovesuccess' )->text(); } global $wgOut; @@ -577,7 +578,7 @@ * 'Special:AdminLinks', defined by the Admin Links extension. */ static function addToAdminLinks( &$admin_links_tree ) { - $general_section = $admin_links_tree->getSection( wfMessage( 'adminlinks_general' )->parse() ); + $general_section = $admin_links_tree->getSection( wfMessage( 'adminlinks_general' )->text() ); $extensions_row = $general_section->getRow( 'extensions' ); if ( is_null( $extensions_row ) ) { $extensions_row = new ALRow( 'extensions' ); @@ -670,19 +671,19 @@ 'oldid' => $wgRequest->getInt( 'oldid' ) ) ) ), -