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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
(1) |
10
|
11
|
12
(1) |
13
|
14
(1) |
15
|
16
|
17
|
18
(18) |
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
(6) |
27
(1) |
28
|
29
|
30
|
31
|
|
Update of /cvsroot/phpwiki/phpwiki In directory usw-pr-cvs1:/tmp/cvs-serv20354 Modified Files: Tag: release-1_2-branch INSTALL.flatfile Log Message: updated my email address. Index: INSTALL.flatfile =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.flatfile,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -r1.2 -r1.2.2.1 *** INSTALL.flatfile 2001年02月01日 04:34:08 1.2 --- INSTALL.flatfile 2001年08月27日 03:55:13 1.2.2.1 *************** *** 128,132 **** Steve Wainstead ! sw...@wc... $Id$ --- 128,132 ---- Steve Wainstead ! sw...@pa... $Id$
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv22192 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Had to revert... the phpwiki: placeholder inserts index.phpadmin.php as a result. This is good enough for now. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -r1.2.2.3 -r1.2.2.4 *** PhpWikiAdministration 2001年08月26日 17:07:19 1.2.2.3 --- PhpWikiAdministration 2001年08月26日 17:11:53 1.2.2.4 *************** *** 1,5 **** !!! This works only if you are logged in as ADMIN. ! [ Login as admin | phpwiki:admin.php ] ! ----------- --- 1,4 ---- !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. -----------
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv21472 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Correction... made proper link to admin.php. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -r1.2.2.2 -r1.2.2.3 *** PhpWikiAdministration 2001年08月26日 17:03:30 1.2.2.2 --- PhpWikiAdministration 2001年08月26日 17:07:19 1.2.2.3 *************** *** 1,4 **** !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. ----------- --- 1,5 ---- !!! This works only if you are logged in as ADMIN. ! [ Login as admin | phpwiki:admin.php ] ! -----------
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv20809 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Added line pointing to (but not linking to) the admin.php page. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -r1.2.2.1 -r1.2.2.2 *** PhpWikiAdministration 2001年02月08日 18:28:31 1.2.2.1 --- PhpWikiAdministration 2001年08月26日 17:03:30 1.2.2.2 *************** *** 1,3 **** ! !!! This works only if you are logged in as ADMIN ----------- --- 1,4 ---- ! !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. -----------
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv20246 Modified Files: TextFormattingRules Log Message: Fixed some bugs in the page source in the "Emphasis" section. Index: TextFormattingRules =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/TextFormattingRules,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** TextFormattingRules 2001年04月06日 18:21:37 1.13 --- TextFormattingRules 2001年08月26日 17:00:50 1.14 *************** *** 32,36 **** !Indented Paragraphs - ''(Quotes)'' * semicolon-colon -- works like <BLOCKQUOTE> --- 32,35 ---- *************** *** 40,45 **** ! Emphasis ! * Use doubled single-quotes ('') for emphasis (usually ''italics'') ! * Use doubled underscores (__) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: --- 39,44 ---- ! Emphasis ! * Use doubled single-quotes ('____') for emphasis (usually ''italics'') ! * Use doubled underscores (_''''_) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: *************** *** 51,76 **** * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | HomePage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * You can create footnotes by using [[1], [[2], [[3], ... like this here [1]. See footnote for counterpart. (If the [[ is in the first column, it is a footnote ''definition'' rather than a footnote ''reference'' [1].) * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] - ! Tables - * Simple tables are available. A table row is introduced by a __|__ in the first column. It is best described by example: - || _''''_Name_''''_ |v _''''_Cost_''''_ |v _''''_Notes_''''_ - | _''''_First_''''_ | _''''_Last_''''_ - |> Jeff |< Dairiki |^ Cheap |< Not worth it - |> Marco |< Polo | Cheaper |< Not available - ;: will generate - || __Name__ |v __Cost__ |v __Notes__ - | __First__ | __Last__ - |> Jeff |< Dairiki |^ Cheap |< Not worth it - |> Marco |< Polo | Cheaper |< Not available - - ;: Note that multiple __|__'s lead to spanned columns, and __v__'s can be used to span rows. A __>__ generates a right justified column, __<__ a left justified column and __^__ a centered column (which is the default.) - - ! HTML Mark-Up Language --- 50,60 ---- * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | FrontPage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * [1], [2], [3], [4] refer to remote references. Click EditLinks on the edit form to enter URLs. These differ from the newer linking scheme; references are unique to a page. * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] ! HTML Mark-Up Language *************** *** 79,91 **** * The & characters will not work * If you really must use HTML, your system administrator can enable this feature. Start each line with a bar (|). Note that this feature is disabled by default. - - ! More detail than you want to know - - See [MagicPhpWikiURLs] for gory details on how to write - various kind of wiki maintainance links. - - ----- - - Footnotes: - - [1] By using [[1] a second time (in the first column) the footnote itself is ''defined''. You may refer to a footnote as many times as you want, but you may only define it once on the page. Note the the [[1] in the footnote links back to the first reference, if there are multiple references there will be +'s after the [[1] which will link to the other references. (References which come ''after'' the footnote ''definition'' will not be linked to.) --- 63,64 ----
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv17267 Modified Files: Tag: release-1_2-branch RecentChanges Log Message: Added PhpWikiAdministration to RecentChanges... this list should be dynamic however. For that matter I'd rather have a totally automated RecentChanges like UseMod does. Index: RecentChanges =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/Attic/RecentChanges,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -r1.14 -r1.14.2.1 *** RecentChanges 2000年11月06日 16:14:43 1.14 --- RecentChanges 2001年08月26日 16:44:28 1.14.2.1 *************** *** 12,15 **** --- 12,16 ---- * [MostPopular] * [PhpWiki] + * [PhpWikiAdministration] * [RecentChanges] * [RecentVisitors]
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv17112 Modified Files: Tag: release-1_2-branch TextFormattingRules Log Message: Fixed bug in the page source; the "Emphasis" section was not rendering correctly. Index: TextFormattingRules =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/TextFormattingRules,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -r1.8.2.1 -r1.8.2.2 *** TextFormattingRules 2001年02月08日 18:28:31 1.8.2.1 --- TextFormattingRules 2001年08月26日 16:43:08 1.8.2.2 *************** *** 32,36 **** !Indented Paragraphs - ''(Quotes)'' * semicolon-colon -- works like <BLOCKQUOTE> --- 32,35 ---- *************** *** 40,45 **** ! Emphasis ! * Use doubled single-quotes ('') for emphasis (usually ''italics'') ! * Use doubled underscores (__) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: --- 39,44 ---- ! Emphasis ! * Use doubled single-quotes ('____') for emphasis (usually ''italics'') ! * Use doubled underscores (_''''_) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries:
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; }
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.
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)
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;
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.
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 {
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 ----
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)) {
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; }
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>]
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>]
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>]
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>]
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; + } + }
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>]
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>]
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";
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) {