Withoutaname has uploaded a new change for review.

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

Change subject: Remove deprecated $wgCopyrightIcon
......................................................................

Remove deprecated $wgCopyrightIcon

Change-Id: I0ca3e4d00449e1bb158bf1a2b3d3ea7900cb64f8
---
M includes/DefaultSettings.php
M includes/Setup.php
M includes/Skin.php
3 files changed, 12 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/148570/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 4606e9e..1d16cf4 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5858,12 +5858,6 @@
 $wgRightsIcon = null;
 
 /**
- * Set this to some HTML to override the rights icon with an arbitrary logo
- * @deprecated since 1.18 Use $wgFooterIcons['copyright']['copyright']
- */
-$wgCopyrightIcon = null;
-
-/**
  * Set this to true if you want detailed copyright information forms on Upload.
  */
 $wgUseCopyrightUpload = false;
diff --git a/includes/Setup.php b/includes/Setup.php
index 040aba5..01d6e78 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -114,9 +114,7 @@
        && isset( $wgFooterIcons['copyright']['copyright'] )
        && $wgFooterIcons['copyright']['copyright'] === array()
 ) {
-       if ( $wgCopyrightIcon ) {
-               $wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
-       } elseif ( $wgRightsIcon || $wgRightsText ) {
+       if ( $wgRightsIcon || $wgRightsText ) {
                $wgFooterIcons['copyright']['copyright'] = array(
                        'url' => $wgRightsUrl,
                        'src' => $wgRightsIcon,
diff --git a/includes/Skin.php b/includes/Skin.php
index f493b7b..b4b135b 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -861,26 +861,20 @@
         * @return null|string
         */
        function getCopyrightIcon() {
-               global $wgRightsUrl, $wgRightsText, $wgRightsIcon, 
$wgCopyrightIcon;
+               global $wgFooterIcons;
 
                $out = '';
 
-               if ( $wgCopyrightIcon ) {
-                       $out = $wgCopyrightIcon;
-               } elseif ( $wgRightsIcon ) {
-                       $icon = htmlspecialchars( $wgRightsIcon );
-
-                       if ( $wgRightsUrl ) {
-                               $url = htmlspecialchars( $wgRightsUrl );
-                               $out .= '<a href="' . $url . '">';
-                       }
-
-                       $text = htmlspecialchars( $wgRightsText );
-                       $out .= "<img src=\"$icon\" alt=\"$text\" width=\"88\" 
height=\"31\" />";
-
-                       if ( $wgRightsUrl ) {
-                               $out .= '</a>';
-                       }
+               if ( isset( $wgFooterIcons['copyright']['copyright'] ) ) {
+                       $copyright = $wgFooterIcons['copyright']['copyright'];
+                       $out .= Html::rawElement( 'a', array( 'href' => 
htmlspecialchars( $copyright['url'] ) ),
+                               Html::element( 'img', array(
+                                       'src' => htmlspecialchars( 
$copyright['src'] ),
+                                       'alt' => htmlspecialchars( 
$copyright['alt'] ),
+                                       'width' => 88,
+                                       'height' => 31
+                               ) )
+                       );
                }
 
                return $out;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ca3e4d00449e1bb158bf1a2b3d3ea7900cb64f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Withoutaname <[email protected]>

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

Reply via email to