Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/99545


Change subject: Remove unused params in EntityView::getHtmlForEditSection
......................................................................

Remove unused params in EntityView::getHtmlForEditSection

Change-Id: I4b72973deca57420964db88a567142559a56498e
---
M repo/includes/EntityView.php
M repo/includes/ItemView.php
2 files changed, 12 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/45/99545/1

diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index 91ae138..4f0a0a6 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -370,7 +370,7 @@
                                $label === false ? 'wb-value-empty' : '',
                                htmlspecialchars( $label === false ? wfMessage( 
'wikibase-label-empty' )->text() : $label ),
                                wfTemplate( 'wb-property-value-supplement', 
wfMessage( 'parentheses', $prefixedId ) )
-                                       . $this->getHtmlForEditSection( 
$entity, $lang, $editUrl )
+                                       . $this->getHtmlForEditSection( 
$editUrl )
                        )
                );
 
@@ -398,7 +398,7 @@
                        wfTemplate( 'wb-property',
                                $description === false ? 'wb-value-empty' : '',
                                htmlspecialchars( $description === false ? 
wfMessage( 'wikibase-description-empty' )->text() : $description ),
-                               $this->getHtmlForEditSection( $entity, $lang, 
$editUrl )
+                               $this->getHtmlForEditSection( $editUrl )
                        )
                );
 
@@ -427,7 +427,7 @@
                                'wb-aliases-empty',
                                'wb-value-empty',
                                wfMessage( 'wikibase-aliases-empty' )->text(),
-                               $this->getHtmlForEditSection( $entity, $lang, 
$editUrl, 'span', 'add' )
+                               $this->getHtmlForEditSection( $editUrl, 'span', 
'add' )
                        );
                } else {
                        $aliasesHtml = '';
@@ -440,7 +440,7 @@
                                '',
                                '',
                                wfMessage( 'wikibase-aliases-label' )->text(),
-                               $aliasList . $this->getHtmlForEditSection( 
$entity, $lang, $editUrl )
+                               $aliasList . $this->getHtmlForEditSection( 
$editUrl )
                        );
                }
 
@@ -526,8 +526,8 @@
                                htmlspecialchars( Utils::fetchLanguageName( 
$language ) ),
                                htmlspecialchars( $label !== false ? $label : 
wfMessage( 'wikibase-label-empty' ) ),
                                htmlspecialchars( $description !== false ? 
$description : wfMessage( 'wikibase-description-empty' ) ),
-                               $this->getHtmlForEditSection( $entity, $lang, 
$editLabelLink ),
-                               $this->getHtmlForEditSection( $entity, $lang, 
$editDescriptionLink ),
+                               $this->getHtmlForEditSection( $editLabelLink ),
+                               $this->getHtmlForEditSection( 
$editDescriptionLink ),
                                $label !== false ? '' : 'wb-value-empty',
                                $description !== false ? '' : 'wb-value-empty',
                                $this->getTitle()->getLocalURL() . '?setlang=' 
. $language
@@ -590,7 +590,7 @@
                                htmlspecialchars( $propertyLabel )
                        );
 
-                       $htmlForEditSection = $this->getHtmlForEditSection( 
$entity, $lang, '', 'span' ); // TODO: add link to SpecialPage
+                       $htmlForEditSection = $this->getHtmlForEditSection( '', 
'span' ); // TODO: add link to SpecialPage
 
                        $claimHtmlGenerator = new ClaimHtmlGenerator(
                                $this->snakFormatter
@@ -603,7 +603,7 @@
                        $toolbarHtml = wfTemplate( 'wikibase-toolbar',
                                'wb-addtoolbar',
                                // TODO: add link to SpecialPage
-                               $this->getHtmlForEditSection( $entity, $lang, 
'', 'span', 'add' )
+                               $this->getHtmlForEditSection( '', 'span', 'add' 
)
                        );
 
                        $claimsHtml .= wfTemplate( 'wb-claimlistview',
@@ -637,9 +637,7 @@
         * @param bool $enabled can be set to false to display the button 
disabled
         * @return string
         */
-       public function getHtmlForEditSection(
-               Entity $entity, Language $lang, $url = '', $tag = 'span', 
$action = 'edit', $enabled = true
-       ) {
+       public function getHtmlForEditSection( $url = '', $tag = 'span', 
$action = 'edit', $enabled = true ) {
                wfProfileIn( __METHOD__ );
 
                $buttonLabel = wfMessage( $action === 'add' ? 'wikibase-add' : 
'wikibase-edit' )->text();
diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php
index 8f94ea7..843fb9f 100644
--- a/repo/includes/ItemView.php
+++ b/repo/includes/ItemView.php
@@ -160,7 +160,7 @@
                                        $alternatingClass,
                                        htmlspecialchars( 
$link->getSite()->getGlobalId() ),
                                        htmlspecialchars( $link->getPage() ),
-                                       $this->getHtmlForEditSection( $item, 
$lang, $editLink, 'td' )
+                                       $this->getHtmlForEditSection( 
$editLink, 'td' )
                                );
 
                        } else {
@@ -185,7 +185,7 @@
                                        $escapedSiteId, // displayed site ID
                                        htmlspecialchars( $link->getUrl() ),
                                        htmlspecialchars( $link->getPage() ),
-                                       $this->getHtmlForEditSection( $item, 
$lang, $editLink . '/' . $escapedSiteId, 'td' ),
+                                       $this->getHtmlForEditSection( $editLink 
. '/' . $escapedSiteId, 'td' ),
                                        $escapedSiteId // ID used in classes
                                );
                        }
@@ -196,7 +196,7 @@
 
                $tfoot = wfTemplate( 'wb-sitelinks-tfoot',
                        $isFull ? wfMessage( 'wikibase-sitelinksedittool-full' 
)->parse() : '',
-                       $this->getHtmlForEditSection( $item, $lang, $editLink, 
'td', 'add', !$isFull )
+                       $this->getHtmlForEditSection( $editLink, 'td', 'add', 
!$isFull )
                );
 
                $groupName = in_array( $group, $specialGroups ) ? 'special' : 
$group;

-- 
To view, visit https://gerrit.wikimedia.org/r/99545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b72973deca57420964db88a567142559a56498e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to