From 53e15c8ba5cc2fd8ac7ed5a7f8dd4df684dba28a Mon Sep 17 00:00:00 2001
From: Anika Henke <anika@selfthinker.org>
Date: Sat, 10 Mar 2012 20:58:38 +0000
Subject: [PATCH] improved tpl_license() (removed unnecessary class, fixed
 space issues)

---
 inc/template.php | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/inc/template.php b/inc/template.php
index 02e039b2d..37848b59a 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1359,27 +1359,21 @@ function tpl_license($img='badge',$imgonly=false,$return=false,$wrap=true){
     if(!$conf['license']) return '';
     if(!is_array($license[$conf['license']])) return '';
     $lic = $license[$conf['license']];
+    $target = ($conf['target']['extern']) ? ' target="'.$conf['target']['extern'].'"' : '';
 
     $out = '';
     if($wrap) $out  .= '<div class="license">';
     if($img){
         $src = license_img($img);
         if($src){
-            if(!$imgonly){
-                $left = 'medialeft';
-            }else{
-                $left = '';
-            }
-
-            $out .= '<a href="'.$lic['url'].'" rel="license"';
-            if($conf['target']['extern']) $out .= ' target="'.$conf['target']['extern'].'"';
-            $out .= '><img src="'.DOKU_BASE.$src.'" class="'.$left.' lic'.$img.'" alt="'.$lic['name'].'" /></a> ';
+            $out .= '<a href="'.$lic['url'].'" rel="license"'.$target;
+            $out .= '><img src="'.DOKU_BASE.$src.'" alt="'.$lic['name'].'" /></a>';
+            if(!$imgonly) $out .= ' ';
         }
     }
     if(!$imgonly) {
-        $out .= $lang['license'];
-        $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"';
-        if($conf['target']['extern']) $out .= ' target="'.$conf['target']['extern'].'"';
+        $out .= $lang['license'].' ';
+        $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"'.$target;
         $out .= '>'.$lic['name'].'</a>';
     }
     if($wrap) $out .= '</div>';
-- 
GitLab