Update of /cvsroot/phpwiki/phpwiki
In directory usw-pr-cvs1:/tmp/cvs-serv8120
Modified Files:
Tag: release-1_2-branch
DBLIB.txt index.php
Log Message:
Added real back-link searches.
The pgsql and msql backends are completely untested at this point,
but they "should work". (I.e.: they're probably broken now.)
Index: DBLIB.txt
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/DBLIB.txt,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** DBLIB.txt 2000/12/12 21:53:20 1.8
--- DBLIB.txt 2001/08/18 00:35:10 1.8.2.1
***************
*** 119,122 ****
--- 119,139 ----
+ MakeBackLinkSearchRegexp($pagename)
+ takes: a page name
+ returns: A PCRE suitable for searching for a link to the given page
+ within page (wiki-markup) text.
+
+ InitBackLinkSearch($dbi, $pagename)
+ takes: db reference, page name
+ returns: a handle to identify the query and the current position
+ within the result set.
+
+ BackLinkSearchNextMatch($dbi, &$pos)
+ takes: db reference, reference to a hash created by
+ InitBackLinkSearch
+ returns: the next page name that contains a link to the specified page.
+ (advances $pos to next result field as well)
+
+
IncreaseHitCount($dbi, $pagename)
takes: db reference, string (name of a page)
Index: index.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/index.php,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** index.php 2000/11/08 15:34:06 1.5
--- index.php 2001/08/18 00:35:10 1.5.2.1
***************
*** 31,34 ****
--- 31,42 ----
} elseif (isset($full)) {
include "lib/fullsearch.php";
+ } elseif (isset($refs)) {
+ if (function_exists('InitBackLinkSearch')) {
+ include "lib/backlinks.php";
+ }
+ else {
+ $full = $refs;
+ include "lib/fullsearch.php";
+ }
} elseif (isset($post)) {
include "lib/savepage.php";
|