From 0134ed92d0129b1ede6e2ded9b354e0b71ac2a7b Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 6 May 2004 20:30:47 +0000 Subject: [PATCH] revert and removed some comments git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@3453 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/InlineParser.php | 10 +++++----- lib/plugin/SystemInfo.php | 25 ++++++++----------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/lib/InlineParser.php b/lib/InlineParser.php index e57e7b37e..00b960d40 100644 --- a/lib/InlineParser.php +++ b/lib/InlineParser.php @@ -1,4 +1,4 @@ - * * This file is part of PhpWiki. @@ -536,10 +536,10 @@ class Markup_html_abbr extends BalancedMarkup } // Special version for single-line plugins formatting, -// like: '< ? plugin PopularNearby ? >' +// like: '< ?plugin PopularNearby ? >' class Markup_plugin extends SimpleMarkup { - var $_match_regexp = '(?: <\?plugin(?:-form)?\s[^\n]+?\?> )'; + var $_match_regexp = '<\?plugin(?:-form)?\s[^\n]+?\?>'; function markup ($match) { return new Cached_PluginInvocation($match); @@ -629,11 +629,11 @@ class InlineTransformer } function _parse_markup_body ($markup, $match, &$text, $end_regexps) { - if (!$markup) return false; if (isa($markup, 'SimpleMarkup')) return true; // Done. SimpleMarkup is simple. - array_unshift($end_regexps, $markup->getEndRegexp($match)); + + if (!is_object($markup)) return false; // Optimization: if no end pattern in text, we know the // parse will fail. This is an important optimization, // e.g. when text is "*lots *of *start *delims *with diff --git a/lib/plugin/SystemInfo.php b/lib/plugin/SystemInfo.php index 4bfd1bdb9..d1e6a0ce8 100644 --- a/lib/plugin/SystemInfo.php +++ b/lib/plugin/SystemInfo.php @@ -1,5 +1,5 @@ method()system + elseif (method_exists($this, $arg)) // any defined SystemInfo->method() return call_user_func_array(array(&$this, $arg), ''); elseif (defined($arg) && $arg != 'ADMIN_PASSWD') // any defined constant return constant($arg); @@ -466,22 +466,9 @@ function gensym($prefix = "_gensym") { r (mapcar (function (lambda (x) (std-sqr (- x _dev_m)))) numlst)) (sqrt (* (std-mean r) (/ n (float (- n 1)))))) */ -/* -function stddev(&$hits, $total=false) { - $n = count($hits); - if (!$total) $total = array_reduce($hits, 'rsum'); - $mean = gensym("_mean"); - $GLOBALS[$mean] = $total / $n; - $cb = "global ${$mean}; return (\$i-${$mean})*(\$i-${$mean});"; - $r = array_map(create_function('$i',"global ${$mean}; return (\$i-${$mean})*(\$i-${$mean});"),$hits); - unset($GLOBALS[$mean]); - return (float) sqrt(mean($r,$total) * ($n / (float)($n -1))); -} -*/ function stddev(&$hits, $total = false) { $n = count($hits); - if (!$total) - $total = array_reduce($hits, 'rsum'); + if (!$total) $total = array_reduce($hits, 'rsum'); $GLOBALS['mean'] = $total / $n; $r = array_map(create_function('$i', 'global $mean; return ($i-$mean)*($i-$mean);'), $hits); @@ -490,6 +477,10 @@ function stddev(&$hits, $total = false) { } // $Log: not supported by cvs2svn $ +// Revision 1.15 2004/05/03 11:40:42 rurban +// put listAvailableLanguages() and listAvailableThemes() from SystemInfo and +// UserPreferences into Themes.php +// // Revision 1.14 2004/04/19 23:13:04 zorloc // Connect the rest of PhpWiki to the IniConfig system. Also the keyword regular expression is not a config setting // -- 2.45.0