From 8b6e7af9c292bfaa21e2d9a23484a6a3a600e57a Mon Sep 17 00:00:00 2001 From: Wikimedia Espana Date: Sun, 8 Jul 2012 14:13:10 -0700 Subject: [PATCH] =?utf8?q?Valor=20por=20defecto=20para=20=20$enlace2=20y?= =?utf8?q?=20$titulo2,=20resultaba=20en=20=20=20=20generando=20un=20enlace=20a=20?= =?utf8?q?la=20propia=20p=C3=A1gina.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- HomePageWMES.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 "
" . -- 2.30.2