Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/172502
Change subject: fix __construc method in Slick class (v 1.1.0) incompatible changes!!! ...................................................................... fix __construc method in Slick class (v 1.1.0) incompatible changes!!! I reordered the parameters in the constructor method since version 1.1.0, because this sequence will be better for all future widgets. Change-Id: Ia6d08104581744f3ea4114d322628df9f47bdd5f --- M PhpTagsWidgets.php M includes/WidgetSlick.php 2 files changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsWidgets refs/changes/02/172502/1 diff --git a/PhpTagsWidgets.php b/PhpTagsWidgets.php index 7771cbd..1b33f1a 100644 --- a/PhpTagsWidgets.php +++ b/PhpTagsWidgets.php @@ -33,7 +33,7 @@ ); } -define( 'PHPTAGS_WIDGETS_VERSION' , '1.0.0' ); +define( 'PHPTAGS_WIDGETS_VERSION' , '1.1.0' ); // Register this extension on Special:Version $wgExtensionCredits['phptags'][] = array( diff --git a/includes/WidgetSlick.php b/includes/WidgetSlick.php index adc25fd..ab6d5be 100644 --- a/includes/WidgetSlick.php +++ b/includes/WidgetSlick.php @@ -9,7 +9,6 @@ */ class WidgetSlick extends \PhpTags\GenericWidget { - protected static $modules = false; protected static $trueCase = array( 'adaptiveheight' => 'adaptiveHeight', 'autoplayspeed' => 'autoplaySpeed', @@ -29,7 +28,7 @@ 'variablewidth' => 'variableWidth', ); - public function m___construct( $properties = null, $value = null ) { + public function m___construct( $value = null, $properties = null ) { $this->value[self::DATA] = $value; return parent::m___construct( $properties ); } @@ -51,6 +50,19 @@ $data = '<div>' . implode( '</div><div>', $this->value[self::DATA] ) . '</div>'; } return $data; + } + + public static function checkArguments( $object, $method, $arguments, $expects = false ) { + switch ( $method ) { + case '__construct': + $expects = array( + \PhpTags\Hooks::TYPE_MIXED, + \PhpTags\Hooks::TYPE_ARRAY, + \PhpTags\Hooks::EXPECTS_MAXIMUM_PARAMETERS => 2, + ); + break; + } + return parent::checkArguments( $object, $method, $arguments, $expects ); } private function checkProperty( $property, &$value ) { @@ -94,7 +106,7 @@ case 'cssEase': // @???todo case 'customPaging': ??? // @todo case 'easing': -// case 'lazyLoad': +// case 'lazyLoad': // do not allow it!!! case 'slide': $expects = \PhpTags\Hooks::TYPE_STRING; break; -- To view, visit https://gerrit.wikimedia.org/r/172502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6d08104581744f3ea4114d322628df9f47bdd5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PhpTagsWidgets 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