[MediaWiki-commits] [Gerrit] fix variable scope (version 0.3.1) - change (mediawiki...Foxway)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/65654 Change subject: fix variable scope (version 0.3.1) .. fix variable scope (version 0.3.1) Before this change, the variables behave like static Change-Id: I4af1034a3ccfb822d6b4e0474bb6ba9a90c43be1 --- M Foxway.body.php M Foxway.php M includes/Interpreter.php M includes/Runtime.php 4 files changed, 21 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway refs/changes/54/65654/1 diff --git a/Foxway.body.php b/Foxway.body.php index c21cd37..97c0055 100644 --- a/Foxway.body.php +++ b/Foxway.body.php @@ -9,6 +9,8 @@ */ class Foxway { + static $frames=array(); + /** * Render function used in hook ParserFirstCallInit * @@ -47,6 +49,7 @@ $result = Foxway\Interpreter::run( $input, array_merge((array)$frame-getTitle()-getPrefixedText(),$frame-getArguments()), + self::getScope($frame), $is_debug ); @@ -87,4 +90,15 @@ $parser-mStripState-addNoWiki( $rnd, $text ); return $rnd; } + + private static function getScope(PPFrame $frame) { + foreach (self::$frames as $value) { + if( $value[0] === $frame ) { + return $value[1]; + } + } + $scope=count(self::$frames); + self::$frames[] = array($frame, $scope); + return $scope; + } } \ No newline at end of file diff --git a/Foxway.php b/Foxway.php index 896ea82..3ce54f1 100644 --- a/Foxway.php +++ b/Foxway.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'Foxway_VERSION' , '0.3.0' ); +define( 'Foxway_VERSION' , '0.3.1' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/includes/Interpreter.php b/includes/Interpreter.php index 15831b0..34ea40a 100644 --- a/includes/Interpreter.php +++ b/includes/Interpreter.php @@ -107,7 +107,7 @@ T_SR_EQUAL, ); - public static function run($source, array $args=array(), $is_debug=false) { + public static function run($source, array $args=array(), $scope='', $is_debug=false) { $tokens = self::getTokens($source); $return = array(); @@ -123,9 +123,9 @@ $tokenLine = 1; if( $debug ) { - $runtime = new RuntimeDebug( $args ); + $runtime = new RuntimeDebug( $args, $scope ); } else { - $runtime = new Runtime( $args ); + $runtime = new Runtime( $args, $scope ); } $operators = $runtime-getOperators(); diff --git a/includes/Runtime.php b/includes/Runtime.php index 3eb88ef..5fa1b12 100644 --- a/includes/Runtime.php +++ b/includes/Runtime.php @@ -9,7 +9,6 @@ * @licence GNU General Public Licence 2.0 or later */ class Runtime { - protected $args; protected $lastCommand = false; @@ -31,6 +30,8 @@ protected $stack = array(); protected static $variables = array(); protected $thisVariables; + protected $args; + protected $scope; // @see http://www.php.net/manual/ru/language.operators.precedence.php protected static $operatorsPrecedence = array( @@ -61,9 +62,8 @@ ); private $countPrecedences; - public function __construct( array $args ) { + public function __construct( array $args, $scope ) { $this-args = $args; - $scope = isset($args[0]) ? $args[0] : ''; if( !isset(self::$variables[$scope]) ) { self::$variables[$scope] = array(); } -- To view, visit https://gerrit.wikimedia.org/r/65654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4af1034a3ccfb822d6b4e0474bb6ba9a90c43be1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Foxway Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix variable scope (version 0.3.1) - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: fix variable scope (version 0.3.1) .. fix variable scope (version 0.3.1) Before this change, the variables behave like static Change-Id: I4af1034a3ccfb822d6b4e0474bb6ba9a90c43be1 --- M Foxway.body.php M Foxway.php M includes/Interpreter.php M includes/Runtime.php 4 files changed, 21 insertions(+), 7 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Foxway.body.php b/Foxway.body.php index c21cd37..97c0055 100644 --- a/Foxway.body.php +++ b/Foxway.body.php @@ -9,6 +9,8 @@ */ class Foxway { + static $frames=array(); + /** * Render function used in hook ParserFirstCallInit * @@ -47,6 +49,7 @@ $result = Foxway\Interpreter::run( $input, array_merge((array)$frame-getTitle()-getPrefixedText(),$frame-getArguments()), + self::getScope($frame), $is_debug ); @@ -87,4 +90,15 @@ $parser-mStripState-addNoWiki( $rnd, $text ); return $rnd; } + + private static function getScope(PPFrame $frame) { + foreach (self::$frames as $value) { + if( $value[0] === $frame ) { + return $value[1]; + } + } + $scope=count(self::$frames); + self::$frames[] = array($frame, $scope); + return $scope; + } } \ No newline at end of file diff --git a/Foxway.php b/Foxway.php index 896ea82..3ce54f1 100644 --- a/Foxway.php +++ b/Foxway.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'Foxway_VERSION' , '0.3.0' ); +define( 'Foxway_VERSION' , '0.3.1' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/includes/Interpreter.php b/includes/Interpreter.php index 15831b0..34ea40a 100644 --- a/includes/Interpreter.php +++ b/includes/Interpreter.php @@ -107,7 +107,7 @@ T_SR_EQUAL, ); - public static function run($source, array $args=array(), $is_debug=false) { + public static function run($source, array $args=array(), $scope='', $is_debug=false) { $tokens = self::getTokens($source); $return = array(); @@ -123,9 +123,9 @@ $tokenLine = 1; if( $debug ) { - $runtime = new RuntimeDebug( $args ); + $runtime = new RuntimeDebug( $args, $scope ); } else { - $runtime = new Runtime( $args ); + $runtime = new Runtime( $args, $scope ); } $operators = $runtime-getOperators(); diff --git a/includes/Runtime.php b/includes/Runtime.php index 3eb88ef..5fa1b12 100644 --- a/includes/Runtime.php +++ b/includes/Runtime.php @@ -9,7 +9,6 @@ * @licence GNU General Public Licence 2.0 or later */ class Runtime { - protected $args; protected $lastCommand = false; @@ -31,6 +30,8 @@ protected $stack = array(); protected static $variables = array(); protected $thisVariables; + protected $args; + protected $scope; // @see http://www.php.net/manual/ru/language.operators.precedence.php protected static $operatorsPrecedence = array( @@ -61,9 +62,8 @@ ); private $countPrecedences; - public function __construct( array $args ) { + public function __construct( array $args, $scope ) { $this-args = $args; - $scope = isset($args[0]) ? $args[0] : ''; if( !isset(self::$variables[$scope]) ) { self::$variables[$scope] = array(); } -- To view, visit https://gerrit.wikimedia.org/r/65654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4af1034a3ccfb822d6b4e0474bb6ba9a90c43be1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Foxway Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Pastakhov pastak...@yandex.ru 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 unused resources - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused resources .. Remove unused resources Change-Id: I80eb3dc02e99fd0dda5990a3a690d897e054cfcd --- M resources/css/ext.uls.languagesettings.css D resources/images/cog-16x16-ltr.png D resources/images/cog-16x16-rtl.png 3 files changed, 0 insertions(+), 35 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/css/ext.uls.languagesettings.css b/resources/css/ext.uls.languagesettings.css index 65cf430..7c5e61f 100644 --- a/resources/css/ext.uls.languagesettings.css +++ b/resources/css/ext.uls.languagesettings.css @@ -1,38 +1,3 @@ -#uls-current-language-nav { /* @embed */ - background: url('../images/cog-16x16-ltr.png') no-repeat scroll right top transparent; - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/cog.svg'); - background-image: -moz-linear-gradient(transparent, transparent), url('../images/cog.svg'); - background-image: linear-gradient(transparent, transparent), url('../images/cog.svg'); - - cursor: pointer; -} - -/* From uls-menu, unchanged */ -#uls-current-language-nav a { - color: #0088CC; -} - -#uls-current-language-nav h1 { - font-weight: normal; - padding-top: 1.25em; - border: none; - padding-bottom: 3px; - font-size: 18pt; - line-height: 1.25em; - padding-left: 15px; - color: #777; -} - -#uls-current-language-nav h2 { - font-size: 16pt; - line-height: 1.5em; - padding-left: 6px; - margin-top: 0; - margin-bottom: 15px; - border-bottom: none; - color: #777; -} - .uls-menu h3 { border-bottom: medium none; font-size: 14pt; diff --git a/resources/images/cog-16x16-ltr.png b/resources/images/cog-16x16-ltr.png deleted file mode 100644 index ef65d00..000 --- a/resources/images/cog-16x16-ltr.png +++ /dev/null Binary files differ diff --git a/resources/images/cog-16x16-rtl.png b/resources/images/cog-16x16-rtl.png deleted file mode 100644 index b9f4f19..000 --- a/resources/images/cog-16x16-rtl.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/65320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80eb3dc02e99fd0dda5990a3a690d897e054cfcd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove webfonts enabling checkbox and associated preference - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Remove webfonts enabling checkbox and associated preference .. Remove webfonts enabling checkbox and associated preference Bug: 48535 Change-Id: If735a733717596fae03042c5e277bd538bd8501f --- M i18n/en.json M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.webfonts.js 3 files changed, 4 insertions(+), 103 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 9f760d9..feb9126 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -22,9 +22,6 @@ ext-uls-display-settings-anon-label: Display language:, ext-uls-display-settings-anon-same-as-content: English (same as content), ext-uls-display-settings-anon-log-in-cta: [[Special:UserLogin|Log in]] to select a different language for menus., -ext-uls-webfonts-settings-title: Download font when needed, -ext-uls-webfonts-settings-info: Web fonts will be downloaded for displaying text in special scripts., -ext-uls-webfonts-settings-info-link: More information, ext-uls-webfonts-select-for: Select font for $1, ext-uls-webfonts-select-for-ui-info: Font used for user interface, ext-uls-webfonts-select-for-content-info: Font used for content, diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 049c3f7..892ba0a 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -78,18 +78,6 @@ + '/div' // End font selectors - // Webfonts enabling chechbox with label - + 'div class=row' - + 'div class=eleven columns' - + 'label class=checkbox' - + 'input type=checkbox id=webfonts-enable-checkbox /' - + 'strong data-i18n=ext-uls-webfonts-settings-title/strong ' - + 'span data-i18n=ext-uls-webfonts-settings-info/span ' - + 'a target=_blank href=//www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:WebFonts data-i18n=ext-uls-webfonts-settings-info-link/a' - + '/label' - + '/div' - + '/div' - + '/div' // End font settings section // Separator @@ -128,32 +116,8 @@ this.prepareLanguages(); this.prepareUIFonts(); this.prepareContentFonts(); - this.prepareWebfontsCheckbox(); this.i18n(); this.listen(); - }, - - prepareWebfontsCheckbox: function () { - var webFontsEnabled = this.isWebFontsEnabled(); - - if ( !webFontsEnabled ) { - this.$template.find( - '#uls-display-settings-font-selectors' - ).addClass( 'hide' ); - } - - $( '#webfonts-enable-checkbox' ).prop( 'checked', webFontsEnabled ); - }, - - isWebFontsEnabled: function () { - var enable = mw.webfonts.preferences.isEnabled(); - - // If the user didn't use the checkbox, the preference will be undefined. - // The default for now is to enable webfonts if the user didn't select anything. - if ( enable === undefined ) { - enable = true; - } - return enable; }, /** @@ -371,11 +335,8 @@ // Get the language code from the right property - // uiLanguage or contentLanguage language = this[ target + 'Language' ]; - if ( this.isWebFontsEnabled() ) { - fonts = this.$webfonts.list( language ); - } else { - fonts = []; - } + fonts = this.$webfonts.list( language ); + // Possible classes: // uls-ui-fonts // uls-content-fonts @@ -408,7 +369,6 @@ } } ); - $fontSelector.prop( 'disabled', !this.isWebFontsEnabled() ); $systemFont = $( 'option' ).val( 'system' ).text( $.i18n( 'ext-uls-webfonts-system-font' ) ); $fontSelector.append( $systemFont ); $systemFont.attr( 'selected', savedFont === 'system' || !savedFont ); @@ -500,36 +460,6 @@ } ); displaySettings.close(); - } ); - -
[MediaWiki-commits] [Gerrit] rm. unneccessary test classes. - change (sartoris)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/65655 Change subject: rm. unneccessary test classes. .. rm. unneccessary test classes. Change-Id: I199d38a21477cd1d0f00e6819f41bb8103e6a214 --- M sartoris/tests/test.py 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/55/65655/1 diff --git a/sartoris/tests/test.py b/sartoris/tests/test.py index cade1a7..09dc8f0 100644 --- a/sartoris/tests/test.py +++ b/sartoris/tests/test.py @@ -208,15 +208,3 @@ assert False return assert False - - -class TestMain(unittest.TestCase): -def test_main(self): -# self.assertEqual(expected, main(argv, out, err)) -assert False # TODO: implement your test here - - -class TestCli(unittest.TestCase): -def test_cli(self): -# self.assertEqual(expected, cli()) -assert False # TODO: implement your test here -- To view, visit https://gerrit.wikimedia.org/r/65655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I199d38a21477cd1d0f00e6819f41bb8103e6a214 Gerrit-PatchSet: 1 Gerrit-Project: sartoris Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] rm. unneccessary test classes. - change (sartoris)
Rfaulk has submitted this change and it was merged. Change subject: rm. unneccessary test classes. .. rm. unneccessary test classes. Change-Id: I199d38a21477cd1d0f00e6819f41bb8103e6a214 --- M sartoris/tests/test.py 1 file changed, 0 insertions(+), 12 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/sartoris/tests/test.py b/sartoris/tests/test.py index cade1a7..09dc8f0 100644 --- a/sartoris/tests/test.py +++ b/sartoris/tests/test.py @@ -208,15 +208,3 @@ assert False return assert False - - -class TestMain(unittest.TestCase): -def test_main(self): -# self.assertEqual(expected, main(argv, out, err)) -assert False # TODO: implement your test here - - -class TestCli(unittest.TestCase): -def test_cli(self): -# self.assertEqual(expected, cli()) -assert False # TODO: implement your test here -- To view, visit https://gerrit.wikimedia.org/r/65655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I199d38a21477cd1d0f00e6819f41bb8103e6a214 Gerrit-PatchSet: 1 Gerrit-Project: sartoris Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tweak file handling code, particularly to improve performance - change (mediawiki...TranslateSvg)
Jarry1250 has submitted this change and it was merged. Change subject: Tweak file handling code, particularly to improve performance .. Tweak file handling code, particularly to improve performance Tidy up variables and use $this-getBackend()-fileExists() to avoid regenerating files that already exist. Could be annoying in the event of a hash collision (probability 2.8e14, so I'm not too concerned). Should significant improve performance for some kinds of edits. Change-Id: I2b43823c295a1e70084771704997ee9351230ee5 --- M SVGFormatWriter.php 1 file changed, 14 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved Nikerabbit: Looks good to me, but someone else must approve Jarry1250: Verified; Looks good to me, approved diff --git a/SVGFormatWriter.php b/SVGFormatWriter.php index 04362f7..ebecadd 100644 --- a/SVGFormatWriter.php +++ b/SVGFormatWriter.php @@ -66,7 +66,17 @@ $nameHash = md5( $this-filename ); $nameHashPath = substr( $nameHash, 0, 1 ) . '/' . substr( $nameHash, 0, 2 ); $dstPath = $this-getBackend()-getRootStoragePath() . - '/translatesvg-render/' . $nameHashPath/; + '/translatesvg-render/'; + $dstName = $nameHashPath/$contentsHash- . $this-filename . '.png'; + $dstUrl = $wgTranslateSvgPath . '/' . $dstName; + + if( $this-getBackend()-fileExists( array( 'src' = $dstPath . $dstName ) ) ) { + // We've already generated this SVG; no point regenerating + return array( + 'success' = true, + 'message' = $dstUrl, + ); + } // Save the SVG to a temporary file if( !$svg-save( $srcPath ) ) { @@ -94,19 +104,19 @@ // Create any containers/directories as needed... $backend = $this-getBackend(); - if ( !$backend-prepare( array( 'dir' = $dstPath ) )-isOK() ) { + if ( !$backend-prepare( array( 'dir' = $dstPath/$nameHashPath/ ) )-isOK() ) { return array( 'success' = false, 'message' = wfMessage( 'thumbnail_dest_directory' )-text()); } // Store the file at the final storage path... if ( !$backend-quickStore( array( - 'src' = $intPath, 'dst' = $dstPath$contentsHash- . $this-filename . '.png' + 'src' = $intPath, 'dst' = $dstPath . $dstName ) )-isOK() ) { return array( 'success' = false, 'message' = wfMessage( 'thumbnail-dest-create' )-text() ); } return array( 'success' = true, - 'message' = $wgTranslateSvgPath . '/' . $nameHashPath . /$contentsHash- . $this-filename . '.png' + 'message' = $dstUrl ); } -- To view, visit https://gerrit.wikimedia.org/r/65458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b43823c295a1e70084771704997ee9351230ee5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TranslateSvg Gerrit-Branch: master Gerrit-Owner: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clarify the README file about the version - change (qa/browsertests)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/65656 Change subject: Clarify the README file about the version .. Clarify the README file about the version Change-Id: Ie21bd4d4b6820ea521e34d0142f40aa45a04807c --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/56/65656/1 diff --git a/README.md b/README.md index 7e72b40..6f05ae8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Environment -To run the Selenium tests you will have to install Ruby (look at `.ruby-version` file for the exact version), the latest versions of RubyGems and Firefox (the default browser in which the tests run). The easiest way to install Ruby on Linux/Unix is [RVM](https://rvm.io/) and on Windows [RubyInstaller](http://rubyinstaller.org/). +To run the Selenium tests you will have to install Ruby. Look at the `.ruby-version` file for the exact required version. You also have to install the latest versions of RubyGems and Firefox (the default browser in which the tests run). The easiest way to install Ruby on Linux/Unix is [RVM](https://rvm.io/) and on Windows [RubyInstaller](http://rubyinstaller.org/). Clone the repository, `cd` into it, update RubyGems and install the required RubyGems: -- To view, visit https://gerrit.wikimedia.org/r/65656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie21bd4d4b6820ea521e34d0142f40aa45a04807c Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API: Created Express; Modified Define - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: API: Created Express; Modified Define .. API: Created Express; Modified Define Change-Id: Ia25c91472e23326d26b9fbf16c41383fb9d9683e --- M includes/api/OmegaWikiExt.php M includes/api/owDefine.php A includes/api/owExpress.php 3 files changed, 190 insertions(+), 45 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/includes/api/OmegaWikiExt.php b/includes/api/OmegaWikiExt.php index cf674e9..2fec158 100644 --- a/includes/api/OmegaWikiExt.php +++ b/includes/api/OmegaWikiExt.php @@ -22,17 +22,19 @@ // The URL to a wiki page/web page with information about the extension, // which will appear on Special:Version. - 'url' = 'https://www.omegawiki.org/omegawiki_api', + 'url' = 'https://www.omegawiki.org/Help:OmegaWiki_API', ); // Map class name to filename for autoloading $wgAutoloadClasses['Define'] = dirname( __FILE__ ) . '/owDefine.php'; + $wgAutoloadClasses['Express'] = dirname( __FILE__ ) . '/owExpress.php'; $wgAutoloadClasses['AddSyntrans'] = dirname( __FILE__ ) . '/owAddSyntrans.php'; $wgAutoloadClasses['AddAnnotation'] = dirname( __FILE__ ) . '/owAddAnnotation.php'; // Map module name to class name $wgAPIModules['ow_define'] = 'Define'; + $wgAPIModules['ow_express'] = 'Express'; $wgAPIModules['ow_add_syntrans'] = 'AddSyntrans'; $wgAPIModules['ow_add_annotation'] = 'AddAnnotation'; diff --git a/includes/api/owDefine.php b/includes/api/owDefine.php index 3e86bb9..1e061e0 100644 --- a/includes/api/owDefine.php +++ b/includes/api/owDefine.php @@ -1,27 +1,17 @@ ?php -/* +/** O m e g a W i k i A P I ' s D e f i n e c l a s s + * * Created on March 14, 2013 * - * API for WikiData - * - * Copyright (C) 2013 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html */ + +/** HISTORY + * - 2013-05-23: Created separate defining and definingByAnyLanguage functions. + * Can be useful for E x p r e s s c l a s s ~he + * - 2013-03-14: Creation date ~he + */ + require_once( 'extensions/WikiLexicalData/OmegaWiki/WikiDataAPI.php' ); class Define extends ApiBase { @@ -38,34 +28,16 @@ // Get the parameters $params = $this-extractRequestParams(); - if ($params['lang']) { - $languageId = $params['lang']; - $text = getDefinedMeaningDefinitionForLanguage( $params['dm'], $languageId ); - $spelling = getDefinedMeaningSpellingForLanguage( $params['dm'], $languageId ); - $spellingLanguageId = $languageId ; - if (!$text) { - $languageId = 85; - $text = getDefinedMeaningDefinitionForLanguage( $params['dm'], $languageId ); - } + // Optional parameter + if ( $params['lang'] ) { + $this-languageId = $params['lang']; + $defined = defining( $params['dm'], $params['lang'], $this-getModuleName() ); } else { - $languageId = getDefinedMeaningDefinitionLanguageForAnyLanguage( $params['dm'] ); - $text = getDefinedMeaningDefinitionForAnyLanguage( $params['dm'] ); - $spelling = getDefinedMeaningSpellingForAnyLanguage( $params['dm'] ); - // spellingLanguageId is wrong - $spellingLanguageId = getDefinedMeaningSpellingLanguageId( $params['dm'] ); + $defined = definingForAnyLanguage( $params['dm'], $this-getModuleName() ); } - // Top level - $this-getResult()-addValue( null, $this-getModuleName(), array ( 'dmid' = $params['dm'] ) ); - $this-getResult()-addValue( null, $this-getModuleName(), array ( 'spelling' = $spelling ) ); - $this-getResult()-addValue( null, $this-getModuleName(), array ( 'spelllang' = $spellingLanguageId ) ); - - // definition - $this-getResult()-addValue(
[MediaWiki-commits] [Gerrit] Remove document from anon cover function - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/65657 Change subject: Remove document from anon cover function .. Remove document from anon cover function jshintrc has browser:true setting Change-Id: I30acfb63f132473611be9da4edf12c3b6ea42523 --- M resources/js/ext.uls.webfonts.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/57/65657/1 diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index ea944dc..614a4db 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -16,7 +16,7 @@ * @licence GNU General Public Licence 2.0 or later * @licence MIT License */ -( function ( $, mw, document, undefined ) { +( function ( $, mw, undefined ) { 'use strict'; var mediawikiFontRepository, ulsPreferences; @@ -91,4 +91,4 @@ mw.webfonts.setup(); } ); -}( jQuery, mediaWiki, document ) ); +}( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/65657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30acfb63f132473611be9da4edf12c3b6ea42523 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get the saved font using the fontSelector defined in mw.webf... - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/65658 Change subject: Get the saved font using the fontSelector defined in mw.webfonts.setup .. Get the saved font using the fontSelector defined in mw.webfonts.setup Also make sure that correct language is passed to the getFont It was wrong in current version - UI language was passed always (introduced in a refactoring to avoid code duplication for content and ui language- commit: 98bb1c200c8c8fe89a2b7ae1442e2354c6a48266 ) Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430 --- M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.webfonts.js 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/58/65658/1 diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 892ba0a..f1a69c4 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -358,7 +358,8 @@ // Remove all current fonts $fontSelector.find( 'option' ).remove(); - savedFont = mw.webfonts.preferences.getFont( this.uiLanguage ); + // Get the saved font using the fontSelector defined in mw.webfonts.setup + savedFont = this.$webfonts.getFont( language ); $.each( fonts, function ( key, font ) { var $fontOption; diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index 614a4db..206f664 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -62,10 +62,6 @@ font = repository.defaultFont( language ); } - if ( font === 'system' ) { - font = null; - } - return font; }, exclude: ( function () { -- To view, visit https://gerrit.wikimedia.org/r/65658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Access i18n json files from same domain for IE8 and IE9 - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Access i18n json files from same domain for IE8 and IE9 .. Access i18n json files from same domain for IE8 and IE9 IE8 and IE9 does not support ajax with CORS. So make sure they load json files from same domain. See http://bugs.jquery.com/ticket/8283 Bug: 45958 Change-Id: I8442a5efbd4ca7db0f0a407ff94772ea8e213b29 --- M resources/js/ext.uls.init.js 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js index 0b1bb2e..3faa299 100644 --- a/resources/js/ext.uls.init.js +++ b/resources/js/ext.uls.init.js @@ -111,10 +111,15 @@ */ function i18nInit() { var extensionPath, locales, i18n; - - extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) + - '/UniversalLanguageSelector/'; - + if ( window.XDomainRequest ) { + // IE8 and IE9 does not support ajax with CORS. So make sure they + // load json files from same domain ( http://bugs.jquery.com/ticket/8283 ) + extensionPath = mw.config.get( 'wgScriptPath' ) + + '/extensions/UniversalLanguageSelector/'; + } else { + extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) + + '/UniversalLanguageSelector/'; + } locales = mw.config.get( 'wgULSi18nLocales' ); i18n = $.i18n( { locale: currentLang, -- To view, visit https://gerrit.wikimedia.org/r/64918 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8442a5efbd4ca7db0f0a407ff94772ea8e213b29 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Triggering animationstep event in snakview value variation - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Triggering animationstep event in snakview value variation .. Triggering animationstep event in snakview value variation Bug 48677 Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 --- M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js 1 file changed, 17 insertions(+), 3 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified Objections: Daniel Werner: There's a problem with this change, please improve diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js index facf8c2..c4e3af8 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js @@ -4,6 +4,12 @@ * * @licence GNU GPL v2+ * @author Daniel Werner daniel.wer...@wikimedia.de + * + * @event animationstep: Triggered on the html element while the variation's viewport is being + *animated. + *(1) {jQuery.Event} + *(2) {Number} now + *(3) {jQuery.Tween} tween */ ( function( mw, wb, dv, dt, $ ) { 'use strict'; @@ -175,7 +181,7 @@ }, /** -* Attach event handlers to the value view widget's element. +* Attaches event handlers to the value view widget's element. */ _attachEventHandlers: function() { var self = this; @@ -209,11 +215,19 @@ var currentHeight = self.$viewPort.height(); self.$viewPort.css( 'height', 'auto' ); newHeight = self.$viewPort.height(); - self.$viewPort.height( currentHeight ) + self.$viewPort.height( currentHeight ); } if( tween === undefined ) { - self.$viewPort.animate( { height: newHeight }, 250 ); + self.$viewPort.animate( + { height: newHeight }, + { + duration: 250, + step: function( now, tween ) { + $( 'html' ).trigger( 'animationstep', [ now, tween ] ); + } + } + ); } else { self.$viewPort.height( newHeight ); } -- To view, visit https://gerrit.wikimedia.org/r/65113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Input extender: Listening to animationstep event - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Input extender: Listening to animationstep event .. Input extender: Listening to animationstep event (bug 48677) Requires change Ie6717ccece619b7cb8a096f016a690cda3b9ed80 in the Wikibase extension. Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff --- M ValueView/resources/jquery.ui/jquery.ui.inputextender.js 1 file changed, 30 insertions(+), 3 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js index d00393d..b027b29 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js +++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js @@ -76,6 +76,13 @@ _animationTimeout: null, /** +* Caches the element's offset to determine whether the input extension has to be +* repositioned when reacting on global animationstep event. +* @type {Object} +*/ + _offset: null, + + /** * @see jQuery.Widget._create */ _create: function() { @@ -159,13 +166,12 @@ } ); } - // Blurring by clicking away from the widget (one handler is sufficient): $( 'html' ) .off( '.' + this.widgetName ) + // Blurring by clicking away from the widget (one handler is sufficient): .on( 'click.' + this.widgetName, function( event ) { // Loop through all widgets and hide content when having clicked out of it: - var $widgetNodes = $( ':' + self.widgetBaseClass ); - $widgetNodes.each( function( i, widgetNode ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { var widget = $( widgetNode ).data( self.widgetName ), $target = $( event.target ); @@ -175,6 +181,16 @@ widget.hideExtension(); } + } ); + } ) + // If some other animation changes the input element's position, the input extender + // needs to be repositioned: + .on( 'animationstep.' + this.widgetName, function( event, now, tween ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { + var widget = $( widgetNode ).data( self.widgetName ); + if( widget.$extension.is( ':visible' ) ) { + widget._reposition(); + } } ); } ); @@ -292,12 +308,23 @@ * Repositions the extension. */ _reposition: function() { + var offset = this.element.offset(); + + if( + this._offset +offset.top === this._offset.top offset.left === this._offset.left + ) { + return; // Position has not changed. + } + // TODO: Repositioning is not optimal in RTL context when hitting the toggler in the // extension to hide additional input. This seems to be caused by a width // miscalculation which can be debugged with console.log( this.$extension.width() ). this.$extension.position( $.extend( { of: this.element }, this.options.position ) ); + + this._offset = offset; } } ); -- To view, visit https://gerrit.wikimedia.org/r/65114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added missing dependency of TimeInput expert - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Added missing dependency of TimeInput expert .. Added missing dependency of TimeInput expert Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 --- M ValueView/ValueView.resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index 35f5cfd..0a3a38d 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -205,6 +205,7 @@ 'jquery.valueview/valueview.experts/experts.TimeInput.css', ), 'dependencies' = array( + 'jquery.valueview.experts', 'jquery.fn.focusAt', 'jquery.time.timeinput', 'jquery.ui.inputextender', -- To view, visit https://gerrit.wikimedia.org/r/65633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Checking for valid qualifiers in claimview - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Checking for valid qualifiers in claimview .. Checking for valid qualifiers in claimview (bug 48776) Change If4e1196551835776100382416430ae289f82c825 caused claimview's save button to be enabled with empty qualifiers being present. Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index 6344718..3ba48ca 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -184,6 +184,10 @@ * @return {boolean} */ isValid: function() { + if( this._qualifiers !this._qualifiers.isValid() ) { + return false; + } + try { this._instantiateClaim( null ); } catch( e ) { -- To view, visit https://gerrit.wikimedia.org/r/65271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Triggering animationstep event in snakview value variation - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65659 Change subject: Triggering animationstep event in snakview value variation .. Triggering animationstep event in snakview value variation Bug 48677 Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 --- M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/59/65659/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js index facf8c2..c4e3af8 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js @@ -4,6 +4,12 @@ * * @licence GNU GPL v2+ * @author Daniel Werner daniel.wer...@wikimedia.de + * + * @event animationstep: Triggered on the html element while the variation's viewport is being + *animated. + *(1) {jQuery.Event} + *(2) {Number} now + *(3) {jQuery.Tween} tween */ ( function( mw, wb, dv, dt, $ ) { 'use strict'; @@ -175,7 +181,7 @@ }, /** -* Attach event handlers to the value view widget's element. +* Attaches event handlers to the value view widget's element. */ _attachEventHandlers: function() { var self = this; @@ -209,11 +215,19 @@ var currentHeight = self.$viewPort.height(); self.$viewPort.css( 'height', 'auto' ); newHeight = self.$viewPort.height(); - self.$viewPort.height( currentHeight ) + self.$viewPort.height( currentHeight ); } if( tween === undefined ) { - self.$viewPort.animate( { height: newHeight }, 250 ); + self.$viewPort.animate( + { height: newHeight }, + { + duration: 250, + step: function( now, tween ) { + $( 'html' ).trigger( 'animationstep', [ now, tween ] ); + } + } + ); } else { self.$viewPort.height( newHeight ); } -- To view, visit https://gerrit.wikimedia.org/r/65659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Checking for valid qualifiers in claimview - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65660 Change subject: Checking for valid qualifiers in claimview .. Checking for valid qualifiers in claimview (bug 48776) Change If4e1196551835776100382416430ae289f82c825 caused claimview's save button to be enabled with empty qualifiers being present. Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/65660/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index 6344718..3ba48ca 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -184,6 +184,10 @@ * @return {boolean} */ isValid: function() { + if( this._qualifiers !this._qualifiers.isValid() ) { + return false; + } + try { this._instantiateClaim( null ); } catch( e ) { -- To view, visit https://gerrit.wikimedia.org/r/65660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Input extender widget: Removed obsolete stopPropagation() - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65661 Change subject: Input extender widget: Removed obsolete stopPropagation() .. Input extender widget: Removed obsolete stopPropagation() Calling stopPropagation() interferes with other widgets listening to click events on parent nodes. Even more, calling stopPropagation is not required since checking if the extension is clicked is done by using jQuery's .closest(). Change-Id: I178f80357cb4fed7b9d186f4c9e3b6811850289e --- M ValueView/resources/jquery.ui/jquery.ui.inputextender.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/61/65661/1 diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js index d00393d..0ce49fe 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js +++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js @@ -89,7 +89,6 @@ .on( 'click.' + this.widgetName, function( event ) { if( !$( event.target ).closest( self.$closeIcon ).length ) { clearTimeout( self._animationTimeout ); - event.stopPropagation(); self.showExtension(); } } ) -- To view, visit https://gerrit.wikimedia.org/r/65661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I178f80357cb4fed7b9d186f4c9e3b6811850289e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] List rotator widget: Assigning position absolute to menu - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65662 Change subject: List rotator widget: Assigning position absolute to menu .. List rotator widget: Assigning position absolute to menu List rotator menu needs to be positioned absolute on order for its position to be calculated correctly. Change-Id: I09ec3008a66673a4c45324ae5568e2672c3dffd9 --- M ValueView/resources/jquery.ui/jquery.ui.listrotator.css 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/62/65662/1 diff --git a/ValueView/resources/jquery.ui/jquery.ui.listrotator.css b/ValueView/resources/jquery.ui/jquery.ui.listrotator.css index e606613..2c4b193 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.listrotator.css +++ b/ValueView/resources/jquery.ui/jquery.ui.listrotator.css @@ -67,6 +67,7 @@ .ui-listrotator-menu { font-size: 84%; padding: 0; + position: absolute; z-index: 1; } -- To view, visit https://gerrit.wikimedia.org/r/65662 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09ec3008a66673a4c45324ae5568e2672c3dffd9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always resize StringValue expert input element - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65663 Change subject: Always resize StringValue expert input element .. Always resize StringValue expert input element (Bug 48747) String expert needs to be resized even when there is no valid value (e.g. to reset the input box height to one line if there is no value). Change-Id: Ic5dadea3241d6731f28e4c6ad36a3049b2587a61 --- M ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/63/65663/1 diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js index 1e9e9da..39d1eea 100644 --- a/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js @@ -96,11 +96,13 @@ var textValue = this._newValue === null ? '' : this._newValue; this._newValue = false; - // Display value and resize textarea to fit for the value: + // Display value: this.$input.val( textValue ); - this._resizeInput(); } + // Resize textarea to fit the value (which might be empty): + this._resizeInput(); + // We always use the textare for displaying the value, only in edit mode we format the // textare as an input field though. if( this._viewState.isInEditMode() ) { -- To view, visit https://gerrit.wikimedia.org/r/65663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5dadea3241d6731f28e4c6ad36a3049b2587a61 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Input extender: Listening to animationstep event - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65664 Change subject: Input extender: Listening to animationstep event .. Input extender: Listening to animationstep event (bug 48677) Requires change Ie6717ccece619b7cb8a096f016a690cda3b9ed80 in the Wikibase extension. Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff --- M ValueView/resources/jquery.ui/jquery.ui.inputextender.js 1 file changed, 30 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/64/65664/1 diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js index 0ce49fe..8064753 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js +++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js @@ -76,6 +76,13 @@ _animationTimeout: null, /** +* Caches the element's offset to determine whether the input extension has to be +* repositioned when reacting on global animationstep event. +* @type {Object} +*/ + _offset: null, + + /** * @see jQuery.Widget._create */ _create: function() { @@ -158,13 +165,12 @@ } ); } - // Blurring by clicking away from the widget (one handler is sufficient): $( 'html' ) .off( '.' + this.widgetName ) + // Blurring by clicking away from the widget (one handler is sufficient): .on( 'click.' + this.widgetName, function( event ) { // Loop through all widgets and hide content when having clicked out of it: - var $widgetNodes = $( ':' + self.widgetBaseClass ); - $widgetNodes.each( function( i, widgetNode ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { var widget = $( widgetNode ).data( self.widgetName ), $target = $( event.target ); @@ -174,6 +180,16 @@ widget.hideExtension(); } + } ); + } ) + // If some other animation changes the input element's position, the input extender + // needs to be repositioned: + .on( 'animationstep.' + this.widgetName, function( event, now, tween ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { + var widget = $( widgetNode ).data( self.widgetName ); + if( widget.$extension.is( ':visible' ) ) { + widget._reposition(); + } } ); } ); @@ -291,12 +307,23 @@ * Repositions the extension. */ _reposition: function() { + var offset = this.element.offset(); + + if( + this._offset +offset.top === this._offset.top offset.left === this._offset.left + ) { + return; // Position has not changed. + } + // TODO: Repositioning is not optimal in RTL context when hitting the toggler in the // extension to hide additional input. This seems to be caused by a width // miscalculation which can be debugged with console.log( this.$extension.width() ). this.$extension.position( $.extend( { of: this.element }, this.options.position ) ); + + this._offset = offset; } } ); -- To view, visit https://gerrit.wikimedia.org/r/65664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added missing dependency of TimeInput expert - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/65665 Change subject: Added missing dependency of TimeInput expert .. Added missing dependency of TimeInput expert Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 --- M ValueView/ValueView.resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/65/65665/1 diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index 35f5cfd..0a3a38d 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -205,6 +205,7 @@ 'jquery.valueview/valueview.experts/experts.TimeInput.css', ), 'dependencies' = array( + 'jquery.valueview.experts', 'jquery.fn.focusAt', 'jquery.time.timeinput', 'jquery.ui.inputextender', -- To view, visit https://gerrit.wikimedia.org/r/65665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Triggering animationstep event in snakview value variation - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Triggering animationstep event in snakview value variation .. Triggering animationstep event in snakview value variation Bug 48677 Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 --- M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js 1 file changed, 17 insertions(+), 3 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js index facf8c2..c4e3af8 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js @@ -4,6 +4,12 @@ * * @licence GNU GPL v2+ * @author Daniel Werner daniel.wer...@wikimedia.de + * + * @event animationstep: Triggered on the html element while the variation's viewport is being + *animated. + *(1) {jQuery.Event} + *(2) {Number} now + *(3) {jQuery.Tween} tween */ ( function( mw, wb, dv, dt, $ ) { 'use strict'; @@ -175,7 +181,7 @@ }, /** -* Attach event handlers to the value view widget's element. +* Attaches event handlers to the value view widget's element. */ _attachEventHandlers: function() { var self = this; @@ -209,11 +215,19 @@ var currentHeight = self.$viewPort.height(); self.$viewPort.css( 'height', 'auto' ); newHeight = self.$viewPort.height(); - self.$viewPort.height( currentHeight ) + self.$viewPort.height( currentHeight ); } if( tween === undefined ) { - self.$viewPort.animate( { height: newHeight }, 250 ); + self.$viewPort.animate( + { height: newHeight }, + { + duration: 250, + step: function( now, tween ) { + $( 'html' ).trigger( 'animationstep', [ now, tween ] ); + } + } + ); } else { self.$viewPort.height( newHeight ); } -- To view, visit https://gerrit.wikimedia.org/r/65659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6717ccece619b7cb8a096f016a690cda3b9ed80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Checking for valid qualifiers in claimview - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Checking for valid qualifiers in claimview .. Checking for valid qualifiers in claimview (bug 48776) Change If4e1196551835776100382416430ae289f82c825 caused claimview's save button to be enabled with empty qualifiers being present. Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index 6344718..3ba48ca 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -184,6 +184,10 @@ * @return {boolean} */ isValid: function() { + if( this._qualifiers !this._qualifiers.isValid() ) { + return false; + } + try { this._instantiateClaim( null ); } catch( e ) { -- To view, visit https://gerrit.wikimedia.org/r/65660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa8636e8878abb379681be3e3ca44174ecc2fc44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Input extender widget: Removed obsolete stopPropagation() - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Input extender widget: Removed obsolete stopPropagation() .. Input extender widget: Removed obsolete stopPropagation() Calling stopPropagation() interferes with other widgets listening to click events on parent nodes. Even more, calling stopPropagation is not required since checking if the extension is clicked is done by using jQuery's .closest(). Change-Id: I178f80357cb4fed7b9d186f4c9e3b6811850289e --- M ValueView/resources/jquery.ui/jquery.ui.inputextender.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js index d00393d..0ce49fe 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js +++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js @@ -89,7 +89,6 @@ .on( 'click.' + this.widgetName, function( event ) { if( !$( event.target ).closest( self.$closeIcon ).length ) { clearTimeout( self._animationTimeout ); - event.stopPropagation(); self.showExtension(); } } ) -- To view, visit https://gerrit.wikimedia.org/r/65661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I178f80357cb4fed7b9d186f4c9e3b6811850289e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] List rotator widget: Assigning position absolute to menu - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: List rotator widget: Assigning position absolute to menu .. List rotator widget: Assigning position absolute to menu List rotator menu needs to be positioned absolute on order for its position to be calculated correctly. Change-Id: I09ec3008a66673a4c45324ae5568e2672c3dffd9 --- M ValueView/resources/jquery.ui/jquery.ui.listrotator.css 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.ui/jquery.ui.listrotator.css b/ValueView/resources/jquery.ui/jquery.ui.listrotator.css index e606613..2c4b193 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.listrotator.css +++ b/ValueView/resources/jquery.ui/jquery.ui.listrotator.css @@ -67,6 +67,7 @@ .ui-listrotator-menu { font-size: 84%; padding: 0; + position: absolute; z-index: 1; } -- To view, visit https://gerrit.wikimedia.org/r/65662 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09ec3008a66673a4c45324ae5568e2672c3dffd9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always resize StringValue expert input element - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Always resize StringValue expert input element .. Always resize StringValue expert input element (Bug 48747) String expert needs to be resized even when there is no valid value (e.g. to reset the input box height to one line if there is no value). Change-Id: Ic5dadea3241d6731f28e4c6ad36a3049b2587a61 --- M ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js index 1e9e9da..39d1eea 100644 --- a/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js @@ -96,11 +96,13 @@ var textValue = this._newValue === null ? '' : this._newValue; this._newValue = false; - // Display value and resize textarea to fit for the value: + // Display value: this.$input.val( textValue ); - this._resizeInput(); } + // Resize textarea to fit the value (which might be empty): + this._resizeInput(); + // We always use the textare for displaying the value, only in edit mode we format the // textare as an input field though. if( this._viewState.isInEditMode() ) { -- To view, visit https://gerrit.wikimedia.org/r/65663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5dadea3241d6731f28e4c6ad36a3049b2587a61 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Input extender: Listening to animationstep event - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Input extender: Listening to animationstep event .. Input extender: Listening to animationstep event (bug 48677) Requires change Ie6717ccece619b7cb8a096f016a690cda3b9ed80 in the Wikibase extension. Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff --- M ValueView/resources/jquery.ui/jquery.ui.inputextender.js 1 file changed, 30 insertions(+), 3 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js index 0ce49fe..8064753 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js +++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js @@ -76,6 +76,13 @@ _animationTimeout: null, /** +* Caches the element's offset to determine whether the input extension has to be +* repositioned when reacting on global animationstep event. +* @type {Object} +*/ + _offset: null, + + /** * @see jQuery.Widget._create */ _create: function() { @@ -158,13 +165,12 @@ } ); } - // Blurring by clicking away from the widget (one handler is sufficient): $( 'html' ) .off( '.' + this.widgetName ) + // Blurring by clicking away from the widget (one handler is sufficient): .on( 'click.' + this.widgetName, function( event ) { // Loop through all widgets and hide content when having clicked out of it: - var $widgetNodes = $( ':' + self.widgetBaseClass ); - $widgetNodes.each( function( i, widgetNode ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { var widget = $( widgetNode ).data( self.widgetName ), $target = $( event.target ); @@ -174,6 +180,16 @@ widget.hideExtension(); } + } ); + } ) + // If some other animation changes the input element's position, the input extender + // needs to be repositioned: + .on( 'animationstep.' + this.widgetName, function( event, now, tween ) { + $( ':' + self.widgetBaseClass ).each( function( i, widgetNode ) { + var widget = $( widgetNode ).data( self.widgetName ); + if( widget.$extension.is( ':visible' ) ) { + widget._reposition(); + } } ); } ); @@ -291,12 +307,23 @@ * Repositions the extension. */ _reposition: function() { + var offset = this.element.offset(); + + if( + this._offset +offset.top === this._offset.top offset.left === this._offset.left + ) { + return; // Position has not changed. + } + // TODO: Repositioning is not optimal in RTL context when hitting the toggler in the // extension to hide additional input. This seems to be caused by a width // miscalculation which can be debugged with console.log( this.$extension.width() ). this.$extension.position( $.extend( { of: this.element }, this.options.position ) ); + + this._offset = offset; } } ); -- To view, visit https://gerrit.wikimedia.org/r/65664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90c806aa730949bfce1d5b21f1b3c0429ba962ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Added missing dependency of TimeInput expert - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Added missing dependency of TimeInput expert .. Added missing dependency of TimeInput expert Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 --- M ValueView/ValueView.resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index 35f5cfd..0a3a38d 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -205,6 +205,7 @@ 'jquery.valueview/valueview.experts/experts.TimeInput.css', ), 'dependencies' = array( + 'jquery.valueview.experts', 'jquery.fn.focusAt', 'jquery.time.timeinput', 'jquery.ui.inputextender', -- To view, visit https://gerrit.wikimedia.org/r/65665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6deea91071f1974fe0cbdfed305416bdd67cc5c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show input methods for selected language correctly - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/65666 Change subject: Show input methods for selected language correctly .. Show input methods for selected language correctly Remove redundant calls to prepareInputmethods and redundant button styling. Rename firstLanguauge to the clearer currentLanguage. Switch checking for imeLanguage and the prereferences language to make sure that the last one is shown. Done in pair programming with Santhosh. Bug: 48163 Change-Id: Ie8441f29eb20caa05534c8589481a26cb415a27f --- M resources/js/ext.uls.inputsettings.js 1 file changed, 18 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/66/65666/1 diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 0abe952..309d9c1 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -95,7 +95,6 @@ this.$template.find( '.enabled-only' ).addClass( 'hide' ); } this.prepareLanguages(); - this.prepareInputmethods( $.ime.preferences.getLanguage() ); this.prepareToggleButton(); this.$template.i18n(); this.listen(); @@ -196,7 +195,7 @@ prepareLanguages: function () { var inputSettings = this, SUGGESTED_LANGUAGES_NUMBER = 3, - firstLanguage = this.contentLanguage, + currentLanguage = this.contentLanguage, selectedImeLanguage = $.ime.preferences.getLanguage(), languagesForButtons, $languages, suggestedLanguages, lang, i, language, $button, $caret; @@ -216,21 +215,21 @@ // after selecting a different language $languages.empty(); - // UI language must always be present - if ( this.imeLanguage !== this.contentLanguage - $.uls.data.languages[this.imeLanguage] - ) { - languagesForButtons.push( this.imeLanguage ); - firstLanguage = this.imeLanguage; - } - // Selected IME language may be different, and it must // be present, too if ( $.inArray( selectedImeLanguage, languagesForButtons ) === -1 $.uls.data.languages[selectedImeLanguage] ) { languagesForButtons.push( selectedImeLanguage ); - firstLanguage = selectedImeLanguage; + currentLanguage = selectedImeLanguage; + } + + // UI language must always be present + if ( this.imeLanguage !== this.contentLanguage + $.uls.data.languages[this.imeLanguage] + ) { + languagesForButtons.push( this.imeLanguage ); + currentLanguage = this.imeLanguage; } for ( lang in suggestedLanguages ) { @@ -251,7 +250,10 @@ return function () { var selectedLanguage = button.data( 'language' ) || inputSettings.imeLanguage; - inputSettings.enableApplyButton(); + if ( selectedLanguage !== inputSettings.imeLanguage ) { + inputSettings.enableApplyButton(); + } + $.ime.preferences.setLanguage( selectedLanguage ); $( '.uls-ui-languages .button' ).removeClass( 'down' ); button.addClass( 'down' ); @@ -270,16 +272,16 @@ dir: $.uls.data.getDir( language ) } ); - if ( language === firstLanguage ) { - $button.addClass( 'down' ); - } - $button.data( 'language', language ); $caret = $( 'span' ).addClass( 'uls-input-settings-caret' ); $languages.append( $button, $caret ); $button.on( 'click', buttonHandler( $button ) ); + +
[MediaWiki-commits] [Gerrit] add static variables (version 0.3.2) - change (mediawiki...Foxway)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/65667 Change subject: add static variables (version 0.3.2) .. add static variables (version 0.3.2) Change-Id: I70d4f6fd15673adb2dabf91c6070c2543623aaca --- M Foxway.php M includes/Debug.php M includes/ErrorMessage.php M includes/Interpreter.php M includes/Runtime.php M tests/phpunit/includes/InterpreterTest.php 6 files changed, 133 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway refs/changes/67/65667/1 diff --git a/Foxway.php b/Foxway.php index 3ce54f1..bc90aac 100644 --- a/Foxway.php +++ b/Foxway.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'Foxway_VERSION' , '0.3.1' ); +define( 'Foxway_VERSION' , '0.3.2' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/includes/Debug.php b/includes/Debug.php index 44a56e6..fc21e7f 100644 --- a/includes/Debug.php +++ b/includes/Debug.php @@ -80,6 +80,7 @@ case T_ELSE: case T_ELSEIF: case T_ARRAY: + case T_STATIC: $class = 'foxway_construct'; break; case T_VARIABLE: diff --git a/includes/ErrorMessage.php b/includes/ErrorMessage.php index f826428..0ac0e40 100644 --- a/includes/ErrorMessage.php +++ b/includes/ErrorMessage.php @@ -7,21 +7,34 @@ * @ingroup Foxway * @author Pavel Astakhov pastak...@yandex.ru * @licence GNU General Public Licence 2.0 or later - * - * @property-read int $type Type of error - * @property-read mixed $params Params of error */ class ErrorMessage implements iRawOutput { - private $line; - private $tokenLine; - private $type; - private $params; + /** +* __LINE__ of source code returned error +* @var int +*/ + public $line; + /** +* line parser source code that contains the error +* @var int +*/ + public $tokenLine; + /** +* Type of error +* @var int +*/ + public $type; + /** +* Params of error +* @var mixed +*/ + public $params; private $caller; public function __construct( $line, $tokenLine, $type, $params ) { $this-line = $line; - $this-type = $type; $this-tokenLine = $tokenLine; + $this-type = $type; $this-params = $params; $this-caller = wfGetCaller(); @@ -34,17 +47,6 @@ array( 'class' = 'error', 'title' = 'Report from ' .htmlspecialchars($this-caller). 'line '.htmlspecialchars($this-line) ), // TODO wfMessage $this-getMessage() ); - } - - public function __get($name) { - switch ($name) { - case 'type': - return $this-type; - break; - case 'params': - return $this-params; - break; - } } public function getMessage() { diff --git a/includes/Interpreter.php b/includes/Interpreter.php index 34ea40a..a395fd4 100644 --- a/includes/Interpreter.php +++ b/includes/Interpreter.php @@ -21,6 +21,7 @@ define( 'FOXWAY_EXPECT_PARENTHES_WITH_DOUBLE_ARROW', 1 12 ); define( 'FOXWAY_ALLOW_DOUBLE_ARROW', 1 13 ); define( 'FOXWAY_NEED_CONCATENATION_OPERATOR', 1 14 ); +define( 'FOXWAY_EXPECT_STATIC_VARIABLE', 1 15 ); /** * Interpreter class of Foxway extension. @@ -155,6 +156,9 @@ $commandResult = $runtime-getCommandResult(); break; case ',': + if( $parenthesFlags FOXWAY_EXPECT_STATIC_VARIABLE ) { + continue; + } if ( !($parenthesFlags FOXWAY_EXPECT_LIST_PARAMS) ) { $return[] = new ErrorMessage(__LINE__, $tokenLine, E_PARSE, $id); break 2; @@ -306,6 +310,32 @@ if( $expected in_array(T_VARIABLE, $expected) ) { if( $parenthesFlags FOXWAY_EXPECT_CURLY_CLOSE ) { $expected = array( '}' ); + } elseif( $parenthesFlags FOXWAY_EXPECT_STATIC_VARIABLE ) { +
[MediaWiki-commits] [Gerrit] add static variables (version 0.3.2) - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: add static variables (version 0.3.2) .. add static variables (version 0.3.2) Change-Id: I70d4f6fd15673adb2dabf91c6070c2543623aaca --- M Foxway.php M includes/Debug.php M includes/ErrorMessage.php M includes/Interpreter.php M includes/Runtime.php M tests/phpunit/includes/InterpreterTest.php 6 files changed, 133 insertions(+), 22 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Foxway.php b/Foxway.php index 3ce54f1..bc90aac 100644 --- a/Foxway.php +++ b/Foxway.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'Foxway_VERSION' , '0.3.1' ); +define( 'Foxway_VERSION' , '0.3.2' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/includes/Debug.php b/includes/Debug.php index 44a56e6..fc21e7f 100644 --- a/includes/Debug.php +++ b/includes/Debug.php @@ -80,6 +80,7 @@ case T_ELSE: case T_ELSEIF: case T_ARRAY: + case T_STATIC: $class = 'foxway_construct'; break; case T_VARIABLE: diff --git a/includes/ErrorMessage.php b/includes/ErrorMessage.php index f826428..0ac0e40 100644 --- a/includes/ErrorMessage.php +++ b/includes/ErrorMessage.php @@ -7,21 +7,34 @@ * @ingroup Foxway * @author Pavel Astakhov pastak...@yandex.ru * @licence GNU General Public Licence 2.0 or later - * - * @property-read int $type Type of error - * @property-read mixed $params Params of error */ class ErrorMessage implements iRawOutput { - private $line; - private $tokenLine; - private $type; - private $params; + /** +* __LINE__ of source code returned error +* @var int +*/ + public $line; + /** +* line parser source code that contains the error +* @var int +*/ + public $tokenLine; + /** +* Type of error +* @var int +*/ + public $type; + /** +* Params of error +* @var mixed +*/ + public $params; private $caller; public function __construct( $line, $tokenLine, $type, $params ) { $this-line = $line; - $this-type = $type; $this-tokenLine = $tokenLine; + $this-type = $type; $this-params = $params; $this-caller = wfGetCaller(); @@ -34,17 +47,6 @@ array( 'class' = 'error', 'title' = 'Report from ' .htmlspecialchars($this-caller). 'line '.htmlspecialchars($this-line) ), // TODO wfMessage $this-getMessage() ); - } - - public function __get($name) { - switch ($name) { - case 'type': - return $this-type; - break; - case 'params': - return $this-params; - break; - } } public function getMessage() { diff --git a/includes/Interpreter.php b/includes/Interpreter.php index 34ea40a..a395fd4 100644 --- a/includes/Interpreter.php +++ b/includes/Interpreter.php @@ -21,6 +21,7 @@ define( 'FOXWAY_EXPECT_PARENTHES_WITH_DOUBLE_ARROW', 1 12 ); define( 'FOXWAY_ALLOW_DOUBLE_ARROW', 1 13 ); define( 'FOXWAY_NEED_CONCATENATION_OPERATOR', 1 14 ); +define( 'FOXWAY_EXPECT_STATIC_VARIABLE', 1 15 ); /** * Interpreter class of Foxway extension. @@ -155,6 +156,9 @@ $commandResult = $runtime-getCommandResult(); break; case ',': + if( $parenthesFlags FOXWAY_EXPECT_STATIC_VARIABLE ) { + continue; + } if ( !($parenthesFlags FOXWAY_EXPECT_LIST_PARAMS) ) { $return[] = new ErrorMessage(__LINE__, $tokenLine, E_PARSE, $id); break 2; @@ -306,6 +310,32 @@ if( $expected in_array(T_VARIABLE, $expected) ) { if( $parenthesFlags FOXWAY_EXPECT_CURLY_CLOSE ) { $expected = array( '}' ); + } elseif( $parenthesFlags FOXWAY_EXPECT_STATIC_VARIABLE ) { + $r =
[MediaWiki-commits] [Gerrit] Added @covers tags for AtomicDiffOp - change (mediawiki...Diff)
jenkins-bot has submitted this change and it was merged. Change subject: Added @covers tags for AtomicDiffOp .. Added @covers tags for AtomicDiffOp Change-Id: I14f3c12b9b6ee9d90186f8eb63f3844732ad3cdf --- M tests/phpunit/diffop/DiffOpAddTest.php M tests/phpunit/diffop/DiffOpChangeTest.php M tests/phpunit/diffop/DiffOpRemoveTest.php 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/diffop/DiffOpAddTest.php b/tests/phpunit/diffop/DiffOpAddTest.php index e1b02ae..8a9d499 100644 --- a/tests/phpunit/diffop/DiffOpAddTest.php +++ b/tests/phpunit/diffop/DiffOpAddTest.php @@ -6,6 +6,7 @@ /** * @covers Diff\DiffOpAdd + * @covers Diff\AtomicDiffOp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/phpunit/diffop/DiffOpChangeTest.php b/tests/phpunit/diffop/DiffOpChangeTest.php index e11246f..579f15c 100644 --- a/tests/phpunit/diffop/DiffOpChangeTest.php +++ b/tests/phpunit/diffop/DiffOpChangeTest.php @@ -6,6 +6,7 @@ /** * @covers Diff\DiffOpChange + * @covers Diff\AtomicDiffOp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/phpunit/diffop/DiffOpRemoveTest.php b/tests/phpunit/diffop/DiffOpRemoveTest.php index 39d94a6..41a2134 100644 --- a/tests/phpunit/diffop/DiffOpRemoveTest.php +++ b/tests/phpunit/diffop/DiffOpRemoveTest.php @@ -6,6 +6,7 @@ /** * @covers Diff\DiffOpRemove + * @covers Diff\AtomicDiffOp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- To view, visit https://gerrit.wikimedia.org/r/65258 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14f3c12b9b6ee9d90186f8eb63f3844732ad3cdf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore class autoloading in entry point in unit test coverag... - change (mediawiki...Diff)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore class autoloading in entry point in unit test coverage report .. Ignore class autoloading in entry point in unit test coverage report Change-Id: I37f2da06133d4f6b97349a51c4b80571dfb3065e --- M Diff.standalone.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Diff.standalone.php b/Diff.standalone.php index bd0034f..d816255 100644 --- a/Diff.standalone.php +++ b/Diff.standalone.php @@ -19,6 +19,7 @@ die( 'Not an entry point for MediaWiki. Use Diff.php' ); } +// @codeCoverageIgnoreStart spl_autoload_register( function ( $className ) { static $classes = false; @@ -30,4 +31,5 @@ include_once __DIR__ . '/' . $classes[$className]; } } ); +// @codeCoverageIgnoreEnd -- To view, visit https://gerrit.wikimedia.org/r/65266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I37f2da06133d4f6b97349a51c4b80571dfb3065e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Got rid of DiffOpTestDummy - change (mediawiki...Diff)
jenkins-bot has submitted this change and it was merged. Change subject: Got rid of DiffOpTestDummy .. Got rid of DiffOpTestDummy According to PHPUnit this was the biggest piece of CRAP with a risk score of 72, bigger then anything else in Diff :) Change-Id: I2b2d45f96e8fab03de92c269e526cd628168a4e3 --- M Diff.classes.php M tests/phpunit/DiffOpFactoryTest.php D tests/phpunit/DiffOpTestDummy.php M tests/phpunit/diffop/DiffOpAddTest.php M tests/phpunit/diffop/DiffOpChangeTest.php M tests/phpunit/diffop/DiffOpRemoveTest.php M tests/phpunit/diffop/DiffOpTest.php M tests/phpunit/diffop/diff/DiffAsOpTest.php 8 files changed, 42 insertions(+), 98 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Diff.classes.php b/Diff.classes.php index fb806a0..39a8a52 100644 --- a/Diff.classes.php +++ b/Diff.classes.php @@ -44,6 +44,5 @@ 'Diff\MapDiff' = 'includes/diffop/diff/MapDiff.php', 'Diff\Tests\DiffOpTest' = 'tests/phpunit/diffop/DiffOpTest.php', - 'Diff\Tests\DiffOpTestDummy' = 'tests/phpunit/DiffOpTestDummy.php', 'Diff\Tests\DiffTestCase' = 'tests/phpunit/DiffTestCase.php', ); diff --git a/tests/phpunit/DiffOpFactoryTest.php b/tests/phpunit/DiffOpFactoryTest.php index fd030ca..ee6ec6c 100644 --- a/tests/phpunit/DiffOpFactoryTest.php +++ b/tests/phpunit/DiffOpFactoryTest.php @@ -49,7 +49,7 @@ $diffOps[9001] = new DiffOpAdd( 4.2 ); $diffOps['42'] = new DiffOpAdd( array( 42, array( 9001 ) ) ); $diffOps[] = new DiffOpRemove( 42 ); - $diffOps[] = new DiffOpAdd( new DiffOpTestDummy( spam ) ); + $diffOps[] = new DiffOpAdd( new DiffOpChange( 'spam', 'moar spam' ) ); $atomicDiffOps = $diffOps; @@ -87,34 +87,36 @@ * @param DiffOp $diffOp */ public function testNewFromArrayWithConversion( DiffOp $diffOp ) { - $factory = new DiffOpFactory( 'Diff\Tests\DiffOpTestDummy::objectify' ); + $unserializationFunction = function( $array ) { + if ( is_array( $array ) isset( $array['type'] ) $array['type'] === 'Change' ) { + return new DiffOpChange( $array['teh_old'], $array['teh_new'] ); + } + + return $array; + }; + + $factory = new DiffOpFactory( $unserializationFunction ); + + $serializationFunction = function( $obj ) { + if ( $obj instanceof DiffOpChange ) { + return array( + 'type' = 'Change', + 'teh_old' = $obj-getOldValue(), + 'teh_new' = $obj-getNewValue(), + ); + } + + return $obj; + }; // try with conversion callback - $array = $diffOp-toArray( 'Diff\Tests\DiffOpTestDummy::arrayalize' ); + $array = $diffOp-toArray( $serializationFunction ); + $newInstance = $factory-newFromArray( $array ); // If an equality method is implemented in DiffOp, it should be used here $this-assertEquals( $diffOp, $newInstance ); $this-assertEquals( $diffOp-getType(), $newInstance-getType() ); - } - - public static function dummyToArray( $obj ) { - if ( $obj instanceof DiffOpTestDummy ) { - return array( - 'type' = 'Dummy', - 'text' = $obj-text, - ); - } - - return $obj; - } - - public static function arrayToDummy( $array ) { - if ( is_array( $array ) isset( $array['type'] ) $array['type'] === 'Dummy' ) { - return new DiffOpTestDummy( $array['text'] ); - } - - return $array; } public function invalidArrayFromArrayProvider() { diff --git a/tests/phpunit/DiffOpTestDummy.php b/tests/phpunit/DiffOpTestDummy.php deleted file mode 100644 index 510fac1..000 --- a/tests/phpunit/DiffOpTestDummy.php +++ /dev/null @@ -1,63 +0,0 @@ -?php - -namespace Diff\Tests; - -/** - * Dummy class for testing DiffOps. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License
[MediaWiki-commits] [Gerrit] Added @covers tags to unit tests of the QueryEngine component - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Added @covers tags to unit tests of the QueryEngine component .. Added @covers tags to unit tests of the QueryEngine component Change-Id: Ibf73aa770919ebc1f13af831c45f35b06f8d0ef1 --- M QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php M QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php M QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowTest.php M QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimsTableTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/BooleanHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/EntityIdHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/IriHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/MonolingualTextHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/NumberHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DVHandler/StringHandlerTest.php M QueryEngine/tests/phpunit/SQLStore/DataValueHandlersTest.php M QueryEngine/tests/phpunit/SQLStore/FactoryTest.php M QueryEngine/tests/phpunit/SQLStore/SchemaTest.php M QueryEngine/tests/phpunit/SQLStore/SetupTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/SnakInserterTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/SnakRowBuilderTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/SnakStoreTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/ValueSnakRowTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/ValueSnakStoreTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/ValuelessSnakRowTest.php M QueryEngine/tests/phpunit/SQLStore/SnakStore/ValuelessSnakStoreTest.php M QueryEngine/tests/phpunit/SQLStore/StoreConfigTest.php M QueryEngine/tests/phpunit/SQLStore/StoreTest.php M QueryEngine/tests/phpunit/SQLStore/WriterTest.php 25 files changed, 27 insertions(+), 23 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php index fc72714..b1e3ad2 100644 --- a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php @@ -15,7 +15,7 @@ use Wikibase\Statement; /** - * Unit tests for the Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimInserter class. + * @covers Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimInserter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php index 095d707..d9513e7 100644 --- a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php @@ -12,7 +12,7 @@ use Wikibase\Statement; /** - * Unit tests for the Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimRowBuilder class. + * @covers Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimRowBuilder * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowTest.php b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowTest.php index c26c903..9247627 100644 --- a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimRowTest.php @@ -6,7 +6,7 @@ use Wikibase\Statement; /** - * Unit tests for the Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimRow class. + * @covers Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimRow * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimsTableTest.php b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimsTableTest.php index 4d658f6..883403e 100644 --- a/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimsTableTest.php +++ b/QueryEngine/tests/phpunit/SQLStore/ClaimStore/ClaimsTableTest.php @@ -8,7 +8,7 @@ use Wikibase\Statement; /** - * Unit tests for the Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimsTable class. + * @covers Wikibase\QueryEngine\SQLStore\ClaimStore\ClaimsTable * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/QueryEngine/tests/phpunit/SQLStore/DVHandler/BooleanHandlerTest.php b/QueryEngine/tests/phpunit/SQLStore/DVHandler/BooleanHandlerTest.php index 8059ac3..cc12060 100644 ---
[MediaWiki-commits] [Gerrit] Remove document from anon cover function - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Remove document from anon cover function .. Remove document from anon cover function jshintrc has browser:true setting Change-Id: I30acfb63f132473611be9da4edf12c3b6ea42523 --- M resources/js/ext.uls.webfonts.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index ea944dc..614a4db 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -16,7 +16,7 @@ * @licence GNU General Public Licence 2.0 or later * @licence MIT License */ -( function ( $, mw, document, undefined ) { +( function ( $, mw, undefined ) { 'use strict'; var mediawikiFontRepository, ulsPreferences; @@ -91,4 +91,4 @@ mw.webfonts.setup(); } ); -}( jQuery, mediaWiki, document ) ); +}( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/65657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30acfb63f132473611be9da4edf12c3b6ea42523 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get the saved font using the fontSelector defined in mw.webf... - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Get the saved font using the fontSelector defined in mw.webfonts.setup .. Get the saved font using the fontSelector defined in mw.webfonts.setup Also make sure that correct language is passed to the getFont It was wrong in current version - UI language was passed always (introduced in a refactoring to avoid code duplication for content and ui language- commit: 98bb1c200c8c8fe89a2b7ae1442e2354c6a48266 ) Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430 --- M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.webfonts.js 2 files changed, 2 insertions(+), 5 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 892ba0a..f1a69c4 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -358,7 +358,8 @@ // Remove all current fonts $fontSelector.find( 'option' ).remove(); - savedFont = mw.webfonts.preferences.getFont( this.uiLanguage ); + // Get the saved font using the fontSelector defined in mw.webfonts.setup + savedFont = this.$webfonts.getFont( language ); $.each( fonts, function ( key, font ) { var $fontOption; diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index 614a4db..206f664 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -62,10 +62,6 @@ font = repository.defaultFont( language ); } - if ( font === 'system' ) { - font = null; - } - return font; }, exclude: ( function () { -- To view, visit https://gerrit.wikimedia.org/r/65658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improvements to QueryOptionsTest - change (mediawiki...Ask)
jenkins-bot has submitted this change and it was merged. Change subject: Improvements to QueryOptionsTest .. Improvements to QueryOptionsTest Change-Id: I662942c5186d656d01ef47ca121ac39f3e5d1c3b --- M Tests/Phpunit/Language/Option/QueryOptionsTest.php 1 file changed, 25 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/Language/Option/QueryOptionsTest.php b/Tests/Phpunit/Language/Option/QueryOptionsTest.php index 280b9a2..b7f5dbb 100644 --- a/Tests/Phpunit/Language/Option/QueryOptionsTest.php +++ b/Tests/Phpunit/Language/Option/QueryOptionsTest.php @@ -3,6 +3,8 @@ namespace Ask\Tests\Phpunit\Language\Option; use Ask\Language\Option\QueryOptions; +use Ask\Language\Option\SortOptions; +use Ask\Tests\Phpunit\AskTestCase; /** * @covers Ask\Language\Option\QueryOptions @@ -33,7 +35,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ -class QueryOptionsTest extends \Ask\Tests\Phpunit\AskTestCase { +class QueryOptionsTest extends AskTestCase { /** * @since 0.1 @@ -56,7 +58,7 @@ $instances[] = new QueryOptions( 9000, 42, - new \Ask\Language\Option\SortOptions( array() ) + new SortOptions( array() ) ); return $instances; @@ -83,4 +85,25 @@ $this-assertPrimitiveStructure( $array ); } + /** +* @dataProvider constructorArgumentProvider +*/ + public function testConstructSetsFields( $limit, $offset, SortOptions $sort ) { + $queryOptions = new QueryOptions( $limit, $offset, $sort ); + + $this-assertEquals( $limit, $queryOptions-getLimit() ); + $this-assertEquals( $offset, $queryOptions-getOffset() ); + $this-assertEquals( $sort, $queryOptions-getSort() ); + } + + public function constructorArgumentProvider() { + $argLists = array(); + + $argLists[] = array( 1, 2, new SortOptions( array() ) ); + + $argLists[] = array( 100, 0, new SortOptions( array() ) ); + + return $argLists; + } + } -- To view, visit https://gerrit.wikimedia.org/r/65296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I662942c5186d656d01ef47ca121ac39f3e5d1c3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix @covers tag in SortOptionsTest - change (mediawiki...Ask)
jenkins-bot has submitted this change and it was merged. Change subject: Fix @covers tag in SortOptionsTest .. Fix @covers tag in SortOptionsTest Change-Id: If7e5b050068585fc278fc2563191238e84e2c838 --- M Tests/Phpunit/Language/Option/SortOptionsTest.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/Language/Option/SortOptionsTest.php b/Tests/Phpunit/Language/Option/SortOptionsTest.php index b20766b..6836603 100644 --- a/Tests/Phpunit/Language/Option/SortOptionsTest.php +++ b/Tests/Phpunit/Language/Option/SortOptionsTest.php @@ -5,10 +5,11 @@ use Ask\Language\Option\PropertyValueSortExpression; use Ask\Language\Option\SortExpression; use Ask\Language\Option\SortOptions; +use Ask\Tests\Phpunit\AskTestCase; use DataValues\StringValue; /** - * @covers Ask\Language\Option\QueryOptions + * @covers Ask\Language\Option\SortOptions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +37,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ -class SortOptionsTest extends \Ask\Tests\Phpunit\AskTestCase { +class SortOptionsTest extends AskTestCase { /** * @since 0.1 -- To view, visit https://gerrit.wikimedia.org/r/65297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7e5b050068585fc278fc2563191238e84e2c838 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added Travis CI config file - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65668 Change subject: Added Travis CI config file .. Added Travis CI config file Change-Id: I3a2870d749cea6bfd0dd8aeb3e273803eba75214 --- M .gitignore A .travis.yml 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/68/65668/1 diff --git a/.gitignore b/.gitignore index 9ab99ba..dbfbd8f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ !.gitignore !.gitreview +!.travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..4b0942a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + +script: phpunit --configuration DataValues/phpunit.xml.dist -- To view, visit https://gerrit.wikimedia.org/r/65668 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a2870d749cea6bfd0dd8aeb3e273803eba75214 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added Travis CI config file - change (mediawiki...DataValues)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Added Travis CI config file .. Added Travis CI config file Change-Id: I3a2870d749cea6bfd0dd8aeb3e273803eba75214 --- M .gitignore A .travis.yml 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 9ab99ba..dbfbd8f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ !.gitignore !.gitreview +!.travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..4b0942a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + +script: phpunit --configuration DataValues/phpunit.xml.dist -- To view, visit https://gerrit.wikimedia.org/r/65668 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a2870d749cea6bfd0dd8aeb3e273803eba75214 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf5 Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added phpunit.xml file for all projects in the repo - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Added phpunit.xml file for all projects in the repo .. Added phpunit.xml file for all projects in the repo Also made all tests for code that is not dependent on MW runnable without MW being loaded. Change-Id: I38301d4315fca0d52095bd6cda23dc64458d7f09 --- A DataTypes/tests/bootstrap.php M DataTypes/tests/includes/DataTypeFactoryTest.php M DataTypes/tests/includes/DataTypeTest.php M ValueFormatters/tests/FormatterOptionsTest.php M ValueFormatters/tests/ValueFormatterFactoryTest.php M ValueFormatters/tests/ValueFormatterTestBase.php A ValueFormatters/tests/bootstrap.php A ValueParsers/tests/bootstrap.php M ValueParsers/tests/includes/ParserOptionsTest.php M ValueParsers/tests/includes/ValueParserFactoryTest.php M ValueParsers/tests/includes/parsers/ValueParserTestBase.php A ValueValidators/tests/bootstrap.php M ValueValidators/tests/phpunit/ErrorTest.php M ValueValidators/tests/phpunit/ValueValidatorFactoryTest.php A bootstrap.php A phpunit.xml.dist 16 files changed, 209 insertions(+), 84 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/DataTypes/tests/bootstrap.php b/DataTypes/tests/bootstrap.php new file mode 100644 index 000..d6e04cf --- /dev/null +++ b/DataTypes/tests/bootstrap.php @@ -0,0 +1,17 @@ +?php + +/** + * PHPUnit test bootstrap file for the DataTypes library. + * + * @since 0.1 + * + * @file + * @ingroup DataTypes + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ + +require_once( __DIR__ . '/../DataTypes.php' ); + +\DataTypes\Message::registerTextFunction( function() { return ''; } ); \ No newline at end of file diff --git a/DataTypes/tests/includes/DataTypeFactoryTest.php b/DataTypes/tests/includes/DataTypeFactoryTest.php index 5164c09..06d4d26 100644 --- a/DataTypes/tests/includes/DataTypeFactoryTest.php +++ b/DataTypes/tests/includes/DataTypeFactoryTest.php @@ -34,7 +34,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ -class DataTypeFactoryTest extends \MediaWikiTestCase { +class DataTypeFactoryTest extends \PHPUnit_Framework_TestCase { /** * @var null|DataTypeFactory @@ -60,7 +60,7 @@ $this-assertInternalType( 'string', $id ); } - $this-assertArrayEquals( array_unique( $ids ), $ids ); + $this-assertEquals( array_unique( $ids ), $ids ); } public function testGetType() { @@ -76,14 +76,18 @@ public function testGetTypes() { $factory = $this-getInstance(); - $this-assertArrayEquals( - $factory-getTypeIds(), - array_map( - function( DataType $type ) { - return $type-getId(); - }, - $factory-getTypes() - ) + $expectedIds = array_map( + function( DataType $type ) { + return $type-getId(); + }, + $factory-getTypes() + ); + + $expectedIds = array_values( $expectedIds ); + + $this-assertEquals( + $expectedIds, + $factory-getTypeIds() ); } diff --git a/DataTypes/tests/includes/DataTypeTest.php b/DataTypes/tests/includes/DataTypeTest.php index c0c66ea..24c5ad5 100644 --- a/DataTypes/tests/includes/DataTypeTest.php +++ b/DataTypes/tests/includes/DataTypeTest.php @@ -34,7 +34,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com */ -class DataTypeTest extends \MediaWikiTestCase { +class DataTypeTest extends \PHPUnit_Framework_TestCase { /** * @return DataType[] @@ -45,7 +45,13 @@ } public function instanceProvider() { - return $this-arrayWrap( $this-getInstances() ); + $argLists = array(); + + foreach ( $this-getInstances() as $instance ) { + $argLists[] = array( $instance ); + } + + return $argLists; } /** @@ -89,11 +95,7 @@ public function testGetLabel( DataType $type ) { foreach ( array( 'en', 'de', 'nl', 'o_O' ) as $langCode ) { $actual = $type-getLabel( $langCode ); - $this-assertTypeOrValue( 'string', $actual, null ); - - $expected = wfMessage( 'datatypes-type-' . $type-getId() )-inLanguage( $langCode )-text(); - - $this-assertEquals( $expected, $actual ); + $this-assertTrue( $actual === null || is_string( $actual ) ); } }
[MediaWiki-commits] [Gerrit] Updated travis config file to run the tests of all component... - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Updated travis config file to run the tests of all components in this git repo .. Updated travis config file to run the tests of all components in this git repo Change-Id: Ida94a15a8aee1d8aee97be00996d3aa0a4a11b5b --- M .travis.yml 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/.travis.yml b/.travis.yml index 4b0942a..99f1119 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,4 @@ php: - 5.3 - 5.4 - - 5.5 - -script: phpunit --configuration DataValues/phpunit.xml.dist + - 5.5 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida94a15a8aee1d8aee97be00996d3aa0a4a11b5b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor interface integration code - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor interface integration code .. Refactor interface integration code Reduce document.ready code by moving functions outside and grouping tooltip related code to a function. Also remove window and document from wrapper anon function since browser: true is defined in .jshintrc Bug: 48156 Change-Id: I7228285cdcb33b915e96e7e2c59e4dbc90f5fc96 --- M lib/jquery.ime/jquery.ime.js M resources/js/ext.uls.interface.js 2 files changed, 186 insertions(+), 159 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index c09bd54..f969fcb 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -760,6 +760,7 @@ */ selectLanguage: function ( languageCode ) { var ime, + imePref = $.ime.preferences.getIM( languageCode ), language = $.ime.languages[languageCode]; if ( !language ) { @@ -772,7 +773,8 @@ // Nothing to do. It is same as the current language, // but check whether the input method changed. if ( ime.inputmethod - ime.inputmethod.id === $.ime.preferences.getIM( languageCode ) + ime.inputmethod.id === imePref || + imePref === 'system' ) { return false; } diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 2bb3b8b..7516a95 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -1,5 +1,5 @@ /** - * ULS Interface language selector + * ULS interface integration logic * * Copyright (C) 2012-2013 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris, * Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other @@ -17,171 +17,118 @@ * @licence MIT License */ -( function ( $, mw, window, document, undefined ) { +( function ( $, mw ) { 'use strict'; - $( document ).ready( function () { - var $ulsTrigger, - $ulsSettingsTrigger, - $pLang, - ulsOptions, - previousLanguages, previousLang, - anonMode, - rtlPage = $( 'body' ).hasClass( 'rtl' ), + /* +* Construct the display settings link +*/ + function displaySettings() { + var $displaySettingsTitle, displaySettingsText, $displaySettings; + + displaySettingsText = $.i18n( 'ext-uls-display-settings-desc' ); + $displaySettingsTitle = $( 'div data-i18n=ext-uls-display-settings-title' ) + .addClass( 'settings-title' ) + .attr( 'title', displaySettingsText ); + $displaySettings = $( 'div' ) + .addClass( 'display-settings-block' ) + .prop( 'id', 'display-settings-block' ) + .append( $displaySettingsTitle ); + + return $displaySettings; + } + + /* +* Construct the input settings link +*/ + function inputSettings() { + var $inputSettingsTitle, inputSettingsText, $inputSettings; + + inputSettingsText = $.i18n( 'ext-uls-input-settings-desc' ); + $inputSettingsTitle = $( 'div data-i18n=ext-uls-input-settings-title' ) + .addClass( 'settings-title' ) + .attr( 'title', inputSettingsText ); + $inputSettings = $( 'div' ) + .addClass( 'input-settings-block' ) + .prop( 'id', 'input-settings-block' ) + .append( $inputSettingsTitle ); + + return $inputSettings; + } + + /* +* Add display settings link to the settings bar in ULS +* @param {Object} uls The ULS object +*/ + function addDisplaySettings( uls ) { + var $displaySettings = displaySettings(), ulsPosition = mw.config.get( 'wgULSPosition' ), + anonMode = ( mw.user.isAnon() + !mw.config.get( 'wgULSAnonCanChangeLanguage' ) ), + displaySettingsOptions = { + defaultModule: 'display' + }; + + // If the ULS trigger is shown in the top personal menu, + // closing the display settings must show the main ULS
[MediaWiki-commits] [Gerrit] Added Travis CI config file - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65669 Change subject: Added Travis CI config file .. Added Travis CI config file Change-Id: I0b8247d4262a4d4ab002f868db08f8bb4447 --- M .gitignore A .travis.yml 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/69/65669/1 diff --git a/.gitignore b/.gitignore index 3925195..9577ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ !.gitignore !.gitreview +!.travis.yml selenium/configuration.yml selenium/Gemfile.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..0df31c0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + +script: phpunit --configuration Database/phpunit.xml.dist --testsuite=WikibaseDatabaseStandalone \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65669 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b8247d4262a4d4ab002f868db08f8bb4447 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix cancel behaviour of display settings - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/65670 Change subject: Fix cancel behaviour of display settings .. Fix cancel behaviour of display settings Font selection becomes persistent despite cancelling it Bug: 47976 Change-Id: Iea4b65a8a13da3cb4a86f5b6521d62cb1372b42a --- M resources/js/ext.uls.displaysettings.js 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/70/65670/1 diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index f1a69c4..f75fc72 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -434,7 +434,8 @@ var displaySettings = this, $contentFontSelector = this.$template.find( '#content-font-selector' ), $uiFontSelector = this.$template.find( '#ui-font-selector' ), - oldFont = $uiFontSelector.find( 'option:selected' ).val(), + oldUIFont = $uiFontSelector.find( 'option:selected' ).val(), + oldContentFont = $contentFontSelector.find( 'option:selected' ).val(), $tabButtons = displaySettings.$template.find( '.uls-display-settings-tab-switcher button' ); // TODO all these repeated selectors can be placed in object constructor. @@ -444,7 +445,8 @@ } ); displaySettings.$template.find( 'button.uls-display-settings-cancel' ).on( 'click', function () { - mw.webfonts.preferences.setFont( displaySettings.contentLanguage, oldFont ); + mw.webfonts.preferences.setFont( displaySettings.contentLanguage, oldContentFont ); + mw.webfonts.preferences.setFont( displaySettings.uiLanguage, oldUIFont ); if ( displaySettings.$webfonts ) { displaySettings.$webfonts.refresh(); @@ -459,7 +461,8 @@ $button.removeClass( 'down' ); } } ); - + displaySettings.prepareUIFonts(); + displaySettings.prepareContentFonts(); displaySettings.close(); } ); -- To view, visit https://gerrit.wikimedia.org/r/65670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea4b65a8a13da3cb4a86f5b6521d62cb1372b42a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added Travis CI config file - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Added Travis CI config file .. Added Travis CI config file Change-Id: I0b8247d4262a4d4ab002f868db08f8bb4447 --- M .gitignore A .travis.yml 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 3925195..9577ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ !.gitignore !.gitreview +!.travis.yml selenium/configuration.yml selenium/Gemfile.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..0df31c0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + +script: phpunit --configuration Database/phpunit.xml.dist --testsuite=WikibaseDatabaseStandalone \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65669 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b8247d4262a4d4ab002f868db08f8bb4447 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use phpunit config file to work around phpunit bug in the tr... - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65671 Change subject: Use phpunit config file to work around phpunit bug in the travis build .. Use phpunit config file to work around phpunit bug in the travis build Change-Id: I28b19dc767598b9113c2476d5231710a5d76 --- A phpunit.xml.dist 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/71/65671/1 diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 000..327a5de --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,26 @@ +phpunit backupGlobals=false + backupStaticAttributes=false + bootstrap=Database/tests/bootstrap.php + cacheTokens=false + colors=true + convertErrorsToExceptions=true + convertNoticesToExceptions=false + convertWarningsToExceptions=true + stopOnError=false + stopOnFailure=false + stopOnIncomplete=false + stopOnSkipped=false + strict=true + verbose=true +testsuites +testsuite name=WikibaseDatabaseStandalone +directoryDatabase/tests/phpunit/directory +excludeDatabase/tests/phpunit/MWDB/exclude + excludeDatabase/tests/phpunit/MediaWikiQueryInterfaceTest.php/exclude +/testsuite +testsuite name=WikibaseDatabaseMediaWiki +directoryDatabase/tests/phpunit/MWDB/directory +fileDatabase/tests/phpunit/MediaWikiQueryInterfaceTest.php/file +/testsuite +/testsuites +/phpunit -- To view, visit https://gerrit.wikimedia.org/r/65671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28b19dc767598b9113c2476d5231710a5d76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use phpunit config file to work around phpunit bug in the tr... - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Use phpunit config file to work around phpunit bug in the travis build .. Use phpunit config file to work around phpunit bug in the travis build Change-Id: I28b19dc767598b9113c2476d5231710a5d76 --- A phpunit.xml.dist 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 000..327a5de --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,26 @@ +phpunit backupGlobals=false + backupStaticAttributes=false + bootstrap=Database/tests/bootstrap.php + cacheTokens=false + colors=true + convertErrorsToExceptions=true + convertNoticesToExceptions=false + convertWarningsToExceptions=true + stopOnError=false + stopOnFailure=false + stopOnIncomplete=false + stopOnSkipped=false + strict=true + verbose=true +testsuites +testsuite name=WikibaseDatabaseStandalone +directoryDatabase/tests/phpunit/directory +excludeDatabase/tests/phpunit/MWDB/exclude + excludeDatabase/tests/phpunit/MediaWikiQueryInterfaceTest.php/exclude +/testsuite +testsuite name=WikibaseDatabaseMediaWiki +directoryDatabase/tests/phpunit/MWDB/directory +fileDatabase/tests/phpunit/MediaWikiQueryInterfaceTest.php/file +/testsuite +/testsuites +/phpunit -- To view, visit https://gerrit.wikimedia.org/r/65671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28b19dc767598b9113c2476d5231710a5d76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reference to old config file from travis.yml - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65672 Change subject: Remove reference to old config file from travis.yml .. Remove reference to old config file from travis.yml Change-Id: I27f56e2c2526e4c84d22171ca4a58a4d86f5b56b --- M .travis.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/72/65672/1 diff --git a/.travis.yml b/.travis.yml index 0df31c0..4a96ec0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ - 5.4 - 5.5 -script: phpunit --configuration Database/phpunit.xml.dist --testsuite=WikibaseDatabaseStandalone \ No newline at end of file +script: phpunit --testsuite=WikibaseDatabaseStandalone \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27f56e2c2526e4c84d22171ca4a58a4d86f5b56b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reference to old config file from travis.yml - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove reference to old config file from travis.yml .. Remove reference to old config file from travis.yml Change-Id: I27f56e2c2526e4c84d22171ca4a58a4d86f5b56b --- M .travis.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved diff --git a/.travis.yml b/.travis.yml index 0df31c0..4a96ec0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ - 5.4 - 5.5 -script: phpunit --configuration Database/phpunit.xml.dist --testsuite=WikibaseDatabaseStandalone \ No newline at end of file +script: phpunit --testsuite=WikibaseDatabaseStandalone \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27f56e2c2526e4c84d22171ca4a58a4d86f5b56b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [coordinates.js] Added documentation - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/65673 Change subject: [coordinates.js] Added documentation .. [coordinates.js] Added documentation Added documentation and improved code readability along with some cleaning. Change-Id: If23ce2326017840cdffcab8b173e455d37a48b90 --- M DataValues/resources/coordinate.js/src/coordinate.Coordinate.js M DataValues/resources/coordinate.js/src/coordinate.js M DataValues/resources/coordinate.js/src/coordinate.parser.js 3 files changed, 430 insertions(+), 295 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/73/65673/1 diff --git a/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js b/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js index e9d9409..4d4f7a5 100644 --- a/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js +++ b/DataValues/resources/coordinate.js/src/coordinate.Coordinate.js @@ -7,6 +7,7 @@ * @licence GNU GPL v2+ * * @author Denny Vrandečić + * @author H. Snater mediaw...@snater.com * * @dependency coordinate * @dependency coordinate.parser @@ -14,56 +15,184 @@ coordinate.Coordinate = ( function( coordinate, coordinateParser ) { 'use strict'; - var Coordinate = function Coordinate( inputtext, inputprecision ) { - var result = [0, 0, 0]; + /** +* Constructor for an object representing a coordinate with a certain precision. +* +* @param {string} rawInput +* @param {Object} options +*{number} precision: Precision which will overrule the automatically detected +*precision. +* +* @throws {Error} If input text could not be parsed. +* +* @constructor +*/ + var Coordinate = function Coordinate( rawInput, options ) { + var parsed; - this.getInputtext = function() { return inputtext; }; + options = options || {}; try { - result = coordinateParser.parse( inputtext ); - } catch ( err ) { - result = [0, 0, 0]; - this.error = err.toString(); + parsed = coordinateParser.parse( rawInput ); + } catch( e ) { + throw new Error( 'Could not parse input: ' + e.toString() ); } - if ( Math.abs( result[0] ) 90 || Math.abs( result[1] ) 180 ) { - result = [0, 0, 0]; + if ( Math.abs( this._latitude ) 90 || Math.abs( this.longitude ) 180 ) { + throw new Error( 'Invalid input' ); } - var latitude = result[0]; - var longitude = result[1]; - this.latitudeInternal = function() { return latitude; }; - this.longitudeInternal = function() { return longitude; }; - - var precision = ( inputprecision === undefined ) ? result[2] : inputprecision; - this.precisionInternal = function() { return precision; }; - this.precisionText = function() { return coordinate.precisionText( precision ); }; - this.precisionTextEarth = function() { return coordinate.precisionTextEarth( precision ); }; - - this.increasePrecision = function() { - precision = coordinate.increasePrecision( precision ); - return precision; - }; - this.decreasePrecision = function() { - precision = coordinate.decreasePrecision( precision ); - return precision; - }; - - this.northsouth = function() { - return ( latitude 0 ) ? coordinate.settings.south : coordinate.settings.north; - }; - this.eastwest = function() { - return ( longitude 0 ) ? coordinate.settings.west : coordinate.settings.east; - }; - - this.latitudeDegree = function() { return coordinate.toDegree( latitude, precision ); }; - this.longitudeDegree = function() { return coordinate.toDegree( longitude, precision ); }; - this.latitudeDecimal = function() { return coordinate.toDecimal( latitude, precision ); }; - this.longitudeDecimal = function() { return coordinate.toDecimal( longitude, precision ); }; - this.degreeText = function() { return coordinate.degreeText( latitude, longitude, precision ); }; - this.decimalText = function() { return coordinate.decimalText( latitude, longitude, precision ); }; + this._rawInput = rawInput; + this._latitude = parsed[0]; + this._longitude = parsed[1]; +
[MediaWiki-commits] [Gerrit] Fix cancel behaviour of display settings - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Fix cancel behaviour of display settings .. Fix cancel behaviour of display settings Font selection becomes persistent despite cancelling it Bug: 47976 Change-Id: Iea4b65a8a13da3cb4a86f5b6521d62cb1372b42a --- M resources/js/ext.uls.displaysettings.js 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index f1a69c4..f75fc72 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -434,7 +434,8 @@ var displaySettings = this, $contentFontSelector = this.$template.find( '#content-font-selector' ), $uiFontSelector = this.$template.find( '#ui-font-selector' ), - oldFont = $uiFontSelector.find( 'option:selected' ).val(), + oldUIFont = $uiFontSelector.find( 'option:selected' ).val(), + oldContentFont = $contentFontSelector.find( 'option:selected' ).val(), $tabButtons = displaySettings.$template.find( '.uls-display-settings-tab-switcher button' ); // TODO all these repeated selectors can be placed in object constructor. @@ -444,7 +445,8 @@ } ); displaySettings.$template.find( 'button.uls-display-settings-cancel' ).on( 'click', function () { - mw.webfonts.preferences.setFont( displaySettings.contentLanguage, oldFont ); + mw.webfonts.preferences.setFont( displaySettings.contentLanguage, oldContentFont ); + mw.webfonts.preferences.setFont( displaySettings.uiLanguage, oldUIFont ); if ( displaySettings.$webfonts ) { displaySettings.$webfonts.refresh(); @@ -459,7 +461,8 @@ $button.removeClass( 'down' ); } } ); - + displaySettings.prepareUIFonts(); + displaySettings.prepareContentFonts(); displaySettings.close(); } ); -- To view, visit https://gerrit.wikimedia.org/r/65670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea4b65a8a13da3cb4a86f5b6521d62cb1372b42a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved job queue aggregator classes to a subdirectory. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Moved job queue aggregator classes to a subdirectory. .. Moved job queue aggregator classes to a subdirectory. Change-Id: Iabbf566b05d44e19770db7b4519abfe00e4a8d90 --- M includes/AutoLoader.php R includes/job/aggregator/JobQueueAggregator.php R includes/job/aggregator/JobQueueAggregatorMemc.php R includes/job/aggregator/JobQueueAggregatorRedis.php 4 files changed, 3 insertions(+), 3 deletions(-) Approvals: IAlex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 3e08e74..e92b67d 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -657,9 +657,9 @@ # includes/job 'Job' = 'includes/job/Job.php', 'JobQueue' = 'includes/job/JobQueue.php', - 'JobQueueAggregator' = 'includes/job/JobQueueAggregator.php', - 'JobQueueAggregatorMemc' = 'includes/job/JobQueueAggregatorMemc.php', - 'JobQueueAggregatorRedis' = 'includes/job/JobQueueAggregatorRedis.php', + 'JobQueueAggregator' = 'includes/job/aggregator/JobQueueAggregator.php', + 'JobQueueAggregatorMemc' = 'includes/job/aggregator/JobQueueAggregatorMemc.php', + 'JobQueueAggregatorRedis' = 'includes/job/aggregator/JobQueueAggregatorRedis.php', 'JobQueueDB' = 'includes/job/JobQueueDB.php', 'JobQueueGroup' = 'includes/job/JobQueueGroup.php', 'JobQueueFederated' = 'includes/job/JobQueueFederated.php', diff --git a/includes/job/JobQueueAggregator.php b/includes/job/aggregator/JobQueueAggregator.php similarity index 100% rename from includes/job/JobQueueAggregator.php rename to includes/job/aggregator/JobQueueAggregator.php diff --git a/includes/job/JobQueueAggregatorMemc.php b/includes/job/aggregator/JobQueueAggregatorMemc.php similarity index 100% rename from includes/job/JobQueueAggregatorMemc.php rename to includes/job/aggregator/JobQueueAggregatorMemc.php diff --git a/includes/job/JobQueueAggregatorRedis.php b/includes/job/aggregator/JobQueueAggregatorRedis.php similarity index 100% rename from includes/job/JobQueueAggregatorRedis.php rename to includes/job/aggregator/JobQueueAggregatorRedis.php -- To view, visit https://gerrit.wikimedia.org/r/64973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iabbf566b05d44e19770db7b4519abfe00e4a8d90 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch 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 for compatibility with help2man and Debian Policy - change (operations/dumps)
ArielGlenn has submitted this change and it was merged. Change subject: Fix for compatibility with help2man and Debian Policy .. Fix for compatibility with help2man and Debian Policy Change-Id: I80fff47affdfa3843fc64f4349119f1d6367e259 --- M xmlfileutils/CHANGELOG M xmlfileutils/Makefile M xmlfileutils/README M xmlfileutils/mwxml2sql.c M xmlfileutils/mwxml2sql.h M xmlfileutils/sql2txt.c M xmlfileutils/sqlfilter.c 7 files changed, 316 insertions(+), 129 deletions(-) Approvals: ArielGlenn: Verified; Looks good to me, approved diff --git a/xmlfileutils/CHANGELOG b/xmlfileutils/CHANGELOG index c8b79bc..817e516 100644 --- a/xmlfileutils/CHANGELOG +++ b/xmlfileutils/CHANGELOG @@ -1,4 +1,42 @@ -10 Apr 2013 +27 May 2013 Kent L. Miller wpmirror...@gmail.com + + Release 0.0.2-1 + +* mwxml2sql.c: + Doc: show_version() rewritten for compatibility with help2man. + Doc: usage() rewritten for compatibility with help2man. + Doc: man page generated with help2man +* sql2txt.c: + Bug fixed: long options, --sqlfile and --textfile, did not work. + Doc: show_version() written for compatibility with help2man. + Doc: usage() rewritten for compatibility with help2man. + Doc: man page generated with help2man + Option: added -V, --version option for use with help2man +* sqlfilter.c: + Doc: show_version() written for compatibility with help2man. + Doc: usage() rewritten for compatibility with help2man. + Doc: man page generated with help2man + Option: created -w, --version option for use by help2man +* Makefile: + Debian: build and deinstall targets written; clean target improved + Debian: install target rewritten to use: install $(DESTDIR)/... + Doc: man pages generated using `help2man' + MWXML2SQLVERS for Makefile dist version and for VERSION in source +* mwxml2sql.h: + VERSION passed from Makefile + +22 May 2013 Ariel T. Glenn ar...@wikimedia.org + +* mwxmlelts.c: + handle text with deleted / instead of content + workaround for XML files that may contain duplicate text ids + +21 May 2013 Ariel T. Glenn ar...@wikimedia.org + +* mwxmlelts.c: + convert revision timestamp from datestring format to db format + +10 Apr 2013 Ariel T. Glenn ar...@wikimedia.org Release 0.0.2 @@ -11,9 +49,9 @@ for File etc.), converts them to page, revision and table sql, and filters downloaded sql table dumps according to the page ids of the downloaded content, producing a pile of sql files for import -* various bugfixes +* package: various bugfixes -25 Jan 2013 +25 Jan 2013 Ariel T. Glenn ar...@wikimedia.org Release 0.0.1 diff --git a/xmlfileutils/Makefile b/xmlfileutils/Makefile index a16e65d..9dda84b 100644 --- a/xmlfileutils/Makefile +++ b/xmlfileutils/Makefile @@ -3,17 +3,28 @@ # 2013: see the file COPYING for details. # -- +MWXML2SQLVERS = 0.0.2 +PROGRAM= mwxml2sql +DISTNAME = $(PROGRAM)-$(MWXML2SQLVERS) +NAME_MWXML2SQL = convert MediaWiki XML dump file to MySQL INSERT commands +NAME_SQL2TXT = convert MySQL INSERT commands to tab-separated data +NAME_SQLFILTER = filter MySQL INSERT commands with fields matching values + +BINDIR = $(DESTDIR)$(PREFIX)/usr/bin/ +MANDIR = $(DESTDIR)$(PREFIX)/usr/share/man/man1/ + +GZIP = /bin/gzip +HELP2MAN = /usr/bin/help2man +SHELL = /bin/sh + CC=gcc LDFLAGS= #LDFLAGS= -g BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -O2 $(BIGFILES) +CFLAGS=-Wall -O2 $(BIGFILES) -DMWXML2SQLVERS=\$(MWXML2SQLVERS)\ #CFLAGS=-Wall -g $(BIGFILES) -PREFIX=/usr/local -SHELL=/bin/sh - -all: mwxml2sql sql2txt sqlfilter +build: mwxml2sql sql2txt sqlfilter manpages mwxml2sql: mwxml2sql.o filebuffers.o xmltags.o mwxmlelts.o sqlutils.o base36.o sha1.o $(CC) $(CFLAGS) $(LDFLAGS) -o mwxml2sql mwxml2sql.o filebuffers.o \ @@ -27,17 +38,41 @@ $(CC) $(CFLAGS) $(LDFLAGS) -o sqlfilter sqlfilter.o filebuffers.o sqlutils.o \ -lbz2 -lz +manpages: mwxml2sql.1.gz sql2txt.1.gz sqlfilter.1.gz + +mwxml2sql.1.gz: mwxml2sql + $(HELP2MAN) --section 1 --no-info --name $(NAME_MWXML2SQL) \ + --no-discard-stderr ./mwxml2sql | $(GZIP) mwxml2sql.1.gz + +sql2txt.1.gz: sql2txt + $(HELP2MAN) --section 1 --no-info --name $(NAME_SQL2TXT) \ + --no-discard-stderr ./sql2txt | $(GZIP) sql2txt.1.gz + +sqlfilter.1.gz: sqlfilter + $(HELP2MAN) --section 1 --no-info --name $(NAME_SQLFILTER) \ + --no-discard-stderr ./sqlfilter | $(GZIP) sqlfilter.1.gz + install: mwxml2sql sql2txt sqlfilter - if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi - cp -f mwxml2sql $(PREFIX)/bin/mwxml2sql - cp -f sql2txt $(PREFIX)/bin/sql2txt - cp -f sqlfilter
[MediaWiki-commits] [Gerrit] Added test config and bootstrap for the DataModel component - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65674 Change subject: Added test config and bootstrap for the DataModel component .. Added test config and bootstrap for the DataModel component This commit fixes most of the dependency issues where DataModel code was still using things from core or wikibase lib. Some issues are however more serious and fixing them is definitly out of scope for this commit, so the tests invoking this code have been excluded from the WikibaseDataModelWithoutMW testsuite for now. Change-Id: I44397a6b6384cb0210e7a08a552bea90515e4716 --- M DataModel/DataModel.classes.php M DataModel/DataModel.mw.php R DataModel/DataModel/ByPropertyIdArray.php M DataModel/DataModel/Claim/Statement.php M DataModel/DataModel/Entity/Entity.php M DataModel/DataModel/Entity/Property.php R DataModel/DataModel/EntityDiff.php R DataModel/DataModel/ItemDiff.php M DataModel/DataModel/SiteLink.php M DataModel/dependencies.txt A DataModel/phpunit.xml.dist A DataModel/tests/bootstrap.php R DataModel/tests/phpunit/ByPropertyIdArrayTest.php M DataModel/tests/phpunit/Claim/ClaimAggregateTest.php M DataModel/tests/phpunit/Claim/ClaimListAccessTest.php M DataModel/tests/phpunit/Claim/ClaimTest.php M DataModel/tests/phpunit/Claim/ClaimsTest.php M DataModel/tests/phpunit/Claim/StatementTest.php M DataModel/tests/phpunit/Entity/EntityIdTest.php M DataModel/tests/phpunit/Entity/EntityTest.php M DataModel/tests/phpunit/Entity/ItemMultilangTextsTest.php M DataModel/tests/phpunit/Entity/ItemNewEmptyTest.php M DataModel/tests/phpunit/Entity/ItemNewFromArrayTest.php M DataModel/tests/phpunit/Entity/PropertyTest.php R DataModel/tests/phpunit/EntityDiffOldTest.php R DataModel/tests/phpunit/EntityDiffTest.php M DataModel/tests/phpunit/HashableObjectStorageTest.php R DataModel/tests/phpunit/ItemDiffTest.php M DataModel/tests/phpunit/MapValueHasherTest.php M DataModel/tests/phpunit/ReferenceListTest.php M DataModel/tests/phpunit/ReferenceTest.php M DataModel/tests/phpunit/SiteLinkTest.php M DataModel/tests/phpunit/Snak/PropertyValueSnakTest.php M DataModel/tests/phpunit/Snak/SnakListTest.php M DataModel/tests/phpunit/Snak/SnakObjectTest.php M DataModel/tests/phpunit/Snak/SnakTest.php M DataModel/tests/phpunit/hasharray/HashArrayTest.php A DataModel/tests/testLoader.php M lib/WikibaseLib.classes.php M lib/WikibaseLib.hooks.php 40 files changed, 229 insertions(+), 177 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/74/65674/1 diff --git a/DataModel/DataModel.classes.php b/DataModel/DataModel.classes.php index da44d8c..eb9ef89 100644 --- a/DataModel/DataModel.classes.php +++ b/DataModel/DataModel.classes.php @@ -53,8 +53,11 @@ 'Wikibase\SnakRole' = 'DataModel/Snak/SnakRole.php', 'Wikibase\Snaks' = 'DataModel/Snak/Snaks.php', + 'Wikibase\ByPropertyIdArray' = 'DataModel/ByPropertyIdArray.php', + 'Wikibase\EntityDiff' = 'DataModel/EntityDiff.php', 'Wikibase\HashableObjectStorage' = 'DataModel/HashableObjectStorage.php', 'Wikibase\HashArray' = 'DataModel/HashArray.php', + 'Wikibase\ItemDiff' = 'DataModel/ItemDiff.php', 'Wikibase\MapHasher' = 'DataModel/MapHasher.php', 'Wikibase\MapValueHasher' = 'DataModel/MapValueHasher.php', 'Wikibase\Reference' = 'DataModel/Reference.php', diff --git a/DataModel/DataModel.mw.php b/DataModel/DataModel.mw.php index c213f54..02aeffa 100644 --- a/DataModel/DataModel.mw.php +++ b/DataModel/DataModel.mw.php @@ -44,13 +44,7 @@ } if ( defined( 'MW_PHPUNIT_TEST' ) ) { - $wgAutoloadClasses['Wikibase\Test\ClaimTest'] = __DIR__ . '/tests/phpunit/Claim/ClaimTest.php'; - $wgAutoloadClasses['Wikibase\Test\EntityTest'] = __DIR__ . '/tests/phpunit/Entity/EntityTest.php'; - $wgAutoloadClasses['Wikibase\Test\TestItems'] = __DIR__ . '/tests/phpunit/Entity/TestItems.php'; - $wgAutoloadClasses['Wikibase\Test\SnakObjectTest'] = __DIR__ . '/tests/phpunit/Snak/SnakObjectTest.php'; - - $wgAutoloadClasses['Wikibase\Test\HashArrayTest'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayTest.php'; - $wgAutoloadClasses['Wikibase\Test\HashArrayElement'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayElement.php'; + require_once __DIR__ . '/tests/testLoader.php'; } /** @@ -72,6 +66,7 @@ 'Claim/Claim', 'Claim/Statement', + 'Entity/ByPropertyIdArray', 'Entity/EntityId', 'Entity/ItemMultilangTexts', 'Entity/ItemNewEmpty', diff --git a/lib/includes/ByPropertyIdArray.php b/DataModel/DataModel/ByPropertyIdArray.php similarity index 100% rename from lib/includes/ByPropertyIdArray.php rename to DataModel/DataModel/ByPropertyIdArray.php diff --git
[MediaWiki-commits] [Gerrit] Fieldset legends is broken. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fieldset legends is broken. .. Fieldset legends is broken. HTMLForm constructor didn't use messagePrefix if context is null. Bug: 48650 Change-Id: I26367bd597f873838c8cf45d75800661d37c0f95 --- M includes/HTMLForm.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: IAlex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 7adbfc8..2ff598d 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -200,12 +200,12 @@ $this-setContext( $context ); $this-mTitle = false; // We don't need them to set a title $this-mMessagePrefix = $messagePrefix; - } else { + } elseif ( is_null( $context ) $messagePrefix !== '' ) { + $this-mMessagePrefix = $messagePrefix; + } elseif ( is_string( $context ) $messagePrefix === '' ) { // B/C since 1.18 - if ( is_string( $context ) $messagePrefix === '' ) { - // it's actually $messagePrefix - $this-mMessagePrefix = $context; - } + // it's actually $messagePrefix + $this-mMessagePrefix = $context; } // Expand out into a tree. -- To view, visit https://gerrit.wikimedia.org/r/64782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26367bd597f873838c8cf45d75800661d37c0f95 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Happy-melon happy.melon.w...@gmail.com Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed not needed code making the DataValues qunit tests de... - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65676 Change subject: Removed not needed code making the DataValues qunit tests dependent on MW .. Removed not needed code making the DataValues qunit tests dependent on MW Change-Id: I70f56355266813ee4a9c3f15840dc13edca82ead --- M DataValues/tests/qunit/dataValues.tests.js M DataValues/tests/qunit/dataValues.util.inherit.tests.js 2 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/76/65676/1 diff --git a/DataValues/tests/qunit/dataValues.tests.js b/DataValues/tests/qunit/dataValues.tests.js index 633f91b..e215dd6 100644 --- a/DataValues/tests/qunit/dataValues.tests.js +++ b/DataValues/tests/qunit/dataValues.tests.js @@ -12,8 +12,6 @@ // TODO: figure out some non-global alternative to deal with this. QUnit.config.requireExpects = false; - QUnit.module( 'DataValues.js', QUnit.newMwEnvironment() ); - QUnit.test( 'getDataValues', function( assert ) { diff --git a/DataValues/tests/qunit/dataValues.util.inherit.tests.js b/DataValues/tests/qunit/dataValues.util.inherit.tests.js index a301bdd..988c6a1 100644 --- a/DataValues/tests/qunit/dataValues.util.inherit.tests.js +++ b/DataValues/tests/qunit/dataValues.util.inherit.tests.js @@ -11,8 +11,6 @@ ( function( dv, $, QUnit ) { 'use strict'; - QUnit.module( 'dataValues.util.inherit', QUnit.newMwEnvironment() ); - // // === Test Utils: // -- To view, visit https://gerrit.wikimedia.org/r/65676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70f56355266813ee4a9c3f15840dc13edca82ead Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] localise buttons for ky - change (mediawiki...WikiEditor)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/65675 Change subject: localise buttons for ky .. localise buttons for ky Change-Id: I2f489142080f4541b1c76590cc18065f5bf56a7e Bug: 38401 --- M modules/jquery.wikiEditor.toolbar.config.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/75/65675/1 diff --git a/modules/jquery.wikiEditor.toolbar.config.js b/modules/jquery.wikiEditor.toolbar.config.js index c9d0f79..bf2f1c0 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -45,6 +45,7 @@ 'hu': 'format-bold-F.png', 'it': 'format-bold-G.png', 'ka': 'format-bold-ka.png', + 'ky': 'format-bold-ru.png', 'nl': 'format-bold-V.png', 'os': 'format-bold-os.png', 'pt': 'format-bold-N.png', @@ -78,6 +79,7 @@ 'es': [2, -790], 'he': [2, -862], 'it': [2, -790], + 'ky': [2, -934], 'nl': [2, -790], 'pt': [2, -862], 'pt-br': [2, -862], @@ -98,6 +100,7 @@ 'hu': 'format-italic-D.png', 'it': 'format-italic-C.png', 'ka': 'format-italic-ka.png', + 'ky': 'format-italic-K.png', 'nl': 'format-italic-C.png', 'os': 'format-italic-K.png', 'pt': 'format-italic-I.png', -- To view, visit https://gerrit.wikimedia.org/r/65675 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f489142080f4541b1c76590cc18065f5bf56a7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecated $wgDataValues - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65677 Change subject: Deprecated $wgDataValues .. Deprecated $wgDataValues Change-Id: I17e8c899215ca53945f3de7b0eb5e3a249ed76fd --- M DataValues/DataValues.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/77/65677/1 diff --git a/DataValues/DataValues.php b/DataValues/DataValues.php index 66faf88..6e284e3 100644 --- a/DataValues/DataValues.php +++ b/DataValues/DataValues.php @@ -66,6 +66,9 @@ } global $wgDataValues; +/** + * @deprecated since 0.1 This is a global registry that provides no control over object lifecycle + */ $wgDataValues = array(); $wgDataValues['boolean'] = 'DataValues\BooleanValue'; -- To view, visit https://gerrit.wikimedia.org/r/65677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17e8c899215ca53945f3de7b0eb5e3a249ed76fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ResourceLoader: Prevent prefixless modules from overwriting ... - change (mediawiki/core)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/65678 Change subject: ResourceLoader: Prevent prefixless modules from overwriting other modules .. ResourceLoader: Prevent prefixless modules from overwriting other modules Expanding prefixless modules should not overwrite the result set of expanded modules. Change-Id: Ic6e0e1c9e3fe7a585d34de21c532ee5ac3e7fdc5 --- M includes/resourceloader/ResourceLoaderContext.php M tests/phpunit/includes/ResourceLoaderTest.php 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/65678/1 diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index 4588015..22ff6a7 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -96,7 +96,7 @@ $pos = strrpos( $group, '.' ); if ( $pos === false ) { // Prefixless modules, i.e. without dots - $retval = explode( ',', $group ); + $retval = array_merge( $retval, explode( ',', $group ) ); } else { // We have a prefix and a bunch of suffixes $prefix = substr( $group, 0, $pos ); // 'foo' diff --git a/tests/phpunit/includes/ResourceLoaderTest.php b/tests/phpunit/includes/ResourceLoaderTest.php index 68db9ad..fa228a6 100644 --- a/tests/phpunit/includes/ResourceLoaderTest.php +++ b/tests/phpunit/includes/ResourceLoaderTest.php @@ -79,7 +79,12 @@ 'Regression fixed in r88706 with dotless names', array( 'foo', 'bar', 'baz' ), 'foo,bar,baz', - ) + ), + array( + 'Prefixless modules after a prefixed module', + array( 'single.module', 'foobar', 'foobaz' ), + 'single.module|foobar,foobaz', + ), ); } } -- To view, visit https://gerrit.wikimedia.org/r/65678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6e0e1c9e3fe7a585d34de21c532ee5ac3e7fdc5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecate $wgValueValidators $wgValueParsers and $wgValueFor... - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65679 Change subject: Deprecate $wgValueValidators $wgValueParsers and $wgValueFormatters .. Deprecate $wgValueValidators $wgValueParsers and $wgValueFormatters Change-Id: I83d6691f1664446d0fb6b3fa011f9993a4531ee7 --- M ValueFormatters/ValueFormatters.php M ValueParsers/ValueParsers.php M ValueValidators/ValueValidators.php 3 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/79/65679/1 diff --git a/ValueFormatters/ValueFormatters.php b/ValueFormatters/ValueFormatters.php index 9393962..e4e8def 100644 --- a/ValueFormatters/ValueFormatters.php +++ b/ValueFormatters/ValueFormatters.php @@ -49,6 +49,9 @@ global $wgValueFormatters; +/** + * @deprecated since 0.1 This is a global registry that provides no control over object lifecycle + */ $wgValueFormatters = array(); $wgValueFormatters['geocoordinate'] = 'ValueFormatters\GeoCoordinateFormatter'; diff --git a/ValueParsers/ValueParsers.php b/ValueParsers/ValueParsers.php index 8645226..01f7c04 100644 --- a/ValueParsers/ValueParsers.php +++ b/ValueParsers/ValueParsers.php @@ -49,6 +49,9 @@ global $wgValueParsers; +/** + * @deprecated since 0.1 This is a global registry that provides no control over object lifecycle + */ $wgValueParsers = array(); $wgValueParsers['bool'] = 'ValueParsers\BoolParser'; diff --git a/ValueValidators/ValueValidators.php b/ValueValidators/ValueValidators.php index 3ead83c..b835a62 100644 --- a/ValueValidators/ValueValidators.php +++ b/ValueValidators/ValueValidators.php @@ -49,6 +49,9 @@ global $wgValueValidators; +/** + * @deprecated since 0.1 This is a global registry that provides no control over object lifecycle + */ $wgValueValidators = array(); $wgValueValidators['range'] = 'ValueValidators\RangeValidator'; -- To view, visit https://gerrit.wikimedia.org/r/65679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83d6691f1664446d0fb6b3fa011f9993a4531ee7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preparing 2013.05 - change (translatewiki)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/65680 Change subject: Preparing 2013.05 .. Preparing 2013.05 Change-Id: I31ee63f07fe09630bc5cbc6cfcb2070b5f670592 --- M melange/config.ini 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/80/65680/1 diff --git a/melange/config.ini b/melange/config.ini index 6f25219..ce3b783 100644 --- a/melange/config.ini +++ b/melange/config.ini @@ -2,8 +2,8 @@ mediawikirepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/core.git extensionrepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/extensions/ branches=origin/master origin/REL1_20 origin/REL1_19 -releasever=2013.03 -releasever-prev=2013.02 +releasever=2013.05 +releasever-prev=2013.04 bundlename=MediaWiki language extension bundle downloadurl=https://translatewiki.net/mleb hasher=sha256sum -- To view, visit https://gerrit.wikimedia.org/r/65680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31ee63f07fe09630bc5cbc6cfcb2070b5f670592 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added tests for PropertyValueSortExpression - change (mediawiki...Ask)
jenkins-bot has submitted this change and it was merged. Change subject: Added tests for PropertyValueSortExpression .. Added tests for PropertyValueSortExpression Change-Id: Id4e89324f2c8852b6e2810b7bac3de2e272fa936 --- M Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php index b2c559d..71b1ba3 100644 --- a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php +++ b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php @@ -37,6 +37,26 @@ */ class PropertyValueSortExpressionTest extends SortExpressionTest { + public function testCanConstruct() { + new PropertyValueSortExpression( + new StringValue( 'foo' ), + SortExpression::ASCENDING + ); + + $this-assertTrue( true ); + } + + public function testGetPropertyId() { + $propertyId = new StringValue( 'foo' ); + + $sortExpression = new PropertyValueSortExpression( + $propertyId, + SortExpression::ASCENDING + ); + + $this-assertEquals( $propertyId, $sortExpression-getPropertyId() ); + } + /** * @see SortExpressionTest::getInstances * -- To view, visit https://gerrit.wikimedia.org/r/65293 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4e89324f2c8852b6e2810b7bac3de2e272fa936 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added test config and bootstrap for the DataModel component - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Added test config and bootstrap for the DataModel component .. Added test config and bootstrap for the DataModel component This commit fixes most of the dependency issues where DataModel code was still using things from core or wikibase lib. Some issues are however more serious and fixing them is definitly out of scope for this commit, so the tests invoking this code have been excluded from the WikibaseDataModelWithoutMW testsuite for now. Change-Id: I44397a6b6384cb0210e7a08a552bea90515e4716 --- M DataModel/DataModel.classes.php M DataModel/DataModel.mw.php R DataModel/DataModel/ByPropertyIdArray.php M DataModel/DataModel/Claim/Statement.php M DataModel/DataModel/Entity/Entity.php M DataModel/DataModel/Entity/Property.php R DataModel/DataModel/EntityDiff.php R DataModel/DataModel/ItemDiff.php M DataModel/DataModel/SiteLink.php M DataModel/dependencies.txt A DataModel/phpunit.xml.dist A DataModel/tests/bootstrap.php R DataModel/tests/phpunit/ByPropertyIdArrayTest.php M DataModel/tests/phpunit/Claim/ClaimAggregateTest.php M DataModel/tests/phpunit/Claim/ClaimListAccessTest.php M DataModel/tests/phpunit/Claim/ClaimTest.php M DataModel/tests/phpunit/Claim/ClaimsTest.php M DataModel/tests/phpunit/Claim/StatementTest.php M DataModel/tests/phpunit/Entity/EntityIdTest.php M DataModel/tests/phpunit/Entity/EntityTest.php M DataModel/tests/phpunit/Entity/ItemMultilangTextsTest.php M DataModel/tests/phpunit/Entity/ItemNewEmptyTest.php M DataModel/tests/phpunit/Entity/ItemNewFromArrayTest.php M DataModel/tests/phpunit/Entity/PropertyTest.php R DataModel/tests/phpunit/EntityDiffOldTest.php R DataModel/tests/phpunit/EntityDiffTest.php M DataModel/tests/phpunit/HashableObjectStorageTest.php R DataModel/tests/phpunit/ItemDiffTest.php M DataModel/tests/phpunit/MapValueHasherTest.php M DataModel/tests/phpunit/ReferenceListTest.php M DataModel/tests/phpunit/ReferenceTest.php M DataModel/tests/phpunit/SiteLinkTest.php M DataModel/tests/phpunit/Snak/PropertyValueSnakTest.php M DataModel/tests/phpunit/Snak/SnakListTest.php M DataModel/tests/phpunit/Snak/SnakObjectTest.php M DataModel/tests/phpunit/Snak/SnakTest.php M DataModel/tests/phpunit/hasharray/HashArrayTest.php A DataModel/tests/testLoader.php M lib/WikibaseLib.classes.php M lib/WikibaseLib.hooks.php 40 files changed, 229 insertions(+), 177 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/DataModel/DataModel.classes.php b/DataModel/DataModel.classes.php index da44d8c..eb9ef89 100644 --- a/DataModel/DataModel.classes.php +++ b/DataModel/DataModel.classes.php @@ -53,8 +53,11 @@ 'Wikibase\SnakRole' = 'DataModel/Snak/SnakRole.php', 'Wikibase\Snaks' = 'DataModel/Snak/Snaks.php', + 'Wikibase\ByPropertyIdArray' = 'DataModel/ByPropertyIdArray.php', + 'Wikibase\EntityDiff' = 'DataModel/EntityDiff.php', 'Wikibase\HashableObjectStorage' = 'DataModel/HashableObjectStorage.php', 'Wikibase\HashArray' = 'DataModel/HashArray.php', + 'Wikibase\ItemDiff' = 'DataModel/ItemDiff.php', 'Wikibase\MapHasher' = 'DataModel/MapHasher.php', 'Wikibase\MapValueHasher' = 'DataModel/MapValueHasher.php', 'Wikibase\Reference' = 'DataModel/Reference.php', diff --git a/DataModel/DataModel.mw.php b/DataModel/DataModel.mw.php index c213f54..00b549a 100644 --- a/DataModel/DataModel.mw.php +++ b/DataModel/DataModel.mw.php @@ -44,13 +44,7 @@ } if ( defined( 'MW_PHPUNIT_TEST' ) ) { - $wgAutoloadClasses['Wikibase\Test\ClaimTest'] = __DIR__ . '/tests/phpunit/Claim/ClaimTest.php'; - $wgAutoloadClasses['Wikibase\Test\EntityTest'] = __DIR__ . '/tests/phpunit/Entity/EntityTest.php'; - $wgAutoloadClasses['Wikibase\Test\TestItems'] = __DIR__ . '/tests/phpunit/Entity/TestItems.php'; - $wgAutoloadClasses['Wikibase\Test\SnakObjectTest'] = __DIR__ . '/tests/phpunit/Snak/SnakObjectTest.php'; - - $wgAutoloadClasses['Wikibase\Test\HashArrayTest'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayTest.php'; - $wgAutoloadClasses['Wikibase\Test\HashArrayElement'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayElement.php'; + require_once __DIR__ . '/tests/testLoader.php'; } /** @@ -83,6 +77,7 @@ 'Snak/SnakList', 'Snak/Snak', + 'ByPropertyIdArray', 'HashableObjectStorage', 'MapValueHasher', diff --git a/lib/includes/ByPropertyIdArray.php b/DataModel/DataModel/ByPropertyIdArray.php similarity index 100% rename from lib/includes/ByPropertyIdArray.php rename to DataModel/DataModel/ByPropertyIdArray.php diff --git a/DataModel/DataModel/Claim/Statement.php b/DataModel/DataModel/Claim/Statement.php index e3c1f79..a4bcb5f 100644 ---
[MediaWiki-commits] [Gerrit] Move fixedProperties to Settings - change (mediawiki...SemanticMediaWiki)
Nischayn22 has uploaded a new change for review. https://gerrit.wikimedia.org/r/65681 Change subject: Move fixedProperties to Settings .. Move fixedProperties to Settings Bug: 48841 Change-Id: Ia0416782494ae1310bd949d17c52902d4afe7c45 --- M SemanticMediaWiki.settings.php M includes/Settings.php M includes/storage/SQLStore/SMW_SQLStore3.php 3 files changed, 39 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/81/65681/1 diff --git a/SemanticMediaWiki.settings.php b/SemanticMediaWiki.settings.php index 36fc19c..b441928 100644 --- a/SemanticMediaWiki.settings.php +++ b/SemanticMediaWiki.settings.php @@ -557,3 +557,40 @@ ## $smwgAutoRefreshOnPageMove = true; ## + + +/** +* These are fixed properties, i.e. user defined properties having a +* dedicated table for them. Entries in this array have the following format: +* +* property_key = property_type. +* +* The 'property_key' is the title of the property (with underscores instead +* of _ and capital first letter). +* The 'property_type' denotes the type of the property and has to be one of the following: +* SMWDataItem::TYPE_BLOB +* SMWDataItem::TYPE_URI +* SMWDataItem::TYPE_WIKIPAGE +* SMWDataItem::TYPE_NUMBER +* SMWDataItem::TYPE_TIME +* SMWDataItem::TYPE_BOOLEAN +* SMWDataItem::TYPE_CONTAINER +* SMWDataItem::TYPE_GEO +* SMWDataItem::TYPE_CONCEPT +* SMWDataItem::TYPE_PROPERTY +* +* A run of setup using SMWAdmin is needed to create these tables. If an already used property is assigned a new table all old data for this property will +* become inaccessible for SMW. This can be repaired by either migrating it to the new table (repair data) or will eventually be updated on page edits. +* +* Example: If you have a property named 'Age' which is of type 'Number' then add in LocalSettings: +* +* $smwgFixedProperties = array( + 'Age' = SMWDataItem::TYPE_NUMBER +* ); +* +* See also http://semantic-mediawiki.org/wiki/Fixed_properties +* +* @since 1.9 +* @var array +*/ +$smwgFixedProperties = array(); diff --git a/includes/Settings.php b/includes/Settings.php index c000102..5635087 100644 --- a/includes/Settings.php +++ b/includes/Settings.php @@ -150,6 +150,7 @@ 'smwgNamespace' = $GLOBALS['smwgNamespace'], 'smwgMasterStore' = $GLOBALS['smwgMasterStore'], 'smwgIQRunningNumber' = $GLOBALS['smwgIQRunningNumber'], + 'smwgFixedProperties' = $GLOBALS['smwgFixedProperties'], ); return self::newFromArray( $settings ); diff --git a/includes/storage/SQLStore/SMW_SQLStore3.php b/includes/storage/SQLStore/SMW_SQLStore3.php index d35b65a..e9354af 100644 --- a/includes/storage/SQLStore/SMW_SQLStore3.php +++ b/includes/storage/SQLStore/SMW_SQLStore3.php @@ -190,24 +190,6 @@ ); /** - * These are fixed properties, i.e. user defined tables having a - * dedicated table for them. Entries in this array have the format - * property key = property DI type. The key is a DB key (title with - * underscores instead of _ and capital first letter). The DI type is - * one of the types declared in SMWDataItem, e.g., - * SMWDataItem::TYPE_DATE. The correct DI type for common datatypes - * can be found in SMWDataValueFactory. - * - * See also http://semantic-mediawiki.org/wiki/Fixed_properties - * - * @todo Move these to somewhere else? - * - * @since 1.8 - * @var array - */ - public static $fixedProperties = array(); - - /** * Constructor. * * @since 1.8 @@ -824,7 +806,7 @@ // Get all the tables for the properties that are declared as fixed // (overly used and thus having separate tables) - foreach( self::$fixedProperties as $propertyKey = $tableDIType ){ + foreach( SMW\Settings::newFromGlobals()-get( 'smwgFixedProperties' ) as $propertyKey = $tableDIType ){ $tableName = 'smw_fpt_' . md5( $propertyKey ); $propertyTables[$tableName] = new SMWSQLStore3Table( $tableDIType, $tableName, $propertyKey ); } -- To view, visit https://gerrit.wikimedia.org/r/65681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0416782494ae1310bd949d17c52902d4afe7c45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Update wikidata related extensions to mw1.22-wmf5 branches - change (mediawiki/core)
Reedy has submitted this change and it was merged. Change subject: Update wikidata related extensions to mw1.22-wmf5 branches .. Update wikidata related extensions to mw1.22-wmf5 branches Change-Id: I750775c6eb7e509d4bcf0131f2be6c0cd1f1acf6 --- M extensions/DataValues M extensions/Diff M extensions/Wikibase 3 files changed, 0 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/extensions/DataValues b/extensions/DataValues index dc44b04..f083671 16 --- a/extensions/DataValues +++ b/extensions/DataValues -Subproject commit dc44b04ae3bba5d0f6c79ee336798c1eac7df0b3 +Subproject commit f083671d32db349a0b7d661245dea5ed4b012ad1 diff --git a/extensions/Diff b/extensions/Diff index 42a6cb6..55d87aa 16 --- a/extensions/Diff +++ b/extensions/Diff -Subproject commit 42a6cb6ed1df1dc0a7a846a87aeed392c2405615 +Subproject commit 55d87aaaba3edf8f2205f3b7d47a548cac1d7d38 diff --git a/extensions/Wikibase b/extensions/Wikibase index fc2d21b..830a622 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit fc2d21b4917305380df05e0f275b44464686388b +Subproject commit 830a622bfe29bb10244f68d2b4cbc52f6be10b1f -- To view, visit https://gerrit.wikimedia.org/r/65682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I750775c6eb7e509d4bcf0131f2be6c0cd1f1acf6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf5 Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update wikidata related extensions to mw1.22-wmf5 branches - change (mediawiki/core)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/65682 Change subject: Update wikidata related extensions to mw1.22-wmf5 branches .. Update wikidata related extensions to mw1.22-wmf5 branches Change-Id: I750775c6eb7e509d4bcf0131f2be6c0cd1f1acf6 --- M extensions/DataValues M extensions/Diff M extensions/Wikibase 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/65682/1 diff --git a/extensions/DataValues b/extensions/DataValues index dc44b04..f083671 16 --- a/extensions/DataValues +++ b/extensions/DataValues -Subproject commit dc44b04ae3bba5d0f6c79ee336798c1eac7df0b3 +Subproject commit f083671d32db349a0b7d661245dea5ed4b012ad1 diff --git a/extensions/Diff b/extensions/Diff index 42a6cb6..55d87aa 16 --- a/extensions/Diff +++ b/extensions/Diff -Subproject commit 42a6cb6ed1df1dc0a7a846a87aeed392c2405615 +Subproject commit 55d87aaaba3edf8f2205f3b7d47a548cac1d7d38 diff --git a/extensions/Wikibase b/extensions/Wikibase index fc2d21b..830a622 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit fc2d21b4917305380df05e0f275b44464686388b +Subproject commit 830a622bfe29bb10244f68d2b4cbc52f6be10b1f -- To view, visit https://gerrit.wikimedia.org/r/65682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I750775c6eb7e509d4bcf0131f2be6c0cd1f1acf6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf5 Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 1.22wmf5 stuffs - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/65683 Change subject: 1.22wmf5 stuffs .. 1.22wmf5 stuffs Change-Id: If335483af3bec965e340fefebba40f49ec6f1cf6 --- A docroot/bits/static-1.22wmf5/extensions A docroot/bits/static-1.22wmf5/resources A docroot/bits/static-1.22wmf5/skins A w/static-1.22wmf5/extensions A w/static-1.22wmf5/resources A w/static-1.22wmf5/skins 6 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/83/65683/1 diff --git a/docroot/bits/static-1.22wmf5/extensions b/docroot/bits/static-1.22wmf5/extensions new file mode 12 index 000..6dc052e --- /dev/null +++ b/docroot/bits/static-1.22wmf5/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/extensions \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf5/resources b/docroot/bits/static-1.22wmf5/resources new file mode 12 index 000..b3e95ee --- /dev/null +++ b/docroot/bits/static-1.22wmf5/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/resources \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf5/skins b/docroot/bits/static-1.22wmf5/skins new file mode 12 index 000..544c68a --- /dev/null +++ b/docroot/bits/static-1.22wmf5/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/skins/ \ No newline at end of file diff --git a/w/static-1.22wmf5/extensions b/w/static-1.22wmf5/extensions new file mode 12 index 000..6dc052e --- /dev/null +++ b/w/static-1.22wmf5/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/extensions \ No newline at end of file diff --git a/w/static-1.22wmf5/resources b/w/static-1.22wmf5/resources new file mode 12 index 000..b3e95ee --- /dev/null +++ b/w/static-1.22wmf5/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/resources \ No newline at end of file diff --git a/w/static-1.22wmf5/skins b/w/static-1.22wmf5/skins new file mode 12 index 000..a580216 --- /dev/null +++ b/w/static-1.22wmf5/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If335483af3bec965e340fefebba40f49ec6f1cf6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 1.22wmf5 stuffs - change (operations/mediawiki-config)
Reedy has submitted this change and it was merged. Change subject: 1.22wmf5 stuffs .. 1.22wmf5 stuffs Change-Id: If335483af3bec965e340fefebba40f49ec6f1cf6 --- A docroot/bits/static-1.22wmf5/extensions A docroot/bits/static-1.22wmf5/resources A docroot/bits/static-1.22wmf5/skins A w/static-1.22wmf5/extensions A w/static-1.22wmf5/resources A w/static-1.22wmf5/skins 6 files changed, 6 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/bits/static-1.22wmf5/extensions b/docroot/bits/static-1.22wmf5/extensions new file mode 12 index 000..6dc052e --- /dev/null +++ b/docroot/bits/static-1.22wmf5/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/extensions \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf5/resources b/docroot/bits/static-1.22wmf5/resources new file mode 12 index 000..b3e95ee --- /dev/null +++ b/docroot/bits/static-1.22wmf5/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/resources \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf5/skins b/docroot/bits/static-1.22wmf5/skins new file mode 12 index 000..544c68a --- /dev/null +++ b/docroot/bits/static-1.22wmf5/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/skins/ \ No newline at end of file diff --git a/w/static-1.22wmf5/extensions b/w/static-1.22wmf5/extensions new file mode 12 index 000..6dc052e --- /dev/null +++ b/w/static-1.22wmf5/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/extensions \ No newline at end of file diff --git a/w/static-1.22wmf5/resources b/w/static-1.22wmf5/resources new file mode 12 index 000..b3e95ee --- /dev/null +++ b/w/static-1.22wmf5/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/resources \ No newline at end of file diff --git a/w/static-1.22wmf5/skins b/w/static-1.22wmf5/skins new file mode 12 index 000..a580216 --- /dev/null +++ b/w/static-1.22wmf5/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf5/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/65683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If335483af3bec965e340fefebba40f49ec6f1cf6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update wikidata branchpoints to 1.22wmf5 for next time - change (mediawiki...release)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/65684 Change subject: Update wikidata branchpoints to 1.22wmf5 for next time .. Update wikidata branchpoints to 1.22wmf5 for next time Change-Id: I737600870e1dbbefb55cc81c73623badb1e26361 --- M make-wmf-branch/default.conf 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/84/65684/1 diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index a86b280..c6d90ef 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -160,10 +160,10 @@ # a string (use that exact commit hash) $specialExtensions = array( 'CentralNotice' = 'wmf_deploy', - 'DataValues' = 'mw1.22-wmf3', - 'Diff' = 'mw1.22-wmf3', + 'DataValues' = 'mw1.22-wmf5', + 'Diff' = 'mw1.22-wmf5', 'MobileFrontend' = 'production', - 'Wikibase' = 'mw1.22-wmf3', + 'Wikibase' = 'mw1.22-wmf5', // For wikitech use only! 'SemanticMediaWiki' = '1.8.x', -- To view, visit https://gerrit.wikimedia.org/r/65684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I737600870e1dbbefb55cc81c73623badb1e26361 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update wikidata branchpoints to 1.22wmf5 for next time - change (mediawiki...release)
Reedy has submitted this change and it was merged. Change subject: Update wikidata branchpoints to 1.22wmf5 for next time .. Update wikidata branchpoints to 1.22wmf5 for next time Change-Id: I737600870e1dbbefb55cc81c73623badb1e26361 --- M make-wmf-branch/default.conf 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index a86b280..c6d90ef 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -160,10 +160,10 @@ # a string (use that exact commit hash) $specialExtensions = array( 'CentralNotice' = 'wmf_deploy', - 'DataValues' = 'mw1.22-wmf3', - 'Diff' = 'mw1.22-wmf3', + 'DataValues' = 'mw1.22-wmf5', + 'Diff' = 'mw1.22-wmf5', 'MobileFrontend' = 'production', - 'Wikibase' = 'mw1.22-wmf3', + 'Wikibase' = 'mw1.22-wmf5', // For wikitech use only! 'SemanticMediaWiki' = '1.8.x', -- To view, visit https://gerrit.wikimedia.org/r/65684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I737600870e1dbbefb55cc81c73623badb1e26361 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] testwiki, test2wiki and mediawikiwiki to 1.22wmf5 - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/65685 Change subject: testwiki, test2wiki and mediawikiwiki to 1.22wmf5 .. testwiki, test2wiki and mediawikiwiki to 1.22wmf5 Change-Id: I0751e98f65f757e225f2e24e5e9f82de325151d4 --- M wikiversions.dat 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/85/65685/1 diff --git a/wikiversions.dat b/wikiversions.dat index 020bdaa..a7dc6f7 100644 --- a/wikiversions.dat +++ b/wikiversions.dat @@ -465,7 +465,7 @@ lvwiktionary php-1.22wmf4 * map_bmswiki php-1.22wmf4 * mdfwiki php-1.22wmf4 * -mediawikiwiki php-1.22wmf4 * +mediawikiwiki php-1.22wmf5 * metawiki php-1.22wmf4 * mgwikibooks php-1.22wmf4 * mgwiki php-1.22wmf4 * @@ -731,8 +731,8 @@ tawikisource php-1.22wmf4 * tawiktionary php-1.22wmf4 * tenwiki php-1.22wmf4 * -test2wiki php-1.22wmf4 * -testwiki php-1.22wmf4 * +test2wiki php-1.22wmf5 * +testwiki php-1.22wmf5 * tetwiki php-1.22wmf4 * tewikibooks php-1.22wmf4 * tewiki php-1.22wmf4 * -- To view, visit https://gerrit.wikimedia.org/r/65685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0751e98f65f757e225f2e24e5e9f82de325151d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] testwiki, test2wiki and mediawikiwiki to 1.22wmf5 - change (operations/mediawiki-config)
Reedy has submitted this change and it was merged. Change subject: testwiki, test2wiki and mediawikiwiki to 1.22wmf5 .. testwiki, test2wiki and mediawikiwiki to 1.22wmf5 Change-Id: I0751e98f65f757e225f2e24e5e9f82de325151d4 --- M wikiversions.dat 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wikiversions.dat b/wikiversions.dat index 020bdaa..a7dc6f7 100644 --- a/wikiversions.dat +++ b/wikiversions.dat @@ -465,7 +465,7 @@ lvwiktionary php-1.22wmf4 * map_bmswiki php-1.22wmf4 * mdfwiki php-1.22wmf4 * -mediawikiwiki php-1.22wmf4 * +mediawikiwiki php-1.22wmf5 * metawiki php-1.22wmf4 * mgwikibooks php-1.22wmf4 * mgwiki php-1.22wmf4 * @@ -731,8 +731,8 @@ tawikisource php-1.22wmf4 * tawiktionary php-1.22wmf4 * tenwiki php-1.22wmf4 * -test2wiki php-1.22wmf4 * -testwiki php-1.22wmf4 * +test2wiki php-1.22wmf5 * +testwiki php-1.22wmf5 * tetwiki php-1.22wmf4 * tewikibooks php-1.22wmf4 * tewiki php-1.22wmf4 * -- To view, visit https://gerrit.wikimedia.org/r/65685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0751e98f65f757e225f2e24e5e9f82de325151d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid changing the global on special pages - change (mediawiki/core)
TheDJ has submitted this change and it was merged. Change subject: Avoid changing the global on special pages .. Avoid changing the global on special pages Change-Id: I742845badd43cef68ba9f807030d8ea434961fd4 --- M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialUpload.php 2 files changed, 12 insertions(+), 10 deletions(-) Approvals: Hashar: Looks good to me, but someone else must approve TheDJ: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 0d6378c..1b406d1 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -876,16 +876,19 @@ } # Sort data for display and make sure it's unique after we've added user data. - $wgRCLinkLimits[] = $options['limit']; - $wgRCLinkDays[] = $options['days']; - sort( $wgRCLinkLimits ); - sort( $wgRCLinkDays ); - $wgRCLinkLimits = array_unique( $wgRCLinkLimits ); - $wgRCLinkDays = array_unique( $wgRCLinkDays ); + $linkLimits = $wgRCLinkLimits; + $linkLimits[] = $options['limit']; + sort( $linkLimits ); + $linkLimits = array_unique( $linkLimits ); + + $linkDays = $wgRCLinkDays; + $linkDays[] = $options['days']; + sort( $linkDays ); + $linkDays = array_unique( $linkDays ); // limit links $cl = array(); - foreach ( $wgRCLinkLimits as $value ) { + foreach ( $linkLimits as $value ) { $cl[] = $this-makeOptionsLink( $lang-formatNum( $value ), array( 'limit' = $value ), $nondefaults, $value == $options['limit'] ); } @@ -893,7 +896,7 @@ // day links, reset 'from' to none $dl = array(); - foreach ( $wgRCLinkDays as $value ) { + foreach ( $linkDays as $value ) { $dl[] = $this-makeOptionsLink( $lang-formatNum( $value ), array( 'days' = $value, 'from' = '' ), $nondefaults, $value == $options['days'] ); } diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index ee737c6..98d0c9a 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -456,7 +456,6 @@ */ public static function getInitialPageText( $comment = '', $license = '', $copyStatus = '', $source = '' ) { global $wgUseCopyrightUpload, $wgForceUIMsgAsContentMsg; - $wgForceUIMsgAsContentMsg = (array) $wgForceUIMsgAsContentMsg; $msg = array(); /* These messages are transcluded into the actual text of the description page. @@ -464,7 +463,7 @@ * instead of hardcoding it there in the uploader language. */ foreach ( array( 'license-header', 'filedesc', 'filestatus', 'filesource' ) as $msgName ) { - if ( in_array( $msgName, $wgForceUIMsgAsContentMsg ) ) { + if ( in_array( $msgName, (array)$wgForceUIMsgAsContentMsg ) ) { $msg[$msgName] = {{int:$msgName}}; } else { $msg[$msgName] = wfMessage( $msgName )-inContentLanguage()-text(); -- To view, visit https://gerrit.wikimedia.org/r/65136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I742845badd43cef68ba9f807030d8ea434961fd4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert ULS back to 1.22wmf4 version - change (mediawiki/core)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/65688 Change subject: Revert ULS back to 1.22wmf4 version .. Revert ULS back to 1.22wmf4 version Change-Id: Ie2fcb18ad9713809e6c87564ffce01ddc7ccf141 --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/65688/1 diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 65711c3..24ebaff 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 65711c312d21517b2eb10a82bc8eaadb846c70bf +Subproject commit 24ebaff9e92df957cf644520800a18ec7ca3f93e -- To view, visit https://gerrit.wikimedia.org/r/65688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2fcb18ad9713809e6c87564ffce01ddc7ccf141 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf5 Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert ULS back to 1.22wmf4 version - change (mediawiki/core)
Reedy has submitted this change and it was merged. Change subject: Revert ULS back to 1.22wmf4 version .. Revert ULS back to 1.22wmf4 version Change-Id: Ie2fcb18ad9713809e6c87564ffce01ddc7ccf141 --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 65711c3..24ebaff 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 65711c312d21517b2eb10a82bc8eaadb846c70bf +Subproject commit 24ebaff9e92df957cf644520800a18ec7ca3f93e -- To view, visit https://gerrit.wikimedia.org/r/65688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2fcb18ad9713809e6c87564ffce01ddc7ccf141 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf5 Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added and fixed patcher tests and two uncovered bugs - change (mediawiki...Diff)
Daniel Werner has submitted this change and it was merged. Change subject: Added and fixed patcher tests and two uncovered bugs .. Added and fixed patcher tests and two uncovered bugs Change-Id: I25639436313879d145354fadaa053f900690116d --- M RELEASE-NOTES M includes/patcher/MapPatcher.php M tests/phpunit/patcher/ListPatcherTest.php M tests/phpunit/patcher/MapPatcherTest.php 4 files changed, 125 insertions(+), 41 deletions(-) Approvals: Daniel Werner: Looks good to me, approved diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a9b39a3..c5995a4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -7,9 +7,21 @@ === Version 0.7 === (dev) +; Improvements + +* Added extra tests for MapPatcher and ListPatcher +* Added extra tests for Diff + ; Removals * Removed static methods from ListDiff and MapDiff (all deprecated since 0.4) +* Removed DiffOpTestDummy + +; Bug fixes + +* MapPatcher will now no longer stop patching after the first remove operation it encounters +* MapPatcher now always treats its top level input diff as a map diff +* Fixed several issues in ListPatcherTest === Version 0.6 === 2013-05-08 diff --git a/includes/patcher/MapPatcher.php b/includes/patcher/MapPatcher.php index 2ebd70f..fc6e82a 100644 --- a/includes/patcher/MapPatcher.php +++ b/includes/patcher/MapPatcher.php @@ -65,44 +65,14 @@ } /** -* Sets the value comparer that should be used to determine if values are equal. -* -* @since 0.6 -* -* @param ValueComparer $comparer -*/ - public function setValueComparer( ValueComparer $comparer ) { - $this-comparer = $comparer; - } - - /** * @see Patcher::patch * -* @since 0.4 -* -* @param array $base -* @param Diff $diff -* -* @return array -*/ - public function patch( array $base, Diff $diff ) { - if ( $diff-looksAssociative() ) { - $base = $this-getPatchedMap( $base, $diff ); - } - else { - $base = $this-listPatcher-patch( $base, $diff ); - } - - return $base; - } - - /** * Applies the provided diff to the provided array and returns the result. * The array is treated as a map, ie keys are held into account. * * It is possible to pass in non-associative diffs (those for which isAssociative) * returns false, however the likely intended behavior can be obtained via -* @see getPatchedList +* a list patcher. * * @since 0.4 * @@ -112,7 +82,7 @@ * @return array * @throws RuntimeException */ - protected function getPatchedMap( array $base, Diff $diff ) { + public function patch( array $base, Diff $diff ) { /** * @var DiffOp $diffOp */ @@ -135,7 +105,7 @@ $base[$key] = array(); } - $base[$key] = $this-patch( $base[$key], $diffOp ); + $base[$key] = $this-patchMapOrList( $base[$key], $diffOp ); } else if ( $diffOp instanceof DiffOpRemove ) { if ( !array_key_exists( $key, $base ) ) { @@ -144,7 +114,6 @@ } unset( $base[$key] ); - break; } else if ( $diffOp instanceof DiffOpChange ) { if ( !array_key_exists( $key, $base ) ) { @@ -167,6 +136,17 @@ return $base; } + protected function patchMapOrList( array $base, Diff $diff ) { + if ( $diff-looksAssociative() ) { + $base = $this-patch( $base, $diff ); + } + else { + $base = $this-listPatcher-patch( $base, $diff ); + } + + return $base; + } + protected function valuesAreEqual( $firstValue, $secondValue ) { if ( $this-comparer === null ) { $this-comparer = new StrictComparer(); @@ -175,4 +155,15 @@ return $this-comparer-valuesAreEqual( $firstValue, $secondValue ); } + /** +* Sets the value comparer that should be used to determine if values are equal. +* +* @since 0.6 +* +* @param ValueComparer $comparer +*/ + public function setValueComparer( ValueComparer $comparer ) { + $this-comparer = $comparer; + } + } diff --git a/tests/phpunit/patcher/ListPatcherTest.php b/tests/phpunit/patcher/ListPatcherTest.php index
[MediaWiki-commits] [Gerrit] include dump of (one of the) wikidata tables - change (operations/dumps)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/65689 Change subject: include dump of (one of the) wikidata tables .. include dump of (one of the) wikidata tables Change-Id: I9126664d4ebbfabaf60a849b8d9b7a2735d0cff7 --- M xmldumps-backup/README.config M xmldumps-backup/WikiDump.py M xmldumps-backup/wikidump.conf.sample M xmldumps-backup/worker.py 4 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/89/65689/1 diff --git a/xmldumps-backup/README.config b/xmldumps-backup/README.config index e3613ce..41a8699 100644 --- a/xmldumps-backup/README.config +++ b/xmldumps-backup/README.config @@ -59,6 +59,9 @@ flaggedrevslist -- File with list of databases which have flagged revisions enabled. (Really, we should be able to determine this another way instead of keeping a separate list, right?) +wikidatalist-- File with list of databases which act as a wikibase + repo. For Wikimedia projects this currently consists + of the project 'wikidata'. biglist -- File with list of large wikis for which no history dumps are generated because they are too huge. (This must be an old deprecated option; these days we do not care how big they diff --git a/xmldumps-backup/WikiDump.py b/xmldumps-backup/WikiDump.py index ad22b7d..0c48cf0 100644 --- a/xmldumps-backup/WikiDump.py +++ b/xmldumps-backup/WikiDump.py @@ -175,6 +175,7 @@ dblist: , privatelist: , flaggedrevslist: , + wikidatalist: , # dir: , forcenormal: 0, halt: 0, @@ -258,6 +259,7 @@ self.skipDbList = MiscUtils.dbList(self.conf.get(wiki, skipdblist)) self.privateList = MiscUtils.dbList(self.conf.get(wiki, privatelist)) self.flaggedRevsList = MiscUtils.dbList(self.conf.get(wiki, flaggedrevslist)) + self.wikidataList = MiscUtils.dbList(self.conf.get(wiki, wikidatalist)) self.wikiDir = self.conf.get(wiki, dir) self.forceNormal = self.conf.getint(wiki, forcenormal) self.halt = self.conf.getint(wiki, halt) @@ -423,6 +425,9 @@ def hasFlaggedRevs(self): return self.dbName in self.config.flaggedRevsList + + def hasWikidata(self): + return self.dbName in self.config.wikidataList def isLocked(self): return os.path.exists(self.lockFile()) diff --git a/xmldumps-backup/wikidump.conf.sample b/xmldumps-backup/wikidump.conf.sample index 5feed3b..57de2e0 100644 --- a/xmldumps-backup/wikidump.conf.sample +++ b/xmldumps-backup/wikidump.conf.sample @@ -5,6 +5,7 @@ skipdblist=/home/ariel/src/mediawiki/testing/backup/skip.dblist privatelist=/home/ariel/src/mediawiki/testing/backup/private.dblist flaggedrevslist=/home/ariel/src/mediawiki/testing/backup/flagged.dblist +wikidatalist=/home/ariel/src/mediawiki/testing/backup/wikidata.dblist biglist=/home/ariel/src/mediawiki/testing/backup/big.dblist dir=/home/ariel/src/mediawiki/1.16wmf4/phase3 forcenormal=1 diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py index 08c3816..fc6b015 100644 --- a/xmldumps-backup/worker.py +++ b/xmldumps-backup/worker.py @@ -557,6 +557,7 @@ def __init__(self, wiki, prefetch, spawn, chunkToDo, checkpointFile, singleJob, chunkInfo, pageIDRange, runInfoFile, dumpDir): self.wiki = wiki self._hasFlaggedRevs = self.wiki.hasFlaggedRevs() + self._hasWikidata = self.wiki.hasWikidata() self._prefetch = prefetch self._spawn = spawn self.chunkInfo = chunkInfo @@ -663,6 +664,10 @@ self.dumpItems.append( PublicTable( flaggedrevs, flaggedrevstable,This contains a row for each flagged revision, containing who flagged it, when it was flagged, reviewer comments, the flag values, and the quality tier those flags fall under. )) + if self._hasWikidata: + self.dumpItems.append( + PublicTable( wb_items_per_site, wbitemspersitetable,For each Wikidata item, this contains rows with the corresnponding page name on a given wiki project. )) + self.dumpItems.append( BigXmlDump(meta-history, metahistorybz2dump, -- To view, visit https://gerrit.wikimedia.org/r/65689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9126664d4ebbfabaf60a849b8d9b7a2735d0cff7 Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] Add autocreate to addNewUserLogEntry docs. - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/65690 Change subject: Add autocreate to addNewUserLogEntry docs. .. Add autocreate to addNewUserLogEntry docs. Change-Id: I40bdd510dbbc32d32ceee39b54bb4c66ace0ccfc --- M includes/User.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/65690/1 diff --git a/includes/User.php b/includes/User.php index a2d438c..8c88c17 100644 --- a/includes/User.php +++ b/includes/User.php @@ -4315,6 +4315,7 @@ * no matter the value of $wgUser * - 'create2' for a logged in user creating an account for someone else * - 'byemail' when the created user will receive its password by e-mail +* - 'autocreate' when the user is automatically created (such as by CentralAuth). * - Boolean means whether the account was created by e-mail (deprecated): * - true will be converted to 'byemail' * - false will be converted to 'create' if this object is the same as -- To view, visit https://gerrit.wikimedia.org/r/65690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40bdd510dbbc32d32ceee39b54bb4c66ace0ccfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecate Site::newForType since it is so bad - change (mediawiki/core)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65691 Change subject: Deprecate Site::newForType since it is so bad .. Deprecate Site::newForType since it is so bad Change-Id: I79b8ea5ebf3e5f92251eb28335c5e4922c0c3736 --- M includes/site/Site.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/65691/1 diff --git a/includes/site/Site.php b/includes/site/Site.php index 076dc88..acfb808 100644 --- a/includes/site/Site.php +++ b/includes/site/Site.php @@ -630,6 +630,11 @@ } /** +* @deprecated since 1.22. +* This API does not provide control over the object lifecycle, +* uses global state and pretends to work when it cannot handle +* the request properly. +* * @since 1.21 * * @param string $siteType -- To view, visit https://gerrit.wikimedia.org/r/65691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79b8ea5ebf3e5f92251eb28335c5e4922c0c3736 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added test for line 135 of MapPatcher - change (mediawiki...Diff)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Added test for line 135 of MapPatcher .. Added test for line 135 of MapPatcher Change-Id: Ica65774ca9b1c394734f3bc8527a42322f0d3973 --- M tests/phpunit/patcher/MapPatcherTest.php 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/tests/phpunit/patcher/MapPatcherTest.php b/tests/phpunit/patcher/MapPatcherTest.php index e418bbb..adf38a6 100644 --- a/tests/phpunit/patcher/MapPatcherTest.php +++ b/tests/phpunit/patcher/MapPatcherTest.php @@ -131,6 +131,21 @@ $argLists[] = array( $patcher, $base, $diff, $expected ); + + $patcher = new MapPatcher(); + $base = array( + 'foo' = 'bar', + ); + $diff = new Diff( array( + 'baz' = new Diff( array( new DiffOpAdd( 'ny' ), new DiffOpAdd( 'an' ) ), false ), + ) ); + $expected = array( + 'foo' = 'bar', + 'baz' = array( 'ny', 'an' ), + ); + + $argLists[] = array( $patcher, $base, $diff, $expected ); + // TODO return $argLists; -- To view, visit https://gerrit.wikimedia.org/r/65260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica65774ca9b1c394734f3bc8527a42322f0d3973 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add autocreate to addNewUserLogEntry docs. - change (mediawiki/core)
Hoo man has submitted this change and it was merged. Change subject: Add autocreate to addNewUserLogEntry docs. .. Add autocreate to addNewUserLogEntry docs. Change-Id: I40bdd510dbbc32d32ceee39b54bb4c66ace0ccfc --- M includes/User.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hoo man: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/User.php b/includes/User.php index a2d438c..8c88c17 100644 --- a/includes/User.php +++ b/includes/User.php @@ -4315,6 +4315,7 @@ * no matter the value of $wgUser * - 'create2' for a logged in user creating an account for someone else * - 'byemail' when the created user will receive its password by e-mail +* - 'autocreate' when the user is automatically created (such as by CentralAuth). * - Boolean means whether the account was created by e-mail (deprecated): * - true will be converted to 'byemail' * - false will be converted to 'create' if this object is the same as -- To view, visit https://gerrit.wikimedia.org/r/65690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40bdd510dbbc32d32ceee39b54bb4c66ace0ccfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed paths in test suite config - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65692 Change subject: Fixed paths in test suite config .. Fixed paths in test suite config Change-Id: I5a55b88217f172df2698ab991812c5f158775ae2 --- M phpunit.xml.dist 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/92/65692/1 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ed2c202..d862e4a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -23,8 +23,8 @@ directoryValueFormatters/tests/directory /testsuite testsuite name=ValueParsers -directory/ValueParsers/tests/directory -exclude/DataValues/ValueParsers/tests/includes/api/exclude +directoryValueParsers/tests/directory +excludeValueParsers/tests/includes/api/exclude /testsuite testsuite name=ValueValidators directoryValueValidators/tests/directory -- To view, visit https://gerrit.wikimedia.org/r/65692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a55b88217f172df2698ab991812c5f158775ae2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Scroll secondary ULS into view - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/65693 Change subject: Scroll secondary ULS into view .. Scroll secondary ULS into view Bug: 47821 Change-Id: I7ad1de7c62dc4ece4c565500f31ae4db1e7708a4 --- M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.inputsettings.js 2 files changed, 89 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/93/65693/1 diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index f75fc72..c660e54 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -120,6 +120,35 @@ this.listen(); }, + scrollIntoView: function () { + var scrollPosition, + padding = 10, + $window = $( window ), + windowHeight = $window.height(), + windowScrollTop = $window.scrollTop(), + windowBottom = windowScrollTop + windowHeight, + panelHeight = this.$parent.$window.height(), + panelTop = this.$parent.$window.offset().top, + panelBottom = panelTop + panelHeight; + + // If the ULS panel is out of the viewport, + // scroll the window to show it + if ( ( panelTop windowScrollTop ) || ( panelBottom windowBottom ) ) { + if ( panelHeight windowHeight ) { + // Scroll to show as much of the upper + // part of ULS as possible + scrollPosition = panelTop - padding; + } else { + // Scroll just enough to show the ULS panel + scrollPosition = panelBottom - windowHeight + padding; + } + + $( 'html, body' ).stop().animate( { + scrollTop: scrollPosition + }, 500 ); + } + }, + /** * Prepare the UI language selector */ @@ -262,13 +291,40 @@ .i18n(); }, onVisible: function () { - var $parent = $( '#language-settings-dialog' ); + var scrollPosition, + padding = 10, + $window = $( window ), + windowHeight = $window.height(), + windowScrollTop = $window.scrollTop(), + windowBottom = windowScrollTop + windowHeight, + panelHeight = this.$menu.height(), + panelTop = this.$menu.offset().top, + panelBottom = panelTop + panelHeight, + $parent = $( '#language-settings-dialog' ); + // Re-position the element according to the window that called it if ( parseInt( $parent.css( 'left' ), 10 ) ) { -this.$menu.css( 'left', $parent.css( 'left' ) ); + this.$menu.css( 'left', $parent.css( 'left' ) ); } if ( parseInt( $parent.css( 'top' ), 10 ) ) { this.$menu.css( 'top', $parent.css( 'top' ) ); + } + + // If the ULS panel is out of the viewport, + // scroll the window to show it + if ( ( panelTop windowScrollTop ) || ( panelBottom windowBottom ) ) { + if ( panelHeight windowHeight ) { + // Scroll to show as much of the upper + // part of ULS as possible + scrollPosition = panelTop - padding; + } else { +
[MediaWiki-commits] [Gerrit] Added testPatchMapRaisesError to ListPatcherTest - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65694 Change subject: Added testPatchMapRaisesError to ListPatcherTest .. Added testPatchMapRaisesError to ListPatcherTest Also removed an unreachable line in ListPatcher Change-Id: I49e99e31b478206148bdbe1689e36ba2098be333 --- M includes/patcher/ListPatcher.php M tests/phpunit/patcher/ListPatcherTest.php 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/94/65694/1 diff --git a/includes/patcher/ListPatcher.php b/includes/patcher/ListPatcher.php index b005d0a..03ad3bb 100644 --- a/includes/patcher/ListPatcher.php +++ b/includes/patcher/ListPatcher.php @@ -67,8 +67,6 @@ unset( $base[$key] ); break; - default: - $this-handleError( 'Non-add and non-remove diff operation cannot be applied to a list' ); } } diff --git a/tests/phpunit/patcher/ListPatcherTest.php b/tests/phpunit/patcher/ListPatcherTest.php index 6b67937..a02f521 100644 --- a/tests/phpunit/patcher/ListPatcherTest.php +++ b/tests/phpunit/patcher/ListPatcherTest.php @@ -237,4 +237,15 @@ return $argLists; } + public function testPatchMapRaisesError() { + $patcher = new ListPatcher(); + + $patcher-patch( array(), new Diff( array(), true ) ); + + $patcher-throwErrors(); + $this-setExpectedException( 'Diff\PatcherException' ); + + $patcher-patch( array(), new Diff( array(), true ) ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/65694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49e99e31b478206148bdbe1689e36ba2098be333 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added ThrowingPatcherTest to test throwErrors and ignoreErrors - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65695 Change subject: Added ThrowingPatcherTest to test throwErrors and ignoreErrors .. Added ThrowingPatcherTest to test throwErrors and ignoreErrors Change-Id: Ic4c5d90a0cc3b38dc68088051f3812e8b0d22c55 --- A tests/phpunit/patcher/ThrowingPatcherTest.php 1 file changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/95/65695/1 diff --git a/tests/phpunit/patcher/ThrowingPatcherTest.php b/tests/phpunit/patcher/ThrowingPatcherTest.php new file mode 100644 index 000..0ec613c --- /dev/null +++ b/tests/phpunit/patcher/ThrowingPatcherTest.php @@ -0,0 +1,60 @@ +?php + +namespace Diff\Tests; + +use ReflectionClass; + +/** + * @covers Diff\ThrowingPatcher + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @since 0.7 + * + * @ingroup DiffTest + * + * @group Diff + * @group DiffPatcher + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class ThrowingPatcherTest extends DiffTestCase { + + public function testChangeThrowErrors() { + $patcher = $this-getMockForAbstractClass( 'Diff\ThrowingPatcher' ); + + $class = new ReflectionClass( 'Diff\ThrowingPatcher' ); + $method = $class-getMethod( 'handleError' ); + $method-setAccessible( true ); + + $errorMessage = 'foo bar'; + + $method-invokeArgs( $patcher, array( $errorMessage ) ); + + $patcher-throwErrors(); + $patcher-ignoreErrors(); + + $method-invokeArgs( $patcher, array( $errorMessage ) ); + + $patcher-throwErrors(); + $this-setExpectedException( 'Diff\PatcherException' ); + + $method-invokeArgs( $patcher, array( $errorMessage ) ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/65695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4c5d90a0cc3b38dc68088051f3812e8b0d22c55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added FIXME to broken code - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65696 Change subject: Added FIXME to broken code .. Added FIXME to broken code Change-Id: I04cb8c0c3362de03c6344e0c1e2a2b173dd35413 --- M includes/differ/ListDiffer.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/96/65696/1 diff --git a/includes/differ/ListDiffer.php b/includes/differ/ListDiffer.php index e1d9808..3018847 100644 --- a/includes/differ/ListDiffer.php +++ b/includes/differ/ListDiffer.php @@ -83,6 +83,8 @@ * Sets a callback to use for comparison. The callback should accept two * arguments. * +* FIXME: this field is not used! +* * @since 0.5 * * @param callable $comparisonCallback -- To view, visit https://gerrit.wikimedia.org/r/65696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04cb8c0c3362de03c6344e0c1e2a2b173dd35413 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove ListDiff::newEmpty - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65697 Change subject: Remove ListDiff::newEmpty .. Remove ListDiff::newEmpty Change-Id: I51467c1245f86d90d646e4d757f5864160e0d6f9 --- M includes/diffop/diff/ListDiff.php 1 file changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/97/65697/1 diff --git a/includes/diffop/diff/ListDiff.php b/includes/diffop/diff/ListDiff.php index 6b5d8d3..8599cf9 100644 --- a/includes/diffop/diff/ListDiff.php +++ b/includes/diffop/diff/ListDiff.php @@ -25,19 +25,6 @@ } /** -* Creates and returns an empty ListDiff. -* @see Diff::newEmpty -* -* @since 0.1 -* @deprecated since 0.4, just use the constructor -* -* @return ListDiff -*/ - public static function newEmpty() { - return new static( array() ); - } - - /** * @see DiffOp::getType * * @since 0.1 -- To view, visit https://gerrit.wikimedia.org/r/65697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51467c1245f86d90d646e4d757f5864160e0d6f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed impossible to test else case, only there for legacy ... - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65698 Change subject: Removed impossible to test else case, only there for legacy reasons, from Diff .. Removed impossible to test else case, only there for legacy reasons, from Diff Change-Id: I3ef31699c9bcce5a6597be207c0221837d8f9fde --- M includes/diffop/diff/Diff.php 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/98/65698/1 diff --git a/includes/diffop/diff/Diff.php b/includes/diffop/diff/Diff.php index ac0c306..237f2a1 100644 --- a/includes/diffop/diff/Diff.php +++ b/includes/diffop/diff/Diff.php @@ -24,7 +24,7 @@ * * @var boolean|null */ - protected $isAssociative; + protected $isAssociative = null; /** * Pointers to the operations of certain types for quick lookup. @@ -192,10 +192,6 @@ elseif ( $this instanceof ListDiff ) { $this-isAssociative = false; } - else { - $this-isAssociative = null; - } - return $serializationData; } -- To view, visit https://gerrit.wikimedia.org/r/65698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ef31699c9bcce5a6597be207c0221837d8f9fde Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added testErrorOnUnknownDiffOpType to MapPatcherTest - change (mediawiki...Diff)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65699 Change subject: Added testErrorOnUnknownDiffOpType to MapPatcherTest .. Added testErrorOnUnknownDiffOpType to MapPatcherTest Change-Id: I7b764195a7d752325afd5f5a8c92668cd849fc29 --- M tests/phpunit/patcher/MapPatcherTest.php 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff refs/changes/99/65699/1 diff --git a/tests/phpunit/patcher/MapPatcherTest.php b/tests/phpunit/patcher/MapPatcherTest.php index adf38a6..e389c82 100644 --- a/tests/phpunit/patcher/MapPatcherTest.php +++ b/tests/phpunit/patcher/MapPatcherTest.php @@ -360,4 +360,23 @@ $this-assertEquals( $expectedMap, $patchedMap ); } + public function testErrorOnUnknownDiffOpType() { + $patcher = new MapPatcher(); + + $diffOp = $this-getMock( 'Diff\DiffOp' ); + + $diffOp-expects( $this-any() ) + -method( 'getType' ) + -will( $this-returnValue( 'diff' ) ); + + $diff = new Diff( array( $diffOp ), true ); + + $patcher-patch( array(), $diff ); + + $patcher-throwErrors(); + $this-setExpectedException( 'Diff\PatcherException' ); + + $patcher-patch( array(), $diff ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/65699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b764195a7d752325afd5f5a8c92668cd849fc29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added covers tags for DescriptionCollection covering tests - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65700 Change subject: Added covers tags for DescriptionCollection covering tests .. Added covers tags for DescriptionCollection covering tests Change-Id: I8a19c2f563ed1426b11244893721a9883768ae17 --- M Tests/Phpunit/Language/Description/ConjunctionTest.php M Tests/Phpunit/Language/Description/DisjunctionTest.php 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/00/65700/1 diff --git a/Tests/Phpunit/Language/Description/ConjunctionTest.php b/Tests/Phpunit/Language/Description/ConjunctionTest.php index e9e380b..417923b 100644 --- a/Tests/Phpunit/Language/Description/ConjunctionTest.php +++ b/Tests/Phpunit/Language/Description/ConjunctionTest.php @@ -9,6 +9,7 @@ /** * @covers Ask\Language\Description\Conjunction + * @covers Ask\Language\Description\DescriptionCollection * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Description/DisjunctionTest.php b/Tests/Phpunit/Language/Description/DisjunctionTest.php index c3feabb..a87e978 100644 --- a/Tests/Phpunit/Language/Description/DisjunctionTest.php +++ b/Tests/Phpunit/Language/Description/DisjunctionTest.php @@ -8,6 +8,7 @@ /** * @covers Ask\Language\Description\Disjunction + * @covers Ask\Language\Description\DescriptionCollection * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- To view, visit https://gerrit.wikimedia.org/r/65700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a19c2f563ed1426b11244893721a9883768ae17 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplified FQNs and imported classes - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/65702 Change subject: Simplified FQNs and imported classes .. Simplified FQNs and imported classes Change-Id: I04e4eb99fe829e29b058d3dc9fd33d33840477c8 --- M Tests/Phpunit/Language/Description/ConjunctionTest.php M Tests/Phpunit/Language/Description/DescriptionCollectionTest.php M Tests/Phpunit/Language/Description/DisjunctionTest.php 3 files changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/02/65702/1 diff --git a/Tests/Phpunit/Language/Description/ConjunctionTest.php b/Tests/Phpunit/Language/Description/ConjunctionTest.php index 417923b..240a159 100644 --- a/Tests/Phpunit/Language/Description/ConjunctionTest.php +++ b/Tests/Phpunit/Language/Description/ConjunctionTest.php @@ -2,10 +2,13 @@ namespace Ask\Tests\Phpunit\Language\Description; +use Ask\Language\Description\AnyValue; use Ask\Language\Description\Conjunction; use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\Disjunction; +use Ask\Language\Description\ValueDescription; +use DataValues\StringValue; /** * @covers Ask\Language\Description\Conjunction @@ -48,8 +51,8 @@ $instances[] = new Conjunction( array() ); $instances[] = new Conjunction( array( new Conjunction( array() ) ) ); $instances[] = new Conjunction( array( new Disjunction( array() ), new Disjunction( array() ) ) ); - $instances[] = new Conjunction( array( new \Ask\Language\Description\AnyValue() ) ); - $instances[] = new Conjunction( array( new \Ask\Language\Description\ValueDescription( new \DataValues\StringValue( 'ohi' ) ) ) ); + $instances[] = new Conjunction( array( new AnyValue() ) ); + $instances[] = new Conjunction( array( new ValueDescription( new StringValue( 'ohi' ) ) ) ); foreach ( $this-descriptionsProvider() as $argList ) { $instances[] = new Conjunction( $argList[0] ); diff --git a/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php b/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php index e545229..3b434f1 100644 --- a/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php +++ b/Tests/Phpunit/Language/Description/DescriptionCollectionTest.php @@ -7,6 +7,9 @@ use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\SomeProperty; +use Ask\Language\Description\ValueDescription; +use DataValues\NumberValue; +use DataValues\StringValue; /** * Base class for unit tests for the Ask\Language\Description\DescriptionCollection deriving classes. @@ -42,8 +45,8 @@ $descriptionLists[] = array(); $descriptionLists[] = array( - new \Ask\Language\Description\AnyValue(), - new \Ask\Language\Description\ValueDescription( new \DataValues\StringValue( 'nyan nyan' ) ) + new AnyValue(), + new ValueDescription( new StringValue( 'nyan nyan' ) ) ); $descriptionList = array(); @@ -51,7 +54,7 @@ shuffle( $numbers ); foreach ( $numbers as $number ) { - $descriptionList[] = new \Ask\Language\Description\ValueDescription( new \DataValues\NumberValue( $number ) ); + $descriptionList[] = new ValueDescription( new NumberValue( $number ) ); } $descriptionLists[] = $descriptionList; diff --git a/Tests/Phpunit/Language/Description/DisjunctionTest.php b/Tests/Phpunit/Language/Description/DisjunctionTest.php index a87e978..5a2b595 100644 --- a/Tests/Phpunit/Language/Description/DisjunctionTest.php +++ b/Tests/Phpunit/Language/Description/DisjunctionTest.php @@ -2,9 +2,13 @@ namespace Ask\Tests\Phpunit\Language\Description; +use Ask\Language\Description\AnyValue; +use Ask\Language\Description\Conjunction; use Ask\Language\Description\Description; use Ask\Language\Description\DescriptionCollection; use Ask\Language\Description\Disjunction; +use Ask\Language\Description\ValueDescription; +use DataValues\StringValue; /** * @covers Ask\Language\Description\Disjunction @@ -45,10 +49,10 @@ $instances = array(); $instances[] = new Disjunction( array() ); - $instances[] = new Disjunction( array( new \Ask\Language\Description\Conjunction( array() ) ) ); + $instances[] = new Disjunction( array( new Conjunction( array() ) ) ); $instances[] = new Disjunction( array( new Disjunction( array() ), new Disjunction( array() ) ) ); - $instances[] = new Disjunction( array(
[MediaWiki-commits] [Gerrit] [WIP] A quickfix for arrow movements in RTL wikis. - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/65703 Change subject: [WIP] A quickfix for arrow movements in RTL wikis. .. [WIP] A quickfix for arrow movements in RTL wikis. This will make sure the marker moves correctly (backwards/forward) in RTL languages as well as LTR languages, judging from the wiki pageLanguage. This can be a quickfix until the movement can be decided per the direction of the specific element (span/paragraph/div) the marker is in. Bug: 38546 Change-Id: Ic01e110a5e6094cd275327a2e8cea90c900f1bd1 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/03/65703/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index b761ae5..d7e1e38 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -916,7 +916,12 @@ // Stop with final poll cycle so we have correct information in model this.surfaceObserver.stop( true ); selection = this.model.getSelection(); - offsetDelta = e.keyCode === ve.Keys.LEFT ? -1 : 1; + if ( mw.config.get( 'wgVisualEditor' ).pageLanguageDir == 'rtl' ) { + // If the language direction is RTL, switch left/right directions: + offsetDelta = e.keyCode === ve.Keys.LEFT ? 1 : -1; + } else { + offsetDelta = e.keyCode === ve.Keys.LEFT ? -1 : 1; + } // Check for selecting/deselecting inline images and aliens if ( selection.isCollapsed() ) { -- To view, visit https://gerrit.wikimedia.org/r/65703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic01e110a5e6094cd275327a2e8cea90c900f1bd1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo mor...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix AbuseFilter::disableConditionLimit() - change (mediawiki...AbuseFilter)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/65704 Change subject: Fix AbuseFilter::disableConditionLimit() .. Fix AbuseFilter::disableConditionLimit() Used for Special:AbuseFilter/test Change-Id: I964efbbb0be7cae418746667778874790fdbb499 --- M AbuseFilter.class.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/04/65704/1 diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index c213fb6..183e8d0 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -278,7 +278,7 @@ global $wgAbuseFilterConditionLimit; - if ( self::$condCount $wgAbuseFilterConditionLimit ) { + if ( self::$condLimitEnabled self::$condCount $wgAbuseFilterConditionLimit ) { throw new MWException( 'Condition limit reached.' ); } } -- To view, visit https://gerrit.wikimedia.org/r/65704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I964efbbb0be7cae418746667778874790fdbb499 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tool Labs: Add more user requested packages to exec_environ. - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/65705 Change subject: Tool Labs: Add more user requested packages to exec_environ. .. Tool Labs: Add more user requested packages to exec_environ. Bug: 48805 Bug: 48862 Bug: 48863 Change-Id: I10a5e31bb287077356931f12ab11bc59c31671cb --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/65705/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index b0de2a9..b6fa329 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -19,6 +19,10 @@ include generic::locales::international package { [ + 'mdbtools',# Bug #48805. + 'python-genshi', # Bug #48863. + 'python-genshi-doc', # Bug #48863. + 'tree',# Bug #48862. 'nodejs', 'php5-curl', 'mono-runtime', -- To view, visit https://gerrit.wikimedia.org/r/65705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10a5e31bb287077356931f12ab11bc59c31671cb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix typos in Makefile, mwxml2sql.c, and sqlfilter.c - change (operations/dumps)
Wpmirrordev has uploaded a new change for review. https://gerrit.wikimedia.org/r/65706 Change subject: fix typos in Makefile, mwxml2sql.c, and sqlfilter.c .. fix typos in Makefile, mwxml2sql.c, and sqlfilter.c Change-Id: Ia09ab6350612634cc1da2b47238d2b1376281280 --- M xmlfileutils/Makefile M xmlfileutils/mwxml2sql.c M xmlfileutils/sqlfilter.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/06/65706/1 diff --git a/xmlfileutils/Makefile b/xmlfileutils/Makefile index 9dda84b..b6eb6f9 100644 --- a/xmlfileutils/Makefile +++ b/xmlfileutils/Makefile @@ -72,7 +72,7 @@ clean: rm -f *.o *.a mwxml2sql sql2txt sqlfilter *~ - rm -r mwxml2sql.1.gz sql2txt.1.gz sqlfilter.1.gz + rm -f mwxml2sql.1.gz sql2txt.1.gz sqlfilter.1.gz static: mwxml2sql_static sql2txt_static sqlfilter_static diff --git a/xmlfileutils/mwxml2sql.c b/xmlfileutils/mwxml2sql.c index 1fbc11e..026b90a 100644 --- a/xmlfileutils/mwxml2sql.c +++ b/xmlfileutils/mwxml2sql.c @@ -151,7 +151,7 @@ */ void usage(char *whoami, char *message) { char * help = -Usage: mwxml2sql [OPTIONS] --mediawiki versionstring --stubs filename\n\n +Usage: mwxml2sql [OPTIONS] [-m|--mediawiki versionstring] [-s|--stubs filename]\n\n Mwxml2sql reads a possibily compressed stream of MediaWiki XML pages and\n writes possibly compressed SQL files containing INSERT statements for\n page, revision, and text tables.\n\n diff --git a/xmlfileutils/sqlfilter.c b/xmlfileutils/sqlfilter.c index a0477b3..5563220 100644 --- a/xmlfileutils/sqlfilter.c +++ b/xmlfileutils/sqlfilter.c @@ -737,7 +737,7 @@ -o, --outputfile filename\n Name of file to which output will be written. If none is\n specified, data will be written to stdout. If a filename is\n -specified that ends in .gz or .bz2, the file will be gzip or.\n +specified that ends in .gz or .bz2, the file will be gzip or\n bzip2 compressed.\n -r, --raw\n Write raw output without INSERT markup or parens, but with a \n -- To view, visit https://gerrit.wikimedia.org/r/65706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia09ab6350612634cc1da2b47238d2b1376281280 Gerrit-PatchSet: 1 Gerrit-Project: operations/dumps Gerrit-Branch: ariel Gerrit-Owner: Wpmirrordev wpmirror...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix jstart to start only one job instance. - change (labs/toollabs)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/65707 Change subject: Fix jstart to start only one job instance. .. Fix jstart to start only one job instance. https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Continuous_jobs_.28such_as_bots.29 promises that jstart script is equivalent to jsub -once -continuous script. Bug: 48816 Change-Id: Ie3a70c7418d5ea2897a4b331c50f6adf0fb7f816 --- M packages/jobutils/usr/local/bin/jsub M packages/jobutils/usr/share/man/man1/jstart.1 M packages/jobutils/usr/share/man/man1/jsub.1 3 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs refs/changes/07/65707/1 diff --git a/packages/jobutils/usr/local/bin/jsub b/packages/jobutils/usr/local/bin/jsub index 08f2cb8..616de2a 100755 --- a/packages/jobutils/usr/local/bin/jsub +++ b/packages/jobutils/usr/local/bin/jsub @@ -18,7 +18,7 @@ my $queue = 'task'; $script = $1 if $script =~ m{/([^/]+)$}; -$continuous = 1 if $script eq 'jstart'; +$continuous = $once = 1 if ($script eq 'jstart'); my @options; while($#ARGV 0) { @@ -44,7 +44,8 @@ -mem value Request value amount of memory for the job. (number prefixed by 'k', 'm' or 'g') -once Only start one job with that name, fail if - another is already started or queued. + another is already started or queued (default + if invoked as 'jstart'). -continuous Start a self-restarting job on the continuous queue (default if invoked as 'jstart') diff --git a/packages/jobutils/usr/share/man/man1/jstart.1 b/packages/jobutils/usr/share/man/man1/jstart.1 index 33cd924..2d02a2e 100644 --- a/packages/jobutils/usr/share/man/man1/jstart.1 +++ b/packages/jobutils/usr/share/man/man1/jstart.1 @@ -12,7 +12,8 @@ \-mem value Request value amount of memory for the job. (number prefixed by 'k', 'm' or 'g') \-once Only start one job with that name, fail if - another is already started or queued. + another is already started or queued (default if + invoked as 'jstart'). \-continuous Start a self-restarting job on the continuous queue (default if invoked as 'jstart') diff --git a/packages/jobutils/usr/share/man/man1/jsub.1 b/packages/jobutils/usr/share/man/man1/jsub.1 index a3ae4d9..4bebf2b 100644 --- a/packages/jobutils/usr/share/man/man1/jsub.1 +++ b/packages/jobutils/usr/share/man/man1/jsub.1 @@ -12,7 +12,8 @@ \-mem value Request value amount of memory for the job. (number prefixed by 'k', 'm' or 'g') \-once Only start one job with that name, fail if - another is already started or queued. + another is already started or queued (default if + invoked as 'jstart'). \-continuous Start a self-restarting job on the continuous queue (default if invoked as 'jstart') -- To view, visit https://gerrit.wikimedia.org/r/65707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3a70c7418d5ea2897a4b331c50f6adf0fb7f816 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits