From 57f781f73378dcaa74b64a42161b3f8a7700013f Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 21 Mar 2005 08:37:43 +0000 Subject: [PATCH] Changed variable name because Eloy has plans for $CFG->filtermatchoneperpage :-) --- config-dist.php | 2 +- lib/filterlib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config-dist.php b/config-dist.php index e085a3583b4..c1c291d9e91 100644 --- a/config-dist.php +++ b/config-dist.php @@ -209,7 +209,7 @@ $CFG->admin = 'admin'; // // Enabling this will make most text-based filters only match the first time // a phrase occurs in a given text. Otherwise all are matched. -// $CFG->filtermatchfirstonly = true; +// $CFG->filtermatchonepertext = true; //========================================================================= // ALL DONE! To continue installation, visit your main page with a browser diff --git a/lib/filterlib.php b/lib/filterlib.php index d9e0642973d..b251b4b846a 100644 --- a/lib/filterlib.php +++ b/lib/filterlib.php @@ -149,7 +149,7 @@ function filter_phrases ($text, $link_array, $ignoretagsopen=NULL, $ignoretagscl } /// Finally we do our highlighting - if (!empty($CFG->filtermatchfirstonly)) { + if (!empty($CFG->filtermatchonepertext)) { $text = preg_replace('/('.$linkobject->phrase.')/'.$modifiers, $linkobject->hreftagbegin.'$1'.$linkobject->hreftagend, $text, 1); } else {