From b3e02246b277a04d3e4bdfc57feb9702dad1bef8 Mon Sep 17 00:00:00 2001 From: wainstead Date: Wed, 19 Sep 2001 02:36:24 +0000 Subject: [PATCH] Added new local variables list; reformatted leading whitespace. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@560 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/interwiki.php | 82 +++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/lib/interwiki.php b/lib/interwiki.php index 7ca8e2175..70b57c0ab 100644 --- a/lib/interwiki.php +++ b/lib/interwiki.php @@ -1,66 +1,70 @@ - 'wikipage'), $page) ); - $class = 'interwiki'; - } - - return Element('a', array('href' => $url, - 'class' => $class), - $linktext); + if ($linktext) { + $linktext = htmlspecialchars($linktext); + $class = 'named-interwiki'; + } + else { + $linktext = ( htmlspecialchars("$wiki:") + . QElement('span', array('class' => 'wikipage'), $page) ); + $class = 'interwiki'; + } + + return Element('a', array('href' => $url, + 'class' => $class), + $linktext); } // Link InterWiki links // These can be protected by a '!' like Wiki words. function wtt_interwikilinks($match, &$trfrm) { - if ($match[0] == "!") - return htmlspecialchars(substr($match,1)); - return LinkInterWikiLink($match); + if ($match[0] == "!") + return htmlspecialchars(substr($match,1)); + return LinkInterWikiLink($match); } // For emacs users // Local Variables: // mode: php -// c-file-style: "ellemtel" -// End: +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: + ?> -- 2.45.0