From: Wikimedia Espana Date: Sun, 8 Jul 2012 21:13:10 +0000 (-0700) Subject: Valor por defecto para $enlace2 y $titulo2, resultaba en X-Git-Url: http://gitweb.wikimedia.es/?a=commitdiff_plain;h=8b6e7af9c292bfaa21e2d9a23484a6a3a600e57a;p=mediawiki%2Fextensions%2FHomePageWMES Valor por defecto para $enlace2 y $titulo2, resultaba en generando un enlace a la propia página. --- diff --git a/HomePageWMES.php b/HomePageWMES.php index b454b53..e441858 100644 --- a/HomePageWMES.php +++ b/HomePageWMES.php @@ -28,12 +28,17 @@ function efSetupHomepageWMES(&$parser) { return true; } -function landingbox($nombre, $class, $texto, $enlace2, $titulo2) { +function landingbox($nombre, $class, $texto, $enlace2 = false, $titulo2 = false) { global $wgExtensionAssetsPath; $nombre = htmlspecialchars( $nombre ); $imagen = "$wgExtensionAssetsPath/HomePageWMES/images/" . $nombre . ".png"; $link = "/" . lcfirst( $nombre ); $boxname = strtolower( $nombre ) . "_box"; + + if ( $enlace2 === false ) { + $enlace2 = $link; + $titulo2 = $nombre; + } return "
" .