diff options
Diffstat (limited to 'includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php')
| -rwxr-xr-x[-rw-r--r--] | includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php b/includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php index 9686b62..b33c9b5 100644..100755 --- a/includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php +++ b/includes/pear/Text/Wiki/Render/Xhtml/Interwiki.php @@ -9,7 +9,7 @@ * @package Text_Wiki * @author Paul M. Jones <pmjones@php.net> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Interwiki.php 231896 2007-03-15 00:08:47Z justinpatrin $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Text_Wiki */ @@ -26,13 +26,13 @@ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render { var $conf = array( - 'sites' => array( - 'MeatBall' => 'http://www.usemod.com/cgi-bin/mb.pl?%s', - 'Advogato' => 'http://advogato.org/%s', - 'Wiki' => 'http://c2.com/cgi/wiki?%s' + "sites" => array( + "MeatBall" => "http://www.usemod.com/cgi-bin/mb.pl?%s", + "Advogato" => "http://advogato.org/%s", + "Wiki" => "http://c2.com/cgi/wiki?%s" ), - 'target' => '_blank', - 'css' => null + "target" => "_blank", + "css" => null ); @@ -51,24 +51,24 @@ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render { function token($options) { - $text = $options['text']; - if (isset($options['url'])) { + $text = $options["text"]; + if (isset($options["url"])) { // calculated by the parser (e.g. Mediawiki) - $href = $options['url']; + $href = $options["url"]; } else { - $site = $options['site']; + $site = $options["site"]; // toggg 2006/02/05 page name must be url encoded (e.g. may contain spaces) - $page = $this->urlEncode($options['page']); + $page = $this->urlEncode($options["page"]); - if (isset($this->conf['sites'][$site])) { - $href = $this->conf['sites'][$site]; + if (isset($this->conf["sites"][$site])) { + $href = $this->conf["sites"][$site]; } else { return $text; } // old form where page is at end, // or new form with %s placeholder for sprintf()? - if (strpos($href, '%s') === false) { + if (strpos($href, "%s") === false) { // use the old form $href = $href . $page; } else { @@ -78,15 +78,15 @@ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render { } // allow for alternative targets - $target = $this->getConf('target'); + $target = $this->getConf("target"); // build base link - $css = $this->formatConf(' class="%s"', 'css'); + $css = $this->formatConf(' class="%s"', "css"); $text = $this->textEncode($text); $output = "<a$css href=\"$href\""; // are we targeting a specific window? - if ($target && $target != '_self') { + if ($target && $target != "_self") { // this is XHTML compliant, suggested by Aaron Kalin. // code tip is actually from youngpup.net, and it // uses the $target as the new window name. |
