[MediaWiki-commits] [Gerrit] Improved the phrasing of the extension description - change (mediawiki...UploadsLink)
Rillke has submitted this change and it was merged. Change subject: Improved the phrasing of the extension description .. Improved the phrasing of the extension description Change-Id: If77533958cf477f6faf385a711ed363e80ca894b --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Rillke: Looks good to me, approved Bartosz Dziewoński: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 39482ba..0a910ed 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,7 +5,7 @@ "Rainer Rillke" ] }, - "uploadslink-desc": "Adds a link to user's uploads listing to personal tools menu and a link of the relevant's user's upload listing to the Tools box.", + "uploadslink-desc": "Adds a link to the current user's uploads listing to the personal tools menu and a link to the relevant user's upload listing to the sidebar Tools menu.", "uploadslink-portlet-label": "Uploads", "tooltip-pt-uploads": "List of files you have uploaded", "uploadslink-toobox-label": "{{GENDER:$1|User}} uploads", -- To view, visit https://gerrit.wikimedia.org/r/287203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If77533958cf477f6faf385a711ed363e80ca894b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/UploadsLink Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Rillke Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Commons: Restrict changetags userright - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/286522 Change subject: Commons: Restrict changetags userright .. Commons: Restrict changetags userright Restrict changetags userright to sysops and bots on Wikimedia Commons. The decision is solely because there is currently no tag that is relevant to anyone and that we do not generally want to disallow everyone to change tags. Bug: T134196 Change-Id: I369a6b201bc2766b174532130230ff9b4da20a13 --- M wmf-config/InitialiseSettings.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/22/286522/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index b15f42d..edb00bf 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7601,6 +7601,7 @@ ], 'commonswiki' => [ 'user' => [ + 'changetags' => false, // T134196 'move' => false, // requested by Bdka on #wikimedia-tech, 2006-05-04 'upload' => true, // exception for T14556 ], @@ -7609,7 +7610,13 @@ 'autopatrolled' => [ 'autopatrol' => true ], 'filemover' => [ 'movefile' => true ], 'Image-reviewer' => [ 'autopatrol' => true, 'upload_by_url' => true ], - 'sysop' => [ 'upload_by_url' => true ], + 'sysop' => [ + 'changetags' => true, // T134196 + 'upload_by_url' => true, + ], + 'bot' => [ + 'changetags' => true, // T134196 + ] ], 'dawiki' => [ 'patroller' => [ 'patrol' => true, 'autopatrol' => true, 'rollback' => true, ], -- To view, visit https://gerrit.wikimedia.org/r/286522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I369a6b201bc2766b174532130230ff9b4da20a13 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable UploadsLink at Wikimedia Commons - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/286517 Change subject: Enable UploadsLink at Wikimedia Commons .. Enable UploadsLink at Wikimedia Commons Bug: T130018 Change-Id: I660833e0803e591618ae521b9e7dd826cfa5f880 --- M wmf-config/CommonSettings-labs.php M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings-labs.php M wmf-config/InitialiseSettings.php 4 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/17/286517/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index ecd1eeb..28430ad 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -134,10 +134,6 @@ $wgGlobalUserPageDBname = 'metawiki'; } -if ( $wmgUseUploadsLink ) { - wfLoadExtension( 'UploadsLink' ); -} - if ( $wmgUseUrlShortener ) { // Labs overrides $wgUrlShortenerReadOnly = false; diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index ca2f1e8..309af92 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -825,6 +825,10 @@ $wgFFmpegLocation = '/usr/bin/ffmpeg'; } +if ( $wmgUseUploadsLink ) { + wfLoadExtension( 'UploadsLink' ); +} + if ( $wmgUseUrlShortener ) { wfLoadExtension( 'UrlShortener' ); $wgUrlShortenerTemplate = '/$1'; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index aba9191..d7fdc2d 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -577,11 +577,6 @@ 'default' => false, // T69651 ], - 'wmgUseUploadsLink' => [ - 'default' => false, - 'commonswiki' => true, - ], - 'wmgUseUrlShortener' => [ 'default' => true, 'private' => false, diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index b15f42d..cb461a6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12512,6 +12512,11 @@ 'default' => 800, ], +'wmgUseUploadsLink' => [ + 'default' => false, + 'commonswiki' => true, +], + 'wmgUseUrlShortener' => [ 'default' => true, 'private' => false, -- To view, visit https://gerrit.wikimedia.org/r/286517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I660833e0803e591618ae521b9e7dd826cfa5f880 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add UploadsLink to production extension-list - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/286494 Change subject: Add UploadsLink to production extension-list .. Add UploadsLink to production extension-list Bug: T130018 Change-Id: Ica916b67f2cb9d1a0f541f0a23ac24aea77bb1d7 --- M wmf-config/extension-list M wmf-config/extension-list-labs 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/94/286494/1 diff --git a/wmf-config/extension-list b/wmf-config/extension-list index 781759d..e29cd05 100644 --- a/wmf-config/extension-list +++ b/wmf-config/extension-list @@ -128,6 +128,7 @@ $IP/extensions/TrustedXFF/TrustedXFF.php $IP/extensions/UnicodeConverter/extension.json $IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php +$IP/extensions/UploadsLink/extension.json $IP/extensions/UploadWizard/UploadWizard.php $IP/extensions/UrlShortener/extension.json $IP/extensions/UserMerge/UserMerge.php diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs index c295c28..9d93b1b 100644 --- a/wmf-config/extension-list-labs +++ b/wmf-config/extension-list-labs @@ -1,6 +1,5 @@ $IP/extensions/Capiunto/Capiunto.php $IP/extensions/Sentry/Sentry.php -$IP/extensions/UploadsLink/extension.json $IP/extensions/UrlShortener/extension.json $IP/extensions/EventBus/extension.json $IP/extensions/Kartographer/extension.json -- To view, visit https://gerrit.wikimedia.org/r/286494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica916b67f2cb9d1a0f541f0a23ac24aea77bb1d7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not validate relevant user name - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/282503 Change subject: Do not validate relevant user name .. Do not validate relevant user name - This make Special:Log's behaviour consistent with other special pages, e.g. Special:Contributions. Change-Id: Ic0a9322d920d7514bacac1f29a1da4fe57cae854 --- M includes/logging/LogPager.php M includes/specials/SpecialLog.php 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/282503/1 diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index 410c970..3d04641 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -384,6 +384,8 @@ } /** +* Guaranteed to either return a valid title string or a Zero-Length String +* * @return string */ public function getPerformer() { diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index bbe0e0d..af087a6 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -187,7 +187,8 @@ # Set relevant user if ( $pager->getPerformer() ) { - $this->getSkin()->setRelevantUser( User::newFromName( $pager->getPerformer() ) ); + $performerUser = User::newFromName( $pager->getPerformer(), false ); + $this->getSkin()->setRelevantUser( $performerUser ); } # Show form options -- To view, visit https://gerrit.wikimedia.org/r/282503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0a9322d920d7514bacac1f29a1da4fe57cae854 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up UploadsLink on beta cluster - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/281651 Change subject: Set up UploadsLink on beta cluster .. Set up UploadsLink on beta cluster Bug: T131844 Change-Id: I04f1d256cfe995193662301c0272dee427e2c313 --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php M wmf-config/extension-list-labs 3 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/51/281651/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index 59de815..f32cbdc 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -139,6 +139,10 @@ $wgGlobalUserPageDBname = 'metawiki'; } +if ( $wmgUseUploadsLink ) { + wfLoadExtension( 'UploadsLink' ); +} + if ( $wmgUseUrlShortener ) { // Labs overrides $wgUrlShortenerReadOnly = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index a8a9538..9c97b82 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -609,6 +609,11 @@ 'default' => false, # T69651 ), + 'wmgUseUploadsLink' => array( + 'default' => false, + 'commonswiki' => true, + ), + 'wmgUseUrlShortener' => array( 'default' => true, 'private' => false, diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs index f195f2e..c65d74c 100644 --- a/wmf-config/extension-list-labs +++ b/wmf-config/extension-list-labs @@ -1,5 +1,6 @@ $IP/extensions/Capiunto/Capiunto.php $IP/extensions/Sentry/Sentry.php +$IP/extensions/UploadsLink/extension.json $IP/extensions/UrlShortener/extension.json $IP/extensions/EventBus/extension.json $IP/extensions/Kartographer/extension.json -- To view, visit https://gerrit.wikimedia.org/r/281651 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04f1d256cfe995193662301c0272dee427e2c313 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add UploadsLink to extension-list - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/281646 Change subject: Add UploadsLink to extension-list .. Add UploadsLink to extension-list Bug: T130018 Change-Id: I14bf05022d705e4d144c0cc0c9004a438034a0c8 --- M wmf-config/extension-list 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/46/281646/1 diff --git a/wmf-config/extension-list b/wmf-config/extension-list index 781759d..e29cd05 100644 --- a/wmf-config/extension-list +++ b/wmf-config/extension-list @@ -128,6 +128,7 @@ $IP/extensions/TrustedXFF/TrustedXFF.php $IP/extensions/UnicodeConverter/extension.json $IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php +$IP/extensions/UploadsLink/extension.json $IP/extensions/UploadWizard/UploadWizard.php $IP/extensions/UrlShortener/extension.json $IP/extensions/UserMerge/UserMerge.php -- To view, visit https://gerrit.wikimedia.org/r/281646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14bf05022d705e4d144c0cc0c9004a438034a0c8 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make-wmf-branch: Branch UploadsLink extension - change (mediawiki...release)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/281644 Change subject: make-wmf-branch: Branch UploadsLink extension .. make-wmf-branch: Branch UploadsLink extension Change-Id: Ic198b0444039e6613761f214211b0bc1ec2373f2 --- M make-wmf-branch/config.json 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/44/281644/1 diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json index dc9cc7a..a763a41 100644 --- a/make-wmf-branch/config.json +++ b/make-wmf-branch/config.json @@ -135,6 +135,7 @@ "TrustedXFF", "UnicodeConverter", "UniversalLanguageSelector", + "UploadsLink", "UploadWizard", "UrlShortener", "UserMerge", -- To view, visit https://gerrit.wikimedia.org/r/281644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic198b0444039e6613761f214211b0bc1ec2373f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set relevant user on Special:CentralAuth - change (mediawiki...CentralAuth)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/281475 Change subject: Set relevant user on Special:CentralAuth .. Set relevant user on Special:CentralAuth With the same logic as in I7481ab0fc1720e5e8 Bug: T131740 Change-Id: Ibd028f468c8de3a46791f430ccdbb61b3bdfcc0b --- M includes/specials/SpecialCentralAuth.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/75/281475/1 diff --git a/includes/specials/SpecialCentralAuth.php b/includes/specials/SpecialCentralAuth.php index 5b3b8cb..2dd4856 100644 --- a/includes/specials/SpecialCentralAuth.php +++ b/includes/specials/SpecialCentralAuth.php @@ -72,6 +72,12 @@ return; } + $userPage = Title::newFromText( $this->mUserName, NS_USER ); + if ( $userPage ) { + $localUser = User::newFromName( $userPage->getText(), false ); + $this->getSkin()->setRelevantUser( $localUser ); + } + // per bug 47991 $this->getOutput()->setHTMLTitle( $this->msg( 'pagetitle', -- To view, visit https://gerrit.wikimedia.org/r/281475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd028f468c8de3a46791f430ccdbb61b3bdfcc0b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Standardize description message key and message - change (mediawiki...MolHandler)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/280918 Change subject: Standardize description message key and message .. Standardize description message key and message Follow-up of 0ec98ca3a09d Change-Id: I9ca833c0b51ec32c193ec64b5e89af6a8dbcd8e7 --- M MolHandler.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MolHandler refs/changes/18/280918/1 diff --git a/MolHandler.php b/MolHandler.php index 4478409..5756803 100644 --- a/MolHandler.php +++ b/MolHandler.php @@ -30,7 +30,7 @@ 'Rainer Rillke', ), 'version' => '0.1.0', - 'descriptionmsg' => 'mwe-mh-credits-desc', + 'descriptionmsg' => 'molhandler-desc', 'url' => 'https://www.mediawiki.org/wiki/Extension:MolHandler', 'license-name' => 'GPL-2.0+', ); -- To view, visit https://gerrit.wikimedia.org/r/280918 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ca833c0b51ec32c193ec64b5e89af6a8dbcd8e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MolHandler Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ListFiles: Call Skin::setRelevantUser() when applicable - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/277188 Change subject: ListFiles: Call Skin::setRelevantUser() when applicable .. ListFiles: Call Skin::setRelevantUser() when applicable Also validate user name before calling `User::newFromName()` Change-Id: I7481ab0fc1720e5e840f0d552934324f676c0241 --- M includes/specials/SpecialListfiles.php 1 file changed, 44 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/277188/1 diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 16471fe..e820021 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -48,6 +48,11 @@ $showAll ); + $user = $pager->getRelevantUser(); + if ( !$this->including() ) { + $this->getSkin()->setRelevantUser( $user ); + } + $out = $this->getOutput(); if ( $this->including() ) { $out->addParserOutputContent( $pager->getBodyOutput() ); @@ -91,6 +96,11 @@ protected $mUserName = null; + /** +* @property User The relevant user +*/ + protected $mUser = null; + protected $mSearch = ''; protected $mIncluding = false; @@ -108,20 +118,18 @@ if ( $userName !== null && $userName !== '' ) { $nt = Title::newFromText( $userName, NS_USER ); - $user = User::newFromName( $userName, false ); - if ( !is_null( $nt ) ) { + if ( is_null( $nt ) ) { + $this->outputUserDoesNotExist( $userName ); + } else { $this->mUserName = $nt->getText(); + $user = User::newFromName( $this->mUserName, false ); + if ( $user ) { + $this->mUser = $user; + } + if ( !$user || ( $user->isAnon() && !User::isIP( $user->getName() ) ) ) { + $this->outputUserDoesNotExist( $userName ); + } } - if ( !$user || ( $user->isAnon() && !User::isIP( $user->getName() ) ) ) { - $this->getOutput()->wrapWikiMsg( - "\n$1\n", - [ - 'listfiles-userdoesnotexist', - wfEscapeWikiText( $userName ), - ] - ); - } - } if ( $search !== '' && !$this->getConfig()->get( 'MiserMode' ) ) { @@ -150,6 +158,30 @@ } /** +* Get the user relevant to the ImageList +* +* @return User|null +*/ + function getRelevantUser() { + return $this->mUser; + } + + /** +* Add a message to the output stating that the user doesn't exist +* +* @param string $userName Unescaped user name +*/ + protected function outputUserDoesNotExist( $userName ) { + $this->getOutput()->wrapWikiMsg( + "\n$1\n", + [ + 'listfiles-userdoesnotexist', + wfEscapeWikiText( $userName ), + ] + ); + } + + /** * Build the where clause of the query. * * Replaces the older mQueryConds member variable. -- To view, visit https://gerrit.wikimedia.org/r/277188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7481ab0fc1720e5e840f0d552934324f676c0241 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Call Skin::setRelevantUser() when applicable - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/277048 Change subject: Call Skin::setRelevantUser() when applicable .. Call Skin::setRelevantUser() when applicable Change-Id: If1be3b179e05302e40cda697be7d6d65eaab568f --- M includes/specials/SpecialListfiles.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/277048/1 diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 16471fe..98bda22 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -38,6 +38,16 @@ $userName = $this->getRequest()->getText( 'user', $par ); $search = $this->getRequest()->getText( 'ilsearch', '' ); $showAll = $this->getRequest()->getBool( 'ilshowall', false ); + + // Match the behaviour of SpecialContributions when setting + // the relevant user + $userPage = Title::makeTitleSafe( NS_USER, $userName ); + if ( $userPage ) { + $userObj = User::newFromName( $userPage->getText(), false ); + if ( $userObj ) { + $this->getSkin()->setRelevantUser( $userObj ); + } + } } $pager = new ImageListPager( -- To view, visit https://gerrit.wikimedia.org/r/277048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1be3b179e05302e40cda697be7d6d65eaab568f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add composer.json - change (mediawiki...MolHandler)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276992 Change subject: Add composer.json .. Add composer.json Per - https://www.mediawiki.org/wiki/Continuous_integration/Entry_points#PHP - https://github.com/wikimedia/mediawiki-tools-codesniffer Change-Id: I24cef6c6cd081f9145694d67591f4e5d35f8b94f --- A .gitignore M MolHandler.mime.php M MolHandler.php M MolHandler_body.php A composer.json A phpcs.xml M tests/phpunit/MolHandler.mimeTest.php 7 files changed, 71 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MolHandler refs/changes/92/276992/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..d1502b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor/ +composer.lock diff --git a/MolHandler.mime.php b/MolHandler.mime.php index 2ae6ce5..a581d7e 100755 --- a/MolHandler.mime.php +++ b/MolHandler.mime.php @@ -58,9 +58,9 @@ * @return bool */ private static function isChemFileExtension( $extension ) { - static $types = array( + static $types = [ 'mol', 'sdf', 'rxn', 'rd', 'rg', - ); + ]; return in_array( strtolower( $extension ), $types ); } @@ -103,22 +103,22 @@ public static function doGuessChemicalMime( &$head, &$tail, $file ) { # Note that a lot of chemical table files contain embedded molfiles. # Therefore, always check for these container files before checking for molfiles! - static $headers = array( + static $headers = [ '$RXN' => 'chemical/x-mdl-rxnfile', '$RDFILE ' => 'chemical/x-mdl-rdfile', '$MDL' => 'chemical/x-mdl-rgfile', - ); - static $tailsRegExps = array( + ]; + static $tailsRegExps = [ '/\n\s*\$\$\$\$\s*$/' => 'chemical/x-mdl-sdfile', # MDL-Molfile with all kind of line endings '/\n\s*M END\s*$/' => 'chemical/x-mdl-molfile', - ); - static $headersRegExps = array( + ]; + static $headersRegExps = [ # MDL-Molfile counts line # #atoms #bond_numbers #atom_lists [obsolete] [999|#propery_lines] V '/\n(\s*\d{1,3}\s+){3}[^\n]*(?:\d+\s+){1,12}V\d{4,5}\n/' => 'chemical/x-mdl-molfile', - ); + ]; # Compare headers foreach ( $headers as $magic => $candidate ) { diff --git a/MolHandler.php b/MolHandler.php index 4478409..31b24ae 100644 --- a/MolHandler.php +++ b/MolHandler.php @@ -23,17 +23,17 @@ } // Credits -$wgExtensionCredits['media'][] = array( +$wgExtensionCredits['media'][] = [ 'path' => __FILE__, 'name' => 'Mol Handler', - 'author' => array( + 'author' => [ 'Rainer Rillke', - ), + ], 'version' => '0.1.0', 'descriptionmsg' => 'mwe-mh-credits-desc', 'url' => 'https://www.mediawiki.org/wiki/Extension:MolHandler', 'license-name' => 'GPL-2.0+', -); +]; /* Configuration */ $wgMolHandlerDir = __DIR__ . '/'; @@ -41,21 +41,21 @@ # Converter. Note that babel is not yet able to convert reactions $wgMolConverterPath = '/usr/bin'; -$wgMolConvertCommands = array( - 'babel' => array( +$wgMolConvertCommands = [ + 'babel' => [ 'command' => '$path/babel -i$format $input $output', - 'supportedFormats' => array( 'mol' ), + 'supportedFormats' => [ 'mol' ], 'memory' => 204800 - ), - 'indigo' => array( + ], + 'indigo' => [ 'command' => '$path/indigo-depict $input $output', - 'supportedFormats' => array( 'mol', 'rxn' ), + 'supportedFormats' => [ 'mol', 'rxn' ], // 200 MiB - indigo-depict required about 40 MiB with all libraries in // tests but sometimes seems to need much more; no errors with 200 MiB // on the test wiki so far; See Bug 67074. 'memory' => 204800 - ), -); + ], +]; $wgMolConverter = 'indigo'; $wgMediaHandlers['chemical/x-mdl-molfile'] = 'MolMediaHandler'; diff --git a/MolHandler_body.php b/MolHandler_body.php index e924455..ec2f44e 100644 --- a/MolHandler_body.php +++ b/MolHandler_body.php @@ -136,7 +136,7 @@ if ( $tempFSFile ) { # Clean up temporary file $tempFSFile->purge(); - } else if ( is_file( $svgPath ) )
[MediaWiki-commits] [Gerrit] Add extension.json - change (mediawiki...MolHandler)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276977 Change subject: Add extension.json .. Add extension.json Per https://www.mediawiki.org/wiki/Manual:Extension_registration Change-Id: I26019c79b78825d59a3462be814e8d35264f4a10 --- A composer.json A extension.json 2 files changed, 73 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MolHandler refs/changes/77/276977/1 diff --git a/composer.json b/composer.json new file mode 100644 index 000..083767b --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "0.5.1" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ] + } +} diff --git a/extension.json b/extension.json new file mode 100644 index 000..5cfe56c --- /dev/null +++ b/extension.json @@ -0,0 +1,61 @@ +{ + "name": "MolHandler", + "author": [ + "Rainer Rillke" + ], + "url": "https://www.mediawiki.org/wiki/Extension:MolHandler";, + "version": "0.1.0", + "descriptionmsg": "mwe-mh-credits-desc", + "license-name": "GPL-2.0+", + "requires": { + "MediaWiki": ">= 1.25.0" + }, + "type": "media", + "MessagesDirs": { + "MolHandler": [ + "i18n" + ] + }, + "AutoloadClasses": { + "MolHandlerHooks": "MolHandlerHooks.php", + "MolHandlerMime": "MolHandler.mime.php", + "MolHandler": "MolHandler_body.php", + "MolMediaHandler": "MolMediaHandler.php", + "RxnMediaHandler": "RxnMediaHandler.php" + }, + "Hooks": { + "MimeMagicInit": [ + "MolHandlerMime::onMimeMagicInit" + ], + "MimeMagicImproveFromExtension": [ + "MolHandlerMime::onMimeMagicImproveFromExtension" + ], + "MimeMagicGuessFromContent": [ + "MolHandlerMime::onMimeMagicGuessFromContent" + ], + "UnitTestsList": [ + "MolHandlerHooks::onUnitTestsList" + ] + }, + "config": { + "MolConverterPath": "/usr/bin", + "MolConvertCommands": { + "babel": { + "command": "$path/babel -i$format $input $output", + "supportedFormats": ["mol"], + "memory": 204800 + }, + "indigo": { + "command": "$path/indigo-depict $input $output", + "supportedFormats": ["mol", "rxn"], + "memory": 204800 + } + }, + "MolConverter": "indigo", + "MediaHandlers": { + "chemical/x-mdl-molfile": "MolMediaHandler", + "chemical/x-mdl-rxnfile": "RxnMediaHandler" + } + }, + "manifest_version": 1 +} -- To view, visit https://gerrit.wikimedia.org/r/276977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26019c79b78825d59a3462be814e8d35264f4a10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MolHandler Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] I18n: document, use parameter with {{GENDER:}} - change (mediawiki...UploadsLink)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276961 Change subject: I18n: document, use parameter with {{GENDER:}} .. I18n: document, use parameter with {{GENDER:}} Change-Id: I33fc0e5601838e663816a1f2e0bf33e98e186bde --- M i18n/en.json M i18n/qqq.json 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadsLink refs/changes/61/276961/1 diff --git a/i18n/en.json b/i18n/en.json index a924034..39482ba 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,6 +8,6 @@ "uploadslink-desc": "Adds a link to user's uploads listing to personal tools menu and a link of the relevant's user's upload listing to the Tools box.", "uploadslink-portlet-label": "Uploads", "tooltip-pt-uploads": "List of files you have uploaded", - "uploadslink-toobox-label": "User uploads", - "tooltip-tb-uploads": "A list of uploads by this user" + "uploadslink-toobox-label": "{{GENDER:$1|User}} uploads", + "tooltip-tb-uploads": "A list of uploads by this {{GENDER:$1|user}}" } diff --git a/i18n/qqq.json b/i18n/qqq.json index a0aaf76..3e7fc42 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -7,6 +7,6 @@ "uploadslink-desc": "{{desc|name=UploadsLink|url=https://www.mediawiki.org/wiki/Extension:UploadsLink}}";, "uploadslink-portlet-label": "Label of the link in personal tools menu.\n\nThe tooltip for the link is {{msg-mw|Tooltip-pt-uploads}}.\n{{Identical|Uploads}}", "tooltip-pt-uploads": "Tooltip of the link in personal tools menu.", - "uploadslink-toobox-label": "Label of the link in Tools box.\n\nThe tooltip for the link is {{msg-mw|Tooltip-tb-uploads}}.", - "tooltip-tb-uploads": "Tooltip of the link in Tools box." + "uploadslink-toobox-label": "Label of the link in Tools box.\n\nParameters:\n* $1 - username\n\nThe tooltip for the link is {{msg-mw|Tooltip-tb-uploads}}.", + "tooltip-tb-uploads": "Tooltip of the link in Tools box.\n\nParameters:\n* $1 - username" } -- To view, visit https://gerrit.wikimedia.org/r/276961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33fc0e5601838e663816a1f2e0bf33e98e186bde Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadsLink Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add uploadslink to available roles - change (mediawiki/vagrant)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276925 Change subject: Add uploadslink to available roles .. Add uploadslink to available roles Change-Id: Ia4c721f60a7be0d03deafb9a5c0425f377ed889f --- A puppet/modules/role/manifests/uploadslink.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/25/276925/1 diff --git a/puppet/modules/role/manifests/uploadslink.pp b/puppet/modules/role/manifests/uploadslink.pp new file mode 100644 index 000..91ecc87 --- /dev/null +++ b/puppet/modules/role/manifests/uploadslink.pp @@ -0,0 +1,7 @@ +# == Class: role::uploadslink +# The UploadsLink extension adds a link to the personal uploads listing, +# within the personal tools menu and one to the Tools-box on user pages +# and pages that relate to a user. +class role::uploadslink { +mediawiki::extension { 'UploadsLink': } +} -- To view, visit https://gerrit.wikimedia.org/r/276925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4c721f60a7be0d03deafb9a5c0425f377ed889f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] UploadsLink: Extension providing links to uploads listings - change (mediawiki...UploadsLink)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276836 Change subject: UploadsLink: Extension providing links to uploads listings .. UploadsLink: Extension providing links to uploads listings Bug: T32915 Change-Id: Id2f7d9471e319fc67f05cc1e6e87718f88a653e9 --- M COPYING D SandboxLink.php D SandboxLinkHooks.php A UploadsLink.php A UploadsLinkHooks.php M extension.json D i18n/af.json D i18n/ar.json D i18n/ast.json D i18n/bh.json D i18n/bn.json D i18n/ca.json D i18n/ce.json D i18n/ckb.json D i18n/cs.json D i18n/da.json D i18n/de.json D i18n/el.json M i18n/en.json D i18n/eo.json D i18n/es.json D i18n/fa.json D i18n/fr.json D i18n/gl.json D i18n/gsw.json D i18n/he.json D i18n/hi.json D i18n/hu.json D i18n/hy.json D i18n/ilo.json D i18n/is.json D i18n/it.json D i18n/ja.json D i18n/kk-cyrl.json D i18n/kn.json D i18n/ko.json D i18n/ksh.json D i18n/lad.json D i18n/lb.json D i18n/lv.json D i18n/mai.json D i18n/min.json D i18n/mk.json D i18n/ne.json D i18n/nl.json D i18n/or.json D i18n/pl.json D i18n/pt-br.json D i18n/pt.json M i18n/qqq.json D i18n/ru.json D i18n/sa.json D i18n/sk.json D i18n/so.json D i18n/sr-ec.json D i18n/sr-el.json D i18n/sv.json D i18n/ta.json D i18n/te.json D i18n/th.json D i18n/tl.json D i18n/uk.json D i18n/ur.json D i18n/vi.json D i18n/zh-hans.json D i18n/zh-hant.json 66 files changed, 218 insertions(+), 789 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadsLink refs/changes/36/276836/1 diff --git a/COPYING b/COPYING index 96d3f68..2363f5f 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 +Copyright (c) 2014-2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/SandboxLink.php b/SandboxLink.php deleted file mode 100644 index acff19f..000 --- a/SandboxLink.php +++ /dev/null @@ -1,15 +0,0 @@ -https://www.mediawiki.org/wiki/Extension:SandboxLink - * - * @file - * @license MIT - */ -if ( function_exists( 'wfLoadExtension' ) ) { - wfLoadExtension( 'SandboxLink' ); - $wgMessagesDirs['SandboxLink'] = __DIR__ . '/i18n'; -} else { - die( 'This version of the SandboxLink extension requires MediaWiki 1.25+' ); -} diff --git a/SandboxLinkHooks.php b/SandboxLinkHooks.php deleted file mode 100644 index 0603ba1..000 --- a/SandboxLinkHooks.php +++ /dev/null @@ -1,128 +0,0 @@ -https://www.mediawiki.org/wiki/Extension:SandboxLink - * - * @file - * @license MIT - */ - -class SandboxLinkHooks { - /** -* Return a Title for the page where the current user's sandbox is. -* -* @param Skin $skin For context -* @return Title|null -*/ - private static function getSandboxTitle( Skin $skin ) { - $subpageMsg = $skin->msg( 'sandboxlink-subpage-name' )->inContentLanguage(); - if ( $subpageMsg->isDisabled() ) { - return null; - } - $username = $skin->getUser()->getName(); - return Title::makeTitleSafe( NS_USER, $username . '/' . $subpageMsg->plain() ); - } - - /** -* Return a link descriptor for the page where the current user's sandbox is, -* relative to current title and in current language. -* -* @param Skin $skin For context -* @return array Link descriptor in a format accepted by PersonalUrls hook -*/ - private static function makeSandboxLink( Skin $skin ) { - $currentTitle = $skin->getTitle(); - - $title = self::getSandboxTitle( $skin ); - if ( !$title ) { - return null; - } - - if ( $title->exists() && $title->isRedirect() ) { - $href = $title->getLocalURL( array( 'redirect' => 'no' ) ); - } elseif ( $title->exists() ) { - $href = $title->getLocalURL(); - } else { - $query = array( 'action' => 'edit', 'redlink' => '1' ); - - $editintroMsg = $skin->msg( 'sandboxlink-editintro-pagename' )->inContentLanguage(); - if ( !$editintroMsg->isDisabled() ) { - $query['editintro'] = $editintroMsg->plain(); - } - - $preloadMsg = $skin->msg( 'sandboxlink-preload-pagename' )->inContentLanguage(); - if ( !$preloadMsg->isDisabled() ) { - $query['preload'] = $preloadMsg->plain(); - } - - $href = $title->getLocalURL( $query ); - } - - return array( - 'id' => 'pt-sandbox', - 'text' => $skin->msg( 'sandboxlink-portlet-label' )->tex
[MediaWiki-commits] [Gerrit] Add pixabay.com to wgCopyUploadsDomains - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276069 Change subject: Add pixabay.com to wgCopyUploadsDomains .. Add pixabay.com to wgCopyUploadsDomains Change-Id: I678c07d9b124f9b5132bd9057ee3787ab02fe616 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/276069/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3cf7b78..29e6cf7 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11963,6 +11963,7 @@ 'webapi.aucklandmuseum.com',// Auckland Museum - T122995 '*.e-pics.ethz.ch', // ETH Library - T123109 '*.museumvictoria.com.au', // Victoria State (AU) Museum, requested in T125387 + 'pixabay.com', // Pixbay: Free high quality images ), ), -- To view, visit https://gerrit.wikimedia.org/r/276069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I678c07d9b124f9b5132bd9057ee3787ab02fe616 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Parse huge XML metadata from DjVu images - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/249724 Change subject: Parse huge XML metadata from DjVu images .. Parse huge XML metadata from DjVu images Bug: T117013 Change-Id: I88ef3c1390dc48fa2cfe41d83867eaf0c244726e --- M includes/media/DjVu.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/249724/1 diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php index 662c330..5cc05f2 100644 --- a/includes/media/DjVu.php +++ b/includes/media/DjVu.php @@ -309,7 +309,7 @@ // Set to false rather than null to avoid further attempts $image->dejaMetaTree = false; $image->djvuTextTree = false; - $tree = new SimpleXMLElement( $metadata ); + $tree = new SimpleXMLElement( $metadata, LIBXML_PARSEHUGE ); if ( $tree->getName() == 'mw-djvu' ) { /** @var SimpleXMLElement $b */ foreach ( $tree->children() as $b ) { -- To view, visit https://gerrit.wikimedia.org/r/249724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88ef3c1390dc48fa2cfe41d83867eaf0c244726e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] FlickrUpload form: Button needs to be of type `submit` - change (mediawiki...UploadWizard)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/214112 Change subject: FlickrUpload form: Button needs to be of type `submit` .. FlickrUpload form: Button needs to be of type `submit` ... in order to get the form submitted and a submit event. Bug: T100540 Change-Id: Id70275c92514749d0c832a264f0b7faeb9f973b5 --- M resources/mw.UploadWizard.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/12/214112/1 diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index a4470e9..6040f85 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -160,7 +160,8 @@ flickrButton = new oo.ui.ButtonInputWidget( { id: 'mwe-upwiz-upload-ctrl-flickr', label: mw.message( 'mwe-upwiz-add-flickr' ).text(), - flags: [ 'progressive', 'primary' ] + flags: [ 'progressive', 'primary' ], + type: 'submit' } ); $flickrForm.append( flickrButton.$element ); -- To view, visit https://gerrit.wikimedia.org/r/214112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id70275c92514749d0c832a264f0b7faeb9f973b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make PHP unit parser tests pass again after translation update - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/195245 Change subject: Make PHP unit parser tests pass again after translation update .. Make PHP unit parser tests pass again after translation update - sr-ec.json updated with 17607cf8965bf332f8c80d7a8e25a8c4e1107696 Change-Id: I7dfc9bcea2be85dd42d344858ce02246432f7fe1 --- M tests/parser/parserTests.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/195245/1 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 96f8210..966b666 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -17850,7 +17850,7 @@ !! wikitext == -{Naslov}- == !! html -§Naslov[уреди] +§Naslov[уреди] !! end -- To view, visit https://gerrit.wikimedia.org/r/195245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7dfc9bcea2be85dd42d344858ce02246432f7fe1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upload form: Show or hide form controls dependent on existen... - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/195230 Change subject: Upload form: Show or hide form controls dependent on existence of destination .. Upload form: Show or hide form controls dependent on existence of destination The status before this patch is that said form controls are absent or not solely dependent on whether the `wpForReupload` parameter is set. This works fine as long as the user does have an outdated link in their bookmarks, opens a file description page which is deleted inbetween and presses "upload a new version of this file" or enters a destination at which a file description page exists. In these cases the upload form previously has shown or hidden form controls relevant to the creation of a new file description page which either let to confusion on the user's end: - Why should I pick a license, my work is already licensed? - Why didn't my new license choice during re-upload change the file description page?) Or on the administrator's end: - How could this user upload a file without specifying a license? Minor cleanup: - Use `$license` variable instead of querying the same again. - Documenting methods touched by this change. Bug: T91889 Change-Id: I5baf02165af7cd753c3dd75b93159b6b117bc942 --- M includes/api/ApiQueryImageInfo.php M includes/specials/SpecialUpload.php M resources/src/mediawiki.special/mediawiki.special.upload.js 3 files changed, 87 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/195230/1 diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index c4ca5d6..13fffd3 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -465,7 +465,18 @@ $uploadwarning = isset( $prop['uploadwarning'] ); if ( $uploadwarning ) { - $vals['html'] = SpecialUpload::getExistsWarning( UploadBase::getExistsWarning( $file ) ); + $existsWarning = UploadBase::getExistsWarning( $file ); + $vals['uploadwarning'] = array( + 'code' => $existsWarning['warning'], + 'html' => SpecialUpload::getExistsWarning( $existsWarning ), + ); + // Title::exists() allows hooks to alter its result; + // UploadBase::getExistsWarning returns one warning only and + // considers the existence of a file (not the description page) + // more important + if ( $file->getTitle()->getArticleID() ) { + $vals['uploadwarning']['page-exists'] = ''; + } } if ( $file->isDeleted( File::DELETED_FILE ) ) { diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 72d02e0..f05312bb 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -460,8 +460,16 @@ } } - // Get the page text if this is not a reupload - if ( !$this->mForReUpload ) { + // Get the page text if the file description page does not exist + $title = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName ); + $descPageExists = $title instanceof Title && $title->exists(); + + // It might be possible that a file description has been deleted since + // we displayed the upload form; in this case some fields are likely + // empty but we still generate a file description skeleton which + // makes it easier to the user to complete it compared to creating + // a totally new file description page. + if ( !$descPageExists ) { $pageText = self::getInitialPageText( $this->mComment, $this->mLicense, $this->mCopyrightStatus, $this->mCopyrightSource, $this->getConfig() ); } else { @@ -793,6 +801,7 @@ $this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] ); $this->mDestWarningAck = !empty( $options['destwarningack'] ); $this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : ''; + $this->mDestDescPageTitle = Title::makeTitleSafe( NS_FILE, $this->mDestFile ); $this->mComment = isset( $options['description'] ) ? $options['description'] : ''; @@ -1046,9 +1055,21 @@ ) ); + # Indicates that overwriting an existing file is desired if ( $this->mForReUpload ) { $descriptor['DestFile']['readonly'] = true; -
[MediaWiki-commits] [Gerrit] Use mw.Title.newFromFileName for sanitization after source f... - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/195001 Change subject: Use mw.Title.newFromFileName for sanitization after source file selection .. Use mw.Title.newFromFileName for sanitization after source file selection - Replaced spaces with underscores and capitalization if required is automatically done by mw.Title. Internally mw.Title is using wgCaseSensitiveNamespaces. - Removed wgCapitalizeUploads - not in use and not useful anymore; see https://phabricator.wikimedia.org/P369 - On top of that what was done before, now other characters that would cause an invalid file name error to be thrown after form submission are now replaced with characters that are accepted by MediaWiki. Change-Id: Ib9d2ae7584969284b047b4c681ffae25290d8c89 --- M includes/specials/SpecialUpload.php M resources/src/mediawiki.special/mediawiki.special.upload.js 2 files changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/195001/1 diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 72d02e0..3e2a6c0 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -1151,7 +1151,6 @@ 'wgCheckFileExtensions' => $config->get( 'CheckFileExtensions' ), 'wgStrictFileExtensions' => $config->get( 'StrictFileExtensions' ), 'wgFileExtensions' => array_values( array_unique( $config->get( 'FileExtensions' ) ) ), - 'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ), 'wgMaxUploadSize' => $this->mMaxUploadSize, 'wgFileCanRotate' => SpecialUpload::rotationEnabled(), ); diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 2f03c51..3f08f8e 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -229,12 +229,9 @@ } } - // Replace spaces by underscores - fname = fname.replace( / /g, '_' ); - // Capitalise first letter if needed - if ( mw.config.get( 'wgCapitalizeUploads' ) ) { - fname = fname.charAt( 0 ).toUpperCase().concat( fname.slice( 1 ) ); - } + // Sanitize title, replace spaces by underscores, + // capitalise first letter if needed + fname = mw.Title.newFromFileName( fname ).getMain(); // Output result if ( $( '#wpDestFile' ).length ) { -- To view, visit https://gerrit.wikimedia.org/r/195001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9d2ae7584969284b047b4c681ffae25290d8c89 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Special.upload.js: Avoid making functions within loops - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/190648 Change subject: Special.upload.js: Avoid making functions within loops .. Special.upload.js: Avoid making functions within loops The old implementation used a dirty trick to fool JSHint; though there is really no need to create a function for each single radio input. Change-Id: I1e5c7c403efb26c74df39669491bc49602a9df4f --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 31 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/190648/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index f405c7a..24705e3 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -531,32 +531,39 @@ // Disable all upload source fields except the selected one $( function () { - var i, $row, - $rows = $( '.mw-htmlform-field-UploadSourceField' ); + var rowSelector = '.mw-htmlform-field-UploadSourceField', + $rows = $( rowSelector ), + $radios = $rows.find( 'input[type="radio"]' ), + onRadioChange; - /** -* @param {jQuery} $currentRow -* @return {Function} Handler -* @return {jQuery.Event} return.e -*/ - function createHandler( $currentRow ) { - return function () { - $( '.mw-upload-source-error' ).remove(); - if ( this.checked ) { - // Disable all inputs - $rows.find( 'input[name!="wpSourceType"]' ).prop( 'disabled', true ); - // Re-enable the current one - $currentRow.find( 'input' ).prop( 'disabled', false ); - } - }; - } - for ( i = $rows.length; i; i-- ) { - $row = $rows.eq( i - 1 ); - $row - .find( 'input[name="wpSourceType"]' ) - .change( createHandler( $row ) ); - } + onRadioChange = function () { + var $currentRowInputs; + + if ( !this.checked ) { + return; + } + + $( '.mw-upload-source-error' ).remove(); + + // Enable selected upload method, + // disable source inputs of alternative + // upload methods + $currentRowInputs = $( this ) + .closest( rowSelector ) + .find( 'input' ) + .prop( 'disabled', false ); + + $rows + .find( 'input' ) + .not( $radios ) + .not( $currentRowInputs ) + .prop( 'disabled', true ); + }; + + $radios.on( { + change: onRadioChange + } ); } ); $( function () { -- To view, visit https://gerrit.wikimedia.org/r/190648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e5c7c403efb26c74df39669491bc49602a9df4f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Detect duplicate files by SHA1 search - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/190488 Change subject: Detect duplicate files by SHA1 search .. Detect duplicate files by SHA1 search - As of now, we detect duplicate files by a combination of sha1 and file extension. - Since multiple file extensions for the same MIME are permitted this method does not reliably work. - DON'T MERGE YET: Requires release notes. Bug: T74070 Change-Id: If13059441097799227f23ece36a96c8375f17aab --- M includes/filerepo/file/ArchivedFile.php M includes/upload/UploadBase.php 2 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/190488/1 diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 5b0d8e2..1d45428 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -100,8 +100,9 @@ * @param Title $title * @param int $id * @param string $key +* @param string $sha1 */ - function __construct( $title, $id = 0, $key = '' ) { + function __construct( $title, $id = 0, $key = '', $sha1 = '' ) { $this->id = -1; $this->title = false; $this->name = false; @@ -136,7 +137,11 @@ $this->key = $key; } - if ( !$id && !$key && !( $title instanceof Title ) ) { + if ( $sha1 ) { + $this->sha1 = $sha1; + } + + if ( !$id && !$key && !( $title instanceof Title ) && !$sha1 ) { throw new MWException( "No specifications provided to ArchivedFile constructor." ); } } @@ -162,6 +167,9 @@ if ( $this->title ) { $conds['fa_name'] = $this->title->getDBkey(); } + if ( $this->sha1 ) { + $conds['fa_sha1'] = $this->sha1; + } if ( !count( $conds ) ) { throw new MWException( "No specific information for retrieving archived file" ); diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index a8a38c7..fccb5e1 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -677,10 +677,10 @@ } // Check dupes against archives - $archivedImage = new ArchivedFile( null, 0, "{$hash}.{$this->mFinalExtension}" ); - if ( $archivedImage->getID() > 0 ) { - if ( $archivedImage->userCan( File::DELETED_FILE ) ) { - $warnings['duplicate-archive'] = $archivedImage->getName(); + $archivedFile = new ArchivedFile( null, 0, '', $hash ); + if ( $archivedFile->getID() > 0 ) { + if ( $archivedFile->userCan( File::DELETED_FILE ) ) { + $warnings['duplicate-archive'] = $archivedFile->getName(); } else { $warnings['duplicate-archive'] = ''; } -- To view, visit https://gerrit.wikimedia.org/r/190488 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If13059441097799227f23ece36a96c8375f17aab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Chunked upload: Return expected offset on offset error - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/190221 Change subject: Chunked upload: Return expected offset on offset error .. Chunked upload: Return expected offset on offset error Bug: T87535 Change-Id: If68e0075e73a78c1dd8d95839f7ee9374a995201 --- M includes/api/ApiUpload.php M includes/upload/UploadFromChunks.php 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/190221/1 diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 62d8882..78a4971 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -218,7 +218,11 @@ $status = $this->mUpload->addChunk( $chunkPath, $chunkSize, $this->mParams['offset'] ); if ( !$status->isGood() ) { - $this->dieUsage( $status->getWikiText(), 'stashfailed' ); + $extradata = array( + 'offset' => $this->mUpload->getOffset(), + ); + + $this->dieUsage( $status->getWikiText(), 'stashfailed', 0, $extradata ); return array(); } diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index 8e6c9c6..3c249ce 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -303,10 +303,10 @@ } /** -* Gets the current offset in fromt the stashedupload table +* Get the offset at which the next uploaded chunk will be appended to * @return int Current byte offset of the chunk file set */ - private function getOffset() { + public function getOffset() { if ( $this->mOffset !== null ) { return $this->mOffset; } -- To view, visit https://gerrit.wikimedia.org/r/190221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If68e0075e73a78c1dd8d95839f7ee9374a995201 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expose file size and MIME to Lua - change (mediawiki...Scribunto)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/190117 Change subject: Expose file size and MIME to Lua .. Expose file size and MIME to Lua Use cases: - size: Showing links (like to SVG validator) conditionally (e.g. only if the filesize is below the threshold it can work on) - mime: No longer have to guess the MIME type based on the file extension. We use the MIME type for displaying correct and precise information about maximum thumbnailable sizes in case an uploaded work exceeds this limit. This change will not have negative impact on performance; as soon as width or height is loaded, the two newly added information are gratis. Change-Id: I25aad85c2a558a684aca83374aeb628f355fad1c --- M engines/LuaCommon/TitleLibrary.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/17/190117/1 diff --git a/engines/LuaCommon/TitleLibrary.php b/engines/LuaCommon/TitleLibrary.php index 635683b..4d179f1 100644 --- a/engines/LuaCommon/TitleLibrary.php +++ b/engines/LuaCommon/TitleLibrary.php @@ -309,6 +309,8 @@ 'exists' => true, 'width' => $file->getWidth(), 'height' => $file->getHeight(), + 'mime' => $file->getMimeType(), + 'size' => $file->getSize(), 'pages' => $pages ) ); } -- To view, visit https://gerrit.wikimedia.org/r/190117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25aad85c2a558a684aca83374aeb628f355fad1c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add re-upload parameter to uploadtext message - change (mediawiki/core)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/181171 Change subject: Add re-upload parameter to uploadtext message .. Add re-upload parameter to uploadtext message This can be useful for customized versions of [[MediaWiki:Uploadtext]] for example in cases where the text implies it would be mandatory to specify a license. The license selector will, however, not be available in this case. Therefore it's neccessary to adjust the text accordingly. Change-Id: I3ca93566728af5ac4c951670912d05a0d27aa87a --- M includes/specials/SpecialUpload.php M languages/i18n/qqq.json 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/181171/1 diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index ee89b0a..0d8c2f4 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -268,7 +268,10 @@ # Add text to form $form->addPreText( '' . - $this->msg( 'uploadtext', array( $this->mDesiredDestName ) )->parseAsBlock() . + $this->msg( + 'uploadtext', + array( $this->mDesiredDestName, $this->mForReUpload ) + )->parseAsBlock() . '' ); # Add upload error message $form->addPreText( $message ); diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 2c01b02..ea962ca 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1428,7 +1428,7 @@ "uploaderror": "Used as section header in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|upload-tryagain|Submit text}}", "upload-summary": "{{doc-specialpagesummary|upload}}", "upload-recreate-warning": "Used as warning in [[Special:Upload]].", - "uploadtext": "{{doc-important|thumb and left are magic words. Leave them untranslated!}}\nText displayed when uploading a file using [[Special:Upload]].", + "uploadtext": "{{doc-important|thumb and left are magic words. Leave them untranslated!}}\nText displayed when uploading a file using [[Special:Upload]].\n* $1 - Destination file name\n* $2 - 1 if it is a re-upload, otherwise empty", "upload-permitted": "Used in [[Special:Upload]]. Parameters:\n* $1 - list of file types, defined in the variable [[mw:Special:MyLanguage/Manual:$wgFileExtensions|$wgFileExtensions]]\nSee also:\n* {{msg-mw|Upload-preferred}}\n* {{msg-mw|Upload-prohibited}}", "upload-preferred": "Used in [[Special:Upload]]. Parameters:\n* $1 - list of file types, defined in the variable [[mw:Special:MyLanguage/Manual:$wgFileExtensions|$wgFileExtensions]]\nSee also:\n* {{msg-mw|Upload-permitted}}\n* {{msg-mw|Upload-prohibited}}", "upload-prohibited": "Used in [[Special:Upload]]. Parameters:\n* $1 - list of file types, defined in the variable [[mw:Special:MyLanguage/Manual:$wgFileBlacklist|$wgFileBlacklist]]\nSee also:\n* {{msg-mw|Upload-permitted}}\n* {{msg-mw|Upload-preferred}}", -- To view, visit https://gerrit.wikimedia.org/r/181171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ca93566728af5ac4c951670912d05a0d27aa87a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Documentation: ActionWidget is non-framed by default - change (oojs/ui)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/160198 Change subject: Documentation: ActionWidget is non-framed by default .. Documentation: ActionWidget is non-framed by default Change-Id: Ib2a3416a5615a58a67444d2fb5b4cf28e9a06f1f --- M src/widgets/ActionWidget.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/98/160198/1 diff --git a/src/widgets/ActionWidget.js b/src/widgets/ActionWidget.js index d8a54a8..53a5b5a 100644 --- a/src/widgets/ActionWidget.js +++ b/src/widgets/ActionWidget.js @@ -8,6 +8,7 @@ * @param {Object} [config] Configuration options * @cfg {string} [action] Symbolic action name * @cfg {string[]} [modes] Symbolic mode names + * @cfg {boolean} [framed=false] Render button with a frame */ OO.ui.ActionWidget = function OoUiActionWidget( config ) { // Config intialization -- To view, visit https://gerrit.wikimedia.org/r/160198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2a3416a5615a58a67444d2fb5b4cf28e9a06f1f Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Demos: Load scripts in corrects order - change (oojs/ui)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/158496 Change subject: Demos: Load scripts in corrects order .. Demos: Load scripts in corrects order Currently scripts are loaded from the body, and thus asynchronously. To avoid errors like undefined oojs or oojs.ui, this patch will make sure that every script used in the demo is loaded in the right order. Change-Id: Icb2a57c93f38181046c63c7179f350594f642269 --- M demos/demo.js M demos/index.html 2 files changed, 26 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/96/158496/1 diff --git a/demos/demo.js b/demos/demo.js index f0198c1..5fc5fac 100644 --- a/demos/demo.js +++ b/demos/demo.js @@ -57,8 +57,30 @@ directionSelect.on( 'select', updateDemo ); $( function () { + var loaded, + toLoad = [ 'dialogs.js', 'icons.js', 'widgets.js', 'toolbars.js' ], + promises = []; + + $.each( toLoad, function ( idx, item ) { + if ( location.protocol === 'file:' ) { + var def = $.Deferred(); + + $( '' ) + .load( function () { + def.resolve(); + } ) + .appendTo( 'body' ) + .attr( 'src', item ); + + promises.push( def.promise() ); + } else { + promises.push( $.getScript( item ) ); + } + } ); + $( '.oo-ui-demo-menu' ).append( pageMenu.$element, themeSelect.$element, directionSelect.$element ); - updateDemo(); + + $.when.apply( $, promises ).done( updateDemo ); } ); /** diff --git a/demos/index.html b/demos/index.html index 80b1cb9..c8ebf79 100644 --- a/demos/index.html +++ b/demos/index.html @@ -15,17 +15,13 @@ +