You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(107) |
Feb
(48) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
(29) |
Jul
(14) |
Aug
(9) |
Sep
(34) |
Oct
(14) |
Nov
(6) |
Dec
(18) |
2004 |
Jan
|
Feb
(4) |
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(43) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2007 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Even H. <ho...@us...> - 2003-06-30 10:27:22
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv32210 Modified Files: transforms.php save.php Log Message: Something strange with sticky options... Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- transforms.php 22 Feb 2002 14:46:09 -0000 1.25 +++ transforms.php 30 Jun 2003 10:27:16 -0000 1.26 @@ -164,6 +164,12 @@ "macro_token(q1('\\1'), q1('\\3'))", $text, -1); } +function parse_no_macros($text) +{ + return preg_replace('/\\[\\[([^] ]+( [^]]+)?)]]/e', + "", $text, -1); +} + function macro_token($macro, $trail) { global $ViewMacroEngine; Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/save.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- save.php 22 Feb 2002 14:46:08 -0000 1.5 +++ save.php 30 Jun 2003 10:27:16 -0000 1.6 @@ -25,7 +25,7 @@ { $elements_index = $i; } } if($macros_index != -1) - { $ParseEngine[$macros_index] = 'parse_noop'; } + { $ParseEngine[$macros_index] = 'parse_no_macros'; } if($transclude_index != -1) { $ParseEngine[$transclude_index] = 'parse_noop'; } if($elements_index != -1) @@ -89,7 +89,7 @@ $called = 1; } - if(preg_match('/^\\*SisterWiki:\\s+([A-Z][A-Za-z]+)\s+(http:[^\\s]+)/', + if(preg_match('/^\\*SisterWiki:\\s+\!?([A-Za-z]+)\s+(https?:[^\\s]+)/', $text, $result)) { $pagestore->new_sisterwiki($page, $result[1], $result[2]); |
From: Even H. <ho...@us...> - 2003-06-30 10:00:11
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1:/tmp/cvs-serv29128 Modified Files: Tag: release-v0_22-bugfix-branch ChangeLog.txt Log Message: 2003-06-30 Even Holen <eve...@pv...> * parse/transforms.php and parse/save.php: Removed fixed regarding parse_clear which removed all text. Inserted parse_no_macros instead * Fixed sisterwiki-definition like interwiki's below Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -d -r1.6.2.1 -r1.6.2.2 --- ChangeLog.txt 29 Jun 2003 18:34:13 -0000 1.6.2.1 +++ ChangeLog.txt 30 Jun 2003 10:00:05 -0000 1.6.2.2 @@ -2,6 +2,10 @@ WikkiTikkiTavi - ChangeLog -------------------------- +2003-06-30 Even Holen <eve...@pv...> + * parse/transforms.php and parse/save.php: Removed fixed regarding + parse_clear which removed all text. Inserted parse_no_macros instead + * Fixed sisterwiki-definition like interwiki's below 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: |
From: Even H. <ho...@us...> - 2003-06-29 18:34:16
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv4755/lib Modified Files: Tag: release-v0_22-bugfix-branch db.php defaults.php diff.php pagestore.php Log Message: 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: - In WantedPages changed sql-query (having => where) to make it work with mysql 4.0.0alpha (and later on) - Added warning of deletion on empty pages in OrphanedPages-macro * lib/diff.php: Detect if we're running on Windows, and then use rand() instead of posix_getpid(). * templates/common.php: Added a div#toolbar_top around the toolbar * templates/wiki.css: Added a display:none for div#toolbar_top on media:print to disable printing of menu. Also added a clear:both to the hr in div#header so that one might right-justify the image in the header without it being below the line. * parse/transforms.php: - Allow white space around <code>/</code> - Added assertion to interwiki-regexp to allow interwiki-links to appear next to each other - Added parse_clear() in addition to parse_noop() to be able to remove text in parse_define_links * parse/save.php: - Allowed escaping InterWiki-entries with !, allowing start with a lowercase character, and allowing https:-links as InterWiki-entries. - Changed parse_noop to parse_clear in parse_define_links to avoid using macro names in the link tables (and thus from appearing on WantedPages if not defined) * lib/db.php: Include error message in error output in query(). NOTE! This should be extended/enhanced for all the db-functions... * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff Index: db.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/db.php,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -u -d -r1.3 -r1.3.4.1 --- db.php 30 Nov 2001 22:10:15 -0000 1.3 +++ db.php 29 Jun 2003 18:34:13 -0000 1.3.4.1 @@ -28,7 +28,7 @@ global $ErrorDatabaseQuery; if(!($qid = mysql_query($text, $this->handle))) - { die($ErrorDatabaseQuery); } + { die("<strong>$ErrorDatabaseQuery</strong><p>$text</p>"); } return $qid; } Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -d -r1.5 -r1.5.2.1 --- defaults.php 22 Feb 2002 14:46:08 -0000 1.5 +++ defaults.php 29 Jun 2003 18:34:13 -0000 1.5.2.1 @@ -18,8 +18,8 @@ // Note that changing this might require a change to parse/transforms.php so // that parse_wikiname knows how many parentheses are included in $LinkPtn. $UpperPtn = "[A-Z\xc0-\xde]"; -$LowerPtn = "[a-z\xdf-\xff]"; -$AlphaPtn = "[A-Za-z\xc0-\xff]"; +$LowerPtn = "[a-z\xdf-\xfe]"; +$AlphaPtn = "[A-Za-z\xc0-\xfe]"; $LinkPtn = $UpperPtn . $AlphaPtn . '*' . $LowerPtn . '+' . $UpperPtn . $AlphaPtn . '*(\\/' . $UpperPtn . $AlphaPtn . '*)?'; Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/diff.php,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -u -d -r1.5 -r1.5.4.1 --- diff.php 9 Jan 2002 21:48:46 -0000 1.5 +++ diff.php 29 Jun 2003 18:34:13 -0000 1.5.4.1 @@ -6,8 +6,11 @@ { global $TempDir, $DiffCmd, $ErrorCreatingTemp, $ErrorWritingTemp; - $num = posix_getpid(); // Comment if running on Windows. - // $num = rand(); // Uncomment if running on Windows. + if (isset ( $_SERVER["WINDIR"])){ + $num = rand(); // If running on Windows + } else { + $num = posix_getpid(); // If not running on Windows + } $temp1 = $TempDir . '/wiki_' . $num . '_1.txt'; $temp2 = $TempDir . '/wiki_' . $num . '_2.txt'; Index: pagestore.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/pagestore.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -d -r1.5 -r1.5.2.1 --- pagestore.php 22 Feb 2002 14:46:08 -0000 1.5 +++ pagestore.php 29 Jun 2003 18:34:13 -0000 1.5.2.1 @@ -55,7 +55,7 @@ $qid = $this->dbh->query("SELECT time, author, version, username, " . "comment " . "FROM $PgTbl WHERE title='$page' " . - "ORDER BY version DESC"); + "ORDER BY version DESC"); $list = array(); while(($result = $this->dbh->result($qid))) @@ -148,11 +148,14 @@ { $this->dbh->query("UPDATE $IwTbl SET where_defined='$where_defined', " . "url='$url' WHERE prefix='$prefix'"); + echo "<pre>InterWikiUpd: $prefix, $where_defined, $url</pre>\n"; } else { $this->dbh->query("INSERT INTO $IwTbl(prefix, where_defined, url) " . "VALUES('$prefix', '$where_defined', '$url')"); + + echo "<pre>InterWiki: $prefix, $where_defined, $url</pre>\n"; } } |
From: Even H. <ho...@us...> - 2003-06-29 18:34:16
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv4755/parse Modified Files: Tag: release-v0_22-bugfix-branch macros.php save.php transforms.php Log Message: 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: - In WantedPages changed sql-query (having => where) to make it work with mysql 4.0.0alpha (and later on) - Added warning of deletion on empty pages in OrphanedPages-macro * lib/diff.php: Detect if we're running on Windows, and then use rand() instead of posix_getpid(). * templates/common.php: Added a div#toolbar_top around the toolbar * templates/wiki.css: Added a display:none for div#toolbar_top on media:print to disable printing of menu. Also added a clear:both to the hr in div#header so that one might right-justify the image in the header without it being below the line. * parse/transforms.php: - Allow white space around <code>/</code> - Added assertion to interwiki-regexp to allow interwiki-links to appear next to each other - Added parse_clear() in addition to parse_noop() to be able to remove text in parse_define_links * parse/save.php: - Allowed escaping InterWiki-entries with !, allowing start with a lowercase character, and allowing https:-links as InterWiki-entries. - Changed parse_noop to parse_clear in parse_define_links to avoid using macro names in the link tables (and thus from appearing on WantedPages if not defined) * lib/db.php: Include error message in error output in query(). NOTE! This should be extended/enhanced for all the db-functions... * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -d -r1.10 -r1.10.2.1 --- macros.php 22 Feb 2002 14:46:08 -0000 1.10 +++ macros.php 29 Jun 2003 18:34:13 -0000 1.10.2.1 @@ -142,6 +142,9 @@ { $first = 0; } $text = $text . html_ref($page[1], $page[1]); + if ($page[4] == 0 ) { + $text .= " ** Empty, scheduled for deletion ** "; + } } } @@ -159,9 +162,10 @@ $q1 = $pagestore->dbh->query("SELECT l.link, SUM(l.count) AS ct, p.title " . "FROM $LkTbl AS l LEFT JOIN $PgTbl AS p " . "ON l.link = p.title " . + "WHERE p.title IS NULL " . "GROUP BY l.link " . - "HAVING p.title IS NULL " . "ORDER BY ct DESC, l.link"); + while(($result = $pagestore->dbh->result($q1))) { Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/save.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -d -r1.5 -r1.5.2.1 --- save.php 22 Feb 2002 14:46:08 -0000 1.5 +++ save.php 29 Jun 2003 18:34:13 -0000 1.5.2.1 @@ -11,7 +11,6 @@ { global $pagestore, $page, $ParseEngine, $Entity, $ParseObject; static $called = 0; - $macros_index = -1; $transclude_index = -1; $elements_index = -1; @@ -25,7 +24,7 @@ { $elements_index = $i; } } if($macros_index != -1) - { $ParseEngine[$macros_index] = 'parse_noop'; } + { $ParseEngine[$macros_index] = 'parse_clear'; } if($transclude_index != -1) { $ParseEngine[$transclude_index] = 'parse_noop'; } if($elements_index != -1) @@ -68,12 +67,11 @@ $called = 1; } - if(preg_match('/^\\*InterWiki:\\s+([A-Z][A-Za-z]+)\s+(http:[^\\s]+)/', + if(preg_match('/^\*InterWiki:\s+\!?([A-Za-z]+)\s+(https?:[^\s]+)/', $text, $result)) { $pagestore->new_interwiki($page, $result[1], $result[2]); } - return $text; } Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -u -d -r1.25 -r1.25.2.1 --- transforms.php 22 Feb 2002 14:46:09 -0000 1.25 +++ transforms.php 29 Jun 2003 18:34:13 -0000 1.25.2.1 @@ -8,11 +8,20 @@ // converted back into HTML (or, in the future, perhaps some other // representation such as XML). + +// The following functions is mainly used in the save process, and are mainly +// used to avoid parsing of macros, transcludes, ... and erronoeous +// identification of links within those elements. function parse_noop($text) { return $text; } +function parse_clear($text) +{ + return ""; +} + // The following function "corrects" for PHP's odd preg_replace behavior. // Back-references have backslashes inserted before certain quotes // (specifically, whichever quote was used around the backreference); this @@ -107,7 +116,7 @@ { global $InterwikiPtn; - return preg_replace("/(^|[^A-Za-z])($InterwikiPtn)(\$|[^\\/=&~A-Za-z0-9])/e", + return preg_replace("/(^|[^A-Za-z])($InterwikiPtn)(?=\$|[^\\/=&~A-Za-z0-9])/e", "q1('\\1').interwiki_token(q1('\\3'),q1('\\4')).q1('\\6')", $text, -1); } @@ -162,6 +171,7 @@ { return preg_replace('/\\[\\[([^] ]+( [^]]+)?)]]/e', "macro_token(q1('\\1'), q1('\\3'))", $text, -1); + } function macro_token($macro, $trail) @@ -283,7 +293,7 @@ if($in_code) { - if($text == "</code>\n") + if(preg_match("|^\s*</code>\s*|", $text)) { $Entity[count($Entity)] = array('code', $buffer); $buffer = ''; @@ -296,7 +306,7 @@ } else { - if($text == "<code>\n") + if(preg_match("|^\s*<code>\s*|", $text)) { $in_code = 1; return ''; |
From: Even H. <ho...@us...> - 2003-06-29 18:34:16
|
Update of /cvsroot/tavi/tavi/template In directory sc8-pr-cvs1:/tmp/cvs-serv4755/template Modified Files: Tag: release-v0_22-bugfix-branch common.php wiki.css Log Message: 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: - In WantedPages changed sql-query (having => where) to make it work with mysql 4.0.0alpha (and later on) - Added warning of deletion on empty pages in OrphanedPages-macro * lib/diff.php: Detect if we're running on Windows, and then use rand() instead of posix_getpid(). * templates/common.php: Added a div#toolbar_top around the toolbar * templates/wiki.css: Added a display:none for div#toolbar_top on media:print to disable printing of menu. Also added a clear:both to the hr in div#header so that one might right-justify the image in the header without it being below the line. * parse/transforms.php: - Allow white space around <code>/</code> - Added assertion to interwiki-regexp to allow interwiki-links to appear next to each other - Added parse_clear() in addition to parse_noop() to be able to remove text in parse_define_links * parse/save.php: - Allowed escaping InterWiki-entries with !, allowing start with a lowercase character, and allowing https:-links as InterWiki-entries. - Changed parse_noop to parse_clear in parse_define_links to avoid using macro names in the link tables (and thus from appearing on WantedPages if not defined) * lib/db.php: Include error message in error output in query(). NOTE! This should be extended/enhanced for all the db-functions... * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -d -r1.8 -r1.8.2.1 --- common.php 22 Feb 2002 14:46:09 -0000 1.8 +++ common.php 29 Jun 2003 18:34:13 -0000 1.8.2.1 @@ -74,10 +74,13 @@ print $args['headsufx']; ?> </h1> + <div id="toolbar_top"> <?php if($args['toolbar']) { print html_toolbar_top(); } ?> + +</div> <hr /> </div> <?php Index: wiki.css =================================================================== RCS file: /cvsroot/tavi/tavi/template/wiki.css,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -u -d -r1.8 -r1.8.4.1 --- wiki.css 15 Jan 2002 16:02:43 -0000 1.8 +++ wiki.css 29 Jun 2003 18:34:13 -0000 1.8.4.1 @@ -48,3 +48,12 @@ pre { background: transparent; color: #383838; } + +div#header #logo + { float: right; } +div#header hr + { clear: both; } + +@media print { + div#header #toolbar_top { display: none} +} |
From: Even H. <ho...@us...> - 2003-06-29 18:34:16
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1:/tmp/cvs-serv4755/action Modified Files: Tag: release-v0_22-bugfix-branch save.php Log Message: 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: - In WantedPages changed sql-query (having => where) to make it work with mysql 4.0.0alpha (and later on) - Added warning of deletion on empty pages in OrphanedPages-macro * lib/diff.php: Detect if we're running on Windows, and then use rand() instead of posix_getpid(). * templates/common.php: Added a div#toolbar_top around the toolbar * templates/wiki.css: Added a display:none for div#toolbar_top on media:print to disable printing of menu. Also added a clear:both to the hr in div#header so that one might right-justify the image in the header without it being below the line. * parse/transforms.php: - Allow white space around <code>/</code> - Added assertion to interwiki-regexp to allow interwiki-links to appear next to each other - Added parse_clear() in addition to parse_noop() to be able to remove text in parse_define_links * parse/save.php: - Allowed escaping InterWiki-entries with !, allowing start with a lowercase character, and allowing https:-links as InterWiki-entries. - Changed parse_noop to parse_clear in parse_define_links to avoid using macro names in the link tables (and thus from appearing on WantedPages if not defined) * lib/db.php: Include error message in error output in query(). NOTE! This should be extended/enhanced for all the db-functions... * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/save.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -d -r1.8 -r1.8.2.1 --- save.php 22 Feb 2002 14:46:08 -0000 1.8 +++ save.php 29 Jun 2003 18:34:13 -0000 1.8.2.1 @@ -72,5 +72,6 @@ parseText($document, $SaveMacroEngine, $page); $pagestore->unlock(); // End "transaction". + } ?> |
From: Even H. <ho...@us...> - 2003-06-29 18:34:16
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1:/tmp/cvs-serv4755 Modified Files: Tag: release-v0_22-bugfix-branch ChangeLog.txt Log Message: 2003-06-28 Even Holen <eve...@pv...> * parse/macros.php: - In WantedPages changed sql-query (having => where) to make it work with mysql 4.0.0alpha (and later on) - Added warning of deletion on empty pages in OrphanedPages-macro * lib/diff.php: Detect if we're running on Windows, and then use rand() instead of posix_getpid(). * templates/common.php: Added a div#toolbar_top around the toolbar * templates/wiki.css: Added a display:none for div#toolbar_top on media:print to disable printing of menu. Also added a clear:both to the hr in div#header so that one might right-justify the image in the header without it being below the line. * parse/transforms.php: - Allow white space around <code>/</code> - Added assertion to interwiki-regexp to allow interwiki-links to appear next to each other - Added parse_clear() in addition to parse_noop() to be able to remove text in parse_define_links * parse/save.php: - Allowed escaping InterWiki-entries with !, allowing start with a lowercase character, and allowing https:-links as InterWiki-entries. - Changed parse_noop to parse_clear in parse_define_links to avoid using macro names in the link tables (and thus from appearing on WantedPages if not defined) * lib/db.php: Include error message in error output in query(). NOTE! This should be extended/enhanced for all the db-functions... * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -d -r1.6 -r1.6.2.1 --- ChangeLog.txt 22 Feb 2002 14:46:07 -0000 1.6 +++ ChangeLog.txt 29 Jun 2003 18:34:13 -0000 1.6.2.1 @@ -3,7 +3,38 @@ WikkiTikkiTavi - ChangeLog -------------------------- -2002-02-19 Scott Moonen <sm...@an.... +2003-06-28 Even Holen <eve...@pv...> + * parse/macros.php: + - In WantedPages changed sql-query (having => where) to make it work with + mysql 4.0.0alpha (and later on) + - Added warning of deletion on empty pages in OrphanedPages-macro + * lib/diff.php: Detect if we're running on Windows, and then use rand() + instead of posix_getpid(). + * templates/common.php: Added a div#toolbar_top around the toolbar + * templates/wiki.css: Added a display:none for div#toolbar_top on + media:print to disable printing of menu. Also added a clear:both to + the hr in div#header so that one might right-justify the image in the + header without it being below the line. + * parse/transforms.php: + - Allow white space around <code>/</code> + - Added assertion to interwiki-regexp to allow interwiki-links to appear + next to each other + - Added parse_clear() in addition to parse_noop() to be able to remove + text in parse_define_links + * parse/save.php: + - Allowed escaping InterWiki-entries with !, allowing start with a + lowercase character, and allowing https:-links as InterWiki-entries. + - Changed parse_noop to parse_clear in parse_define_links to avoid + using macro names in the link tables (and thus from appearing on + WantedPages if not defined) + * lib/db.php: Include error message in error output in query(). NOTE! + This should be extended/enhanced for all the db-functions... + * lib/defaults: Changed alphapatterns to _not_ include $FlgChr, \xff + +2002-02-22 Scott Moonen <sm...@an...> + * ** Version 0.22 released ** + +2002-02-19 Scott Moonen <sm...@an...> * Added code to HTML template to add the page's name, with WikiWords split apart, to the list of meta keywords for a page. This should |
From: Even H. <ho...@us...> - 2003-06-28 12:14:50
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1:/tmp/cvs-serv20652 Modified Files: ChangeLog.txt Log Message: Added info on release of version 0.22 Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChangeLog.txt 22 Feb 2002 14:46:07 -0000 1.6 +++ ChangeLog.txt 28 Jun 2003 12:14:47 -0000 1.7 @@ -3,6 +3,9 @@ WikkiTikkiTavi - ChangeLog -------------------------- +2002-02-22 Scott Moonen <sm...@an...> + * ** Version 0.22 released ** + 2002-02-19 Scott Moonen <sm...@an.... * Added code to HTML template to add the page's name, with WikiWords |
From: Kimmo S. <ki...@us...> - 2003-06-26 21:15:55
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv26681/lib Modified Files: main.php Log Message: To support meta linking (SisterWiki) even when $SeparateLinkWords = 1, added a "style" parameter to the find. Setting "style=meta" in the query will always return CamelCase words ($SeparateLinkWords = 0). Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- main.php 5 Apr 2002 15:40:58 -0000 1.4 +++ main.php 26 Jun 2003 21:15:51 -0000 1.5 @@ -23,6 +23,8 @@ ? $HTTP_GET_VARS['ver2'] : ''; $find = isset($HTTP_GET_VARS['find']) ? $HTTP_GET_VARS['find'] : ''; +$style = isset($HTTP_GET_VARS['style']) + ? $HTTP_GET_VARS['style'] : ''; $version = isset($HTTP_GET_VARS['version']) ? $HTTP_GET_VARS['version'] : ''; $full = isset($HTTP_GET_VARS['full']) |
From: Kimmo S. <ki...@us...> - 2003-06-26 21:15:55
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1:/tmp/cvs-serv26681/action Modified Files: find.php Log Message: To support meta linking (SisterWiki) even when $SeparateLinkWords = 1, added a "style" parameter to the find. Setting "style=meta" in the query will always return CamelCase words ($SeparateLinkWords = 0). Index: find.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/find.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- find.php 7 Jan 2002 16:28:32 -0000 1.6 +++ find.php 26 Jun 2003 21:15:52 -0000 1.7 @@ -7,9 +7,15 @@ // Find a string in the database. function action_find() { - global $pagestore, $find; + global $pagestore, $find, $style, $SeparateLinkWords; $list = $pagestore->find($find); + + switch ($style) { + case 'meta': + $SeparateLinkWords = 0; + break; + } $text = ''; foreach($list as $page) |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:34:10
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22146 Modified Files: diff.php Log Message: Look at $PHP_OS to check for the OS. Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/diff.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- diff.php 9 Jan 2002 21:48:46 -0000 1.5 +++ diff.php 28 Apr 2003 00:34:04 -0000 1.6 @@ -6,8 +6,7 @@ { global $TempDir, $DiffCmd, $ErrorCreatingTemp, $ErrorWritingTemp; - $num = posix_getpid(); // Comment if running on Windows. - // $num = rand(); // Uncomment if running on Windows. + $num = strncmp(PHP_OS, "WIN", 3) ? posix_getpid() : rand(); $temp1 = $TempDir . '/wiki_' . $num . '_1.txt'; $temp2 = $TempDir . '/wiki_' . $num . '_2.txt'; |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:23:06
|
Update of /cvsroot/tavi/tavi/template In directory sc8-pr-cvs1:/tmp/cvs-serv19390/template Modified Files: latex.php Log Message: Use <?php instead of <?. Add RCS Id. Index: latex.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/latex.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- latex.php 4 Apr 2002 19:53:22 -0000 1.1 +++ latex.php 28 Apr 2003 00:23:02 -0000 1.2 @@ -1,4 +1,6 @@ -<? +<?php +// $Id$ + // // 2002/03/18 Troy D. Straszheim <tr...@re...> // @@ -26,7 +28,7 @@ %\pagestyle{fancy} %\usepackage{graphicx} -%\lhead{\large{\texttt{<?print $HomePage . ":". $page?>}}} +%\lhead{\large{\texttt{<?php print $HomePage . ":". $page; ?>}}} % \rhead{\resizebox{2.5in}{!}{\includegraphics[trim=0 10 160 0, clip]{cb.eps}}} % %\chead{} @@ -44,7 +46,7 @@ % and action/latex.php % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<?print $latex?> +<?php print $latex; ?> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % here resumes template/latex.php generated latex. % @@ -52,6 +54,6 @@ \end{document} -<? +<?php } ?> |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:23:05
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1:/tmp/cvs-serv19390/parse Modified Files: latex.php Log Message: Use <?php instead of <?. Add RCS Id. Index: latex.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/latex.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- latex.php 4 Apr 2002 19:53:22 -0000 1.1 +++ latex.php 28 Apr 2003 00:23:01 -0000 1.2 @@ -1,4 +1,6 @@ -<? +<?php +// $Id$ + // // 2002/03/18 Troy D. Straszheim <tr...@re...> // |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:23:04
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1:/tmp/cvs-serv19390/action Modified Files: latex.php Log Message: Use <?php instead of <?. Add RCS Id. Index: latex.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/latex.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- latex.php 4 Apr 2002 19:53:22 -0000 1.1 +++ latex.php 28 Apr 2003 00:23:01 -0000 1.2 @@ -1,4 +1,6 @@ -<? +<?php +// $Id$ + // // 2002/03/18 Troy D. Straszheim <tr...@re...> // |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:22:29
|
Update of /cvsroot/tavi/tavi/tools In directory sc8-pr-cvs1:/tmp/cvs-serv19088 Modified Files: tavidoc.php Log Message: Indent using the common 2-column style. Also, "if", "while" and "foreach" are not functions, but statements, so make them not look like function calls. Index: tavidoc.php =================================================================== RCS file: /cvsroot/tavi/tavi/tools/tavidoc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tavidoc.php 27 Apr 2003 22:38:27 -0000 1.1 +++ tavidoc.php 28 Apr 2003 00:22:26 -0000 1.2 @@ -1,4 +1,7 @@ -<html> +<?php +// $Id$ + +?><html> <head> <title>TaviDoc</title> </head> @@ -53,8 +56,8 @@ // Check if the user has properly set a configuration page name parse_str($QUERY_STRING); -if(!isset($page)) - die('No page specified'); +if (!isset($page)) + die('No page specified'); // Load the template $TDTemplate = join('', file($TDTemplateFile)); @@ -65,61 +68,61 @@ // Report echo 'Processing configuration page <a href="', - "index.php?page=$page", '">', $page, "</a>.<br />\n"; + "index.php?page=$page", '">', $page, "</a>.<br />\n"; echo 'Using template <a href="', $TDTemplateFile, '">', - $TDTemplateFile, "</a>.<br />\n"; + $TDTemplateFile, "</a>.<br />\n"; echo 'Output into path <a href="', $TDOutputPath, '">', - $TDOutputPath, "</a>.<br />\n", - '<ol>'; + $TDOutputPath, "</a>.<br />\n", + '<ol>'; -$TDPageQueue[] = $page; +$TDPageQueue[] = $page; $i = 0; -while($i < count($TDPageQueue)) +while ($i < count($TDPageQueue)) { - $Title = $TDPageQueue[$i]; - $Messages = array(); - $PageCount = count($TDPageQueue); + $Title = $TDPageQueue[$i]; + $Messages = array(); + $PageCount = count($TDPageQueue); - // Render using Tavi - $Entity = array(); - $body = parseText(query_page_body($Title), + // Render using Tavi + $Entity = array(); + $body = parseText(query_page_body($Title), $CustomParseEngine, ''); - // Macros - $body = str_replace(array('[TITLE]', - '[BODY]', - '[TIMESTAMP]', - '[YEAR]'), - array($Title, - $body, - date('w, F jS Y, G:i'), - date('Y')), - $TDTemplate); + // Macros + $body = str_replace(array('[TITLE]', + '[BODY]', + '[TIMESTAMP]', + '[YEAR]'), + array($Title, + $body, + date('w, F jS Y, G:i'), + date('Y')), + $TDTemplate); - // Write file - $filename = $TDOutputPath.filename($Title); - $fid = fopen($filename, 'w'); - fwrite($fid, $body); - fclose($fid); + // Write file + $filename = $TDOutputPath.filename($Title); + $fid = fopen($filename, 'w'); + fwrite($fid, $body); + fclose($fid); - // Report - $dif = (count($TDPageQueue) - $PageCount); - echo '<li>', - 'Writing page <a href="index.php?page=', $Title, '">', $Title, '</a>', - ' to file <a href="'.$filename.'">', $filename, '</a>', - ($dif > 0 ? ", $dif new pages found" : ''); + // Report + $dif = (count($TDPageQueue) - $PageCount); + echo '<li>', + 'Writing page <a href="index.php?page=', $Title, '">', $Title, '</a>', + ' to file <a href="'.$filename.'">', $filename, '</a>', + ($dif > 0 ? ", $dif new pages found" : ''); - if(count($Messages) > 0) - { - echo '<ol>'; - foreach($Messages as $Message) - echo '<li>'.$Message.'</li>'; - echo '</ol>'; - } + if (count($Messages) > 0) + { + echo '<ol>'; + foreach ($Messages as $Message) + echo '<li>'.$Message.'</li>'; + echo '</ol>'; + } - echo '</li>'; - flush(); - ++$i; + echo '</li>'; + flush(); + ++$i; } // Close the database @@ -136,69 +139,69 @@ // Create the filename from a page title function filename($Title) { - return strtolower(urlencode(str_replace(' ', '_', $Title))).'.html'; + return strtolower(urlencode(str_replace(' ', '_', $Title))).'.html'; } //------------------------------------------------------------------------ // Die with a nice error function query_error($sql) { - die('<big>MySQL Error '.mysql_errno().': '.mysql_error() - .'</big><br /><code>'.nl2br($sql).'</code>'); + die('<big>MySQL Error '.mysql_errno().': '.mysql_error() + .'</big><br /><code>'.nl2br($sql).'</code>'); } //------------------------------------------------------------------------ // Extract the body from a page function query_page_body($Title) { - global $DBTablePrefix; + global $DBTablePrefix; - $Title = mysql_escape_string($Title); + $Title = mysql_escape_string($Title); - $sql = 'select body - from '.$DBTablePrefix."pages - where title = '$Title' - order by version desc"; - $qid = mysql_query($sql) or query_error($sql); - $row = mysql_fetch_row($qid) or query_error($sql); - mysql_free_result($qid) or query_error($sql); + $sql = 'select body + from '.$DBTablePrefix."pages + where title = '$Title' + order by version desc"; + $qid = mysql_query($sql) or query_error($sql); + $row = mysql_fetch_row($qid) or query_error($sql); + mysql_free_result($qid) or query_error($sql); - return $row[0]; + return $row[0]; } //------------------------------------------------------------------------ // Query the Wiki whether a page exists with given title function query_page_exists($Title) { - global $DBTablePrefix; + global $DBTablePrefix; - $Title = mysql_escape_string($Title); + $Title = mysql_escape_string($Title); - $sql = 'select count(*) - from '.$DBTablePrefix."pages - where title = '$Title'"; - $qid = mysql_query($sql) or query_error($sql); - $row = mysql_fetch_row($qid) or query_error($sql); - mysql_free_result($qid) or query_error($sql); + $sql = 'select count(*) + from '.$DBTablePrefix."pages + where title = '$Title'"; + $qid = mysql_query($sql) or query_error($sql); + $row = mysql_fetch_row($qid) or query_error($sql); + mysql_free_result($qid) or query_error($sql); - return($row[0] > 0? TRUE : FALSE); + return($row[0] > 0? TRUE : FALSE); } //------------------------------------------------------------------------ // Custom renderer for horizontal rulers function custom_display_html_hr() { - return "<hr noshade size=\"2\" />\n"; + return "<hr noshade size=\"2\" />\n"; } //------------------------------------------------------------------------ // Custom parser which strips of the braces from links function custom_parse_hyperlink_description($text) { - global $UrlPtn; + global $UrlPtn; - return preg_replace("/\\[($UrlPtn) ([^]]+)]/e", - "url_token(q1('\\1'), q1('\\4'))", $text, -1); + return preg_replace("/\\[($UrlPtn) ([^]]+)]/e", + "url_token(q1('\\1'), q1('\\4'))", $text, -1); } //------------------------------------------------------------------------ @@ -206,41 +209,38 @@ function custom_display_html_ref($page, $appearance, $hover = '', $anchor = '', $anchor_appearance = '') { - global $SeparateLinkWords, $TDPageQueue, $Messages; + global $SeparateLinkWords, $TDPageQueue, $Messages; - if($hover != '') - $hover = ' title="' . $hover . '"'; + if ($hover != '') + $hover = ' title="' . $hover . '"'; - if(query_page_exists($page)) - { - $found = FALSE; - foreach($TDPageQueue as $t) - if($t == $page) - $found = TRUE; + if (query_page_exists($page)) { + $found = FALSE; + foreach($TDPageQueue as $t) + if ($t == $page) + $found = TRUE; - if(!$found) - $TDPageQueue[] = $page; + if (!$found) + $TDPageQueue[] = $page; - if($SeparateLinkWords && $page == $appearance) - $appearance = html_split_name($page); + if ($SeparateLinkWords && $page == $appearance) + $appearance = html_split_name($page); - return '<a href="'.viewURL($page).$anchor.'"'.$hover.'>' - .$appearance.$anchor_appearance.'</a>'; - } - else - { - $Messages[] = 'Page <a href="index.php?action=edit&page='.$page.'">' - .$page.'</a> missing from Wiki.'; + return '<a href="'.viewURL($page).$anchor.'"'.$hover.'>' + .$appearance.$anchor_appearance.'</a>'; + } else { + $Messages[] = 'Page <a href="index.php?action=edit&page='.$page.'">' + .$page.'</a> missing from Wiki.'; - return $appearance; - } + return $appearance; + } } //------------------------------------------------------------------------ // Custom parser which strips of the braces from links function custom_parse_freelink($text) { - return preg_replace( + return preg_replace( "/\\(\\(([-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)()()\\)\\)/e", "freelink_token(q1('\\1'), q1('\\2'), '\\3', '')", $text, -1); @@ -250,7 +250,7 @@ // Overwrite the normal viewURL code to return the filename function viewURL($page, $version = '', $full = '') { - return filename($page); + return filename($page); } ?> </body> |
From: Kimmo S. <ki...@us...> - 2003-04-28 00:21:00
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1:/tmp/cvs-serv18883 Modified Files: style.php Log Message: Missing ?> tag. Index: style.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/style.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- style.php 22 Feb 2002 14:46:08 -0000 1.2 +++ style.php 28 Apr 2003 00:20:51 -0000 1.3 @@ -15,4 +15,4 @@ header("Content-Length: $size"); ob_end_flush(); } - +?> |
From: Kimmo S. <ki...@us...> - 2003-04-27 22:38:31
|
Update of /cvsroot/tavi/tavi/tools In directory sc8-pr-cvs1:/tmp/cvs-serv11414 Added Files: tavidoc.php Log Message: From: "Martijn W. van der Lee" <ma...@va...> A tool to generate .HTML files from Tavi pages. It takes a single page and recursively renders all pages to raw .HTML files inside a TaviDoc subdir, ensuring each page is rendered only once. Install tavidoc.php and the other file next to the Tavi index.php and in the URL, specify the ?page= similar to the normal Tavi URL. It's not quite perfect but does the job well. --- NEW FILE: tavidoc.php --- <html> <head> <title>TaviDoc</title> </head> <body><?php ////////////////////////////////////////////////////////////////////////// // // S t a t i c // // Required for database connectivity require_once('config.php'); // Required for rendering require_once('lib/defaults.php'); require_once('parse/main.php'); require_once('parse/html.php'); require_once('parse/transforms.php'); // TaviDoc defaults static $TDOutputPath = 'tavidoc/'; static $TDTemplateFile = 'tavidoc.template.html'; $TDPageQueue = array(); // Tavi defaults static $CustomParseEngine = array('parse_elem_flag', 'parse_raw_html', 'parse_code', 'custom_parse_hyperlink_description', 'parse_hyperlink', 'custom_parse_freelink', 'parse_bold', 'parse_italic', 'parse_teletype', 'parse_heading', 'parse_table', 'parse_horiz', 'parse_indents', 'parse_newline', 'parse_elements'); $DisplayEngine['hr'] = 'custom_display_html_hr'; $DisplayEngine['ref'] = 'custom_display_html_ref'; $FlgChr = chr(255); ////////////////////////////////////////////////////////////////////////// // // M a i n l i n e // // Report echo '<h1>TaviDoc</h1>'; // Check if the user has properly set a configuration page name parse_str($QUERY_STRING); if(!isset($page)) die('No page specified'); // Load the template $TDTemplate = join('', file($TDTemplateFile)); // Open the database mysql_connect($DBServer, $DBUser, $DBPasswd); mysql_select_db($DBName); // Report echo 'Processing configuration page <a href="', "index.php?page=$page", '">', $page, "</a>.<br />\n"; echo 'Using template <a href="', $TDTemplateFile, '">', $TDTemplateFile, "</a>.<br />\n"; echo 'Output into path <a href="', $TDOutputPath, '">', $TDOutputPath, "</a>.<br />\n", '<ol>'; $TDPageQueue[] = $page; $i = 0; while($i < count($TDPageQueue)) { $Title = $TDPageQueue[$i]; $Messages = array(); $PageCount = count($TDPageQueue); // Render using Tavi $Entity = array(); $body = parseText(query_page_body($Title), $CustomParseEngine, ''); // Macros $body = str_replace(array('[TITLE]', '[BODY]', '[TIMESTAMP]', '[YEAR]'), array($Title, $body, date('w, F jS Y, G:i'), date('Y')), $TDTemplate); // Write file $filename = $TDOutputPath.filename($Title); $fid = fopen($filename, 'w'); fwrite($fid, $body); fclose($fid); // Report $dif = (count($TDPageQueue) - $PageCount); echo '<li>', 'Writing page <a href="index.php?page=', $Title, '">', $Title, '</a>', ' to file <a href="'.$filename.'">', $filename, '</a>', ($dif > 0 ? ", $dif new pages found" : ''); if(count($Messages) > 0) { echo '<ol>'; foreach($Messages as $Message) echo '<li>'.$Message.'</li>'; echo '</ol>'; } echo '</li>'; flush(); ++$i; } // Close the database mysql_close(); echo "</ol>\n", "Succesfully completed.\n"; ////////////////////////////////////////////////////////////////////////// // // F u n c t i o n s // //------------------------------------------------------------------------ // Create the filename from a page title function filename($Title) { return strtolower(urlencode(str_replace(' ', '_', $Title))).'.html'; } //------------------------------------------------------------------------ // Die with a nice error function query_error($sql) { die('<big>MySQL Error '.mysql_errno().': '.mysql_error() .'</big><br /><code>'.nl2br($sql).'</code>'); } //------------------------------------------------------------------------ // Extract the body from a page function query_page_body($Title) { global $DBTablePrefix; $Title = mysql_escape_string($Title); $sql = 'select body from '.$DBTablePrefix."pages where title = '$Title' order by version desc"; $qid = mysql_query($sql) or query_error($sql); $row = mysql_fetch_row($qid) or query_error($sql); mysql_free_result($qid) or query_error($sql); return $row[0]; } //------------------------------------------------------------------------ // Query the Wiki whether a page exists with given title function query_page_exists($Title) { global $DBTablePrefix; $Title = mysql_escape_string($Title); $sql = 'select count(*) from '.$DBTablePrefix."pages where title = '$Title'"; $qid = mysql_query($sql) or query_error($sql); $row = mysql_fetch_row($qid) or query_error($sql); mysql_free_result($qid) or query_error($sql); return($row[0] > 0? TRUE : FALSE); } //------------------------------------------------------------------------ // Custom renderer for horizontal rulers function custom_display_html_hr() { return "<hr noshade size=\"2\" />\n"; } //------------------------------------------------------------------------ // Custom parser which strips of the braces from links function custom_parse_hyperlink_description($text) { global $UrlPtn; return preg_replace("/\\[($UrlPtn) ([^]]+)]/e", "url_token(q1('\\1'), q1('\\4'))", $text, -1); } //------------------------------------------------------------------------ // Custom display engine which nullifies non-existing pages function custom_display_html_ref($page, $appearance, $hover = '', $anchor = '', $anchor_appearance = '') { global $SeparateLinkWords, $TDPageQueue, $Messages; if($hover != '') $hover = ' title="' . $hover . '"'; if(query_page_exists($page)) { $found = FALSE; foreach($TDPageQueue as $t) if($t == $page) $found = TRUE; if(!$found) $TDPageQueue[] = $page; if($SeparateLinkWords && $page == $appearance) $appearance = html_split_name($page); return '<a href="'.viewURL($page).$anchor.'"'.$hover.'>' .$appearance.$anchor_appearance.'</a>'; } else { $Messages[] = 'Page <a href="index.php?action=edit&page='.$page.'">' .$page.'</a> missing from Wiki.'; return $appearance; } } //------------------------------------------------------------------------ // Custom parser which strips of the braces from links function custom_parse_freelink($text) { return preg_replace( "/\\(\\(([-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)()()\\)\\)/e", "freelink_token(q1('\\1'), q1('\\2'), '\\3', '')", $text, -1); } //------------------------------------------------------------------------ // Overwrite the normal viewURL code to return the filename function viewURL($page, $version = '', $full = '') { return filename($page); } ?> </body> </html> |
From: Kimmo S. <ki...@us...> - 2003-04-27 22:23:25
|
Update of /cvsroot/tavi/tavi/tools In directory sc8-pr-cvs1:/tmp/cvs-serv6080/tools Log Message: Directory /cvsroot/tavi/tavi/tools added to the repository |
From: Kimmo S. <ki...@us...> - 2002-04-05 15:41:03
|
Update of /cvsroot/tavi/tavi/lib In directory usw-pr-cvs1:/tmp/cvs-serv32766/lib Modified Files: main.php Log Message: Enable latex action. Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- main.php 22 Feb 2002 14:46:08 -0000 1.3 +++ main.php 5 Apr 2002 15:40:58 -0000 1.4 @@ -79,6 +79,7 @@ 'save' => array('action/save.php', 'action_save', 'edit'), 'diff' => array('action/diff.php', 'action_diff', 'search'), 'find' => array('action/find.php', 'action_find', 'search'), + 'latex' => array('action/latex.php', 'action_latex', 'view'), 'history' => array('action/history.php', 'action_history', 'search'), 'prefs' => array('action/prefs.php', 'action_prefs', 'view'), |
From: Kimmo S. <ki...@us...> - 2002-04-04 19:53:31
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv20555/parse Added Files: latex.php Log Message: LaTeX action from Troy D. Straszheim <tr...@re...>. --- NEW FILE: latex.php --- <? // // 2002/03/18 Troy D. Straszheim <tr...@re...> // // These functions take wiki entities like 'bold_begin' or 'ref' and return // latex representing these entities. They are used throught this script // to generate appropriate latex. Together with the template scripts, they // constitue the sole generators of latex in this script, and are thus the // sole means of customizing appearance. function latex_bold_start() { return '\textbf{'; } function latex_bold_end() { return '}'; } function latex_italic_start() { return '\textit{'; } function latex_italic_end() { return '}'; } function latex_tt_start() { return '\texttt{'; } function latex_tt_end() { return '}'; } function latex_ul_start() { return "\\begin{itemize}\n"; } function latex_ul_end() { return "\\end{itemize}\n"; } function latex_ol_start() { return '\begin{enumerate}'; } function latex_ol_end() { return '\end{enumerate}'; } function latex_li_start() { return '\item '; } function latex_li_end() { return "\n\n"; } function latex_dl_start() { return '\begin{itemize}'; } function latex_dl_end() { return '\end{itemize}'; } function latex_dd_start() { return '\item '; } function latex_dd_end() { return "\n"; } function latex_hr() { return "\vskip0.25cm\hrule\vskip0.25cm"; } function latex_newline() { return "\n"; } function latex_head_start($level) { $lvlmap = array('\chapter', '\section', '\subsection', '\subsubsection', '\paragraph', '\subparagraph'); return $lvlmap[$level] . '{'; } function latex_head_end($level) { return "}\n\n"; } function sanitize($text) { // $patterns = array ("/([^\\])%/", "/([^\\])#/", "/([^\\])&/"); // $replacements = array ("$1\%CLEAN", "$1\#CLEAN", "$1\&CLEAN"); // return preg_replace($patterns, $replacements, $text); return "GIMPY:" . $text; } function latex_nowiki($text) { // $newtext = sanitize($text); return $text; } function latex_code($text) { return '\begin{verbatim}' . $text . '\end{verbatim}'; } function latex_raw($text) { return $text; } function html_table_start() { return '\begin{tabular}{|l|l|l|l|l|l|l|l|l|}'; } function html_table_end() { return '\end{tabular}' . "\n"; } function html_table_row_start() { return ''; } function html_table_row_end() { return '\\'.'\\'."\n"; } function html_table_cell_start($span = 1) { // if($span == 1) // { return '<td>'; } // else // { return '<td colspan="' . $span . '">'; } return '&'; } function html_table_cell_end() { return '&'; } //function latex_diff_old_start() // { return "<table width=\"95%\" bgcolor=\"ffffaf\"><tr><td>\n"; } //function latex_diff_end() // { return '</td></tr></table>'; } //function latex_diff_new_start() // { return "<table width=\"95%\" bgcolor=\"cfffcf\"><tr><td>\n"; } //function latex_diff_add() // { return latex_bold_start() . 'Added:' . latex_bold_end(); } //function latex_diff_change() // { return latex_bold_start() . 'Changed:' . latex_bold_end(); } //function latex_diff_delete() // { return latex_bold_start() . 'Deleted:' . latex_bold_end(); } function latex_time($timestamp) { $time = mktime(substr($timestamp, 8, 2), substr($timestamp, 10, 2), substr($timestamp, 12, 2), substr($timestamp, 4, 2), substr($timestamp, 6, 2), substr($timestamp, 0, 4)); return date('D, d M Y H:i:s', $time); } function latex_timestamp($timestamp) { return substr($timestamp, 0, 4) . '.' . substr($timestamp, 4, 2) . '.' . substr($timestamp, 6, 2) . ' ' . substr($timestamp, 8, 2) . ':' . substr($timestamp, 10, 2); } function latex_url($url, $text) { if($url == $text && preg_match('/(.jpg|.png|.gif)$/', $text)) { return '\textit{(image: '. $url .')}'; } return '$\underline{\textrm{'. $url . '}}$'; } function latex_ref($page, $appearance, $hover = '') { global $db; if($hover != '') { $hover = ' title="' . $hover . '"'; } $p = new WikiPage($db, $page); if($p->exists()) { // return '<a href="' . viewURL($page) . '"' . $hover . '>' . $page . '</a>'; return '\textbf{'. $page . '}'; } else { return '\textbf{' . $appearance . $hover . "}"; } } function latex_interwiki($base, $ref) { global $pagestore; if(($url = $pagestore->interwiki($base)) != '') { return 'INTERWIKI-W-URL: ' . $url . ' ' . $base . ':' . $ref ; } return 'INTERWIKI-NO-URL: ' . $base . ':' . $ref; } function latex_twin($base, $ref) { global $pagestore; // return '<a href="' . $pagestore->interwiki($base) . $ref . '">' . // '<font size="-1"><em>[' . $base . ']</em></font></a>'; } function latex_category($time, $page, $host, $user, $comment) { global $pagestore; $text = '(' . latex_timestamp($time) . ') (' . '<a href="' . historyURL($page) . '"><font size="-1">changes</font></a>) ' . latex_ref($page, $page); if(count($twin = $pagestore->twinpages($page))) { foreach($twin as $site) { $text = $text . ' ' . latex_twin($site[0], $site[1]); } } $text = $text . ' . . . . . <em>' . ($user == '' ? $host : latex_ref($user, $user, $host)) . '</em>'; if($comment != '') { $text = $text . ' ' . latex_bold_start() . '[' . str_replace('<', '<', str_replace('&', '&', $comment)) . ']' . latex_bold_end(); } return $text . latex_newline(); } function latex_fulllist($page, $count) { return '<strong><a href="' . viewURL($page, '', 1) . '">' . 'See complete list (' . $count . ' entries)</a></strong>'; } function latex_fullhistory($page, $count) { return '<tr><td colspan="3"><strong><a href="' . historyURL($page, 1) . '">' . 'See complete list (' . $count . ' entries)</a></strong></td></tr>'; } function latex_toolbar_top() { global $HomePage, $PrefsScript; return latex_ref($HomePage, $HomePage) . ' | ' . latex_ref('RecentChanges', 'RecentChanges') . ' | ' . '<a href="' . $PrefsScript . '">Preferences</a>'; } function latex_history_entry($page, $version, $time, $host, $user, $c1, $c2, $comment) { return "<tr><td>" . "<input type=\"radio\" name=\"ver1\" value=\"$version\"" . ($c1 ? ' checked="checked"' : '') . " /></td>\n" . " <td>" . "<input type=\"radio\" name=\"ver2\" value=\"$version\"" . ($c2 ? ' checked="checked"' : '') . " /></td>\n" . "<td><a href=\"" . viewURL($page, $version) . "\">" . latex_time($time) . "</a> . . . . " . ($user == '' ? $host : latex_ref($user, $user, $host)) . ($comment == '' ? '' : (' ' . latex_bold_start() . '[' . str_replace('<', '<', str_replace('&', '&', $comment)) . ']' . latex_bold_end())) . "</td></tr>\n"; } function latex_lock_start() { global $AdminScript; return '<form method="post" action="' . $AdminScript . "\">\n" . '<input type="hidden" name="locking" value="1" />' . "\n" . latex_bold_start() . 'Locked' . latex_bold_end() . latex_newline(); } function latex_lock_end($count) { return '<input type="hidden" name="count" value="' . $count . '" />' . "\n" . '<input type="submit" name="Save" value="Save" />' . "\n" . '</form>' . "\n"; } function latex_lock_page($page, $mutable) { static $count = 0; $count++; return '<input type="hidden" name="name' . $count . '" value="' . urlencode($page) . '" />' . "\n" . '<input type="checkbox" name="lock' . $count . '" value="1"' . ($mutable ? '' : ' checked="checked"') . ' />' . "\n" . "\n" . $page . latex_newline(); } function latex_rate_start() { return '<br /><strong>Blocked IP address ranges</strong>' . "\n<dl>\n"; } function latex_rate_end() { global $AdminScript; return "</dl>\n" . '<form method="post" action="' . $AdminScript . "\">\n" . '<input type="hidden" name="blocking" value="1" />' . "\n" . 'Enter IP address range in form <tt>12.*</tt>, <tt>34.56.*</tt>, or ' . '<tt>78.90.123.*</tt><br />' . "\n" . '<input type="text" name="address" value="" size="40" /><br />' . "\n" . '<input type="submit" name="Block" value="Block" />' . "\n" . '<input type="submit" name="Unblock" value="Unblock" />' . "\n" . '</form>' . "\n"; } function latex_rate_entry($address) { return '<dd>' . $address . "</dd>\n"; } ?> |
From: Kimmo S. <ki...@us...> - 2002-04-04 19:53:30
|
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv20555/template Added Files: latex.php Log Message: LaTeX action from Troy D. Straszheim <tr...@re...>. --- NEW FILE: latex.php --- <? // // 2002/03/18 Troy D. Straszheim <tr...@re...> // function template_view($page, $latex) { global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription; global $FindScript, $pagestore; ?> \documentclass{article} % % Latex generating code contributed to the wiki project by % Troy D. Straszheim <tr...@re...> % % % The latex at the top and at the very bottom of this file come from % template/latex.php verbatim. % % % uncomment these selectively to use various latex packages (fancyhdr, % graphicx) and/or to add an EPS graphic of your choosing % %\usepackage{fancyhdr} %\pagestyle{fancy} %\usepackage{graphicx} %\lhead{\large{\texttt{<?print $HomePage . ":". $page?>}}} % \rhead{\resizebox{2.5in}{!}{\includegraphics[trim=0 10 160 0, clip]{cb.eps}}} % %\chead{} %\lfoot{\today} %\cfoot{} %\rfoot{} %\renewcommand{\headrulewidth}{0.4pt} %\renewcommand{\footrulewidth}{0.4pt} \setlength{\parskip}{0.25cm} \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % here starts the latex generated by parse/latex.php % % and action/latex.php % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <?print $latex?> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % here resumes template/latex.php generated latex. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document} <? } ?> |
From: Kimmo S. <ki...@us...> - 2002-04-04 19:53:30
|
Update of /cvsroot/tavi/tavi/action In directory usw-pr-cvs1:/tmp/cvs-serv20555/action Added Files: latex.php Log Message: LaTeX action from Troy D. Straszheim <tr...@re...>. --- NEW FILE: latex.php --- <? // // 2002/03/18 Troy D. Straszheim <tr...@re...> // require('parse/main.php'); require('parse/macros.php'); require('parse/latex.php'); require(TemplateDir . '/latex.php'); require('lib/headers.php'); function backslashit($text) { $patterns = array ("/</", "/%/", "/#/", "/&/", "/>/", "/&/"); $replacements = array ("$<$", "\%", "\#", "\&", "$>$", "\&"); return preg_replace($patterns, $replacements, $text); } // Parse and display a page. function action_latex() { global $page, $pagestore, $ParseEngine, $DisplayEngine, $HTTP_IF_MODIFIED_SINCE; global $version; $pg = $pagestore->page($page); if($version != '') { $pg->version = $version; } $pg->read(); // if(!empty($HTTP_IF_MODIFIED_SINCE)) // { if_modified($pg->time); } // gen_headers($pg->time); // $pg->text is the raw stuff from the database // print $pg->text; // $DisplayEngine indicates what functions will be used to translate wiki // markup elements into actual HTML. See parse/html.php $DisplayEngine = array( 'bold_start' => 'latex_bold_start', 'bold_end' => 'latex_bold_end', 'italic_start' => 'latex_italic_start', 'italic_end' => 'latex_italic_end', 'tt_start' => 'latex_tt_start', 'tt_end' => 'latex_tt_end', 'head_start' => 'latex_head_start', 'head_end' => 'latex_head_end', 'newline' => 'latex_newline', 'ref' => 'latex_ref', 'url' => 'latex_url', 'interwiki' => 'latex_interwiki', 'raw' => 'latex_raw', 'code' => 'latex_code', 'hr' => 'latex_hr', 'nowiki' => 'latex_nowiki', 'bullet_list_start' => 'latex_ul_start', 'bullet_list_end' => 'latex_ul_end', 'bullet_item_start' => 'latex_li_start', 'bullet_item_end' => 'latex_li_end', 'indent_list_start' => 'latex_dl_start', 'indent_list_end' => 'latex_dl_end', 'indent_item_start' => 'latex_dd_start', 'indent_item_end' => 'latex_dd_end', 'numbered_list_start' => 'latex_ol_start', 'numbered_list_end' => 'latex_ol_end', 'numbered_item_start' => 'latex_li_start', 'numbered_item_end' => 'latex_li_end', 'diff_old_start' => 'latex_diff_old_start', 'diff_old_end' => 'latex_diff_end', 'diff_new_start' => 'latex_diff_new_start', 'diff_new_end' => 'latex_diff_end', 'diff_change' => 'latex_diff_change', 'diff_add' => 'latex_diff_add', 'diff_delete' => 'latex_diff_delete' ); $rawtext = $pg->text; $parseText = parseText($rawtext, $ParseEngine, "OBJECTNAMEHERE"); $newtext = backslashit($parseText); template_view($page, $newtext); } ?> |
From: Scott M. <sm...@us...> - 2002-02-22 14:46:14
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv11105/parse Modified Files: macros.php save.php transforms.php Log Message: Merge 0.21 bugfixes into trunk. Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- macros.php 8 Jan 2002 17:31:01 -0000 1.9 +++ macros.php 22 Feb 2002 14:46:08 -0000 1.10 @@ -131,8 +131,9 @@ foreach($pages as $page) { + $esc_page = addslashes($page[1]); $q2 = $pagestore->dbh->query("SELECT page FROM $LkTbl " . - "WHERE link='$page[1]' AND page!='$page[1]'"); + "WHERE link='$esc_page' AND page!='$esc_page'"); if(!($r2 = $pagestore->dbh->result($q2)) || empty($r2[0])) { if(!$first) // Don't prepend newline to first one. @@ -155,23 +156,23 @@ $text = ''; $first = 1; - $q1 = $pagestore->dbh->query("SELECT link, SUM(count) AS ct FROM $LkTbl " . - "GROUP BY link ORDER BY ct DESC, link"); + $q1 = $pagestore->dbh->query("SELECT l.link, SUM(l.count) AS ct, p.title " . + "FROM $LkTbl AS l LEFT JOIN $PgTbl AS p " . + "ON l.link = p.title " . + "GROUP BY l.link " . + "HAVING p.title IS NULL " . + "ORDER BY ct DESC, l.link"); + while(($result = $pagestore->dbh->result($q1))) { - $q2 = $pagestore->dbh->query("SELECT MAX(version) FROM $PgTbl " . - "WHERE title='$result[0]'"); - if(!($r2 = $pagestore->dbh->result($q2)) || empty($r2[0])) - { - if(!$first) // Don't prepend newline to first one. - { $text = $text . "\n"; } - else - { $first = 0; } + if(!$first) // Don't prepend newline to first one. + { $text = $text . "\n"; } + else + { $first = 0; } - $text = $text . '(' . - html_url(findURL($result[0]), $result[1]) . - ') ' . html_ref($result[0], $result[0]); - } + $text = $text . '(' . + html_url(findURL($result[0]), $result[1]) . + ') ' . html_ref($result[0], $result[0]); } return html_code($text); @@ -208,12 +209,20 @@ $text = ''; $first = 1; + +// It's not quite as straightforward as one would imagine to turn the +// following code into a JOIN, since we want to avoid multiplying the +// number of links to a page by the number of versions of that page that +// exist. If anyone has some efficient suggestions, I'd be welcome to +// entertain them. -- ScottMoonen + $q1 = $pagestore->dbh->query("SELECT link, SUM(count) AS ct FROM $LkTbl " . "GROUP BY link ORDER BY ct DESC, link"); while(($result = $pagestore->dbh->result($q1))) { + $esc_page = addslashes($result[0]); $q2 = $pagestore->dbh->query("SELECT MAX(version) FROM $PgTbl " . - "WHERE title='$result[0]'"); + "WHERE title='$esc_page'"); if(($r2 = $pagestore->dbh->result($q2)) && !empty($r2[0])) { if(!$first) // Don't prepend newline to first one. @@ -233,7 +242,7 @@ // This macro inserts an HTML anchor into the text. function view_macro_anchor($args) { - preg_match('/([-A-Za-z0-9]*)/', $args, $result); + preg_match('/^([A-Za-z][-A-Za-z0-9_:.]*)$/', $args, $result); if($result[1] != '') { return html_anchor($result[1]); } Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/save.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- save.php 3 Jan 2002 16:33:26 -0000 1.4 +++ save.php 22 Feb 2002 14:46:08 -0000 1.5 @@ -14,17 +14,22 @@ $macros_index = -1; $transclude_index = -1; + $elements_index = -1; for($i = 0; $i < count($ParseEngine); $i++) { if($ParseEngine[$i] == 'parse_macros') { $macros_index = $i; } if($ParseEngine[$i] == 'parse_transclude') { $transclude_index = $i; } + if($ParseEngine[$i] == 'parse_elements') + { $elements_index = $i; } } if($macros_index != -1) { $ParseEngine[$macros_index] = 'parse_noop'; } if($transclude_index != -1) { $ParseEngine[$transclude_index] = 'parse_noop'; } + if($elements_index != -1) + { $ParseEngine[$elements_index] = 'parse_noop'; } if(!$called) { @@ -45,6 +50,8 @@ { $ParseEngine[$macros_index] = 'parse_macros'; } if($transclude_index != -1) { $ParseEngine[$transclude_index] = 'parse_transclude'; } + if($elements_index != -1) + { $ParseEngine[$elements_index] = 'parse_elements'; } return $text; } Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- transforms.php 14 Jan 2002 18:07:55 -0000 1.24 +++ transforms.php 22 Feb 2002 14:46:09 -0000 1.25 @@ -59,7 +59,7 @@ if($validate) { $ptn = "/(^|[^A-Za-z])($LinkPtn)(())(\"\")?/e"; } else - { $ptn = "/(^|[^A-Za-z])(!?$LinkPtn)((\#[-A-Za-z0-9]+)?)(\"\")?/e"; } + { $ptn = "/(^|[^A-Za-z])(!?$LinkPtn)((\#[A-Za-z]([-A-Za-z0-9_:.]*[-A-Za-z0-9_])?)?)(\"\")?/e"; } return preg_replace($ptn, "q1('\\1').wikiname_token(q1('\\2'),'\\4')", @@ -81,15 +81,15 @@ if($validate) { - $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)(())()\\)\\)/e"; + $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)()()\\)\\)/e"; } else { - $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)((\|[-A-Za-z0-9 _+\\/.,']+)?)((\#[-A-Za-z0-9]+)?)\\)\\)/e"; + $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)(\|[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+)?(\#[A-Za-z][-A-Za-z0-9_:.]*)?()\\)\\)/e"; } return preg_replace($ptn, - "freelink_token(q1('\\1'), q1('\\3'), '\\5', '')", + "freelink_token(q1('\\1'), q1('\\2'), '\\3', '')", $text, -1); } @@ -355,6 +355,11 @@ if($steal == '' && $last_prefix == '' && $result[1] == '') { return $text; } // Common case fast. +// Remember lengths of strings. + + $last_len = strlen($last_prefix); + $prefix_len = strlen($result[1]); + if($steal == '') // Not slurping up line. { $text = $result[4]; @@ -365,19 +370,23 @@ // previous line. for($i = 0; - $i < $MaxNesting && ($last_prefix[$i] != '' || $result[1][$i] != ''); + $i < $MaxNesting && ($i < $last_len || $i < $prefix_len); $i++) { - if($last_prefix[$i] == $result[1][$i]) + // If equal, continue. + if($i < $last_len && $i < $prefix_len // Neither past end. + && $last_prefix[$i] == $result[1][$i]) // Equal content. { continue; } - if($last_prefix[$i] == '') + + // If we've gone deeper than the previous line, we're done. + if($i >= $last_len) { break; } - if($last_prefix[$i] != $result[1][$i]) - { -// Uh-oh. We're different. End any dangling lists from the previous -// line. - for($j = $i; $j < $MaxNesting && $last_prefix[$j] != ''; $j++) + // If last line goes further than us, end its dangling lists. + if($i >= $prefix_len // Current line ended. + || $last_prefix[$i] != $result[1][$i]) // Or not, but they differ. + { + for($j = $i; $j < $MaxNesting && $j < $last_len; $j++) { $fixup = entity_listitem($last_prefix[$j], 'end') . entity_list($last_prefix[$j], 'end') @@ -390,7 +399,7 @@ // End the preceding line's list item if we're starting another one // at the same level. - if($i > 0 && $result[1][$i] == '') + if($i > 0 && $i >= $prefix_len) { $fixup = $fixup . entity_listitem($last_prefix[$i - 1], 'end'); } // Start fresh new lists for this line as needed. @@ -398,14 +407,14 @@ // instead of what they really may appear as, since their function is // really just to indent. - for(; $i < $MaxNesting - 1 && $result[1][$i + 1] != ''; $i++) + for(; $i < $MaxNesting - 1 && $i + 1 < $prefix_len; $i++) { $result[1][$i] = ':'; // Pretend to be an indent. $fixup = $fixup . entity_list(':', 'start') . entity_listitem(':', 'start'); } - if($result[1][$i] != '') + if($i < $prefix_len) // Start the list itself. { $fixup = $fixup . entity_list($result[1][$i], 'start'); @@ -476,7 +485,7 @@ { global $MaxHeading; - if(!preg_match('/^(=+) (.*) (=+)$/', $text, $result)) + if(!preg_match('/^\s*(=+) (.*) (=+)\s*$/', $text, $result)) { return $text; } if(strlen($result[1]) != strlen($result[3])) @@ -507,11 +516,19 @@ { global $Entity, $DisplayEngine; - return $DisplayEngine[$Entity[$text][0]]($Entity[$text][1], - $Entity[$text][2], - $Entity[$text][3], - $Entity[$text][4], - $Entity[$text][5]); + if(function_exists('call_user_func_array')) + { + return call_user_func_array($DisplayEngine[$Entity[$text][0]], + array_slice($Entity[$text], 1)); + } + else + { + return $DisplayEngine[$Entity[$text][0]]($Entity[$text][1], + $Entity[$text][2], + $Entity[$text][3], + $Entity[$text][4], + $Entity[$text][5]); + } } function parse_diff_skip($text) @@ -528,8 +545,13 @@ static $in_old = 0; static $in_new = 0; - $this_old = ($text[0] == '<'); - $this_new = ($text[0] == '>'); + if(strlen($text) == 0) + { $this_old = $this_new = 0; } + else + { + $this_old = ($text[0] == '<'); + $this_new = ($text[0] == '>'); + } if($this_old || $this_new) { $text = substr($text, 2); } |
From: Scott M. <sm...@us...> - 2002-02-22 14:46:14
|
Update of /cvsroot/tavi/tavi/action In directory usw-pr-cvs1:/tmp/cvs-serv11105/action Modified Files: admin.php save.php style.php Log Message: Merge 0.21 bugfixes into trunk. Index: admin.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/admin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- admin.php 7 Jan 2002 18:13:58 -0000 1.1 +++ admin.php 22 Feb 2002 14:46:08 -0000 1.2 @@ -1,6 +1,9 @@ <?php // $Id$ +// Don't freak out lib/init.php. +$document = $categories = $comment = $page = ''; + require('lib/init.php'); require('parse/html.php'); require('parse/transforms.php'); @@ -9,35 +12,45 @@ if($AdminEnabled != 1) { die($ErrorAdminDisabled); } -// If register_globals is off, we need to harvest the script parameters -// at this point. +// Harvest script parameters. -if(!ini_get('register_globals')) +$REMOTE_ADDR = isset($HTTP_SERVER_VARS['REMOTE_ADDR']) + ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ''; + +if(isset($HTTP_GET_VARS['locking'])) + { $locking = $HTTP_GET_VARS['locking']; } +if(isset($HTTP_GET_VARS['blocking'])) + { $blocking = $HTTP_GET_VARS['blocking']; } +if(!isset($locking)) { - $REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; + $locking = isset($HTTP_POST_VARS['locking']) + ? $HTTP_POST_VARS['locking'] : ''; +} +if(!isset($blocking)) +{ + $blocking = isset($HTTP_POST_VARS['blocking']) + ? $HTTP_POST_VARS['blocking'] : ''; +} - $locking = $HTTP_GET_VARS['locking']; - $blocking = $HTTP_GET_VARS['blocking']; +$Block = isset($HTTP_POST_VARS['Block']) + ? $HTTP_POST_VARS['Block'] : ''; +$Unblock = isset($HTTP_POST_VARS['Unblock']) + ? $HTTP_POST_VARS['Unblock'] : ''; +$Save = isset($HTTP_POST_VARS['Save']) + ? $HTTP_POST_VARS['Save'] : ''; +$address = isset($HTTP_POST_VARS['address']) + ? $HTTP_POST_VARS['address'] : ''; - $Block = $HTTP_POST_VARS['Block']; - $Unblock = $HTTP_POST_VARS['Unblock']; - $Save = $HTTP_POST_VARS['Save']; - $address = $HTTP_POST_VARS['address']; - if(!isset($blocking)) - { $blocking = $HTTP_POST_VARS['blocking']; } - if(!isset($locking)) - { $locking = $HTTP_POST_VARS['locking']; } - $count = $HTTP_POST_VARS['count']; +$count = isset($HTTP_POST_VARS['count']) ? $HTTP_POST_VARS['count'] : 0; - if($locking && $count > 0) +if($locking && $count > 0) +{ + for($i = 1; $i <= $count; $i++) { - for($i = 1; $i <= $count; $i++) - { - $var = 'name' + $i; - $$var = $HTTP_POST_VARS[$var]; - $var = 'lock' + $i; - $$var = $HTTP_POST_VARS[$var]; - } + $var = 'name' + $i; + $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : ''; + $var = 'lock' + $i; + $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : ''; } } @@ -57,7 +70,10 @@ for($i = 1; $i <= $count; $i++) { $page = urldecode($HTTP_POST_VARS['name' . $i]); - $lock = ($HTTP_POST_VARS['lock' . $i] == '1'); + if(isset($HTTP_POST_VARS['lock' . $i])) + { $lock = $HTTP_POST_VARS['lock' . $i]; } + else + { $lock = 0; } $pg = $pagestore->page($page); $pg->read(); $pg->version++; Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/save.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- save.php 7 Jan 2002 16:28:32 -0000 1.7 +++ save.php 22 Feb 2002 14:46:08 -0000 1.8 @@ -41,15 +41,15 @@ // Silently trim string to $MaxPostLen chars. $document = substr($document, 0, $MaxPostLen); - - $document = str_replace("\\", "\\\\", $document); - $document = str_replace("'", "\\'", $document); $document = str_replace("\r", "", $document); + $esc_doc = str_replace("\\", "\\\\", $document); + $esc_doc = str_replace("'", "\\'", $esc_doc); + $comment = str_replace("\\", "\\\\", $comment); $comment = str_replace("'", "\\'", $comment); - $pg->text = $document; + $pg->text = $esc_doc; $pg->hostname = gethostbyaddr($REMOTE_ADDR); $pg->username = $UserName; $pg->comment = $comment; Index: style.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/style.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- style.php 8 Jan 2002 17:31:00 -0000 1.1 +++ style.php 22 Feb 2002 14:46:08 -0000 1.2 @@ -7,6 +7,12 @@ { header("Content-type: text/css"); + ob_start(); + require(TemplateDir . '/wiki.css'); + + $size = ob_get_length(); + header("Content-Length: $size"); + ob_end_flush(); } |
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv11105/template Modified Files: admin.php common.php conflict.php diff.php edit.php find.php history.php prefs.php preview.php view.php Log Message: Merge 0.21 bugfixes into trunk. Index: admin.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/admin.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- admin.php 10 Jan 2002 01:31:04 -0000 1.10 +++ admin.php 22 Feb 2002 14:46:09 -0000 1.11 @@ -22,6 +22,11 @@ <?php print $args['html']; ?> </div> <?php - template_common_epilogue(array('nosearch' => 1)); + template_common_epilogue(array('twin' => '', + 'edit' => '', + 'editver' => 0, + 'history' => '', + 'timestamp' => '', + 'nosearch' => 1)); } ?> Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- common.php 15 Jan 2002 16:22:39 -0000 1.7 +++ common.php 22 Feb 2002 14:46:09 -0000 1.8 @@ -24,6 +24,11 @@ global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription; global $StyleScript, $SeparateTitleWords, $SeparateHeaderWords; + $keywords = ' ' . html_split_name($args['headlink']); + $keywords = str_replace('"', '"', $keywords); + + ob_start(); // Start buffering output. + if($SeparateTitleWords) { $args['title'] = html_split_name($args['title']); } ?> @@ -32,7 +37,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> -<meta name="KEYWORDS" content="<?php print $MetaKeywords; ?>" /> +<meta name="KEYWORDS" content="<?php print $MetaKeywords . $keywords; ?>" /> <meta name="DESCRIPTION" content="<?php print $MetaDescription; ?>" /> <?php if($args['norobots']) @@ -170,5 +175,9 @@ </body> </html> <?php + + $size = ob_get_length(); + header("Content-Length: $size"); + ob_end_flush(); } ?> Index: conflict.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/conflict.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- conflict.php 10 Jan 2002 01:31:04 -0000 1.9 +++ conflict.php 22 Feb 2002 14:46:09 -0000 1.10 @@ -75,6 +75,7 @@ 'edit' => '', 'editver' => 0, 'history' => $args['page'], - 'timestamp' => $args['timestamp'])); + 'timestamp' => $args['timestamp'], + 'nosearch' => 0)); } ?> Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/diff.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- diff.php 10 Jan 2002 01:31:04 -0000 1.10 +++ diff.php 22 Feb 2002 14:46:09 -0000 1.11 @@ -32,6 +32,7 @@ 'edit' => $args['page'], 'editver' => $args['editable'] ? 0 : -1, 'history' => $args['page'], - 'timestamp' => $args['timestamp'])); + 'timestamp' => $args['timestamp'], + 'nosearch' => 0)); } ?> Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/edit.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- edit.php 10 Jan 2002 01:31:04 -0000 1.9 +++ edit.php 22 Feb 2002 14:46:09 -0000 1.10 @@ -60,6 +60,7 @@ 'edit' => '', 'editver' => '', 'history' => $args['page'], - 'timestamp' => $args['timestamp'])); + 'timestamp' => $args['timestamp'], + 'nosearch' => 0)); } ?> Index: find.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/find.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- find.php 10 Jan 2002 01:31:04 -0000 1.10 +++ find.php 22 Feb 2002 14:46:09 -0000 1.11 @@ -27,6 +27,7 @@ 'edit' => '', 'editver' => 0, 'history' => '', - 'timestamp' => '')); + 'timestamp' => '', + 'nosearch' => 0)); } ?> Index: history.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/history.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- history.php 10 Jan 2002 01:31:04 -0000 1.11 +++ history.php 22 Feb 2002 14:46:09 -0000 1.12 @@ -49,6 +49,7 @@ 'edit' => '', 'editver' => 0, 'history' => '', - 'timestamp' => '')); + 'timestamp' => '', + 'nosearch' => 0)); } ?> Index: prefs.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/prefs.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- prefs.php 10 Jan 2002 01:31:04 -0000 1.11 +++ prefs.php 22 Feb 2002 14:46:09 -0000 1.12 @@ -73,6 +73,11 @@ </form> </div> <?php - template_common_epilogue(array('nosearch' => 1)); + template_common_epilogue(array('twin' => '', + 'edit' => '', + 'editver' => 0, + 'history' => '', + 'timestamp' => '', + 'nosearch' => 1)); } ?> Index: preview.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/preview.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- preview.php 10 Jan 2002 01:31:04 -0000 1.9 +++ preview.php 22 Feb 2002 14:46:09 -0000 1.10 @@ -66,6 +66,7 @@ 'edit' => '', 'editver' => 0, 'history' => $args['page'], - 'timestamp' => $args['timestamp'])); + 'timestamp' => $args['timestamp'], + 'nosearch' => 0)); } ?> Index: view.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/view.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- view.php 10 Jan 2002 01:31:04 -0000 1.9 +++ view.php 22 Feb 2002 14:46:09 -0000 1.10 @@ -36,6 +36,7 @@ : ($args['archive'] ? $args['version'] : 0), 'history' => $args['page'], - 'timestamp' => $args['timestamp'])); + 'timestamp' => $args['timestamp'], + 'nosearch' => 0)); } ?> |