From: <var...@us...> - 2014-10-10 16:23:31
|
Revision: 9246 http://sourceforge.net/p/phpwiki/code/9246 Author: vargenau Date: 2014-10-10 16:23:28 +0000 (Fri, 10 Oct 2014) Log Message: ----------- function GetPageType is static Modified Paths: -------------- trunk/lib/PageType.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-10-10 16:03:31 UTC (rev 9245) +++ trunk/lib/PageType.php 2014-10-10 16:23:28 UTC (rev 9246) @@ -76,7 +76,7 @@ * @param string $name Name of the page type. * @return PageType An object which is a subclass of PageType. */ - function GetPageType($name = '') + static function GetPageType($name = '') { if (!$name) $name = 'wikitext'; @@ -351,6 +351,7 @@ if (!$this->_map) return '(?:(?!a)a)'; // Never matches. + $qkeys = array(); foreach (array_keys($this->_map) as $moniker) $qkeys[] = preg_quote($moniker, '/'); return "(?:" . join("|", $qkeys) . ")"; @@ -363,7 +364,7 @@ { /** * @param WikiDB_Page $page - * @param hash $meta Version meta-data. + * @param array $meta Version meta-data hash. */ function __construct(&$page, $meta) { @@ -424,13 +425,14 @@ { $map = $this->_getMap($pagetext); if (!$map) - return HTML::p("<No interwiki map found>"); // Shouldn't happen. + return HTML::p("No interwiki map found"); // Shouldn't happen. $mon_attr = array('class' => 'interwiki-moniker'); $url_attr = array('class' => 'interwiki-url'); $thead = HTML::thead(HTML::tr(HTML::th($mon_attr, _("Moniker")), HTML::th($url_attr, _("InterWiki Address")))); + $rows = array(); foreach ($map as $moniker => $interurl) { $rows[] = HTML::tr(HTML::td($mon_attr, new Cached_WikiLinkIfKnown($moniker)), HTML::td($url_attr, HTML::samp($interurl))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |