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: Scott M. <sm...@us...> - 2002-01-08 17:38:02
|
Update of /cvsroot/tavi/tavi In directory usw-pr-cvs1:/tmp/cvs-serv2021 Modified Files: NEWS.txt Log Message: Release notes, as it were. Index: NEWS.txt =================================================================== RCS file: /cvsroot/tavi/tavi/NEWS.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NEWS.txt 2002/01/08 17:31:00 1.2 +++ NEWS.txt 2002/01/08 17:37:59 1.3 @@ -3,12 +3,25 @@ WikkiTikkiTavi - News --------------------- -See ChangeLog.txt. +See also ChangeLog.txt. --------------------- +2002-01-?? Scott Moonen <sm...@an...> + + WikkiTikkiTavi version 0.21 is released. Several bug fixes (including a + security fix), and several minor new features, such as HTML anchors, + arbitrary link text for free links, RSS syndication, and the use of style + sheets and XHTML-Strict markup. + + Users should note that the transclude syntax, %%PageName%%, has been + deprecated for this release. It is superceded by the + [[Transclude PageName]] macro. The double-% syntax will be removed + as of version 0.30. + + 2001-11-17 Christopher Cashell <to...@zy...> -WikkiTikkiTavi has had a CVS reorganization, intending to bring it to a -more "normal" state (as defined by common CVS usage conventions). + WikkiTikkiTavi has had a CVS reorganization, intending to bring it to a + more "normal" state (as defined by common CVS usage conventions). |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:06
|
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv31540/template Modified Files: common.php Log Message: Installation tweaks, [[Template]] macro. Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- common.php 2002/01/07 15:39:17 1.5 +++ common.php 2002/01/08 17:31:01 1.6 @@ -22,7 +22,7 @@ function template_common_prologue($args) { global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription; - global $StyleSheet, $SeparateTitleWords, $SeparateHeaderWords; + global $StyleScript, $SeparateTitleWords, $SeparateHeaderWords; if($SeparateTitleWords) { $args['title'] = html_split_name($args['title']); } @@ -42,7 +42,7 @@ <?php } ?> -<link rel="STYLESHEET" href="<? print $StyleSheet; ?>" type="text/css" /> +<link rel="STYLESHEET" href="<? print $StyleScript; ?>" type="text/css" /> <title><?php print $args['title'] . ' - ' . $WikiName; ?></title> </head> <body> |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:05
|
Update of /cvsroot/tavi/tavi In directory usw-pr-cvs1:/tmp/cvs-serv31540 Modified Files: ChangeLog.txt INSTALL.txt NEWS.txt Log Message: Installation tweaks, [[Template]] macro. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChangeLog.txt 2002/01/03 22:04:23 1.2 +++ ChangeLog.txt 2002/01/08 17:31:00 1.3 @@ -3,6 +3,17 @@ WikkiTikkiTavi - ChangeLog -------------------------- +2002-01-08 Scott Moonen <sm...@an...> + + * Worked on streamlining installation, providing instructions for + added security and ease of upgrade. + * Introduced [[Transclude PageName]] macro, which will succeed + the %%PageName%% syntax. The double-% syntax is now deprecated + and will be removed in 0.30. + * Added action=style URL action to retrieve stylesheet. + * Applied patch from David Baker to allow case-insensitive image + suffixes, and also support .jpeg suffix. + 2002-01-03 Scott Moonen <sm...@an...> * Changed transclusion behavior so that recursive transclusions beyond @@ -21,7 +32,7 @@ register_globals=off. * Implemented HTML anchor macro, [[Anchor name]]. * Implemented anchor reference syntax: PageName#anchor and - ((free links))#anchor. + ((free links#anchor)). 2002-01-01 Scott Moonen <sm...@an...> Index: INSTALL.txt =================================================================== RCS file: /cvsroot/tavi/tavi/INSTALL.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- INSTALL.txt 2002/01/04 15:54:42 1.6 +++ INSTALL.txt 2002/01/08 17:31:00 1.7 @@ -8,6 +8,9 @@ more detailed instructions dealing with virtual hosts, 'Tavi templates, URL rewriting, etc. +See below, under "Installation Suggestions" for some recommendations as +to how to ensure your installation is secure. + 1. Extract tavi-0.21.tar to the location you wish the script to reside. 2. Run install/create-db.pl to create your tables: @@ -32,19 +35,20 @@ perl ./create-db.pl project sally pass wiki_ database.example.com perl ./create-db.pl common jim key "" database.example.com -3. In the install/ directory, run the "configure.pl" script to configure - your wiki: +3. In the install/ directory, run the "configure.pl" script to generate a + configuration file for your wiki. It takes one parameter, the location + of the configuration file. For example: - perl ./configure.pl + perl ./configure.pl /home/u/user12/tavi/config.php + perl ./configure.pl ../config.php You will be prompted for such things as the URL to the wiki script, the name of your wiki, database information, etc. 4. Examine the file 'config.php' that was created by the configuration - script, to make sure the settings are correct. 'config.php' is located - in the base directory of the wiki install. + script, to make sure the settings are correct. -4. Visit your wiki and start creating pages! +5. Visit your wiki and start creating pages! Apart from your wiki's home page, you should also create RecentChanges, containing (at minimum) a wildcard subscription list like so: @@ -54,9 +58,98 @@ You should also create some InterWiki entries. See http://tavi.sourceforge.net/InterWiki for help. -5. Advertise your wiki. Feel free to put a link to your wiki on +6. Advertise your wiki. Feel free to put a link to your wiki on http://tavi.sourceforge.net/TaviSites. + +Installation Suggestions +======================== + +There are several steps you should take to add additional security and +flexibility to your installation. Note, however, that none of the +following suggestions are *required*. If you follow the above steps for +a simple installation, 'Tavi will work just as well. + +1. It is not necessary to install 'Tavi in a location that can be + accessed from the web. Indeed, if you install it in a central location, + you realize several benefits: + + * Automatic upgrading becomes easier. + * One installed copy can serve multiple scripts on a wiki farm or + virtual host. + * Your installation is less susceptible to undiscovered PHP exploits, + since the various 'Tavi scripts are not accessible from a browser. + + In order to do this, simply install 'Tavi in a non-web-accessible + directory on your server. For example, you might install it in + /usr/local/lib/tavi/tavi-0.21 and create a symbolic link called + /usr/local/lib/tavi/tavi-current that points to it. + + You must then: + + A. Choose a web directory from which to access 'Tavi. + + B. Create an 'admin/' subdirectory off of that directory. + + C. (In Apache), edit your .htaccess file to add the 'Tavi installation + to the include directories. For example, place the following in + .htaccess: + + php_value include_path "/usr/local/lib/tavi/tavi-current" + + If you are using php.cgi instead of mod_php, you may have to edit + your php.ini file instead to change the include_path. + + Do the same for a .htaccess file in the 'admin/' subdirectory you + created. + + Note also that you need to allow Apache FollowSymlinks if you use + symbolic links as here suggested. + + D. Create a symbolic link in your web directory to the index.php + file in the 'Tavi installation (in this example, to + /usr/local/lib/tavi/tavi-current/index.php). + + (You will need to allow Apache FollowSymlinks for this to work; + otherwise, you could perhaps copy index.php to your web directory.) + + E. Create a symbolic link in 'admin/' on your webspace to the + admin/index.php file in the 'Tavi installation + + F. Make sure your config.php file is accessible from the PHP include + path (see below). + +2. For added security, you should try to place your config.php file in a + location that is not accessible from the web. While no one will probably + be able to read its contents, it is still a good idea to prevent it from + being web-accessible. + + To do so, create a .htaccess file in your web directory and in the 'admin/' + sub-directory that adds the location of config.php to the PHP include_path. + For example, suppose you placed config.php in /home/u/user12/tavi/. Your + .htaccess files might look like: + + php_value include_path "/home/u/user12/tavi" + + Or, if you followed the steps above to also place the 'Tavi script in a + central location: + + php_value include_path "/home/u/user12/tavi:/usr/local/lib/tavi/tavi-current" + + If you are using the CGI version of PHP, instead of mod_php, you would + similarly configure php.ini to change your include path. + +3. For added security, you should turn off register_globals. While there + are no known register_globals exploits in 'Tavi, it is always a good idea + to protect against the unknown by disabling register_globals. If you are + using mod_php, you would add the following line to your .htaccess file in + your web directory and in the 'admin/' subdirectory: + + php_flag register_globals off + + You should do similarly in php.ini if you are using the CGI version of PHP. + + Advanced ======== @@ -120,9 +213,8 @@ If you have been using a customized template, we recommend that you place it in a directory other than template/. This will prevent it from being -overwritten when you reinstall 'Tavi, or should you choose to upgrade again -later. (However, you may wish to consider using the new template as a -starting point for your custom template, as it has been tweaked to be -compliant with the XHTML-Strict standard.) +overwritten when you upgrade now (or later). (However, you may wish to +consider using the new template as a starting point for your custom template, +as it has been tweaked to be compliant with the XHTML-Strict standard.) Index: NEWS.txt =================================================================== RCS file: /cvsroot/tavi/tavi/NEWS.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- NEWS.txt 2002/01/03 21:46:23 1.1 +++ NEWS.txt 2002/01/08 17:31:00 1.2 @@ -3,7 +3,7 @@ WikkiTikkiTavi - News --------------------- -See ChangeLog. +See ChangeLog.txt. --------------------- |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:05
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv31540/parse Modified Files: html.php macros.php Log Message: Installation tweaks, [[Template]] macro. Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- html.php 2002/01/07 15:36:29 1.19 +++ html.php 2002/01/08 17:31:01 1.20 @@ -114,7 +114,7 @@ function html_url($url, $text) { if($url == $text - && preg_match('/(.jpg|.png|.gif)$/', $text)) + && preg_match('/(.jpe?g|.png|.gif)$/i', $text)) { return "<img src=\"$url\" alt=\"" . basename($url) . "\" />"; } Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- macros.php 2002/01/04 20:38:42 1.8 +++ macros.php 2002/01/08 17:31:01 1.9 @@ -240,4 +240,38 @@ else { return ''; } } + +// This macro transcludes another page into a wiki page. +function view_macro_transclude($args) +{ + global $pagestore, $ParseEngine, $ParseObject; + static $visited_array = array(); + static $visited_count = 0; + + if(!validate_page($args)) + { return '[[Transclude ' . $args . ']]'; } + + $visited_array[$visited_count++] = $ParseObject; + for($i = 0; $i < $visited_count; $i++) + { + if($visited_array[$i] == $args) + { + $visited_count--; + return '[[Transclude ' . $args . ']]'; + } + } + + $pg = $pagestore->page($args); + $pg->read(); + if(!$pg->exists) + { + $visited_count--; + return '[[Transclude ' . $args . ']]'; + } + + $result = parseText($pg->text, $ParseEngine, $args); + $visited_count--; + return $result; +} + ?> |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:05
|
Update of /cvsroot/tavi/tavi/lib In directory usw-pr-cvs1:/tmp/cvs-serv31540/lib Modified Files: defaults.php main.php url.php Log Message: Installation tweaks, [[Template]] macro. Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- defaults.php 2002/01/07 15:36:29 1.2 +++ defaults.php 2002/01/08 17:31:01 1.3 @@ -239,6 +239,7 @@ $ViewMacroEngine = array( '!' => 'view_macro_category', 'Anchor' => 'view_macro_anchor', + 'Transclude' => 'view_macro_transclude', 'PageSize' => 'view_macro_pagesize', 'LinkTable' => 'view_macro_linktab', 'OrphanedPages' => 'view_macro_orphans', Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- main.php 2002/01/07 18:13:58 1.1 +++ main.php 2002/01/08 17:31:01 1.2 @@ -52,7 +52,8 @@ 'search'), 'prefs' => array('action/prefs.php', 'action_prefs', 'view'), 'macro' => array('action/macro.php', 'action_macro', 'search'), - 'rss' => array('action/rss.php', 'action_rss', 'view') + 'rss' => array('action/rss.php', 'action_rss', 'view'), + 'style' => array('action/style.php', 'action_style', '') ); // Default action and page names. @@ -68,7 +69,8 @@ { die($ErrorInvalidPage); } // Don't let people do too many things too quickly. -rateCheck($pagestore->dbh, $ActionList[$action][2]); +if($ActionList[$action][2] != '') + { rateCheck($pagestore->dbh, $ActionList[$action][2]); } // Dispatch the appropriate action. if(!empty($ActionList[$action])) Index: url.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/url.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- url.php 2002/01/07 18:13:58 1.2 +++ url.php 2002/01/08 17:31:01 1.3 @@ -23,6 +23,8 @@ { $DiffScript = $ScriptBase . '?action=diff'; } if(!isset($PrefsScript)) { $PrefsScript = $ScriptBase . '?action=prefs'; } +if(!isset($StyleScript)) + { $StyleScript = $ScriptBase . '?action=style'; } if(!function_exists('viewURL')) { |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:05
|
Update of /cvsroot/tavi/tavi/install In directory usw-pr-cvs1:/tmp/cvs-serv31540/install Modified Files: settings.cnf Log Message: Installation tweaks, [[Template]] macro. Index: settings.cnf =================================================================== RCS file: /cvsroot/tavi/tavi/install/settings.cnf,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- settings.cnf 2002/01/07 18:13:58 1.4 +++ settings.cnf 2002/01/08 17:31:01 1.5 @@ -148,6 +148,3 @@ // $TemplateDir indicates what directory your wiki templates are located in. // You may use this to install other templates than the default template. ---- -noprompt_var $StyleSheet dirname($ScriptBase) . '/' . $TemplateDir . '/wiki.css' -// $StyleSheet contains the URL for your wiki's CSS style sheet. It is -// typically a relative URL, such as '/wiki/wiki.css'. |
From: Scott M. <sm...@us...> - 2002-01-08 17:31:05
|
Update of /cvsroot/tavi/tavi/action In directory usw-pr-cvs1:/tmp/cvs-serv31540/action Added Files: style.php Log Message: Installation tweaks, [[Template]] macro. --- NEW FILE: style.php --- <?php // $Id: style.php,v 1.1 2002/01/08 17:31:00 smoonen Exp $ // This function emits the current template's stylesheet. function action_style() { header("Content-type: text/css"); require(TemplateDir . '/wiki.css'); } |
From: Scott M. <sm...@us...> - 2002-01-07 18:35:52
|
Update of /cvsroot/tavi/tavi/install In directory usw-pr-cvs1:/tmp/cvs-serv12559/install Modified Files: configure.pl Log Message: Parameterize config file name/location. Index: configure.pl =================================================================== RCS file: /cvsroot/tavi/tavi/install/configure.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.pl 2002/01/07 16:28:32 1.5 +++ configure.pl 2002/01/07 18:35:49 1.6 @@ -5,6 +5,17 @@ if(!(-t)) { die "You must execute this script from the command line.\n"; } +if($#ARGV == -1) +{ + print "Usage: \n"; + print " perl ./configure.pl [some/directory/]config.php\n"; + print "\n"; + print "Examples:\n\n"; + print " perl ./configure.pl ../config.php\n"; + print " perl ./configure.pl /home/u/user12/tavi/config.php\n"; + exit; +} + # This subroutine prompts the user for a variable's value and writes # that variable to config.php. sub do_variable @@ -76,8 +87,8 @@ if(!(open SETTINGS , "settings.cnf")) { die "Error opening settings.cnf!\n"; } -if(!(open CONFIG , ">../config.php")) - { die "Error opening config.php for writing!\n"; } +if(!(open CONFIG , ">$ARGV[0]")) + { die "Error opening configuration file for writing!\n"; } print CONFIG "<?php\n\n"; @@ -107,6 +118,6 @@ close SETTINGS; close CONFIG; -print "\n\nconfig.php has been written. Please examine it to verify\n"; +print "\n\n$ARGV[0] has been written. Please examine it to verify\n"; print "it is accurate.\n"; |
From: Scott M. <sm...@us...> - 2002-01-07 18:14:01
|
Update of /cvsroot/tavi/tavi/admin In directory usw-pr-cvs1:/tmp/cvs-serv6694/admin Modified Files: index.php Log Message: Refactor index.php, admin/index.php Index: index.php =================================================================== RCS file: /cvsroot/tavi/tavi/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- index.php 2002/01/02 21:07:21 1.6 +++ index.php 2002/01/07 18:13:58 1.7 @@ -2,121 +2,5 @@ // $Id$ chdir('..'); -require('lib/init.php'); -require('parse/html.php'); -require('parse/transforms.php'); -require('template/admin.php'); - -// If register_globals is off, we need to harvest the script parameters -// at this point. - -if(!ini_get('register_globals')) -{ - $locking = $HTTP_GET_VARS['locking']; - $blocking = $HTTP_GET_VARS['blocking']; - - $Block = $HTTP_POST_VARS['Block']; - $Unblock = $HTTP_POST_VARS['Unblock']; - $Save = $HTTP_POST_VARS['Save']; - $address = $HTTP_POST_VARS['address']; - $blocking = $HTTP_POST_VARS['blocking']; - $count = $HTTP_POST_VARS['count']; - $locking = $HTTP_POST_VARS['locking']; - - if($locking && $count > 0) - { - for($i = 1; $i <= $count; $i++) - { - $var = 'name' + $i; - $$var = $HTTP_POST_VARS[$var]; - $var = 'lock' + $i; - $$var = $HTTP_POST_VARS[$var]; - } - } -} - -if($AdminEnabled != 1) - { die($ErrorAdminDisabled); } - -if($locking) // Locking/unlocking pages. -{ - if(empty($Save)) // Not saving results; display form. - { - $html = html_lock_start(); - $pagelist = $pagestore->allpages(); - foreach($pagelist as $page) - { $html = $html . html_lock_page($page[1], $page[6]); } - template_admin(array('html' => $html . html_lock_end(count($pagelist)))); - } - else // Lock/unlock pages at admin's request. - { - $pagestore->lock(); // Exclusive access to database. - for($i = 1; $i <= $count; $i++) - { - $page = urldecode($HTTP_POST_VARS['name' . $i]); - $lock = ($HTTP_POST_VARS['lock' . $i] == '1'); - $pg = $pagestore->page($page); - $pg->read(); - $pg->version++; - $pg->hostname = gethostbyaddr($REMOTE_ADDR); - $pg->username = $UserName; - $pg->comment = ''; - $pg->text = str_replace('\\', '\\\\', $pg->text); - $pg->text = str_replace('\'', '\\\'', $pg->text); - if($pg->exists && $pg->mutable && $lock) - { - $pg->mutable = 0; - $pg->write(); - } - else if($pg->exists && !$pg->mutable && !$lock) - { - $pg->mutable = 1; - $pg->write(); - } - } - - $pagestore->unlock(); - header('Location: ' . $AdminScript); - } -} -else if($blocking) // Blocking/unblocking IP addrs. -{ - if(empty($Block) && empty($Unblock)) // Not saving results; display form. - { - $html = ''; - if($RatePeriod == 0) - { - $html = $html . html_bold_start() . - 'Rate control / IP blocking disabled' . - html_bold_end() . html_newline(); - } - - $html = $html . html_rate_start(); - $blocklist = rateBlockList($pagestore->dbh); - foreach($blocklist as $block) - { $html = $html . html_rate_entry($block); } - $html = $html . html_rate_end(); - - template_admin(array('html' => $html)); - } - else // Block/unblock an address group. - { - if(!empty($Block)) - { rateBlockAdd($pagestore->dbh, $address); } - else if(!empty($Unblock)) - { rateBlockRemove($pagestore->dbh, $address); } - - header('Location: ' . $AdminScript); - } -} -else // Display main menu for admin. -{ - template_admin(array('html' => html_url($AdminScript . '?locking=1', - 'Lock / unlock pages') . - html_newline() . - html_url($AdminScript . '?blocking=1', - 'Block / unblock hosts') . - html_newline())); -} - +require('action/admin.php'); ?> |
From: Scott M. <sm...@us...> - 2002-01-07 18:14:01
|
Update of /cvsroot/tavi/tavi/install In directory usw-pr-cvs1:/tmp/cvs-serv6694/install Modified Files: settings.cnf Log Message: Refactor index.php, admin/index.php Index: settings.cnf =================================================================== RCS file: /cvsroot/tavi/tavi/install/settings.cnf,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- settings.cnf 2002/01/07 16:28:32 1.3 +++ settings.cnf 2002/01/07 18:13:58 1.4 @@ -110,7 +110,7 @@ // $ScriptBase determines the location of your wiki script. It should indicate // the full URL of the main index.php script itself. ---- -string $AdminBase '' +string $AdminScript '' Enter the fully-qualified URL for the administration script for this wiki. For example, if the wiki script itself is located at the URL |
From: Scott M. <sm...@us...> - 2002-01-07 18:14:01
|
Update of /cvsroot/tavi/tavi/lib In directory usw-pr-cvs1:/tmp/cvs-serv6694/lib Modified Files: url.php Added Files: main.php Log Message: Refactor index.php, admin/index.php --- NEW FILE: main.php --- <?php // $Id: main.php,v 1.1 2002/01/07 18:13:58 smoonen Exp $ // If register_globals is off, we need to harvest the script parameters // at this point. if(!ini_get('register_globals')) { $HTTP_REFERER = $HTTP_SERVER_VARS['HTTP_REFERER']; $QUERY_STRING = $HTTP_SERVER_VARS['QUERY_STRING']; $REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; $action = $HTTP_GET_VARS['action']; $page = $HTTP_GET_VARS['page']; $ver1 = $HTTP_GET_VARS['ver1']; $ver2 = $HTTP_GET_VARS['ver2']; $find = $HTTP_GET_VARS['find']; $version = $HTTP_GET_VARS['version']; $full = $HTTP_GET_VARS['full']; $Preview = $HTTP_POST_VARS['Preview']; $Save = $HTTP_POST_VARS['Save']; $archive = $HTTP_POST_VARS['archive']; $auth = $HTTP_POST_VARS['auth']; $categories = $HTTP_POST_VARS['categories']; $cols = $HTTP_POST_VARS['cols']; $comment = $HTTP_POST_VARS['comment']; $days = $HTTP_POST_VARS['days']; $discard = $HTTP_POST_VARS['discard']; $document = $HTTP_POST_VARS['document']; $hist = $HTTP_POST_VARS['hist']; $min = $HTTP_POST_VARS['min']; $nextver = $HTTP_POST_VARS['nextver']; $rows = $HTTP_POST_VARS['rows']; $tzoff = $HTTP_POST_VARS['tzoff']; $user = $HTTP_POST_VARS['user']; } require('lib/init.php'); require('parse/transforms.php'); // To add an action=x behavior, add an entry to this array. First column // is the file to load, second is the function to call, and third is how // to treat it for rate-checking purposes ('view', 'edit', or 'search'). $ActionList = array( 'view' => array('action/view.php', 'action_view', 'view'), 'edit' => array('action/edit.php', 'action_edit', 'view'), 'save' => array('action/save.php', 'action_save', 'edit'), 'diff' => array('action/diff.php', 'action_diff', 'search'), 'find' => array('action/find.php', 'action_find', 'search'), 'history' => array('action/history.php', 'action_history', 'search'), 'prefs' => array('action/prefs.php', 'action_prefs', 'view'), 'macro' => array('action/macro.php', 'action_macro', 'search'), 'rss' => array('action/rss.php', 'action_rss', 'view') ); // Default action and page names. if(empty($page) && empty($action)) { $page = $QUERY_STRING; } if(empty($action)) { $action = 'view'; } if(empty($page)) { $page = $HomePage; } // Confirm we have a valid page name. if(!validate_page($page)) { die($ErrorInvalidPage); } // Don't let people do too many things too quickly. rateCheck($pagestore->dbh, $ActionList[$action][2]); // Dispatch the appropriate action. if(!empty($ActionList[$action])) { include($ActionList[$action][0]); $ActionList[$action][1](); } // Expire old versions, etc. $pagestore->maintain(); ?> Index: url.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/url.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- url.php 2002/01/03 21:46:23 1.1 +++ url.php 2002/01/07 18:13:58 1.2 @@ -7,14 +7,22 @@ // The new versions of the relevant functions should be defined in // config.php. Those functions that are redefined will not be // redefined here. -$ViewBase = $ScriptBase . '?page='; -$EditBase = $ScriptBase . '?action=edit&page='; -$HistoryBase = $ScriptBase . '?action=history&page='; -$FindScript = $ScriptBase . '?action=find'; -$FindBase = $FindScript . '&find='; -$SaveBase = $ScriptBase . '?action=save&page='; -$DiffScript = $ScriptBase . '?action=diff'; -$PrefsScript = $ScriptBase . '?action=prefs'; +if(!isset($ViewBase)) + { $ViewBase = $ScriptBase . '?page='; } +if(!isset($EditBase)) + { $EditBase = $ScriptBase . '?action=edit&page='; } +if(!isset($HistoryBase)) + { $HistoryBase = $ScriptBase . '?action=history&page='; } +if(!isset($FindScript)) + { $FindScript = $ScriptBase . '?action=find'; } +if(!isset($FindBase)) + { $FindBase = $FindScript . '&find='; } +if(!isset($SaveBase)) + { $SaveBase = $ScriptBase . '?action=save&page='; } +if(!isset($DiffScript)) + { $DiffScript = $ScriptBase . '?action=diff'; } +if(!isset($PrefsScript)) + { $PrefsScript = $ScriptBase . '?action=prefs'; } if(!function_exists('viewURL')) { |
From: Scott M. <sm...@us...> - 2002-01-07 18:14:01
|
Update of /cvsroot/tavi/tavi/action In directory usw-pr-cvs1:/tmp/cvs-serv6694/action Added Files: admin.php Log Message: Refactor index.php, admin/index.php --- NEW FILE: admin.php --- <?php // $Id: admin.php,v 1.1 2002/01/07 18:13:58 smoonen Exp $ require('lib/init.php'); require('parse/html.php'); require('parse/transforms.php'); require('template/admin.php'); if($AdminEnabled != 1) { die($ErrorAdminDisabled); } // If register_globals is off, we need to harvest the script parameters // at this point. if(!ini_get('register_globals')) { $REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; $locking = $HTTP_GET_VARS['locking']; $blocking = $HTTP_GET_VARS['blocking']; $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']; if($locking && $count > 0) { for($i = 1; $i <= $count; $i++) { $var = 'name' + $i; $$var = $HTTP_POST_VARS[$var]; $var = 'lock' + $i; $$var = $HTTP_POST_VARS[$var]; } } } if($locking) // Locking/unlocking pages. { if(empty($Save)) // Not saving results; display form. { $html = html_lock_start(); $pagelist = $pagestore->allpages(); foreach($pagelist as $page) { $html = $html . html_lock_page($page[1], $page[6]); } template_admin(array('html' => $html . html_lock_end(count($pagelist)))); } else // Lock/unlock pages at admin's request. { $pagestore->lock(); // Exclusive access to database. for($i = 1; $i <= $count; $i++) { $page = urldecode($HTTP_POST_VARS['name' . $i]); $lock = ($HTTP_POST_VARS['lock' . $i] == '1'); $pg = $pagestore->page($page); $pg->read(); $pg->version++; $pg->hostname = gethostbyaddr($REMOTE_ADDR); $pg->username = $UserName; $pg->comment = ''; $pg->text = str_replace('\\', '\\\\', $pg->text); $pg->text = str_replace('\'', '\\\'', $pg->text); if($pg->exists && $pg->mutable && $lock) { $pg->mutable = 0; $pg->write(); } else if($pg->exists && !$pg->mutable && !$lock) { $pg->mutable = 1; $pg->write(); } } $pagestore->unlock(); header('Location: ' . $AdminScript); } } else if($blocking) // Blocking/unblocking IP addrs. { if(empty($Block) && empty($Unblock)) // Not saving results; display form. { $html = ''; if($RatePeriod == 0) { $html = $html . html_bold_start() . 'Rate control / IP blocking disabled' . html_bold_end() . html_newline(); } $html = $html . html_rate_start(); $blocklist = rateBlockList($pagestore->dbh); foreach($blocklist as $block) { $html = $html . html_rate_entry($block); } $html = $html . html_rate_end(); template_admin(array('html' => $html)); } else // Block/unblock an address group. { if(!empty($Block)) { rateBlockAdd($pagestore->dbh, $address); } else if(!empty($Unblock)) { rateBlockRemove($pagestore->dbh, $address); } header('Location: ' . $AdminScript); } } else // Display main menu for admin. { template_admin(array('html' => html_url($AdminScript . '?locking=1', 'Lock / unlock pages') . html_newline() . html_url($AdminScript . '?blocking=1', 'Block / unblock hosts') . html_newline())); } ?> |
From: Scott M. <sm...@us...> - 2002-01-07 18:14:01
|
Update of /cvsroot/tavi/tavi In directory usw-pr-cvs1:/tmp/cvs-serv6694 Modified Files: index.php Log Message: Refactor index.php, admin/index.php Index: index.php =================================================================== RCS file: /cvsroot/tavi/tavi/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.php 2002/01/04 14:02:01 1.10 +++ index.php 2002/01/07 18:13:58 1.11 @@ -1,82 +1,4 @@ <?php // $Id$ - -// If register_globals is off, we need to harvest the script parameters -// at this point. - -if(!ini_get('register_globals')) -{ - $HTTP_REFERER = $HTTP_SERVER_VARS['HTTP_REFERER']; - $QUERY_STRING = $HTTP_SERVER_VARS['QUERY_STRING']; - $REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; - - $action = $HTTP_GET_VARS['action']; - $page = $HTTP_GET_VARS['page']; - $ver1 = $HTTP_GET_VARS['ver1']; - $ver2 = $HTTP_GET_VARS['ver2']; - $find = $HTTP_GET_VARS['find']; - $version = $HTTP_GET_VARS['version']; - $full = $HTTP_GET_VARS['full']; - - $Preview = $HTTP_POST_VARS['Preview']; - $Save = $HTTP_POST_VARS['Save']; - $archive = $HTTP_POST_VARS['archive']; - $auth = $HTTP_POST_VARS['auth']; - $categories = $HTTP_POST_VARS['categories']; - $cols = $HTTP_POST_VARS['cols']; - $comment = $HTTP_POST_VARS['comment']; - $days = $HTTP_POST_VARS['days']; - $discard = $HTTP_POST_VARS['discard']; - $document = $HTTP_POST_VARS['document']; - $hist = $HTTP_POST_VARS['hist']; - $min = $HTTP_POST_VARS['min']; - $nextver = $HTTP_POST_VARS['nextver']; - $rows = $HTTP_POST_VARS['rows']; - $tzoff = $HTTP_POST_VARS['tzoff']; - $user = $HTTP_POST_VARS['user']; -} - -require('lib/init.php'); -require('parse/transforms.php'); - -// To add an action=x behavior, add an entry to this array. First column -// is the file to load, second is the function to call, and third is how -// to treat it for rate-checking purposes ('view', 'edit', or 'search'). -$ActionList = array( - 'view' => array('action/view.php', 'action_view', 'view'), - 'edit' => array('action/edit.php', 'action_edit', 'view'), - 'save' => array('action/save.php', 'action_save', 'edit'), - 'diff' => array('action/diff.php', 'action_diff', 'search'), - 'find' => array('action/find.php', 'action_find', 'search'), - 'history' => array('action/history.php', 'action_history', - 'search'), - 'prefs' => array('action/prefs.php', 'action_prefs', 'view'), - 'macro' => array('action/macro.php', 'action_macro', 'search'), - 'rss' => array('action/rss.php', 'action_rss', 'view') - ); - -// Default action and page names. -if(empty($page) && empty($action)) - { $page = $QUERY_STRING; } -if(empty($action)) - { $action = 'view'; } -if(empty($page)) - { $page = $HomePage; } - -// Confirm we have a valid page name. -if(!validate_page($page)) - { die($ErrorInvalidPage); } - -// Don't let people do too many things too quickly. -rateCheck($pagestore->dbh, $ActionList[$action][2]); - -// Dispatch the appropriate action. -if(!empty($ActionList[$action])) -{ - include($ActionList[$action][0]); - $ActionList[$action][1](); -} - -// Expire old versions, etc. -$pagestore->maintain(); +require('lib/main.php'); ?> |
From: Scott M. <sm...@us...> - 2002-01-07 16:28:36
|
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv7962/template Modified Files: admin.php conflict.php diff.php edit.php find.php history.php prefs.php preview.php view.php Log Message: Constant-ize TemplateDir Index: admin.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/admin.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- admin.php 2002/01/03 15:23:44 1.8 +++ admin.php 2002/01/07 16:28:32 1.9 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The admin template is passed an associative array with the following // elements: Index: conflict.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/conflict.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- conflict.php 2002/01/02 17:43:24 1.7 +++ conflict.php 2002/01/07 16:28:32 1.8 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The conflict template is passed an associative array with the following // elements: Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/diff.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- diff.php 2002/01/02 17:48:43 1.8 +++ diff.php 2002/01/07 16:28:32 1.9 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The diff template is passed an associative array with the following // elements: Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- edit.php 2002/01/02 17:43:24 1.7 +++ edit.php 2002/01/07 16:28:32 1.8 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The edit template is passed an associative array with the following // elements: Index: find.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/find.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- find.php 2002/01/02 17:48:43 1.8 +++ find.php 2002/01/07 16:28:32 1.9 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The find template is passed an associative array with the following // elements: Index: history.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/history.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- history.php 2002/01/02 17:48:43 1.9 +++ history.php 2002/01/07 16:28:32 1.10 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The history template is passed an associative array with the following // elements: Index: prefs.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/prefs.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- prefs.php 2002/01/07 15:36:29 1.9 +++ prefs.php 2002/01/07 16:28:32 1.10 @@ -2,10 +2,7 @@ // $Id$ require('parse/html.php'); -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); function template_prefs() { Index: preview.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/preview.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- preview.php 2002/01/02 17:43:24 1.7 +++ preview.php 2002/01/07 16:28:32 1.8 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The preview template is passed an associative array with the following // elements: Index: view.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/view.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- view.php 2002/01/02 17:43:24 1.7 +++ view.php 2002/01/07 16:28:32 1.8 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/common.php')) - { require($TemplateDir . '/common.php'); } -else - { die; } +require(TemplateDir . '/common.php'); // The view template is passed an associative array with the following // elements: |
Update of /cvsroot/tavi/tavi/action In directory usw-pr-cvs1:/tmp/cvs-serv7962/action Modified Files: conflict.php diff.php edit.php find.php history.php prefs.php preview.php rss.php save.php view.php Log Message: Constant-ize TemplateDir Index: conflict.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/conflict.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- conflict.php 2002/01/03 16:33:25 1.6 +++ conflict.php 2002/01/07 16:28:31 1.7 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/conflict.php')) - { require($TemplateDir . '/conflict.php'); } -else - { die; } +require(TemplateDir . '/conflict.php'); // Conflict editor. Someone accidentally almost overwrote something someone // else just saved. Index: diff.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/diff.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- diff.php 2002/01/03 16:33:25 1.6 +++ diff.php 2002/01/07 16:28:32 1.7 @@ -4,10 +4,7 @@ require('parse/main.php'); require('parse/macros.php'); require('parse/html.php'); -if(file_exists($TemplateDir . '/diff.php')) - { require($TemplateDir . '/diff.php'); } -else - { die; } +require(TemplateDir . '/diff.php'); require('lib/diff.php'); // Compute difference between two versions of a page. Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/edit.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- edit.php 2002/01/02 17:43:24 1.5 +++ edit.php 2002/01/07 16:28:32 1.6 @@ -2,10 +2,7 @@ // $Id$ require('parse/html.php'); -if(file_exists($TemplateDir . '/edit.php')) - { require($TemplateDir . '/edit.php'); } -else - { die; } +require(TemplateDir . '/edit.php'); // Edit a page (possibly an archive version). function action_edit() Index: find.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/find.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- find.php 2002/01/02 17:43:24 1.5 +++ find.php 2002/01/07 16:28:32 1.6 @@ -2,10 +2,7 @@ // $Id$ require('parse/html.php'); -if(file_exists($TemplateDir . '/find.php')) - { require($TemplateDir . '/find.php'); } -else - { die; } +require(TemplateDir . '/find.php'); // Find a string in the database. function action_find() Index: history.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/history.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- history.php 2002/01/02 17:43:24 1.5 +++ history.php 2002/01/07 16:28:32 1.6 @@ -5,10 +5,7 @@ require('parse/macros.php'); require('parse/html.php'); require('lib/diff.php'); -if(file_exists($TemplateDir . '/history.php')) - { require($TemplateDir . '/history.php'); } -else - { die; } +require(TemplateDir . '/history.php'); require('lib/headers.php'); // Display the known history of a page's edits. Index: prefs.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/prefs.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- prefs.php 2002/01/02 17:43:24 1.5 +++ prefs.php 2002/01/07 16:28:32 1.6 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/prefs.php')) - { require($TemplateDir . '/prefs.php'); } -else - { die; } +require(TemplateDir . '/prefs.php'); // View or set a user's preferences. function action_prefs() Index: preview.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/preview.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- preview.php 2002/01/03 16:33:25 1.6 +++ preview.php 2002/01/07 16:28:32 1.7 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/preview.php')) - { require($TemplateDir . '/preview.php'); } -else - { die; } +require(TemplateDir . '/preview.php'); // Preview what a page will look like when it is saved. function action_preview() Index: rss.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/rss.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rss.php 2002/01/03 16:33:25 1.4 +++ rss.php 2002/01/07 16:28:32 1.5 @@ -1,10 +1,7 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/rss.php')) - { require($TemplateDir . '/rss.php'); } -else - { die; } +require(TemplateDir . '/rss.php'); require('parse/html.php'); require('parse/macros.php'); Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/save.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- save.php 2002/01/03 16:33:25 1.6 +++ save.php 2002/01/07 16:28:32 1.7 @@ -1,17 +1,14 @@ <?php // $Id$ -if(file_exists($TemplateDir . '/save.php')) - { require($TemplateDir . '/save.php'); } -else - { die; } +require(TemplateDir . '/save.php'); require('lib/category.php'); require('parse/save.php'); // Commit an edit to the database. function action_save() { - global $pagestore, $comment, $categories, $TemplateDir, $archive; + global $pagestore, $comment, $categories, $archive; global $Save, $page, $document, $nextver, $REMOTE_ADDR; global $MaxPostLen, $UserName, $SaveMacroEngine, $ErrorPageLocked; Index: view.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/view.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- view.php 2002/01/03 16:33:25 1.6 +++ view.php 2002/01/07 16:28:32 1.7 @@ -4,10 +4,7 @@ require('parse/main.php'); require('parse/macros.php'); require('parse/html.php'); -if(file_exists($TemplateDir . '/view.php')) - { require($TemplateDir . '/view.php'); } -else - { die; } +require(TemplateDir . '/view.php'); require('lib/headers.php'); // Parse and display a page. |
From: Scott M. <sm...@us...> - 2002-01-07 16:28:35
|
Update of /cvsroot/tavi/tavi/install In directory usw-pr-cvs1:/tmp/cvs-serv7962/install Modified Files: configure.pl settings.cnf Log Message: Constant-ize TemplateDir Index: configure.pl =================================================================== RCS file: /cvsroot/tavi/tavi/install/configure.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure.pl 2002/01/04 19:15:05 1.4 +++ configure.pl 2002/01/07 16:28:32 1.5 @@ -12,13 +12,21 @@ my ($descriptor, $prompt, $comment) = @_; my ($variable, $value); - if($descriptor =~ /^noprompt/) # Write out value without question. + if($descriptor =~ /^noprompt_var/) # Write out value without question. { $descriptor =~ /(\S+)\s+(\S+)\s+(.+)/; $variable = $2; $value = $3; print CONFIG $comment; print CONFIG "$variable = $value;\n\n"; + } + elsif($descriptor =~ /^noprompt_const/) # Write out const without question. + { + $descriptor =~ /(\S+)\s+(\S+)\s+(.+)/; + $variable = $2; + $value = $3; + print CONFIG $comment; + print CONFIG "define(\"$variable\", $value);\n\n"; } elsif($descriptor =~ /^comment/) # Write out just a comment. { Index: settings.cnf =================================================================== RCS file: /cvsroot/tavi/tavi/install/settings.cnf,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- settings.cnf 2002/01/03 21:54:26 1.2 +++ settings.cnf 2002/01/07 16:28:32 1.3 @@ -144,10 +144,10 @@ // $MetaDescription should be a sentence or two describing your wiki. This // is useful to aid search engines in indexing your wiki. ---- -noprompt $TemplateDir 'template' +noprompt_const TemplateDir 'template' // $TemplateDir indicates what directory your wiki templates are located in. // You may use this to install other templates than the default template. ---- -noprompt $StyleSheet dirname($ScriptBase) . '/' . $TemplateDir . '/wiki.css' +noprompt_var $StyleSheet dirname($ScriptBase) . '/' . $TemplateDir . '/wiki.css' // $StyleSheet contains the URL for your wiki's CSS style sheet. It is // typically a relative URL, such as '/wiki/wiki.css'. |
From: Scott M. <sm...@us...> - 2002-01-07 15:39:20
|
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv26524/template Modified Files: common.php Log Message: Variable cleanup. Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- common.php 2002/01/07 15:36:29 1.4 +++ common.php 2002/01/07 15:39:17 1.5 @@ -22,7 +22,7 @@ function template_common_prologue($args) { global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription; - global $StyleSheet, $SeparateTitleWords, $UpperPtn, $SeparateHeaderWords; + global $StyleSheet, $SeparateTitleWords, $SeparateHeaderWords; if($SeparateTitleWords) { $args['title'] = html_split_name($args['title']); } |
From: Scott M. <sm...@us...> - 2002-01-07 15:36:33
|
Update of /cvsroot/tavi/tavi/lib In directory usw-pr-cvs1:/tmp/cvs-serv25539/lib Modified Files: defaults.php Log Message: Split header words, as well as title words. Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- defaults.php 2002/01/03 21:46:23 1.1 +++ defaults.php 2002/01/07 15:36:29 1.2 @@ -63,6 +63,11 @@ // be changed. $SeparateTitleWords = 1; +// $SeparateHeaderWords determines whether spaces should be inserted in page +// headers. If nonzero, the page header of WikiName would show 'Wiki Name' +// instead. Pages that have free link names would not have changed headers. +$SeparateHeaderWords = 0; + // $CookieName determines the name of the cookie that browser preferences // (like user name, etc.) are stored in. $CookieName = 'prefs'; |
From: Scott M. <sm...@us...> - 2002-01-07 15:36:33
|
Update of /cvsroot/tavi/tavi/template In directory usw-pr-cvs1:/tmp/cvs-serv25539/template Modified Files: common.php prefs.php Log Message: Split header words, as well as title words. Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- common.php 2002/01/03 18:16:01 1.3 +++ common.php 2002/01/07 15:36:29 1.4 @@ -22,14 +22,10 @@ function template_common_prologue($args) { global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription; - global $StyleSheet, $SeparateTitleWords, $UpperPtn; + global $StyleSheet, $SeparateTitleWords, $UpperPtn, $SeparateHeaderWords; - if($SeparateTitleWords - && validate_page($args['title']) == 1) - { - $args['title'] = preg_replace("/([^\\/])($UpperPtn)/", "\\1 \\2", - $args['title'], -1); - } + if($SeparateTitleWords) + { $args['title'] = html_split_name($args['title']); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" @@ -62,7 +58,12 @@ { ?> <a class="title" href="<?php print findURL($args['headlink']); ?>"> - <?php print $args['headlink']; ?></a> +<?php + if($SeparateHeaderWords) + { print html_split_name($args['headlink']); } + else + { print $args['headlink']; } +?></a> <?php } print $args['headsufx']; Index: prefs.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/prefs.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- prefs.php 2002/01/03 15:23:44 1.8 +++ prefs.php 2002/01/07 15:36:29 1.9 @@ -1,6 +1,7 @@ <?php // $Id$ +require('parse/html.php'); if(file_exists($TemplateDir . '/common.php')) { require($TemplateDir . '/common.php'); } else |
From: Scott M. <sm...@us...> - 2002-01-07 15:36:33
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv25539/parse Modified Files: html.php Log Message: Split header words, as well as title words. Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- html.php 2002/01/02 21:30:17 1.18 +++ html.php 2002/01/07 15:36:29 1.19 @@ -268,4 +268,20 @@ { return '<dd>' . $address . "</dd>\n"; } + +// This function splits up a traditional WikiName so that individual +// words are separated by spaces. + +function html_split_name($page) +{ + global $UpperPtn, $LowerPtn; + + if(validate_page($page) != 1) + { return $page; } + $page = preg_replace("/(?<=$UpperPtn|$LowerPtn)($UpperPtn$LowerPtn)/", + ' \\1', $page, -1); + $page = preg_replace("/($LowerPtn)($UpperPtn)/", + '\\1 \\2', $page, -1); + return $page; +} ?> |
From: Scott M. <sm...@us...> - 2002-01-04 20:38:45
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv31625/parse Modified Files: macros.php Log Message: Accomodate buggy PHP 4.03. Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- macros.php 2002/01/03 16:33:26 1.7 +++ macros.php 2002/01/04 20:38:42 1.8 @@ -24,7 +24,7 @@ { $parsed = parseText($args, array('parse_wikiname', 'parse_freelink'), ''); $pagenames = array(); - preg_replace('/' . $FlgChr . '(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[$1][1]', $parsed); + preg_replace('/' . $FlgChr . '(\\d+)' . $FlgChr . '/e', '$pagenames[]=$Entity[\\1][1]', $parsed); $list = $pagestore->givenpages($pagenames); } |
From: Scott M. <sm...@us...> - 2002-01-04 20:38:45
|
Update of /cvsroot/tavi/tavi/lib In directory usw-pr-cvs1:/tmp/cvs-serv31625/lib Modified Files: category.php Log Message: Accomodate buggy PHP 4.03. Index: category.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/category.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- category.php 2002/01/03 16:33:25 1.5 +++ category.php 2002/01/04 20:38:42 1.6 @@ -12,7 +12,7 @@ $parsed = parseText($catlist, array('parse_wikiname', 'parse_freelink'), ''); $pagenames = array(); preg_replace('/' . $FlgChr . '(\\d+)' . $FlgChr . '/e', - '$pagenames[]=$Entity[$1][1]', $parsed); + '$pagenames[]=$Entity[\\1][1]', $parsed); if(validate_page($page) == 2) { $page = '((' . $page . '))'; } |
From: Scott M. <sm...@us...> - 2002-01-04 20:35:30
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv30928/parse Modified Files: transforms.php Log Message: Accomodate bug in PHP 4.03. Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- transforms.php 2002/01/04 19:37:16 1.21 +++ transforms.php 2002/01/04 20:35:27 1.22 @@ -78,7 +78,7 @@ } else { - $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)(\|([-A-Za-z0-9 _+\\/.,']+))?((\#[-A-Za-z0-9]+)?)\\)\\)/e"; + $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)((\|[-A-Za-z0-9 _+\\/.,']+)?)((\#[-A-Za-z0-9]+)?)\\)\\)/e"; } return preg_replace($ptn, @@ -90,6 +90,8 @@ { if($appearance == '') { $appearance = $link; } + else + { $appearance = substr($appearance, 1); } // Trim leading '|'. return new_entity(array('ref', $link, $appearance, '', $anchor, $anchor_appearance)); } |
From: Scott M. <sm...@us...> - 2002-01-04 19:37:19
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv16399/parse Modified Files: transforms.php Log Message: Renderbug Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- transforms.php 2002/01/04 19:30:36 1.20 +++ transforms.php 2002/01/04 19:37:16 1.21 @@ -78,11 +78,12 @@ } else { - $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)(\|([-A-Za-z0-9 _+\\/.,']+))?(\#[-A-Za-z0-9]+)?\\)\\)/e"; + $ptn = "/\\(\\(([-A-Za-z0-9 _+\\/.,']+)(\|([-A-Za-z0-9 _+\\/.,']+))?((\#[-A-Za-z0-9]+)?)\\)\\)/e"; } return preg_replace($ptn, - "freelink_token(q1('\\1'), q1('\\3'), '\\4', '')", $text, -1); + "freelink_token(q1('\\1'), q1('\\3'), '\\5', '')", + $text, -1); } function freelink_token($link, $appearance, $anchor, $anchor_appearance) |
From: Scott M. <sm...@us...> - 2002-01-04 19:30:38
|
Update of /cvsroot/tavi/tavi/parse In directory usw-pr-cvs1:/tmp/cvs-serv14705/parse Modified Files: transforms.php Log Message: Renderbug Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- transforms.php 2002/01/04 15:38:54 1.19 +++ transforms.php 2002/01/04 19:30:36 1.20 @@ -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-z0-9]+)?)(\"\")?/e"; } return preg_replace($ptn, "q1('\\1').new_entity(array('ref',q1('\\2'),q1('\\2'),'','\\4','\\4'))", |