Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv3171/lib
Modified Files:
display.php
Log Message:
Wups. Didn't save the last of the previous changes before commit.
Index: display.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/display.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -2 -b -p -d -r1.46 -r1.47
--- display.php 7 Mar 2003 21:46:55 -0000 1.46
+++ display.php 7 Mar 2003 21:52:34 -0000 1.47
@@ -6,39 +6,4 @@ require_once('lib/Template.php');
/**
- * Guess a short description of the page.
- *
- * Algorithm:
- *
- * This algorithm was suggested on MeatballWiki by
- * Alex Schroeder <kensanata@...>.
- *
- * Use the first paragraph in the page which contains at least two
- * sentences.
- *
- * @see http://www.usemod.com/cgi-bin/mb.pl?MeatballWikiSuggestions
- */
-function GleanDescription ($rev) {
- $two_sentences
- = pcre_fix_posix_classes("/[.?!]\s+[[:upper:])]"
- . ".*"
- . "[.?!]\s*([[:upper:])]|$)/sx");
- // Escape strings
- $content = preg_replace("/(['\"])/", "\$1", $rev->getPackedContent());
-
- // Iterate through paragraphs.
- while (preg_match('/(?: ^ \w .* $ \n? )+/mx', $content, $m)) {
- $paragraph = $m[0];
-
- // Return paragraph if it contains at least two sentences.
- if (preg_match($two_sentences, $paragraph)) {
- return preg_replace("/\s*\n\s*/", " ", trim($paragraph));
- }
-
- $content = substr(strstr($content, $paragraph), strlen($paragraph));
- }
- return '';
-}
-
-/**
* Extract keywords from Category* links on page.
*/
|