You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
| 2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
| 2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
| 2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
| 2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
| 2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
| 2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
| 2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
| 2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
| 2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
| 2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
| 2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
| 2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
| 2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
| 2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
| 2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
| 2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
| 2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
| 2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 05:09:12
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv19382/lib
Modified Files:
Tag: release-1_2-branch
db_filesystem.php
Log Message:
Fix SF bug #227748.
When using the flat-file back end, page names with slashes in them didn't work.
We fix this by urlencoding '%' '/' '\\' and ':' when they occur in page names.
WARNING: If any pages currently in your flat-file database contain any of
those characters in their titles, this change will make them invisible
to PhpWiki. You should back them up before upgrading, and restore them
after upgrading.
Index: db_filesystem.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/db_filesystem.php,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -C2 -r1.4.2.3 -r1.4.2.4
*** db_filesystem.php 2001/08/18 02:38:34 1.4.2.3
--- db_filesystem.php 2001/08/18 05:09:09 1.4.2.4
***************
*** 42,49 ****
}
!
// Return hash of page + attributes or default
function RetrievePage($dbi, $pagename, $pagestore) {
! $filename = $dbi[$pagestore] . "/" . $pagename;
if ($fd = @fopen($filename, "rb")) {
$locked = flock($fd, 1); # Read lock
--- 42,61 ----
}
! // Sort of urlencode() the pagename.
! // We only encode a limited set of characters to minimize breakage
! // of existing databases. The encoded names can be decoded with
! // urldecode.
! function EncodePagename($pagename) {
! $bad_chars = '%/\\:'; // '%' must be first!
! for ($i = 0; $i < strlen($bad_chars); $i++) {
! $pagename = str_replace($bad_chars[$i],
! rawurlencode($bad_chars[$i]), $pagename);
! }
! return $pagename;
! }
!
// Return hash of page + attributes or default
function RetrievePage($dbi, $pagename, $pagestore) {
! $filename = $dbi[$pagestore] . "/" . EncodePagename($pagename);
if ($fd = @fopen($filename, "rb")) {
$locked = flock($fd, 1); # Read lock
***************
*** 55,59 ****
$pagehash = unserialize($data);
if (!is_array($pagehash))
! ExitWiki(sprintf("'%s': corrupt file",
htmlspecialchars($filename)));
}
--- 67,71 ----
$pagehash = unserialize($data);
if (!is_array($pagehash))
! ExitWiki(sprintf(gettext("'%s': corrupt file"),
htmlspecialchars($filename)));
}
***************
*** 82,86 ****
}
! $filename = $dbi . "/" . $pagename;
if($fd = fopen($filename, 'a+b')) {
$locked = flock($fd,2); #Exclusive blocking lock
--- 94,98 ----
}
! $filename = $dbi . "/" . EncodePagename($pagename);
if($fd = fopen($filename, 'a+b')) {
$locked = flock($fd,2); #Exclusive blocking lock
***************
*** 116,125 ****
function IsWikiPage($dbi, $pagename) {
! return file_exists($dbi['wiki'] . "/" . $pagename);
}
function IsInArchive($dbi, $pagename) {
! return file_exists($dbi['archive'] . "/" . $pagename);
}
--- 128,137 ----
function IsWikiPage($dbi, $pagename) {
! return file_exists($dbi['wiki'] . "/" . EncodePagename($pagename));
}
function IsInArchive($dbi, $pagename) {
! return file_exists($dbi['archive'] . "/" . EncodePagename($pagename));
}
***************
*** 200,203 ****
--- 212,219 ----
while (list($key, $page) = each($pos['data'])) {
$pagedata = RetrievePage($dbi, $page, $WikiPageStore);
+ if (!is_array($pagedata)) {
+ printf(gettext("%s: bad data<br>\n"), htmlspecialchars($page));
+ continue;
+ }
while (list($i, $line) = each($pagedata['content'])) {
***************
*** 285,290 ****
$d = opendir($dbi);
while($entry = readdir($d)) {
! if ($entry != '.' && $entry != '..')
! $namelist[] = $entry;
}
--- 301,313 ----
$d = opendir($dbi);
while($entry = readdir($d)) {
! if ($entry == '.' || $entry == '..')
! continue;
! $pagename = rawurldecode($entry);
! if ($entry != EncodePagename($pagename)) {
! printf(gettext("%s: Bad filename in database<br>\n"),
! htmlspecialchars("$dbi/$entry"));
! continue;
! }
! $namelist[] = $pagename;
}
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 05:09:12
|
Update of /cvsroot/phpwiki/phpwiki
In directory usw-pr-cvs1:/tmp/cvs-serv19382
Modified Files:
Tag: release-1_2-branch
UPGRADING.readme
Log Message:
Fix SF bug #227748.
When using the flat-file back end, page names with slashes in them didn't work.
We fix this by urlencoding '%' '/' '\\' and ':' when they occur in page names.
WARNING: If any pages currently in your flat-file database contain any of
those characters in their titles, this change will make them invisible
to PhpWiki. You should back them up before upgrading, and restore them
after upgrading.
Index: UPGRADING.readme
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/Attic/UPGRADING.readme,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** UPGRADING.readme 2001/08/18 03:57:27 1.1.2.1
--- UPGRADING.readme 2001/08/18 05:09:09 1.1.2.2
***************
*** 13,16 ****
schemas/update.mysql.1.2.0-1.2.1 and use it as a guide.
-
--- 13,27 ----
schemas/update.mysql.1.2.0-1.2.1 and use it as a guide.
+ Flat File
+
+ We are now (since 1.2.0) urlencoding the characters '%', '/', '\\',
+ and ':' when forming filenames from page names. (This is to fix a bug
+ having to do with page names containing slashes.) If you currently have
+ any page names with any of those special characters, they will not be
+ visible to PhpWiki after you upgrade. (Any pages without those funny
+ characters in their names will be unaffected.)
+
+ If you do have pages with slashes, colons or percent signs in their names,
+ you should probably make a backup dump of your database before upgrading
+ and re-load the database after upgrading.
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 03:57:30
|
Update of /cvsroot/phpwiki/phpwiki/schemas
In directory usw-pr-cvs1:/tmp/cvs-serv10849/schemas
Modified Files:
Tag: release-1_2-branch
schema.mysql
Added Files:
Tag: release-1_2-branch
update.mysql.1.2.0-1.2.1
Log Message:
Fixed SF Bug #233898. (MySQL backend insensitive to case in page names.)
Note that this involves a change to the MySQL schema. A convenient
mysql script, schemas/update.mysql.1.2.0-1.2.1, is provided which can
be used to update your schema in-place.
***** Error reading new file: [Errno 2] No such file or directory: 'update.mysql.1.2.0-1.2.1'
Index: schema.mysql
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/schemas/schema.mysql,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** schema.mysql 2000/09/23 14:31:38 1.3
--- schema.mysql 2001/08/18 03:57:27 1.3.2.1
***************
*** 10,14 ****
CREATE TABLE wiki (
! pagename VARCHAR(100) NOT NULL,
version INT NOT NULL DEFAULT 1,
flags INT NOT NULL DEFAULT 0,
--- 10,14 ----
CREATE TABLE wiki (
! pagename VARCHAR(100) BINARY NOT NULL,
version INT NOT NULL DEFAULT 1,
flags INT NOT NULL DEFAULT 0,
***************
*** 22,26 ****
CREATE TABLE archive (
! pagename VARCHAR(100) NOT NULL,
version INT NOT NULL DEFAULT 1,
flags INT NOT NULL DEFAULT 0,
--- 22,26 ----
CREATE TABLE archive (
! pagename VARCHAR(100) BINARY NOT NULL,
version INT NOT NULL DEFAULT 1,
flags INT NOT NULL DEFAULT 0,
***************
*** 34,44 ****
CREATE TABLE wikilinks (
! frompage VARCHAR(100) NOT NULL,
! topage VARCHAR(100) NOT NULL,
PRIMARY KEY (frompage, topage)
);
CREATE TABLE hitcount (
! pagename VARCHAR(100) NOT NULL,
hits INT NOT NULL DEFAULT 0,
PRIMARY KEY (pagename)
--- 34,44 ----
CREATE TABLE wikilinks (
! frompage VARCHAR(100) BINARY NOT NULL,
! topage VARCHAR(100) BINARY NOT NULL,
PRIMARY KEY (frompage, topage)
);
CREATE TABLE hitcount (
! pagename VARCHAR(100) BINARY NOT NULL,
hits INT NOT NULL DEFAULT 0,
PRIMARY KEY (pagename)
***************
*** 46,50 ****
CREATE TABLE wikiscore (
! pagename VARCHAR(100) NOT NULL,
score INT NOT NULL DEFAULT 0,
PRIMARY KEY (pagename)
--- 46,50 ----
CREATE TABLE wikiscore (
! pagename VARCHAR(100) BINARY NOT NULL,
score INT NOT NULL DEFAULT 0,
PRIMARY KEY (pagename)
***************
*** 55,59 ****
CREATE TABLE hottopics (
! pagename VARCHAR(100) NOT NULL,
lastmodified INT NOT NULL,
PRIMARY KEY (pagename, lastmodified)
--- 55,59 ----
CREATE TABLE hottopics (
! pagename VARCHAR(100) BINARY NOT NULL,
lastmodified INT NOT NULL,
PRIMARY KEY (pagename, lastmodified)
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 03:57:30
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10849/lib
Modified Files:
Tag: release-1_2-branch
mysql.php
Log Message:
Fixed SF Bug #233898. (MySQL backend insensitive to case in page names.)
Note that this involves a change to the MySQL schema. A convenient
mysql script, schemas/update.mysql.1.2.0-1.2.1, is provided which can
be used to update your schema in-place.
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/mysql.php,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -r1.10.2.1 -r1.10.2.2
*** mysql.php 2001/08/18 00:35:10 1.10.2.1
--- mysql.php 2001/08/18 03:57:27 1.10.2.2
***************
*** 214,226 ****
$clause = '';
while($term) {
! $word = "$term";
if ($word[0] == '-') {
$word = substr($word, 1);
! $clause .= "not ($column like '%$word%') ";
} else {
! $clause .= "($column like '%$word%') ";
}
if ($term = strtok(' '))
! $clause .= 'and ';
}
return $clause;
--- 214,226 ----
$clause = '';
while($term) {
! $word = strtolower("$term");
if ($word[0] == '-') {
$word = substr($word, 1);
! $clause .= "not (LCASE($column) like '%$word%') ";
} else {
! $clause .= "(LCASE($column) like '%$word%') ";
}
if ($term = strtok(' '))
! $clause .= 'AND ';
}
return $clause;
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 03:57:30
|
Update of /cvsroot/phpwiki/phpwiki
In directory usw-pr-cvs1:/tmp/cvs-serv10849
Added Files:
Tag: release-1_2-branch
UPGRADING.readme
Log Message:
Fixed SF Bug #233898. (MySQL backend insensitive to case in page names.)
Note that this involves a change to the MySQL schema. A convenient
mysql script, schemas/update.mysql.1.2.0-1.2.1, is provided which can
be used to update your schema in-place.
--- NEW FILE ---
MySQL
The MySQL schema has changed since PhpWiki 1.2.0.
If you're upgrading from PhpWiki 1.2.0 and you use the MySQL back end,
you need to update the schema.
As long as you use the stock table names you can just do something like:
mysql -u <username> -p wiki < schemas/update.mysql.1.2.0-1.2.1
If you don't use the stock table names, look at the script in
schemas/update.mysql.1.2.0-1.2.1 and use it as a guide.
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 02:38:37
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv30089/lib
Modified Files:
Tag: release-1_2-branch
db_filesystem.php
Log Message:
Attempt to fix SF bug #413446.
I think this bug was due to using PHP's file() function to slurp in the
files (as an array of lines). The files, being serialized data, consist
of only one (sometimes very long) line. I think (at least in some PHPs)
this make the file() function unhappy.
Fixed to use fread() rather than file(). Also make sure to open files
in 'binary' mode.
Index: db_filesystem.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/db_filesystem.php,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -C2 -r1.4.2.2 -r1.4.2.3
*** db_filesystem.php 2001/08/18 02:05:28 1.4.2.2
--- db_filesystem.php 2001/08/18 02:38:34 1.4.2.3
***************
*** 46,62 ****
function RetrievePage($dbi, $pagename, $pagestore) {
$filename = $dbi[$pagestore] . "/" . $pagename;
! if ($fd = @fopen($filename, "r")) {
$locked = flock($fd, 1); # Read lock
if (!$locked) {
ExitWiki("Timeout while obtaining lock. Please try again");
}
! if ($data = file($filename)) {
// unserialize $data into a hash
! $pagehash = unserialize(join("\n", $data));
! }
! fclose($fd);
! if($data) {
! return $pagehash;
! }
} else {
return -1;
--- 46,65 ----
function RetrievePage($dbi, $pagename, $pagestore) {
$filename = $dbi[$pagestore] . "/" . $pagename;
! if ($fd = @fopen($filename, "rb")) {
$locked = flock($fd, 1); # Read lock
if (!$locked) {
ExitWiki("Timeout while obtaining lock. Please try again");
}
! if ($data = fread($fd, filesize($filename))) {
// unserialize $data into a hash
! $pagehash = unserialize($data);
! if (!is_array($pagehash))
! ExitWiki(sprintf("'%s': corrupt file",
! htmlspecialchars($filename)));
! }
! fclose($fd);
! if ($data) {
! return $pagehash;
! }
} else {
return -1;
***************
*** 80,93 ****
$filename = $dbi . "/" . $pagename;
! if($fd = fopen($filename, 'a')) {
$locked = flock($fd,2); #Exclusive blocking lock
if (!$locked) {
ExitWiki("Timeout while obtaining lock. Please try again");
! }
#Second (actually used) filehandle
! $fdsafe = fopen($filename, 'w');
! fwrite($fdsafe, $pagedata);
! fclose($fdsafe);
fclose($fd);
} else {
--- 83,101 ----
$filename = $dbi . "/" . $pagename;
! if($fd = fopen($filename, 'a+b')) {
$locked = flock($fd,2); #Exclusive blocking lock
if (!$locked) {
ExitWiki("Timeout while obtaining lock. Please try again");
! }
!
#Second (actually used) filehandle
! #$fdsafe = fopen($filename, 'wb');
! #fwrite($fdsafe, $pagedata);
! #fclose($fdsafe);
!
! rewind($fd);
! ftruncate($fd, 0);
! fwrite($fd, $pagedata);
fclose($fd);
} else {
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 02:05:31
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv22507/lib
Modified Files:
Tag: release-1_2-branch
db_filesystem.php
Log Message:
Remove debugging output cruft which should never have made it to the CVS
repository in the first place.
Index: db_filesystem.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/db_filesystem.php,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** db_filesystem.php 2001/08/18 00:35:10 1.4.2.1
--- db_filesystem.php 2001/08/18 02:05:28 1.4.2.2
***************
*** 192,198 ****
while (list($key, $page) = each($pos['data'])) {
$pagedata = RetrievePage($dbi, $page, $WikiPageStore);
- printf("Page: '%s' => '%s'<br>\n",
- htmlspecialchars($page),
- htmlspecialchars($pagedata));
while (list($i, $line) = each($pagedata['content'])) {
--- 192,195 ----
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 01:50:50
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv20005/lib
Modified Files:
Tag: release-1_2-branch
stdlib.php
Log Message:
Fixed SF Bug #414789
URLs like http://a.com/WikiWord were getting recognized as WikiWords
by ExtractWikiPageLinks, therefore resulting in erroneous entries
in the links table of those backends which have one.
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.21.2.4
retrieving revision 1.21.2.5
diff -C2 -r1.21.2.4 -r1.21.2.5
*** stdlib.php 2001/08/18 01:30:56 1.21.2.4
--- stdlib.php 2001/08/18 01:50:47 1.21.2.5
***************
*** 341,345 ****
function ExtractWikiPageLinks($content)
{
! global $WikiNameRegexp;
$wikilinks = array();
--- 341,345 ----
function ExtractWikiPageLinks($content)
{
! global $WikiNameRegexp, $AllowedProtocols;
$wikilinks = array();
***************
*** 361,364 ****
--- 361,368 ----
}
+ // Remove URLs (think about "http:a.b.com/WikiWords").
+ $line = preg_replace("/!?\b($AllowedProtocols):[^\s<>\[\]\"'()]*[^\s<>\[\]\"'(),.?]/",
+ ' ', $line);
+
// BumpyText old-style wiki links
if (preg_match_all("/!?$WikiNameRegexp/", $line, $link)) {
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 01:30:59
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv17527/lib
Modified Files:
Tag: release-1_2-branch
stdlib.php
Log Message:
Fix SF bug #418267.
Deeply nested lists resulted in a "Stack bounds exceeded in
SetHTMLOutputMode" fatal error. Now we just clamp the nesting
depth to 10 (eleven leading '*'s are treated as if there were
only ten of them.)
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.21.2.3
retrieving revision 1.21.2.4
diff -C2 -r1.21.2.3 -r1.21.2.4
*** stdlib.php 2001/03/02 21:26:03 1.21.2.3
--- stdlib.php 2001/08/18 01:30:56 1.21.2.4
***************
*** 183,187 ****
if ($level > 10) {
// arbitrarily limit tag nesting
! ExitWiki(gettext ("Nesting depth exceeded in SetHTMLOutputMode"));
}
--- 183,190 ----
if ($level > 10) {
// arbitrarily limit tag nesting
! //ExitWiki(gettext ("Nesting depth exceeded in SetHTMLOutputMode"));
! // Now, instead of crapping out when we encounter a deeply
! // nested list item, we just clamp the the maximum depth.
! $level = 10;
}
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/templates/browse.html,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -C2 -r1.9.2.1 -r1.9.2.2
*** browse.html 2001/06/14 00:39:55 1.9.2.1
--- browse.html 2001/08/18 00:35:10 1.9.2.2
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Unlock page</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Unlock page</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/locale/nl/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/locale/nl/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/locale/nl/templates/browse.html,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** browse.html 2001/06/14 00:39:55 1.3.2.1
--- browse.html 2001/08/18 00:35:10 1.3.2.2
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Unlock page</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Unlock page</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/locale/es/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/locale/es/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/locale/es/templates/browse.html,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -r1.3.2.2 -r1.3.2.3
*** browse.html 2001/07/17 21:35:37 1.3.2.2
--- browse.html 2001/08/18 00:35:10 1.3.2.3
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Desbloquear página</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Desbloquear página</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/locale/sv/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/locale/sv/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/locale/sv/templates/browse.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** browse.html 2001/06/14 00:39:55 1.1.2.1
--- browse.html 2001/08/18 00:35:10 1.1.2.2
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Lås upp sida</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Lås upp sida</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv8120/lib
Modified Files:
Tag: release-1_2-branch
db_filesystem.php dbalib.php dbmlib.php mysql.php pgsql.php
Added Files:
Tag: release-1_2-branch
backlinks.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.)
***** Error reading new file: [Errno 2] No such file or directory: 'backlinks.php'
Index: db_filesystem.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/db_filesystem.php,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** db_filesystem.php 2001/01/01 23:18:46 1.4
--- db_filesystem.php 2001/08/18 00:35:10 1.4.2.1
***************
*** 13,16 ****
--- 13,19 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, $res)
+ MakeBackLinkSearchRegexp($pagename)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
IncreaseHitCount($dbi, $pagename)
GetHitCount($dbi, $pagename)
***************
*** 152,155 ****
--- 155,207 ----
// new database features
+ // Compute PCRE suitable for searching for links to the given page.
+ function MakeBackLinkSearchRegexp($pagename) {
+ global $WikiNameRegexp;
+
+ // Note that in (at least some) PHP 3.x's, preg_quote only takes
+ // (at most) one argument. Also it doesn't quote '/'s.
+ // It does quote '='s, so we'll use that for the delimeter.
+ $quoted_pagename = preg_quote($pagename);
+ if (preg_match("/^$WikiNameRegexp\$/", $pagename)) {
+ # FIXME: This may need modification for non-standard (non-english) $WikiNameRegexp.
+ return "=(?<![A-Za-z0-9!])$quoted_pagename(?![A-Za-z0-9])=";
+ }
+ else {
+ // Note from author: Sorry. :-/
+ return ( '='
+ . '(?<!\[)\[(?!\[)' // Single, isolated '['
+ . '([^]|]*\|)?' // Optional stuff followed by '|'
+ . '\s*' // Optional space
+ . $quoted_pagename // Pagename
+ . '\s*\]=' ); // Optional space, followed by ']'
+ // FIXME: the above regexp is still not quite right.
+ // Consider the text: " [ [ test page ]". This is a link to a page
+ // named '[ test page'. The above regexp will recognize this
+ // as a link either to '[ test page' (good) or to 'test page' (wrong).
+ }
+ }
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ return InitTitleSearch($dbi, MakeBackLinkSearchRegexp($pagename));
+ }
+
+ // iterating through back-links
+ function BackLinkSearchNextMatch($dbi, &$pos) {
+ global $WikiPageStore;
+ while (list($key, $page) = each($pos['data'])) {
+ $pagedata = RetrievePage($dbi, $page, $WikiPageStore);
+ printf("Page: '%s' => '%s'<br>\n",
+ htmlspecialchars($page),
+ htmlspecialchars($pagedata));
+
+ while (list($i, $line) = each($pagedata['content'])) {
+ if (preg_match($pos['search'], $line))
+ return $page;
+ }
+ }
+ return 0;
+ }
+
function IncreaseHitCount($dbi, $pagename) {
return;
***************
*** 226,234 ****
function GetAllWikiPagenames($dbi) {
$namelist = array();
! $d = opendir($dbi);
! $curr = 0;
! while($entry = readdir($d)) {
! $namelist[$curr++] = $entry;
! }
return $namelist;
--- 278,286 ----
function GetAllWikiPagenames($dbi) {
$namelist = array();
! $d = opendir($dbi);
! while($entry = readdir($d)) {
! if ($entry != '.' && $entry != '..')
! $namelist[] = $entry;
! }
return $namelist;
Index: dbalib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/dbalib.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** dbalib.php 2001/01/31 02:01:27 1.2
--- dbalib.php 2001/08/18 00:35:10 1.2.2.1
***************
*** 19,22 ****
--- 19,25 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, &$pos)
+ MakeBackLinkSearchRegexp($pagename)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
IncreaseHitCount($dbi, $pagename)
GetHitCount($dbi, $pagename)
***************
*** 173,177 ****
--- 176,227 ----
// new database features
+ // Compute PCRE suitable for searching for links to the given page.
+ function MakeBackLinkSearchRegexp($pagename) {
+ global $WikiNameRegexp;
+
+ $quoted_pagename = preg_quote($pagename, '/');
+ if (preg_match("/^$WikiNameRegexp\$/", $pagename)) {
+ // FIXME: This may need modification for non-standard (non-english) $WikiNameRegexp.
+ return "/(?<![A-Za-z0-9!])$quoted_pagename(?![A-Za-z0-9])/";
+ }
+ else {
+ // Note from author: Sorry. :-/
+ return ( '/'
+ . '(?<!\[)\[(?!\[)' // Single, isolated '['
+ . '([^]|]*\|)?' // Optional stuff followed by '|'
+ . '\s*' // Optional space
+ . $quoted_pagename // Pagename
+ . '\s*\]/' ); // Optional space, followed by ']'
+ // FIXME: the above regexp is still not quite right.
+ // Consider the text: " [ [ test page ]". This is a link to a page
+ // named '[ test page'. The above regexp will recognize this
+ // as a link either to '[ test page' (good) or to 'test page' (wrong).
+ }
+ }
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ return InitTitleSearch($dbi, MakeBackLinkSearchRegexp($pagename));
+ }
+ // iterating through back-links
+ function BackLinkSearchNextMatch($dbi, &$pos) {
+ while ($pos['key']) {
+ $page = $pos['key'];
+ $pos['key'] = dba_nextkey($dbi['wiki']);
+
+ $rawdata = dba_fetch($page, $dbi['wiki']);
+ if ( ! preg_match($pos['search'], $rawdata))
+ continue;
+
+ $pagedata = unserialize(UnPadSerializedData($rawdata));
+ while (list($i, $line) = each($pagedata['content'])) {
+ if (preg_match($pos['search'], $line))
+ return $page;
+ }
+ }
+ return 0;
+ }
+
function IncreaseHitCount($dbi, $pagename) {
***************
*** 201,205 ****
}
-
function InitMostPopular($dbi, $limit) {
// iterate through the whole dbm file for hit counts
--- 251,254 ----
***************
*** 255,257 ****
}
! ?>
\ No newline at end of file
--- 304,306 ----
}
! ?>
Index: dbmlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/dbmlib.php,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** dbmlib.php 2001/01/31 03:11:25 1.7
--- dbmlib.php 2001/08/18 00:35:10 1.7.2.1
***************
*** 16,19 ****
--- 16,22 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, $res)
+ MakeBackLinkSearchRegexp($pagename)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
IncreaseHitCount($dbi, $pagename)
GetHitCount($dbi, $pagename)
***************
*** 210,213 ****
--- 213,267 ----
////////////////////////
// new database features
+
+ // Compute PCRE suitable for searching for links to the given page.
+ function MakeBackLinkSearchRegexp($pagename) {
+ global $WikiNameRegexp;
+
+ // Note that in (at least some) PHP 3.x's, preg_quote only takes
+ // (at most) one argument. Also it doesn't quote '/'s.
+ // It does quote '='s, so we'll use that for the delimeter.
+ $quoted_pagename = preg_quote($pagename);
+ if (preg_match("/^$WikiNameRegexp\$/", $pagename)) {
+ # FIXME: This may need modification for non-standard (non-english) $WikiNameRegexp.
+ return "=(?<![A-Za-z0-9!])$quoted_pagename(?![A-Za-z0-9])=";
+ }
+ else {
+ // Note from author: Sorry. :-/
+ return ( '='
+ . '(?<!\[)\[(?!\[)' // Single, isolated '['
+ . '([^]|]*\|)?' // Optional stuff followed by '|'
+ . '\s*' // Optional space
+ . $quoted_pagename // Pagename
+ . '\s*\]=' ); // Optional space, followed by ']'
+ // FIXME: the above regexp is still not quite right.
+ // Consider the text: " [ [ test page ]". This is a link to a page
+ // named '[ test page'. The above regexp will recognize this
+ // as a link either to '[ test page' (good) or to 'test page' (wrong).
+ }
+ }
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ return InitTitleSearch($dbi, MakeBackLinkSearchRegexp($pagename));
+ }
+
+ // iterating through back-links
+ function BackLinkSearchNextMatch($dbi, &$pos) {
+ while ($pos['key']) {
+ $page = $pos['key'];
+ $pos['key'] = dbmnextkey($dbi['wiki'], $pos['key']);
+
+ $rawdata = dbmfetch($dbi['wiki'], $page);
+ if ( ! preg_match($pos['search'], $rawdata))
+ continue;
+
+ $pagedata = unserialize(UnPadSerializedData($rawdata));
+ while (list($i, $line) = each($pagedata['content'])) {
+ if (preg_match($pos['search'], $line))
+ return $page;
+ }
+ }
+ return 0;
+ }
function IncreaseHitCount($dbi, $pagename) {
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/mysql.php,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -r1.10 -r1.10.2.1
*** mysql.php 2001/01/04 18:37:56 1.10
--- mysql.php 2001/08/18 00:35:10 1.10.2.1
***************
*** 20,23 ****
--- 20,25 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, $res)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
InitMostPopular($dbi, $limit)
MostPopularNextMatch($dbi, $res)
***************
*** 262,265 ****
--- 264,291 ----
}
}
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ global $WikiLinksStore;
+
+ $topage = addslashes($pagename);
+ $res = mysql_query( "SELECT DISTINCT frompage FROM $WikiLinksStore"
+ . " WHERE topage='$topage'"
+ . " ORDER BY frompage",
+ $dbi["dbc"]);
+ return $res;
+ }
+
+
+ // iterating through database
+ function BackLinkSearchNextMatch($dbi, $res) {
+ if($a = mysql_fetch_row($res)) {
+ return $a[0];
+ }
+ else {
+ return 0;
+ }
+ }
+
function InitMostPopular($dbi, $limit) {
Index: pgsql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/pgsql.php,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** pgsql.php 2000/11/02 04:23:59 1.4
--- pgsql.php 2001/08/18 00:35:10 1.4.2.1
***************
*** 16,19 ****
--- 16,21 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, $res)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
IncreaseHitCount($dbi, $pagename)
GetHitCount($dbi, $pagename)
***************
*** 289,292 ****
--- 291,317 ----
////////////////////////
// new database features
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ global $WikiLinksPageStore;
+
+ $topage = addslashes($pagename);
+ $res['res'] = pg_exec( $dbi["dbc"], ( "SELECT DISTINCT frompage FROM $WikiLinksPageStore"
+ . " WHERE topage='$topage'"
+ . " ORDER BY frompage" ));
+ $res['row'] = 0;
+ return $res;
+ }
+
+
+ // iterating through database
+ function BackLinkSearchNextMatch($dbi, $res) {
+ if($a = @pg_fetch_row($res['res'], $res['row']++)) {
+ return $a[0];
+ }
+ else {
+ return 0;
+ }
+ }
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:14
|
Update of /cvsroot/phpwiki/phpwiki/locale/de/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/locale/de/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/locale/de/templates/browse.html,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** browse.html 2001/06/14 00:39:55 1.3.2.1
--- browse.html 2001/08/18 00:35:10 1.3.2.2
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Seite freigeben</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Seite freigeben</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:13
|
Update of /cvsroot/phpwiki/phpwiki/locale/it/templates
In directory usw-pr-cvs1:/tmp/cvs-serv8120/locale/it/templates
Modified Files:
Tag: release-1_2-branch
browse.html
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: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/locale/it/templates/browse.html,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** browse.html 2001/06/14 00:39:55 1.1.2.2
--- browse.html 2001/08/18 00:35:10 1.1.2.3
***************
*** 7,11 ****
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?full=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Sblocca la pagina</a>]
--- 7,11 ----
<body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta>
<h1><a href="###SCRIPTURL###"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a>
! <a href="###SCRIPTURL###?refs=###PAGEURL###">###PAGE###</a></h1>
###IF:ADMIN###
###IF LOCK###[<a href="###SCRIPTURL###?unlock=###PAGEURL###">Sblocca la pagina</a>]
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:35:12
|
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";
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-18 00:34:30
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv8023/lib
Modified Files:
Tag: release-1_2-branch
msql.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.)
The msql back-link search is a bit buggy, and will not find links
if they are split between two records ("lines") in the page store.
(The proper remedy for this is to implement the links table in
the msql back end.)
Index: msql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/msql.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** msql.php 2001/02/01 04:24:26 1.6
--- msql.php 2001/08/18 00:34:27 1.6.2.1
***************
*** 16,19 ****
--- 16,22 ----
InitFullSearch($dbi, $search)
FullSearchNextMatch($dbi, &$pos)
+ MakeBackLinkSearchRegexp($pagename)
+ InitBackLinkSearch($dbi, $pagename)
+ BackLinkSearchNextMatch($dbi, &$pos)
GetAllWikiPageNames($dbi)
*/
***************
*** 389,392 ****
--- 392,456 ----
// new database features
+ // Compute PCRE suitable for searching for links to the given page.
+ function MakeBackLinkSearchRegexp($pagename) {
+ global $WikiNameRegexp;
+
+ // Note that in (at least some) PHP 3.x's, preg_quote only takes
+ // (at most) one argument. Also it doesn't quote '/'s.
+ // It does quote '='s, so we'll use that for the delimeter.
+ $quoted_pagename = preg_quote($pagename);
+ if (preg_match("/^$WikiNameRegexp\$/", $pagename)) {
+ # FIXME: This may need modification for non-standard (non-english) $WikiNameRegexp.
+ return "=(?<![A-Za-z0-9!])$quoted_pagename(?![A-Za-z0-9])=";
+ }
+ else {
+ // Note from author: Sorry. :-/
+ return ( '='
+ . '(?<!\[)\[(?!\[)' // Single, isolated '['
+ . '([^]|]*\|)?' // Optional stuff followed by '|'
+ . '\s*' // Optional space
+ . $quoted_pagename // Pagename
+ . '\s*\]=' ); // Optional space, followed by ']'
+ // FIXME: the above regexp is still not quite right.
+ // Consider the text: " [ [ test page ]". This is a link to a page
+ // named '[ test page'. The above regexp will recognize this
+ // as a link either to '[ test page' (good) or to 'test page' (wrong).
+ }
+ }
+
+ // setup for back-link search
+ function InitBackLinkSearch($dbi, $pagename) {
+ global $WikiLinksStore;
+
+ $topage = addslashes($pagename);
+
+ // FIXME: this is buggy. If a [multiword link] is split accross
+ // multiple lines int the page_table, we wont find it.
+ // (Probably the best fix is to implement the link table, and use it.)
+ $res['regexp'] = MakeBackLinkSearchRegexp($pagename);
+ $res['res'] = msql_query( "SELECT pagename, line FROM $dbi[page_table]"
+ . " WHERE line LIKE '%$topage%'"
+ . " ORDER BY pagename",
+ $dbi["dbc"]);
+ $res['lastpage'] = '';
+
+ return $res;
+ }
+
+
+ // iterating through database
+ function BackLinkSearchNextMatch($dbi, $res) {
+ while (true) {
+ if ( ! ($o = msql_fetch_object($res['res']))) {
+ return 0;
+ }
+ if ( $res['lastpage'] == $o->pagename )
+ continue;
+ if ( ! preg_match($res['regexp'], $a->line) )
+ continue;
+ $res['lastpage'] = $o->pagename;
+ return $o->pagename;
+ }
+ }
function IncreaseHitCount($dbi, $pagename) {
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-14 21:41:12
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv23003/lib
Modified Files:
userauth.php
Log Message:
(WikiUser::getPreferences): More fixes to address PHP warnings.
Index: userauth.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/userauth.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** userauth.php 2001/08/09 16:21:44 1.8
--- userauth.php 2001/08/14 21:41:10 1.9
***************
*** 102,110 ****
global $HTTP_COOKIE_VARS;
! if (is_string($HTTP_COOKIE_VARS['WIKI_PREFS'])) {
! $prefcookie = unserialize(fix_magic_quotes_gpc($HTTP_COOKIE_VARS['WIKI_PREFS']));
! while (list($k, $v) = each($prefs))
! if (!empty($prefcookie[$k]))
! $prefs[$k] = $prefcookie[$k];
}
--- 102,115 ----
global $HTTP_COOKIE_VARS;
! if (isset($HTTP_COOKIE_VARS['WIKI_PREFS'])) {
! $prefcookie = $HTTP_COOKIE_VARS['WIKI_PREFS'];
! if (is_string($prefcookie)) {
! $prefcookie = unserialize(fix_magic_quotes_gpc($prefcookie));
! if (is_array($prefcookie)) {
! while (list($k, $v) = each($prefs))
! if (!empty($prefcookie[$k]))
! $prefs[$k] = $prefcookie[$k];
! }
! }
}
|
|
From: Steve W. <wai...@us...> - 2001-08-12 23:57:40
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6266
Modified Files:
stdlib.php
Log Message:
Undefined links will now have a question mark at the start instead of
at the end of the link; this idea comes from the book The Wiki Way and
it's supposed to be a bit clearer to the user.
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** stdlib.php 2001/06/26 18:08:32 1.40
--- stdlib.php 2001/08/12 23:57:37 1.41
***************
*** 158,166 ****
return Element('span', array('class' => 'wikiunknown'),
! Element('u', $linktext) .
! QElement('a',
! array('href' => WikiURL($wikiword, array('action' => 'edit')),
! 'class' => 'wikiunknown'),
! '?'));
}
--- 158,164 ----
return Element('span', array('class' => 'wikiunknown'),
! QElement('a', array('href' => WikiURL($wikiword, array('action' => 'edit')),'class' => 'wikiunknown'),'?')
! . Element('u', $linktext)
! );
}
|
|
From: Geoffrey T. D. <da...@us...> - 2001-08-09 16:21:47
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1190/lib
Modified Files:
userauth.php
Log Message:
Fix for PHP warning: "argument passed to unserialize() is not an string".
Index: userauth.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/userauth.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** userauth.php 2001/07/20 17:40:12 1.7
--- userauth.php 2001/08/09 16:21:44 1.8
***************
*** 101,109 ****
'edit_area.height' => 22);
! $prefcookie = unserialize(fix_magic_quotes_gpc($GLOBALS['WIKI_PREFS']));
!
! while (list($k, $v) = each($prefs))
! if (!empty($prefcookie[$k]))
! $prefs[$k] = $prefcookie[$k];
// Some sanity checks. (FIXME: should move somewhere else)
--- 101,111 ----
'edit_area.height' => 22);
! global $HTTP_COOKIE_VARS;
! if (is_string($HTTP_COOKIE_VARS['WIKI_PREFS'])) {
! $prefcookie = unserialize(fix_magic_quotes_gpc($HTTP_COOKIE_VARS['WIKI_PREFS']));
! while (list($k, $v) = each($prefs))
! if (!empty($prefcookie[$k]))
! $prefs[$k] = $prefcookie[$k];
! }
// Some sanity checks. (FIXME: should move somewhere else)
|
|
From: Geoffrey T. D. <da...@us...> - 2001-07-20 17:40:15
|
Update of /cvsroot/phpwiki/phpwiki/templates
In directory usw-pr-cvs1:/tmp/cvs-serv1029/templates
Modified Files:
browse.html
Log Message:
Added support for bogo-logins.
One can now "login" using any WikiWord as a user ID.
(Unless logging in as the admin user, any password will work.)
Currently, the sole effect of logging in is that the
the logged-in user ID is recorded as the author of any
page edits. Thus, "logging in" allows one to control
the author which appears in RecentChanges and the page
info display.
Index: browse.html
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/templates/browse.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** browse.html 2001/06/26 18:13:00 1.18
--- browse.html 2001/07/20 17:40:12 1.19
***************
*** 16,19 ****
--- 16,20 ----
href="###ACTION###search&searchtype=full&searchterm=###PAGEURL###"
><span class='wikiword'>###PAGE###</span></a></h1>
+
###IF:!ANONYMOUS###
<p>You are logged in as <em>###USERID###</em>.
***************
*** 27,30 ****
--- 28,38 ----
<hr noshade>
###ENDIF:!ANONYMOUS###
+
+ ###IF:ANONYMOUS###
+ If you would like to, you may
+ <a class="wikiaction" href="###ACTION###login">log in</a>
+ (use any WikiWord as a user ID, any password.)</p>
+ ###ENDIF:ANONYMOUS###
+
<table class="outer" width="100%" cellspacing=2 border=0>
<tr><td><table class="inner" width="100%" border=0 cellspacing=0 cellpadding=5>
|
|
From: Geoffrey T. D. <da...@us...> - 2001-07-20 17:40:15
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1029/lib
Modified Files:
userauth.php
Log Message:
Added support for bogo-logins.
One can now "login" using any WikiWord as a user ID.
(Unless logging in as the admin user, any password will work.)
Currently, the sole effect of logging in is that the
the logged-in user ID is recorded as the author of any
page edits. Thus, "logging in" allows one to control
the author which appears in RecentChanges and the page
info display.
Index: userauth.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/userauth.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** userauth.php 2001/05/31 17:43:05 1.6
--- userauth.php 2001/07/20 17:40:12 1.7
***************
*** 137,146 ****
function _get_http_authenticated_userid () {
global $PHP_AUTH_USER, $PHP_AUTH_PW;
!
! if (empty($PHP_AUTH_USER) || empty($PHP_AUTH_PW))
return false;
! if (($PHP_AUTH_USER != ADMIN_USER) || ($PHP_AUTH_PW != ADMIN_PASSWD))
return false;
return $PHP_AUTH_USER;
--- 137,155 ----
function _get_http_authenticated_userid () {
global $PHP_AUTH_USER, $PHP_AUTH_PW;
! global $WikiNameRegexp;
!
! if (empty($PHP_AUTH_USER))
return false;
! if ($PHP_AUTH_USER == ADMIN_USER) {
! if (empty($PHP_AUTH_PW) || $PHP_AUTH_PW != ADMIN_PASSWD)
! return false;
! }
! else if (! ALLOW_BOGO_LOGIN) {
! return false;
! }
! else if (! preg_match('/\A' . $WikiNameRegexp . '\z/', $PHP_AUTH_USER)) {
return false;
+ }
return $PHP_AUTH_USER;
***************
*** 164,168 ****
if (ACCESS_LOG)
$LogEntry->status = 401;
! echo gettext ("You entered an invalid login or password.");
ExitWiki();
}
--- 173,183 ----
if (ACCESS_LOG)
$LogEntry->status = 401;
! echo "<p>" . gettext ("You entered an invalid login or password.") . "\n";
! if (ALLOW_BOGO_LOGIN) {
! echo "<p>";
! echo gettext ("You can log in using any valid WikiWord as a user ID.") . "\n";
! echo gettext ("(Any password will work, except, of course for the admin user.)") . "\n";
! }
!
ExitWiki();
}
|
|
From: Geoffrey T. D. <da...@us...> - 2001-07-20 17:40:15
|
Update of /cvsroot/phpwiki/phpwiki
In directory usw-pr-cvs1:/tmp/cvs-serv1029
Modified Files:
index.php
Log Message:
Added support for bogo-logins.
One can now "login" using any WikiWord as a user ID.
(Unless logging in as the admin user, any password will work.)
Currently, the sole effect of logging in is that the
the logged-in user ID is recorded as the author of any
page edits. Thus, "logging in" allows one to control
the author which appears in RecentChanges and the page
info display.
Index: index.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/index.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** index.php 2001/07/12 03:49:05 1.19
--- index.php 2001/07/20 17:40:12 1.20
***************
*** 61,64 ****
--- 61,70 ----
define('ACCESS_LOG', '/tmp/wiki_access_log');
+
+ // If ALLOW_BOGO_LOGIN is true, users are allowed to login
+ // (with any/no password) using any userid which: 1) is not
+ // the ADMIN_USER, 2) is a valid WikiWord (matches $WikiNameRegexp.)
+ define('ALLOW_BOGO_LOGIN', true);
+
/////////////////////////////////////////////////////////////////////
//
|
|
From: Steve W. <wai...@us...> - 2001-07-20 17:29:47
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv31972 Added Files: PhpWikiDatabase.php Log Message: Initial file for an abstract base class. For now I copy/pasted the methods suggested in WikiDatabase (http://phpwiki.sourceforge.net/phpwiki/index.php) as a starting point, though there were a few that were undecided and I left those out. At least for now the class can support retrievePage() and insertPage() and a few other basic methods, so rudimentary work can start. The flowerbox reads: /* * Abstract base class for the database used by PhpWiki. * This should be extended by classes for DB/dbx, dba and * flat file. */ ***** Error reading new file: [Errno 2] No such file or directory: 'PhpWikiDatabase.php' |