You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:17:48
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory usw-pr-cvs1:/tmp/cvs-serv6583/lib/plugin Log Message: Directory /cvsroot/phpwiki/phpwiki/lib/plugin added to the repository |
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv2684/lib Modified Files: config.php diff.php display.php editpage.php fullsearch.php interwiki.php loadsave.php main.php pageinfo.php prepend.php savepage.php search.php stdlib.php transform.php ziplib.php Added Files: ArchiveCleaner.php DbaDatabase.php DbaListSet.php DbaPartition.php ErrorManager.php Request.php Template.php TextSearchQuery.php WikiDB.php WikiPlugin.php WikiUser.php Removed Files: PhpWikiDatabase.php db_filesystem.php dbalib.php dbmlib.php msql.php mysql.php pgsql.php userauth.php Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. ***** Error reading new file: [Errno 2] No such file or directory: 'ArchiveCleaner.php' ***** Error reading new file: [Errno 2] No such file or directory: 'DbaDatabase.php' ***** Error reading new file: [Errno 2] No such file or directory: 'DbaListSet.php' ***** Error reading new file: [Errno 2] No such file or directory: 'DbaPartition.php' ***** Error reading new file: [Errno 2] No such file or directory: 'ErrorManager.php' ***** Error reading new file: [Errno 2] No such file or directory: 'Request.php' ***** Error reading new file: [Errno 2] No such file or directory: 'Template.php' --- NEW FILE --- <?php /** * A text search query. * * This represents "Google-like" text search queries like: * <dl> * <dt> wiki -test * <dd> Match strings containing the substring 'wiki', and not containing the * substring 'test'. * <dt> wiki word or page * <dd> Match strings containing the substring 'wiki' and either the substring * 'word' or the substring 'page'. * </dl> * * The full query syntax, in order of precedence, is roughly: * * The unary 'NOT' or '-' operator (they are equivalent) negates the * following search clause. * * Search clauses may be joined with the (left-associative) binary operators * 'AND' and 'OR'. * * Two adjoining search clauses are joined with an implicit 'AND'. This has * lower precedence than either an explicit 'AND' or 'OR', so "a b OR c" * parses as "a AND ( b OR c )", while "a AND b OR c" parses as * "( a AND b ) OR c" (due to the left-associativity of 'AND' and 'OR'.) * * Search clauses can be grouped with parentheses. * * Phrases (or other things which don't look like words) can be forced to * be interpreted as words by quoting them, either with single (') or double (") * quotes. If you wan't to include the quote character within a quoted string, * double-up on the quote character: 'I''m hungry' is equivalent to * "I'm hungry". */ class TextSearchQuery { /** * Create a new query. * * @param $search_query string The query. Syntax is as described above. * Note that an empty $search_query will match anything. * @see TextSearchQuery */ function TextSearchQuery($search_query) { $parser = new TextSearchQuery_Parser; $this->_tree = $parser->parse($search_query); $this->_optimize(); } function _optimize() { $this->_tree = $this->_tree->optimize(); } /** * Get a regexp which matches the query. */ function asRegexp() { if (!isset($this->_regexp)) $this->_regexp = '/^' . $this->_tree->regexp() . '/isS'; return $this->_regexp; } /** * Match query against string. * * @param $string string The string to match. * @return boolean True if the string matches the query. */ function match($string) { return preg_match($this->asRegexp(), $string); } /** * Get a regular expression suitable for highlighting matched words. * * This returns a PCRE regular expression which matches any non-negated * word in the query. * * @return string The PCRE regexp. */ function getHighlightRegexp() { if (!isset($this->_hilight_regexp)) { $words = array_unique($this->_tree->highlight_words()); if (!$words) { $this->_hilight_regexp = false; } else { foreach ($words as $key => $word) $words[$key] = preg_quote($word, '/'); $this->_hilight_regexp = '(?:' . join('|', $words) . ')'; } } return $this->_hilight_regexp; } /** * Make an SQL clause which matches the query. * * @param $make_sql_clause_func string,function or array * A callback which takes a single word as an argument and * returns an SQL clause which will match exactly those records * containing the word. The word passed to the callback will always * be in all lower case. * * If $make_sql_clause_func is an array, it is interpreted as a method * callback. The first element of the array is the object, the second * element (a string) is the name of the method. * * If $make_sql_clause_func is a string, it is taken to be the name * of a global function to call. * * Otherwise, $make_sql_clause_func is assumed to be a function object * (created by create_function()). * * Example usage: * <pre> * function sql_title_match($word) { * return sprintf("LOWER(title) like '%s'", * addslashes($word)); * } * * ... * * $query = new TextSearchQuery("wiki -page"); * $sql_clause = $query->makeSqlClause('sql_title_match'); * </pre> * This will result in $sql_clause containing something like * "(LOWER(title) like 'wiki') AND NOT (LOWER(title) like 'page')". * * @return string The PCRE regexp. */ function makeSqlClause($make_sql_clause_func) { $this->_sql_clause_func = $make_sql_clause_func; return $this->_sql_clause($this->_tree); } function _sql_clause($node) { switch ($node->op) { case 'WORD': $callback = $this->_sql_clause_func; if (is_array($callback)) { list($object, $method) = $callback; return call_user_method($method, $object, $node->word); } elseif (is_string($callback)) return call_user_func($callback, $node->word); else return $callback($node->word); case 'NOT': return "NOT (" . $this->_sql_clause($node->leaves[0]) . ")"; case 'AND': case 'OR': $subclauses = array(); foreach ($node->leaves as $leaf) $subclauses[] = "(" . $this->_sql_clause($leaf) . ")"; return join(" $node->op ", $subclauses); default: assert($node->op == 'VOID'); return '1=1'; } } /** * Get printable representation of the parse tree. * * This is for debugging only. * @return string Printable parse tree. */ function asString() { return $this->_as_string($this->_tree); } function _as_string($node, $indent = '') { switch ($node->op) { case 'WORD': return $indent . "WORD: $node->word"; case 'VOID': return $indent . "VOID"; default: $lines = array($indent . $node->op . ":"); $indent .= " "; foreach ($node->leaves as $leaf) $lines[] = $this->_as_string($leaf, $indent); return join("\n", $lines); } } } //////////////////////////////////////////////////////////////// // // Remaining classes are private. // //////////////////////////////////////////////////////////////// /** * Virtual base class for nodes in a TextSearchQuery parse tree. * * Also servers as a 'VOID' (contentless) node. */ class TextSearchQuery_node { var $op = 'VOID'; /** * Optimize this node. * @return object Optimized node. */ function optimize() { return $this; } /** * @return regexp matching this node. */ function regexp() { return ''; } /** * @param bool True if this node has been negated (higher in the parse tree.) * @return array A list of all non-negated words contained by this node. */ function highlight_words($negated = false) { return array(); } } /** * A word. */ class TextSearchQuery_node_word extends TextSearchQuery_node { var $op = "WORD"; function TextSearchQuery_node_word($word) { $this->word = $word; } function regexp() { return '(?=.*' . preg_quote($this->word, '/') . ')'; } function highlight_words($negated = false) { return $negated ? array() : array($this->word); } } /** * A negated clause. */ class TextSearchQuery_node_not extends TextSearchQuery_node { var $op = "NOT"; function TextSearchQuery_node_not($leaf) { $this->leaves = array($leaf); } function optimize() { $leaf = &$this->leaves[0]; $leaf = $leaf->optimize(); if ($leaf->op == 'NOT') return $leaf->leaves[0]; // ( NOT ( NOT x ) ) -> x return $this; } function regexp() { $leaf = &$this->leaves[0]; return '(?!' . $leaf->regexp() . ')'; } function highlight_words($negated = false) { return $this->leaves[0]->highlight_words(!$negated); } } /** * Virtual base class for 'AND' and 'OR conjoins. */ class TextSearchQuery_node_binop extends TextSearchQuery_node { function TextSearchQuery_node_binop($leaves) { $this->leaves = $leaves; } function _flatten() { // This flattens e.g. (AND (AND a b) (OR c d) e) // to (AND a b e (OR c d)) $flat = array(); foreach ($this->leaves as $leaf) { $leaf = $leaf->optimize(); if ($this->op == $leaf->op) $flat = array_merge($flat, $leaf->leaves); else $flat[] = $leaf; } $this->leaves = $flat; } function optimize() { $this->_flatten(); assert(!empty($this->leaves)); if (count($this->leaves) == 1) return $this->leaves[0]; // (AND x) -> x return $this; } function highlight_words($negated = false) { $words = array(); foreach ($this->leaves as $leaf) array_splice($words,0,0, $leaf->highlight_words($negated)); return $words; } } /** * A (possibly multi-argument) 'AND' conjoin. */ class TextSearchQuery_node_and extends TextSearchQuery_node_binop { var $op = "AND"; function optimize() { $this->_flatten(); // Convert (AND (NOT a) (NOT b) c d) into (AND (NOT (OR a b)) c d). // Since OR's are more efficient for regexp matching: // (?!.*a)(?!.*b) vs (?!.*(?:a|b)) // Suck out the negated leaves. $nots = array(); foreach ($this->leaves as $key => $leaf) { if ($leaf->op == 'NOT') { $nots[] = $leaf->leaves[0]; unset($this->leaves[$key]); } } // Combine the negated leaves into a single negated or. if ($nots) { $node = ( new TextSearchQuery_node_not (new TextSearchQuery_node_or($nots)) ); array_unshift($this->leaves, $node->optimize()); } assert(!empty($this->leaves)); if (count($this->leaves) == 1) return $this->leaves[0]; // (AND x) -> x return $this; } function regexp() { $regexp = ''; foreach ($this->leaves as $leaf) $regexp .= $leaf->regexp(); return $regexp; } } /** * A (possibly multi-argument) 'OR' conjoin. */ class TextSearchQuery_node_or extends TextSearchQuery_node_binop { var $op = "OR"; function regexp() { // We will combine any of our direct descendents which are WORDs // into a single (?=.*(?:word1|word2|...)) regexp. $regexps = array(); $words = array(); foreach ($this->leaves as $leaf) { if ($leaf->op == 'WORD') $words[] = preg_quote($leaf->word, '/'); else $regexps[] = $leaf->regexp(); } if ($words) array_unshift($regexps, '(?=.*' . $this->_join($words) . ')'); return $this->_join($regexps); } function _join($regexps) { assert(count($regexps) > 0); if (count($regexps) > 1) return '(?:' . join('|', $regexps) . ')'; else return $regexps[0]; } } //////////////////////////////////////////////////////////////// // // Parser: // //////////////////////////////////////////////////////////////// define ('TSQ_TOK_WORD', 1); define ('TSQ_TOK_BINOP', 2); define ('TSQ_TOK_NOT', 4); define ('TSQ_TOK_LPAREN', 8); define ('TSQ_TOK_RPAREN', 16); class TextSearchQuery_Parser { /* * This is a simple recursive descent parser, based on the following grammar: * * toplist : * | toplist expr * ; * * * list : expr * | list expr * ; * * expr : atom * | expr BINOP atom * ; * * atom : '(' list ')' * | NOT atom * | WORD * ; * * The terminal tokens are: * * * and|or BINOP * -|not NOT * ( LPAREN * ) RPAREN * [^-()\s][^()\s]* WORD * "[^"]*" WORD * '[^']*' WORD */ function parse ($search_expr) { $this->lexer = new TextSearchQuery_Lexer($search_expr); $tree = $this->get_list('toplevel'); assert($this->lexer->eof()); unset($this->lexer); return $tree; } function get_list ($is_toplevel = false) { $list = array(); // token types we'll accept as words (and thus expr's) for the // purpose of error recovery: $accept_as_words = TSQ_TOK_NOT | TSQ_TOK_BINOP; if ($is_toplevel) $accept_as_words |= TSQ_TOK_LPAREN | TSQ_TOK_RPAREN; while ( ($expr = $this->get_expr()) || ($expr = $this->get_word($accept_as_words)) ) { $list[] = $expr; } if (!$list) { if ($is_toplevel) return new TextSearchQuery_node; else return false; } return new TextSearchQuery_node_and($list); } function get_expr () { if ( !($expr = $this->get_atom()) ) return false; $savedpos = $this->lexer->tell(); while ( ($op = $this->lexer->get(TSQ_TOK_BINOP)) ) { if ( ! ($right = $this->get_atom()) ) { break; } if ($op == 'and') $expr = new TextSearchQuery_node_and(array($expr, $right)); else { assert($op == 'or'); $expr = new TextSearchQuery_node_or(array($expr, $right)); } $savedpos = $this->lexer->tell(); } $this->lexer->seek($savedpos); return $expr; } function get_atom() { if ($word = $this->get_word()) return $word; $savedpos = $this->lexer->tell(); if ( $this->lexer->get(TSQ_TOK_LPAREN) ) { if ( ($list = $this->get_list()) && $this->lexer->get(TSQ_TOK_RPAREN) ) return $list; } elseif ( $this->lexer->get(TSQ_TOK_NOT) ) { if ( ($atom = $this->get_atom()) ) return new TextSearchQuery_node_not($atom); } $this->lexer->seek($savedpos); return false; } function get_word($accept = TSQ_TOK_WORD) { if ( ($word = $this->lexer->get($accept)) ) return new TextSearchQuery_node_word($word); return false; } } class TextSearchQuery_Lexer { function TextSearchQuery_Lexer ($query_str) { $this->tokens = $this->tokenize($query_str); $this->pos = 0; } function tell() { return $this->pos; } function seek($pos) { $this->pos = $pos; } function eof() { return $this->pos == count($this->tokens); } function tokenize($string) { $tokens = array(); $buf = strtolower(ltrim($string)); while (!empty($buf)) { if (preg_match('/^(and|or)\s*/', $buf, $m)) { $val = $m[1]; $type = TSQ_TOK_BINOP; } elseif (preg_match('/^(-|not)\s*/', $buf, $m)) { $val = $m[1]; $type = TSQ_TOK_NOT; } elseif (preg_match('/^([()])\s*/', $buf, $m)) { $val = $m[1]; $type = $m[1] == '(' ? TSQ_TOK_LPAREN : TSQ_TOK_RPAREN; } elseif (preg_match('/^ " ( (?: [^"]+ | "" )* ) " \s*/x', $buf, $m)) { $val = str_replace('""', '"', $m[1]); $type = TSQ_TOK_WORD; } elseif (preg_match("/^ ' ( (?:[^']+|'')* ) ' \s*/x", $buf, $m)) { $val = str_replace("''", "'", $m[1]); $type = TSQ_TOK_WORD; } elseif (preg_match('/^([^-()][^()\s]*)\s*/', $buf, $m)) { $val = $m[1]; $type = TSQ_TOK_WORD; } else { assert(empty($buf)); break; } $buf = substr($buf, strlen($m[0])); $tokens[] = array($type, $val); } return $tokens; } function get($accept) { if ($this->pos >= count($this->tokens)) return false; list ($type, $val) = $this->tokens[$this->pos]; if (($type & $accept) == 0) return false; $this->pos++; return $val; } } // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: ?> ***** Error reading new file: [Errno 2] No such file or directory: 'WikiDB.php' ***** Error reading new file: [Errno 2] No such file or directory: 'WikiPlugin.php' ***** Error reading new file: [Errno 2] No such file or directory: 'WikiUser.php' Index: config.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** config.php 2001/05/31 17:39:02 1.40 --- config.php 2001/09/18 19:16:23 1.41 *************** *** 24,31 **** $FieldSeparator = "\x81"; - - // constants for flags in $pagehash - define("FLAG_PAGE_LOCKED", 1); - // Search PHP's include_path to find file or directory. function FindFile ($file, $missing_okay = false) --- 24,27 ---- *************** *** 90,93 **** --- 86,93 ---- } + // Setup localisation + setlocale(LC_ALL, "$LANG"); + putenv("LC_ALL=$LANG"); + if (!function_exists ('gettext')) { *************** *** 109,114 **** { // Setup localisation - setlocale(LC_ALL, "$LANG"); - putenv("LC_ALL=$LANG"); bindtextdomain ("phpwiki", FindFile("locale")); textdomain ("phpwiki"); --- 109,112 ---- *************** *** 187,193 **** // Autodetect URL settings: // ! if (!defined('SERVER_NAME')) define('SERVER_NAME', $SERVER_NAME); ! if (!defined('SERVER_PORT')) define('SERVER_PORT', $SERVER_PORT); ! if (!defined('SCRIPT_NAME')) define('SCRIPT_NAME', $SCRIPT_NAME); if (!defined('DATA_PATH')) define('DATA_PATH', dirname(SCRIPT_NAME)); --- 185,191 ---- // Autodetect URL settings: // ! if (!defined('SERVER_NAME')) define('SERVER_NAME', $HTTP_SERVER_VARS['SERVER_NAME']); ! if (!defined('SERVER_PORT')) define('SERVER_PORT', $HTTP_SERVER_VARS['SERVER_PORT']); ! if (!defined('SCRIPT_NAME')) define('SCRIPT_NAME', $HTTP_SERVER_VARS['SCRIPT_NAME']); if (!defined('DATA_PATH')) define('DATA_PATH', dirname(SCRIPT_NAME)); *************** *** 220,224 **** // e.g. /dir/index.php/HomePage. ! global $REQUEST_URI, $SCRIPT_NAME; $requri = preg_quote($REQUEST_URI, '%'); --- 218,223 ---- // e.g. /dir/index.php/HomePage. ! //global $REQUEST_URI, $SCRIPT_NAME; ! extract($GLOBALS['HTTP_SERVER_VARS']); $requri = preg_quote($REQUEST_URI, '%'); *************** *** 249,252 **** --- 248,252 ---- // + $REDIRECT_URL = &$HTTP_SERVER_VARS['REDIRECT_URL']; if (USE_PATH_INFO and isset($REDIRECT_URL) and ! IsProbablyRedirectToIndex()) *************** *** 281,315 **** if (empty($DBParams['dbtype'])) { ! if ( floor(phpversion()) == 3) { ! $DBParams['dbtype'] = 'dbm'; ! } else { ! $DBParams['dbtype'] = 'dba'; ! } } - switch ($DBParams['dbtype']) - { - case 'dbm': - include 'lib/dbmlib.php'; - break; - case 'dba': - include 'lib/dbalib.php'; - break; - case 'mysql': - include 'lib/mysql.php'; - break; - case 'pgsql': - include 'lib/pgsql.php'; - break; - case 'msql': - include 'lib/msql.php'; - break; - case 'file': - include "lib/db_filesystem.php"; - break; - default: - ExitWiki($DBParams['dbtype'] . ": unknown DBTYPE"); - } - // InterWiki linking -- wiki-style links to other wikis on the web // --- 281,287 ---- if (empty($DBParams['dbtype'])) { ! $DBParams['dbtype'] = 'dba'; } // InterWiki linking -- wiki-style links to other wikis on the web // *************** *** 319,329 **** } // Access log if (!defined('ACCESS_LOG')) define('ACCESS_LOG', ''); ! // Get remote host name, if apache hasn't done it for us ! if (empty($REMOTE_HOST) && ENABLE_REVERSE_DNS) ! $REMOTE_HOST = gethostbyaddr($REMOTE_ADDR); --- 291,303 ---- } + // FIXME: delete // Access log if (!defined('ACCESS_LOG')) define('ACCESS_LOG', ''); ! ! // FIXME: delete // Get remote host name, if apache hasn't done it for us ! if (empty($HTTP_SERVER_VARS['REMOTE_HOST']) && ENABLE_REVERSE_DNS) ! $HTTP_SERVER_VARS['REMOTE_HOST'] = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR']); Index: diff.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/diff.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** diff.php 2001/06/26 18:03:41 1.12 --- diff.php 2001/09/18 19:16:23 1.13 *************** *** 1025,1029 **** ///////////////////////////////////////////////////////////////// ! function PageInfoRow ($label, $hash) { global $datetimeformat; --- 1025,1029 ---- ///////////////////////////////////////////////////////////////// ! function PageInfoRow ($pagename, $label, $rev) { global $datetimeformat; *************** *** 1031,1085 **** $cols = QElement('td', array('align' => 'right'), $label); ! if (is_array($hash)) { ! extract($hash); ! $cols .= QElement('td', ! sprintf(gettext ("version %s"), $version)); ! $cols .= QElement('td', ! sprintf(gettext ("last modified on %s"), ! strftime($datetimeformat, $lastmodified))); ! $cols .= QElement('td', ! sprintf(gettext ("by %s"), $author)); } else { ! $cols .= QElement('td', array('colspan' => '3'), ! gettext ("None")); } return Element('tr', $cols); } ! if (isset($pagename)) ! { ! if (!isset($ver1)) { ! if (isset($ver2)) $ver1 = $ver2 - 1; ! else { ! $ver1 = GetMaxVersionNumber($dbi, $pagename, $ArchivePageStore); ! $ver2 = 0; ! } ! } ! elseif (!isset($ver2)) $ver2 = 0; ! ! $older = RetrievePage($dbi, $pagename, SelectStore($dbi, $pagename, $ver1, $WikiPageStore, $ArchivePageStore), $ver1); ! $newer = RetrievePage($dbi, $pagename, SelectStore($dbi, $pagename, $ver2, $WikiPageStore, $ArchivePageStore), $ver2); ! ! $html = Element('table', ! PageInfoRow(gettext ("Newer page:"), $newer) ! . PageInfoRow(gettext ("Older page:"), $older)); ! ! $html .= "<p>\n"; ! ! if (is_array($newer) && is_array($older)) ! { ! $diff = new WikiDiff($older['content'], $newer['content']); ! if ($diff->isEmpty()) { ! $html .= '<hr>[' . gettext ("Versions are identical") . ']'; ! } else { ! //$fmt = new WikiDiffFormatter; ! $fmt = new WikiUnifiedDiffFormatter; ! $html .= $fmt->format($diff, $older['content']); ! } } ! echo GeneratePage('MESSAGE', $html, ! sprintf(gettext ("Diff of %s."), $pagename), 0); } ?> --- 1031,1164 ---- $cols = QElement('td', array('align' => 'right'), $label); + if ($rev) { + $url = WikiURL($pagename, array('version' => $rev->getVersion())); + $linked_version = QElement('a', array('href' => $url), $rev->getVersion()); + $cols .= Element('td', + gettext("version") . " " . $linked_version); ! $cols .= QElement('td', ! sprintf(gettext ("last modified on %s"), ! strftime($datetimeformat, $rev->get('mtime')))); ! $cols .= QElement('td', ! sprintf(gettext ("by %s"), $rev->get('author'))); } else { ! $cols .= QElement('td', array('colspan' => '3'), ! gettext ("None")); } return Element('tr', $cols); } ! function showDiff ($dbi, $request) { ! $pagename = $request->getArg('pagename'); ! $version = $request->getArg('version'); ! $previous = $request->getArg('previous'); ! ! $page = $dbi->getPage($pagename); ! ! if ($version) { ! if (!($new = $page->getRevision($version))) ! NoSuchRevision($page, $version); ! $new_version = sprintf(gettext("version %d"), $version); ! } ! else { ! $new = $page->getCurrentRevision(); ! $new_version = gettext('current version'); ! } ! ! if (preg_match('/^\d+$/', $previous)) { ! if ( !($old = $page->getRevision($previous)) ) ! NoSuchRevision($page, $previous); ! $old_version = sprintf(gettext("version %d"), $previous); ! $others = array('major', 'minor', 'author'); ! } ! else { ! switch ($previous) { ! case 'major': ! $old = $new; ! while ($old = $page->getRevisionBefore($old)) { ! if (! $old->get('is_minor_edit')) ! break; ! } ! $old_version = gettext("previous major revision"); ! $others = array('minor', 'author'); ! break; ! case 'author': ! $old = $new; ! while ($old = $page->getRevisionBefore($old)) { ! if ($old->get('author') != $new->get('author')) ! break; ! } ! $old_version = gettext("revision by previous author"); ! $others = array('major', 'minor'); ! break; ! case 'minor': ! default: ! $previous='minor'; ! $old = $page->getRevisionBefore($new); ! $old_version = gettext("previous revision"); ! $others = array('major', 'author'); ! break; ! } } ! $new_url = WikiURL($pagename, array('version' => $new->getVersion())); ! $new_link = QElement('a', array('href' => $new_url), $new_version); ! $old_url = WikiURL($pagename, array('version' => $old ? $old->getVersion() : 0)); ! $old_link = QElement('a', array('href' => $old_url), $old_version); ! $page_link = LinkExistingWikiWord($pagename); ! ! $html = Element('p', ! sprintf(htmlspecialchars(gettext("Differences between %s and %s of %s.")), ! $new_link, $old_link, $page_link)); ! ! $otherdiffs=''; ! $label = array('major' => gettext("Previous Major Revision"), ! 'minor' => gettext("Previous Revision"), ! 'author'=> gettext("Previous Author")); ! foreach ($others as $other) { ! $args = array('action' => 'diff', 'previous' => $other); ! if ($version) ! $args['version'] = $version; ! $otherdiffs .= ' ' . QElement('a', array('href' => WikiURL($pagename, $args), ! 'class' => 'wikiaction'), ! $label[$other]); ! } ! $html .= Element('p', ! htmlspecialchars(gettext("Other diffs:")) ! . $otherdiffs); ! ! ! if ($old and $old->getVersion() == 0) ! $old = false; ! ! $html .= Element('table', ! PageInfoRow($pagename, gettext ("Newer page:"), $new) ! . PageInfoRow($pagename, gettext ("Older page:"), $old)); ! ! $html .= "<p>\n"; ! ! if ($new && $old) { ! $diff = new WikiDiff($old->getContent(), $new->getContent()); ! if ($diff->isEmpty()) { ! $html .= '<hr>[' . gettext ("Versions are identical") . ']'; ! } ! else { ! //$fmt = new WikiDiffFormatter; ! $fmt = new WikiUnifiedDiffFormatter; ! $html .= $fmt->format($diff, $old->getContent()); ! } ! } ! ! include_once('lib/Template.php'); ! echo GeneratePage('MESSAGE', $html, ! sprintf(gettext ("Diff: %s"), $pagename)); } + + // Local Variables: + // mode: php + // tab-width: 8 + // c-basic-offset: 4 + // c-hanging-comment-ender-p: nil + // indent-tabs-mode: nil + // End: ?> Index: display.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/display.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** display.php 2001/06/26 18:04:54 1.9 --- display.php 2001/09/18 19:16:23 1.10 *************** *** 1,26 **** <?php ! // display.php: fetch page or get default content ! // calls transform.php for actual transformation of wiki markup to HTML ! rcs_id('$Id$'); ! if (!isset($version)) $version = 0; ! $pagestore = SelectStore($dbi, $pagename, $version, $WikiPageStore, $ArchivePageStore); ! $pagehash = RetrievePage($dbi, $pagename, $pagestore, $version); ! ! $html = ""; ! // we render the page if it exists, else ask the user to write one. ! if (is_array($pagehash)) { ! // transform.php returns $html containing all the HTML markup ! include("lib/transform.php"); ! } else { ! $html .= sprintf(gettext("Describe %s here."), ! LinkUnknownWikiWord($pagename)); } ! echo GeneratePage('BROWSE', $html, $pagename, $pagehash); flush(); - IncreaseHitCount($dbi, $pagename); // For emacs users // Local Variables: --- 1,32 ---- <?php ! // display.php: fetch page or get default content ! // calls transform.php for actual transformation of wiki markup to HTML ! rcs_id('$Id$'); ! require_once('lib/Template.php'); ! require_once('lib/transform.php'); ! function displayPage($dbi, $request) { ! $pagename = $request->getArg('pagename'); ! $version = $request->getArg('version'); ! ! $page = $dbi->getPage($pagename); ! if ($version) { ! $revision = $page->getRevision($version); ! if (!$revision) ! NoSuchRevision($page, $version); ! } ! else { ! $revision = $page->getCurrentRevision(); } ! $template = new WikiTemplate('BROWSE'); ! $template->setPageRevisionTokens($revision); ! $template->replace('CONTENT', do_transform($revision->getContent())); ! echo $template->getExpansion(); flush(); + $page->increaseHitCount(); + } // For emacs users // Local Variables: Index: editpage.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/editpage.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** editpage.php 2001/06/26 18:08:32 1.16 --- editpage.php 2001/09/18 19:16:23 1.17 *************** *** 2,44 **** rcs_id('$Id$'); ! // editpage relies on $pagename, $version ! $currentpage = RetrievePage($dbi, $pagename, SelectStore($dbi, $pagename, $version, $WikiPageStore, $ArchivePageStore), $version); - $banner = htmlspecialchars($pagename); - $pagehash = $currentpage; - - if (is_array($pagehash)) { - if (($pagehash['flags'] & FLAG_PAGE_LOCKED) && !$user->is_admin()) { - $html = "<p>"; - $html .= gettext ("This page has been locked by the administrator and cannot be edited."); - $html .= "\n<p>"; - $html .= gettext ("Sorry for the inconvenience."); - $html .= "\n"; - echo GeneratePage('MESSAGE', $html, sprintf (gettext ("Problem while editing %s"), $pagename), 0); - ExitWiki (""); - } - - $textarea = htmlspecialchars(implode("\n", $pagehash["content"])); - } - else { - if (preg_match("/^${WikiNameRegexp}\$/", $pagename)) $newpage = $pagename; - else $newpage = "[$pagename]"; - - $textarea = htmlspecialchars(sprintf(gettext("Describe %s here."), $newpage)); - - unset($pagehash); - $pagehash["version"] = 0; - $pagehash["lastmodified"] = time(); - $pagehash["author"] = ''; - $currentpage = $pagehash; - } - - echo GeneratePage('EDITPAGE', $textarea, $pagename, $pagehash); - - // For emacs users // Local Variables: // mode: php ! // c-file-style: "ellemtel" // End: ?> --- 2,62 ---- rcs_id('$Id$'); ! require_once('lib/Template.php'); ! function editPage($dbi, $request) { ! // editpage relies on $pagename, $version ! $pagename = $request->getArg('pagename'); ! $version = $request->getArg('version'); ! ! $page = $dbi->getPage($pagename); ! $current = $page->getCurrentRevision(); ! ! if ($version === false) { ! $selected = $current; ! } ! else { ! $selected = $page->getRevision($version); ! if (!$selected) ! NoSuchRevision($page, $version); // noreturn ! } ! ! global $user; // FIXME: make this non-global. ! if ($page->get('locked') && !$user->is_admin()) { ! $html = "<p>"; ! $html .= gettext ("This page has been locked by the administrator and cannot be edited."); ! $html .= "\n<p>"; ! $html .= gettext ("Sorry for the inconvenience."); ! $html .= "\n"; ! ! echo GeneratePage('MESSAGE', $html, ! sprintf(gettext("Problem while editing %s"), $args->pagename), ! $selected); ! ExitWiki (""); ! } ! ! ! $age = time() - $current->get('mtime'); ! $minor_edit = ( $age < MINOR_EDIT_TIMEOUT && $current->get('author') == $user->id() ); ! ! $formvars = array('content' => htmlspecialchars($selected->getPackedContent()), ! 'minor_edit' => $minor_edit ? 'checked' : '', ! 'version' => $selected->getVersion(), ! 'editversion' => $current->getVersion(), ! 'summary' => '', ! 'convert' => '', ! 'pagename' => htmlspecialchars($pagename)); ! ! $template = new WikiTemplate('EDITPAGE'); ! $template->setPageRevisionTokens($selected); ! $template->replace('FORMVARS', $formvars); ! echo $template->getExpansion(); ! } // Local Variables: // mode: php ! // tab-width: 8 ! // c-basic-offset: 4 ! // c-hanging-comment-ender-p: nil ! // indent-tabs-mode: nil // End: ?> Index: fullsearch.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/fullsearch.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** fullsearch.php 2001/02/12 01:43:10 1.6 --- fullsearch.php 2001/09/18 19:16:23 1.7 *************** *** 1,48 **** <?php ! // Search the text of pages for a match. ! rcs_id('$Id$'); ! ! if (empty($searchterm)) ! $searchterm = ''; // FIXME: do something better here? ! ! fix_magic_quotes_gpc($searchterm); ! ! $html = "<P><B>" ! . sprintf(gettext ("Searching for \"%s\" ....."), ! htmlspecialchars($searchterm)) ! . "</B></P>\n<DL>\n"; ! ! // search matching pages ! $query = InitFullSearch($dbi, $searchterm); ! ! // quote regexp chars (space are treated as "or" operator) ! $qterm = preg_replace("/\s+/", "|", preg_quote($searchterm)); ! ! $found = 0; ! $count = 0; ! while ($pagehash = FullSearchNextMatch($dbi, $query)) { ! $html .= "<DT><B>" . LinkExistingWikiWord($pagehash["pagename"]) . "</B>\n"; ! $count++; ! ! // print out all matching lines, highlighting the match ! for ($j = 0; $j < (count($pagehash["content"])); $j++) { ! if ($hits = preg_match_all("/$qterm/i", $pagehash["content"][$j], $dummy)) { ! $matched = preg_replace("/$qterm/i", ! "${FieldSeparator}OT\\0${FieldSeparator}CT", ! $pagehash["content"][$j]); ! $matched = htmlspecialchars($matched); ! $matched = str_replace("${FieldSeparator}OT", '<b>', $matched); ! $matched = str_replace("${FieldSeparator}CT", '</b>', $matched); ! $html .= "<dd><small>$matched</small></dd>\n"; $found += $hits; ! } ! } ! } ! ! $html .= "</dl>\n<hr noshade>" ! . sprintf (gettext ("%d matches found in %d pages."), ! $found, $count) ! . "\n"; ! ! echo GeneratePage('MESSAGE', $html, gettext ("Full Text Search Results"), 0); ?> --- 1,51 ---- <?php ! // Search the text of pages for a match. ! rcs_id('$Id$'); ! require_once('lib/Template.php'); ! require_once('lib/TextSearchQuery.php'); ! ! $query = new TextSearchQuery($args->get('searchterm')); ! ! $html = ("<p><b>" ! . sprintf(gettext ("Searching for \"%s\" ....."), ! htmlspecialchars($args->get('searchterm'))) ! . "</b></p>\n<dl>\n" ); ! ! // search matching pages ! $iter = $dbi->fullsearch($query); ! ! // quote regexp chars (space are treated as "or" operator) ! $hilight_re = $query->getHighlightRegexp(); ! ! $found = 0; ! $count = 0; ! while ($page = $iter->next()) { ! $html .= "<dt><b>" . LinkExistingWikiWord($page->getName()) . "</b>\n"; ! $count++; ! if (empty($hilight_re)) ! continue; // nothing to highlight ! ! // print out all matching lines, highlighting the match ! $current = $page->getCurrentRevision(); ! $matches = preg_grep("/$hilight_re/i", $current->getContent()); ! foreach ($matches as $line) { ! if ($hits = preg_match_all("/$hilight_re/i", $line, $dummy)) { ! $line = preg_replace("/$hilight_re/i", ! "${FieldSeparator}OT\\0${FieldSeparator}CT", ! $line); ! $line = htmlspecialchars($line); ! $line = str_replace("${FieldSeparator}OT", '<b>', $line); ! $line = str_replace("${FieldSeparator}CT", '</b>', $line); ! $html .= "<dd><small>$line</small></dd>\n"; $found += $hits; ! } ! } ! } ! ! $html .= ( "</dl>\n<hr noshade>" ! . sprintf (gettext ("%d matches found in %d pages."), ! $found, $count) ! . "\n"); ! ! echo GeneratePage('MESSAGE', $html, sprintf(gettext("Full Text Search: %s"), $searchterm)); ?> Index: interwiki.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/interwiki.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** interwiki.php 2001/03/03 19:29:48 1.5 --- interwiki.php 2001/09/18 19:16:23 1.6 *************** *** 35,47 **** $url .= $page; ! if ($linktext) $linktext = htmlspecialchars($linktext); ! else ! $linktext = Element('span', array('class' => 'interwiki'), ! htmlspecialchars("$wiki:") . ! QElement('span', array('class' => 'wikiword'), $page)); return Element('a', array('href' => $url, ! 'class' => 'interwikilink'), $linktext); } --- 35,50 ---- $url .= $page; ! if ($linktext) { $linktext = htmlspecialchars($linktext); ! $class = 'named-interwiki'; ! } ! else { ! $linktext = ( htmlspecialchars("$wiki:") ! . QElement('span', array('class' => 'wikipage'), $page) ); ! $class = 'interwiki'; ! } return Element('a', array('href' => $url, ! 'class' => $class), $linktext); } Index: loadsave.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/loadsave.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** loadsave.php 2001/06/26 18:08:32 1.7 --- loadsave.php 2001/09/18 19:16:23 1.8 *************** *** 1,16 **** <?php rcs_id('$Id$'); - require "lib/ziplib.php"; - function StartLoadDump($title, $html = '') { // FIXME: This is a hack echo ereg_replace('</body>.*', '', ! GeneratePage('MESSAGE', $html, $title, 0)); } function EndLoadDump() { // FIXME: This is a hack echo Element('p', QElement('b', gettext("Complete."))); echo Element('p', "Return to " . LinkExistingWikiWord($GLOBALS['pagename'])); --- 1,18 ---- <?php rcs_id('$Id$'); + require_once("lib/ziplib.php"); + require_once("lib/Template.php"); function StartLoadDump($title, $html = '') { // FIXME: This is a hack echo ereg_replace('</body>.*', '', ! GeneratePage('MESSAGE', $html, $title, 0)); } + function EndLoadDump() { // FIXME: This is a hack + echo Element('p', QElement('b', gettext("Complete."))); echo Element('p', "Return to " . LinkExistingWikiWord($GLOBALS['pagename'])); *************** *** 25,47 **** //////////////////////////////////////////////////////////////// ! function MailifyPage ($pagehash, $oldpagehash = false) { ! global $SERVER_ADMIN, $ArchivePageStore; ! $from = isset($SERVER_ADMIN) ? $SERVER_ADMIN : 'foo@bar'; $head = "From $from " . ctime(time()) . "\r\n"; ! $head .= "Subject: " . rawurlencode($pagehash['pagename']) . "\r\n"; $head .= "From: $from (PhpWiki)\r\n"; ! $head .= "Date: " . rfc1123date($pagehash['lastmodified']) . "\r\n"; $head .= sprintf("Mime-Version: 1.0 (Produced by PhpWiki %s)\r\n", PHPWIKI_VERSION); ! if (is_array($oldpagehash)) ! { ! return $head . MimeMultipart(array(MimeifyPage($oldpagehash), ! MimeifyPage($pagehash))); ! } ! ! return $head . MimeifyPage($pagehash); } --- 27,54 ---- //////////////////////////////////////////////////////////////// ! function MailifyPage ($page, $nversions = 1) { ! global $SERVER_ADMIN; ! ! $current = $page->getCurrentRevision(); $from = isset($SERVER_ADMIN) ? $SERVER_ADMIN : 'foo@bar'; $head = "From $from " . ctime(time()) . "\r\n"; ! $head .= "Subject: " . rawurlencode($page->getName()) . "\r\n"; $head .= "From: $from (PhpWiki)\r\n"; ! $head .= "Date: " . rfc1123date($current->get('mtime')) . "\r\n"; $head .= sprintf("Mime-Version: 1.0 (Produced by PhpWiki %s)\r\n", PHPWIKI_VERSION); ! $iter = $page->getAllRevisions(); ! $parts = array(); ! while ($revision = $iter->next()) { ! $parts[] = MimeifyPageRevision($revision); ! if ($nversions > 0 && count($parts) >= $nversions) ! break; ! } ! if (count($parts) > 1) ! return $head . MimeMultipart($parts); ! assert($parts); ! return $head . $parts[0]; } *************** *** 53,142 **** * included as well. */ ! function MakeWikiZip ($dbi, $include_archive = false) { ! global $WikiPageStore, $ArchivePageStore; ! ! $pages = GetAllWikiPageNames($dbi); ! $zipname = "wiki.zip"; ! ! if ($include_archive) { ! $zipname = "wikidb.zip"; ! } ! ! $zip = new ZipWriter("Created by PhpWiki", $zipname); ! ! for (reset($pages); $pagename = current($pages); next($pages)) ! { ! set_time_limit(30); // Reset watchdog. ! $pagehash = RetrievePage($dbi, $pagename, $WikiPageStore, 0); ! ! if (! is_array($pagehash)) ! continue; ! ! if ($include_archive) ! $oldpagehash = RetrievePage($dbi, $pagename, $ArchivePageStore, 0); ! else ! $oldpagehash = false; ! ! $attrib = array('mtime' => $pagehash['lastmodified'], ! 'is_ascii' => 1); ! if (($pagehash['flags'] & FLAG_PAGE_LOCKED) != 0) ! $attrib['write_protected'] = 1; ! ! $content = MailifyPage($pagehash, $oldpagehash); ! $zip->addRegularFile( rawurlencode($pagehash['pagename']), ! $content, $attrib); ! } ! $zip->finish(); ! } ! function DumpToDir ($dbi, $directory) ! { ! global $WikiPageStore; ! ! if (empty($directory)) ! ExitWiki(gettext("You must specify a directory to dump to")); ! ! // see if we can access the directory the user wants us to use ! if (! file_exists($directory)) { ! if (! mkdir($directory, 0755)) ! ExitWiki("Cannot create directory '$directory'<br>\n"); ! else ! $html = "Created directory '$directory' for the page dump...<br>\n"; ! } else { ! $html = "Using directory '$directory'<br>\n"; ! } ! ! StartLoadDump("Dumping Pages", $html); ! ! $pages = GetAllWikiPagenames($dbi); ! ! while (list ($i, $pagename) = each($pages)) ! { ! $enc_name = htmlspecialchars($pagename); ! $filename = rawurlencode($pagename); ! ! echo "<br>$enc_name ... "; ! if($pagename != $filename) ! echo "<small>saved as $filename</small> ... "; ! ! $page = RetrievePage($dbi, $pagename, $WikiPageStore, 0); ! ! //$data = serialize($page); ! $data = MailifyPage($page); ! if ( !($fd = fopen("$directory/$filename", "w")) ) ! ExitWiki("<b>couldn't open file '$directory/$filename' for writing</b>\n"); ! $num = fwrite($fd, $data, strlen($data)); ! echo "<small>$num bytes written</small>\n"; ! flush(); ! assert($num == strlen($data)); ! fclose($fd); ! } ! EndLoadDump(); } --- 60,146 ---- * included as well. */ ! function MakeWikiZip ($dbi, $request) { ! if ($request->getArg('include') == 'all') { ! $zipname = "wikidb.zip"; ! $include_archive = true; ! } ! else { ! $zipname = "wiki.zip"; ! $include_archive = false; ! } ! ! ! ! $zip = new ZipWriter("Created by PhpWiki", $zipname); ! ! $pages = $dbi->getAllPages(); ! while ($page = $pages->next()) { ! set_time_limit(30); // Reset watchdog. ! ! $current = $page->getCurrentRevision(); ! if ($current->getVersion() == 0) ! continue; ! ! ! $attrib = array('mtime' => $current->get('mtime'), ! 'is_ascii' => 1); ! if ($page->get('locked')) ! $attrib['write_protected'] = 1; ! ! if ($include_archive) ! $content = MailifyPage($page, 0); ! else ! $content = MailifyPage($page); ! $zip->addRegularFile( rawurlencode($page->getName()), ! $content, $attrib); ! } ! $zip->finish(); ! } ! ! function DumpToDir ($dbi, $request) ! { ! $directory = $request->getArg('directory'); ! if (empty($directory)) ! ExitWiki(gettext("You must specify a directory to dump to")); ! ! // see if we can access the directory the user wants us to use ! if (! file_exists($directory)) { ! if (! mkdir($directory, 0755)) ! ExitWiki("Cannot create directory '$directory'<br>\n"); ! else ! $html = "Created directory '$directory' for the page dump...<br>\n"; ! } else { ! $html = "Using directory '$directory'<br>\n"; ! } ! ! StartLoadDump("Dumping Pages", $html); ! ! $pages = $dbi->getAllPages(); ! ! while ($page = $pages->next()) { ! ! $enc_name = htmlspecialchars($page->getName()); ! $filename = rawurlencode($page->getName()); ! ! echo "<br>$enc_name ... "; ! if($pagename != $filename) ! echo "<small>saved as $filename</small> ... "; ! $data = MailifyPage($page); ! if ( !($fd = fopen("$directory/$filename", "w")) ) ! ExitWiki("<b>couldn't open file '$directory/$filename' for writing</b>\n"); ! $num = fwrite($fd, $data, strlen($data)); ! echo "<small>$num bytes written</small>\n"; ! flush(); ! assert($num == strlen($data)); ! fclose($fd); ! } ! EndLoadDump(); } *************** *** 147,228 **** //////////////////////////////////////////////////////////////// ! function SavePage ($dbi, $page, $defaults, $source, $filename) { ! global $WikiPageStore; ! // Fill in defaults for missing values? ! // Should we do more sanity checks here? ! while (list($key, $val) = each($defaults)) ! if (empty($page[$key])) ! $page[$key] = $val; ! ! $pagename = $page['pagename']; ! ! if (empty($pagename)) ! { ! echo Element('dd'). Element('dt', QElement('b', "Empty pagename!")); ! return; ! } ! ! ! $mesg = array(); ! $version = $page['version']; ! $isnew = true; ! ! if ($version) ! $mesg[] = sprintf(gettext("version %s"), $version); ! if ($source) ! $mesg[] = sprintf(gettext("from %s"), $source); ! ! if (is_array($current = RetrievePage($dbi, $pagename, $WikiPageStore, 0))) ! { ! $isnew = false; ! ! if (arrays_equal($current['content'], $page['content']) ! && $current['author'] == $page['author'] ! && $current['flags'] == $page['flags']) ! { ! $mesg[] = sprintf(gettext("is identical to current version %d"), ! $current['version']); ! ! if ( $version <= $current['version'] ) ! { ! $mesg[] = gettext("- skipped"); ! $page = false; ! } ! } ! else ! { ! SavePageToArchive($pagename, $current); ! ! if ( $version <= $current['version'] ) ! $page['version'] = $current['version'] + 1; ! } ! } ! else if ($page['version'] < 1) ! $page['version'] = 1; ! ! ! if ($page) ! { ! ReplaceCurrentPage($pagename, $page); ! UpdateRecentChanges($dbi, $pagename, $isnew); ! ! $mesg[] = gettext("- saved"); ! if ($version != $page['version']) ! $mesg[] = sprintf(gettext("as version %d"), $page['version']); ! } ! ! print( Element('dt', LinkExistingWikiWord($pagename)) ! . QElement('dd', join(" ", $mesg)) ! . "\n" ); ! flush(); ! } ! ! function ParseSerializedPage($text) ! { ! if (!preg_match('/^a:\d+:{[si]:\d+/', $text)) ! return false; ! return unserialize($text); } --- 151,265 ---- //////////////////////////////////////////////////////////////// ! function SavePage ($dbi, $pageinfo, $source, $filename) { ! $pagedata = $pageinfo['pagedata']; // Page level meta-data. ! $versiondata = $pageinfo['versiondata']; // Revision level meta-data. ! if (empty($pageinfo['pagename'])) { ! echo Element('dd'). Element('dt', QElement('b', "Empty pagename!")); ! return; ! } ! ! if (empty($versiondata['author_id'])) ! $versiondata['author_id'] = $versiondata['author']; ! ! $pagename = $pageinfo['pagename']; ! $content = $pageinfo['content']; ! ! $page = $dbi->getPage($pagename); ! ! foreach ($pagedata as $key => $value) { ! if (!empty($value)) ! $page->set($key, $value); ! } ! ! $mesg = array(); ! $skip = false; ! if ($source) ! $mesg[] = sprintf(gettext("from %s"), $source); ! ! $current = $page->getCurrentRevision(); ! if ($current->getVersion() == 0) { ! $mesg[] = gettext("new page"); ! $isnew = true; ! } ! else { ! if ($current->getPackedContent() == $content ! && $current->get('author') == $versiondata['author']) { ! $mesg[] = sprintf(gettext("is identical to current version %d"), ! $current->getVersion()); ! $mesg[] = gettext("- skipped"); ! $skip = true; ! } ! $isnew = false; ! } ! ! if (! $skip) { ! $new = $page->createRevision(WIKIDB_FORCE_CREATE, $content, ! $versiondata, ! ExtractWikiPageLinks($content)); ! ! $mesg[] = gettext("- saved"); ! $mesg[] = sprintf(gettext("- saved as version %d"), $new->getVersion()); ! } ! ! print( Element('dt', LinkExistingWikiWord($pagename)) ! . QElement('dd', join(" ", $mesg)) ! . "\n" ); ! flush(); ! } ! ! function ParseSerializedPage($text, $default_pagename) ! { ! if (!preg_match('/^a:\d+:{[si]:\d+/', $text)) ! return false; ! ! $pagehash = unserialize($text); ! ! // Split up pagehash into four parts: ! // pagename ! // content ! // page-level meta-data ! // revision-level meta-data ! ! if (!defined('FLAG_PAGE_LOCKED')) ! define('FLAG_PAGE_LOCKED', 1); ! $pageinfo = array('pagedata' => array(), ! 'versiondata' => array()); ! ! $pagedata = &$pageinfo['pagedata']; ! $versiondata = &$pageinfo['versiondata']; ! ! // Fill in defaults. ! if (empty($pagehash['pagename'])) ! $pagehash['pagename'] = $default_pagename; ! if (empty($pagehash['author'])) ! $pagehash['author'] = $GLOBALS['user']->id(); ! ! ! foreach ($pagehash as $key => $value) { ! switch($key) { ! case 'pagename': ! case 'version': ! $pageinfo[$key] = $value; ! break; ! case 'content': ! $pageinfo[$key] = join("\n", $value); ! case 'flags': ! if (($value & FLAG_PAGE_LOCKED) != 0) ! $pagedata['locked'] = 'yes'; ! break; ! case 'created': ! $pagedata[$key] = $value; ! break; ! case 'lastmodified': ! $versiondata['mtime'] = $value; ! break; ! case 'author': ! $versiondata[$key] = $value; ! break; ! } ! } ! return $pageinfo; } *************** *** 233,275 **** function LoadFile ($dbi, $filename, $text = false, $mtime = false) { ! if (!is_string($text)) ! { ! // Read the file. ! $stat = stat($filename); ! $mtime = $stat[9]; ! $text = implode("", file($filename)); ! } ! ! set_time_limit(30); // Reset watchdog. ! ! // FIXME: basename("filewithnoslashes") seems to return garbage sometimes. ! $basename = basename("/dummy/" . $filename); ! ! if (!$mtime) ! $mtime = time(); // Last resort. ! ! $defaults = array('author' => $GLOBALS['user']->id(), ! 'pagename' => rawurldecode($basename), ! 'flags' => 0, ! 'version' => 0, ! 'created' => $mtime, ! 'lastmodified' => $mtime); ! ! if ( ($parts = ParseMimeifiedPages($text)) ) ! { ! usort($parts, 'SortByPageVersion'); ! for (reset($parts); $page = current($parts); next($parts)) ! SavePage($dbi, $page, $defaults, "MIME file $filename", $basename); ! } ! else if ( ($page = ParseSerializedPage($text)) ) ! { ! SavePage($dbi, $page, $defaults, "Serialized file $filename", $basename); ! } ! else ! { ! // Assume plain text file. ! $page['content'] = preg_split('/[ \t\r]*\n/', chop($text)); ! SavePage($dbi, $page, $defaults, "plain file $filename", $basename); ! } } --- 270,312 ---- function LoadFile ($dbi, $filename, $text = false, $mtime = false) { ! if (!is_string($text)) { ! // Read the file. ! $stat = stat($filename); ! $mtime = $stat[9]; ! $text = implode("", file($filename)); ! } ! ! set_time_limit(30); // Reset watchdog. ! ! // FIXME: basename("filewithnoslashes") seems to return garbage sometimes. ! $basename = basename("/dummy/" . $filename); ! ! if (!$mtime) ! $mtime = time(); // Last resort. ! ! $defaults = array('author' => $GLOBALS['user']->id(), ! 'pagename' => rawurldecode($basename)); ! ! $default_pagename = rawurldecode($basename); ! ! if ( ($parts = ParseMimeifiedPages($text)) ) { ! usort($parts, 'SortByPageVersion'); ! foreach ($parts as $pageinfo) ! SavePage($dbi, $pageinfo, "MIME file $filename", $basename); ! } ! else if ( ($pageinfo = ParseSerializedPage($text, $default_pagename)) ) { ! SavePage($dbi, $pageinfo, "Serialized file $filename", $basename); ! } ! else { ! // Assume plain text file. ! $pageinfo = array('pagename' => $default_pagename, ! 'pagedata' => array(), ! 'versiondata' ! => array('author' => $GLOBALS['user']->id()), ! 'content' ! => preg_replace('/[ \t\r]*\n/', "\n", chop($text)) ! ); ! SavePage($dbi, $pageinfo, "plain file $filename", $basename); ! } } *************** *** 284,289 **** || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', 'Skipping'); ! continue; } --- 321,326 ---- || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', 'Skipping'); ! continue; } *************** *** 354,362 **** } ! function LoadFileOrDir ($dbi, $source) { StartLoadDump("Loading '$source'"); echo "<dl>\n"; ! LoadAny($dbi, $source, false, array(gettext('RecentChanges'))); echo "</dl>\n"; EndLoadDump(); --- 391,400 ---- } ! function LoadFileOrDir ($dbi, $request) { + $source = $request->getArg('source'); StartLoadDump("Loading '$source'"); echo "<dl>\n"; ! LoadAny($dbi, $source/*, false, array(gettext('RecentChanges'))*/); echo "</dl>\n"; EndLoadDump(); *************** *** 365,413 **** function SetupWiki ($dbi) { ! global $GenericPages, $LANG, $user; ! //FIXME: This is a hack ! $user->userid = 'The PhpWiki programming team'; ! StartLoadDump('Loading up virgin wiki'); ! echo "<dl>\n"; ! ! $ignore = array(gettext('RecentChanges')); ! LoadAny($dbi, FindLocalizedFile(WIKI_PGSRC), false, $ignore); ! if ($LANG != "C") ! LoadAny($dbi, FindFile(DEFAULT_WIKI_PGSRC), $GenericPages, $ignore); ! echo "</dl>\n"; ! EndLoadDump(); } ! function LoadPostFile ($dbi, $postname) { ! global $HTTP_POST_FILES; ! ! extract($HTTP_POST_FILES[$postname]); ! fix_magic_quotes_gpc($tmp_name); ! fix_magic_quotes_gpc($name); ! if (!is_uploaded_file($tmp_name)) ! ExitWiki('Bad file post'); // Possible malicious attack. ! ! // Dump http headers. ! $fd = fopen($tmp_na... [truncated message content] |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:28
|
Update of /cvsroot/phpwiki/phpwiki In directory usw-pr-cvs1:/tmp/cvs-serv2684 Modified Files: DBLIB.txt INSTALL INSTALL.flatfile INSTALL.mSQL INSTALL.mysql INSTALL.pgsql README UPGRADING index.php phpwiki.css Added Files: phpwiki-heavy.css Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. --- NEW FILE --- /* * phpwiki-heavy.css * * This is stuff which should be in phpwiki.css, but which breaks NS4. */ /* Hide the elements we put in just to get around NS4 bugs. */ .ns4bug, DIV.br { display: none; } /* This makes spacings in NS4 too big. */ .toolbar, DIV.toolbar { margin: 0.5ex 0ex; } /* This break NS4, but is necessary for IE4. */ DIV.wikitext { width: auto; } /* Make Wikilinks inside <B> tags larger. */ B .wiki, STRONG .wiki, B .wikipage, STRONG .wikipage { font-size: larger; } /* Make wikiaction links look like buttons */ A.wikiaction, A.wikiadmin, INPUT.button { border-style: outset; border-width: thin; color: #006; padding-top: 0ex; padding-bottom: 0ex; padding-left: 0.2em; padding-right: 0.2em; } Index: DBLIB.txt =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/DBLIB.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** DBLIB.txt 2001/02/17 05:35:56 1.9 --- DBLIB.txt 2001/09/18 19:16:23 1.10 *************** *** 1,158 **** ! This is a description of the database interface for PhpWiki. Regardless ! of what kind of data store is used (RDBMS, DBM files, flat text files) ! you should be able to write a library that supports that data store. ! A few notes: ! * While most functions specify a "db reference" as the first value ! passed in, this can be any kind of data type that your functions ! know about. For example, in the DBM implementation this is a hash of ! integers that refer to open database files, but in the MySQL ! version it's an associative array that contains the DB information. ! ! * Functions that return the page data must return a hash (associative ! array) of all the data, where 'content' == the text of the page in Wiki ! markup, 'version' is an integer representing the version, 'author' ! the IP address or host name of the previous author and so on. See ! the next paragraph for a precise description. ! ! * The data structure. This is commonly named $pagehash in the source ! code; it's an associative array with values that are integers, ! strings and arrays (i.e. a heterogenous data structure). Here's a ! current description: ! ! $pagehash = { ! author => string, ! content => array (where each element is a line of the page), ! created => integer (a number in Unix time since the Epoch), ! flags => integer, ! lastmodified => integer (also Unix time), ! pagename => string, ! version => integer ! }; ! ! The functions are: ! ! OpenDataBase($dbname) ! takes: a string, the name of the database ! returns: a reference to the database (a handle) ! ! ! CloseDataBase($dbi) ! takes: a reference to the database (handle) ! returns: the value of the close. For databases with persistent ! connections, this doesn't return anything. ! ! ! MakeDBHash($pagename, $pagehash) ! takes: page name, page array ! returns: an encoded version of the $pagehash suitable for ! insertion into the data store. This is an internal helper ! function used mainly for the RDBMSs. ! ! MakePageHash($dbhash) ! takes: an array that came from the database ! returns: the $pagehash data structure used by the ! application. This function undoes what MakeDBHash does. ! ! RetrievePage($dbi, $pagename, $pagestore) ! takes: db reference, string which is the name of a page, and a ! string indicating which store to fetch the page from (live or archive). ! returns: a PHP associative array containing the page data ! (text, version, author, etc) ! ! ! InsertPage($dbi, $pagename, $pagehash) ! takes: db reference, page name (string), associative array ! of all page data ! returns: nothing (hmm. It should probably return true/false) ! ! SaveCopyToArchive($dbi, $pagename, $pagehash) ! Similar to InsertPage but for handling the archive store. The ! goal here was to separate the two (live db and archive db) in ! case there were different storage formats (for example, the ! archive might only store diffs of the pages). However this is ! not the case in the implementations. ! ! IsWikiPage($dbi, $pagename) ! takes: db reference, string containing page name ! returns: true or false, if the page already exists in the live db. ! ! IsInArchive($dbi, $pagename) ! takes: db reference, string containing page name ! returns: true or false, if the page already exists in the archive. ! ! InitTitleSearch($dbi, $search) ! takes: db reference, search string ! returns: a handle to identify the query and the current position ! within the result set. ! ! RemovePage($dbi, $pagename) ! takes: db reference, name of the page ! returns: nothing ! This deletes a page from both the live and archive page stores. ! ! TitleSearchNextMatch($dbi, &$pos) ! takes: db reference, reference to a hash created by ! InitTitleSearch ! returns: the next page name that contains a match to the search term ! (advances $pos to next result field as well) ! ! MakeSQLSearchClause($search, $column) ! takes: a search string, column name ! returns: a SQL query string suitable for a database query ! ! InitFullSearch($dbi, $search) ! takes: db reference, string containing search term ! returns: similar to InitTitleSearch: a handle to identify the ! query and the current position within the result set. ! ! ! FullSearchNextMatch($dbi, &$pos) ! takes: db reference, reference to a hash created by ! InitFullSearch ! returns: an associative array, where: ! 'name' -- contains the page name ! 'hash' -- contains the hash of the page data ! (advances $pos to next result field as well) ! ! ! IncreaseHitCount($dbi, $pagename) ! takes: db reference, string (name of a page) ! returns: nothing (MySQL implementation returns the last result ! set but it is not used by the caller) ! ! ! GetHitCount($dbi, $pagename) ! takes: db reference, string (page name) ! returns: an integer, the number of hits the page has received ! ! ! InitMostPopular($dbi, $limit) ! takes: a db reference and an integer, which is the limit of the ! number of pages you want returned. ! returns: the result set from the query ! ! ! MostPopularNextMatch($dbi, $res) ! takes: db reference, the result set returned by InitMostPopular ! returns: the next row from the result set, as a PHP array type ! ! GetAllWikiPageNames($dbi) ! takes: db reference ! returns: an array containing all page names ! ! GetWikiPageLinks($dbi, $pagename) ! takes: db reference, page name ! returns: a two-dimensional array containing outbound links ! ordered by score desc ('out'); inbound links ordered by score ! desc ('in'); inbound or outbound links ordered by most number of ! page views ('popular'). ! ! SetWikiPageLinks($dbi, $pagename, $linklist) ! takes: db reference, page name, list of pages linking to this ! one ! This deletes the existing list of linking pages and inserts all ! the page names in $linklist. $Id$ --- 1,7 ---- ! This release uses a complete new database API. ! For now, see lib/WikiDB.php for a description of the external API to the database. ! See lib/WikiDB/backend.php for more detail on how to write a new backend. $Id$ Index: INSTALL =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** INSTALL 2001/02/01 02:50:51 1.8 --- INSTALL 2001/09/18 19:16:23 1.9 *************** *** 1,6 **** 0. INSTALLATION ! PhpWiki requires PHP version 3.0.9 or greater, since it uses the ! preg_*() family of functions. Untar/gzip this file into the directory where you want it to live. --- 1,5 ---- 0. INSTALLATION ! PhpWiki requires PHP version 4.0.? or greater. Untar/gzip this file into the directory where you want it to live. *************** *** 10,29 **** bash$ tar -xvf phpwiki-X.XX.tar ! To improve efficiency, edit lib/config.php and set the $ServerAddress ! by hand; this will save a regexp call on every invocation. - Example: - Let's say you own the web server http://www.foo.com/. You untar in the - server's root directory; then you should be able to just go to your new - Wiki: - http://www.foo.com/phpwiki/index.php - - If you configure your server to recognize index.php as the index of a - directory, you can just do: - - http://www.foo.com/phpwiki/ - - 1. CONFIGURATION --- 9,15 ---- bash$ tar -xvf phpwiki-X.XX.tar ! Look at index.php and edit the settings there to your liking. 1. CONFIGURATION *************** *** 36,44 **** If you don't want the DBM files to live in /tmp you must make sure the web server can read/write to your chosen location. It's probably a bad idea ! to leave it in /tmp. (Again, edit lib/config.php). For example, you create a subdirectory called "pages" in the wiki directory made when you untarred PhpWiki. Move the DBM files there. ! The files are called: wikipagesdb, wikiarchivedb, wikilinksdb, wikihottopicsdb, and wikihitcountdb. The files should already have proper rights and owners, as they were created by the web server. Otherwise --- 22,30 ---- If you don't want the DBM files to live in /tmp you must make sure the web server can read/write to your chosen location. It's probably a bad idea ! to leave it in /tmp. (Again, edit index.php). For example, you create a subdirectory called "pages" in the wiki directory made when you untarred PhpWiki. Move the DBM files there. ! (FIXME: this is incorrect:)The files are called: wikipagesdb, wikiarchivedb, wikilinksdb, wikihottopicsdb, and wikihitcountdb. The files should already have proper rights and owners, as they were created by the web server. Otherwise *************** *** 80,89 **** as the root document of a directory. This web application was written under PHP version 3.0.12 and the latest build of PHP4. It's tested under the following systems: MySQL + Debian ! mSQL + Red Hat 4.1 ! DBM or Postgresql on Red Hat 6.2 It reportedly works on Windows with Apache+PHP, which amazes me. --- 66,76 ---- as the root document of a directory. + FIXME: obsolete. (PHP 3 won't work) This web application was written under PHP version 3.0.12 and the latest build of PHP4. It's tested under the following systems: MySQL + Debian ! mSQL + Red Hat 4.1 (FIXME: msql currently won't work) ! DBA or Postgresql on Red Hat 6.2 It reportedly works on Windows with Apache+PHP, which amazes me. Index: INSTALL.flatfile =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.flatfile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** INSTALL.flatfile 2001/04/06 18:21:36 1.4 --- INSTALL.flatfile 2001/09/18 19:16:23 1.5 *************** *** 1,2 **** --- 1,5 ---- + FIXME: The flatfile backend has not yet been ported to the new database + scheme. For now, it is broken. + If you cannot run PhpWiki on top of a relational database like MySQL or Postgresql, and your system does not support DBM files *************** *** 130,132 **** sw...@pa... ! $Id$ \ No newline at end of file --- 133,135 ---- sw...@pa... ! $Id$ Index: INSTALL.mSQL =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.mSQL,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** INSTALL.mSQL 2001/03/02 00:38:50 1.4 --- INSTALL.mSQL 2001/09/18 19:16:23 1.5 *************** *** 1,2 **** --- 1,5 ---- + FIXME: The flatfile backend has not yet been ported to the new database + scheme. For now, it is broken. + Note: mSQL will not be supported in the 1.3 development branch, unless someone wants to assume responsibility for it. When the new version of *************** *** 57,59 **** sw...@pa... ! $Id$ \ No newline at end of file --- 60,62 ---- sw...@pa... ! $Id$ Index: INSTALL.mysql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.mysql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** INSTALL.mysql 2001/07/15 15:49:44 1.7 --- INSTALL.mysql 2001/09/18 19:16:23 1.8 *************** *** 1,2 **** --- 1,3 ---- + FIXME: these instructions are slightly broken. Installing phpwiki with mySQL Index: INSTALL.pgsql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.pgsql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** INSTALL.pgsql 2001/03/03 19:43:14 1.8 --- INSTALL.pgsql 2001/09/18 19:16:23 1.9 *************** *** 1,2 **** --- 1,6 ---- + FIXME: The pgsql backend has not yet been ported to the new database + scheme. (Though it should not be very hard, and is certainly in + the works.) + ---------- NOTE for the 1.2 release: You may see a few warnings when you first *************** *** 69,71 **** Report bugs to php...@li... ! $Id$ \ No newline at end of file --- 73,75 ---- Report bugs to php...@li... ! $Id$ Index: README =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/README,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** README 2001/03/03 19:43:14 1.11 --- README 2001/09/18 19:16:23 1.12 *************** *** 1,2 **** --- 1,4 ---- + FIXME: This is outdated. + This web application is licensed under the Gnu Public License, which should be included in the same directory as this README. A copy Index: UPGRADING =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/UPGRADING,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** UPGRADING 2001/04/06 18:21:36 1.2 --- UPGRADING 2001/09/18 19:16:23 1.3 *************** *** 1,2 **** --- 1,11 ---- + FIXME: WARNING WARNING: the schemas used by the new databases + are completely incompatible with schemas in any previous version + of PhpWiki. If you install this new PhpWiki, you must start with a + new empty database (currently either mysql or dba). (It will be + filled with the usual default pages.) + + FIXME: add more. + + More comprehensive updgrading information is forthcoming... however in the meantime, this message is in the Open Discussion board on *************** *** 46,48 **** ! $Id$ \ No newline at end of file --- 55,57 ---- ! $Id$ Index: index.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/index.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** index.php 2001/07/20 17:40:12 1.20 --- index.php 2001/09/18 19:16:23 1.21 *************** *** 22,26 **** // Part Null: Don't touch this! ! define ('PHPWIKI_VERSION', '1.3.0pre'); require "lib/prepend.php"; rcs_id('$Id$'); --- 22,26 ---- // Part Null: Don't touch this! ! define ('PHPWIKI_VERSION', '1.3.0-jeffs-hacks'); require "lib/prepend.php"; rcs_id('$Id$'); *************** *** 81,95 **** $DBParams = array( // Select the database type: ! // Uncomment one of these, or leave all commented for the default ! // data base type ('dba' if supported, else 'dbm'.) ! //'dbtype' => 'dba', ! //'dbtype' => 'dbm', ! //'dbtype' => 'mysql', ! //'dbtype' => 'pgsql', ! //'dbtype' => 'msql', ! //'dbtype' => 'file', // Used by all DB types: ! 'database' => 'wiki', // prefix for filenames or table names /* --- 81,104 ---- $DBParams = array( // Select the database type: ! //'dbtype' => 'SQL', ! 'dbtype' => 'dba', + // For SQL based backends, specify the database as a DSN + // The most general form of a DSN looks like: + // + // phptype(dbsyntax)://username:password@protocol+hostspec/database + // + // For a MySQL database, the following should work: + // + // mysql://user:password@host/databasename + // + // FIXME: My version Pear::DB seems to be broken enough that there is + // no way to connect to a mysql server over a socket right now. + //'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', + //'dsn' => 'mysql://guest@localhost/test', + 'dsn' => 'pgsql://localhost/test', + // Used by all DB types: ! // prefix for filenames or table names /* *************** *** 98,121 **** * installation. */ ! 'prefix' => 'phpwiki_', ! // Used by 'dbm', 'dba', 'file' 'directory' => "/tmp", ! ! // 'dbm' and 'dba create files named "$directory/${database}{$prefix}*". ! // 'file' creates files named "$directory/${database}/{$prefix}*/*". ! // The sql types use tables named "{$prefix}*" ! ! // Used by 'dbm', 'dba' 'timeout' => 20, ! ! // Used by *sql as neccesary to log in to server: ! 'server' => 'localhost', ! 'port' => '', ! 'socket' => '', ! 'user' => 'guest', ! 'password' => '' ); ///////////////////////////////////////////////////////////////////// --- 107,185 ---- * installation. */ ! //'prefix' => 'phpwiki_', ! // Used by 'dba' 'directory' => "/tmp", ! 'dba_handler' => 'gdbm', // Either of 'gdbm' or 'db2' work great for me. ! //'dba_handler' => 'db2', ! //'dba_handler' => 'db3', // doesn't work at all for me.... 'timeout' => 20, ! //'timeout' => 5 ); + ///////////////////////////////////////////////////////////////////// + // + // The next section controls how many old revisions of each page + // are kept in the database. + // + // There are two basic classes of revisions: major and minor. + // Which class a revision belongs in is determined by whether the + // author checked the "this is a minor revision" checkbox when they + // saved the page. + // + // There is, additionally, a third class of revisions: author revisions. + // The most recent non-mergable revision from each distinct author is + // and author revision. + // + // The expiry parameters for each of those three classes of revisions + // can be adjusted seperately. For each class there are five + // parameters (usually, only two or three of the five are actually set) + // which control how long those revisions are kept in the database. + // + // max_keep: If set, this specifies an absolute maximum for the number + // of archived revisions of that class. This is meant to be + // used as a safety cap when a non-zero min_age is specified. + // It should be set relatively high, and it's purpose is to + // prevent malicious or accidental database overflow due + // to someone causing an unreasonable number of edits in a short + // period of time. + // + // min_age: Revisions younger than this (based upon the supplanted date) + // will be kept unless max_keep is exceeded. The age should + // be specified in days. It should be a non-negative, + // real number, + // + // min_keep: At least this many revisions will be kept. + // + // keep: No more than this many revisions will be kept. + // + // max_age: No revision older than this age will be kept. + // + // Supplanted date: Revisions are timestamped at the instant that they cease + // being the current revision. Revision age is computed using this timestamp, + // not the edit time of the page. + // + // Merging: When a minor revision is deleted, if the preceding revision is by + // the same author, the minor revision is merged with the preceding revision + // before it is deleted. Essentially: this replaces the content (and supplanted + // timestamp) of the previous revision with the content after the merged minor + // edit, the rest of the page metadata for the preceding version (summary, mtime, ...) + // is not changed. + // + // Keep up to 8 major edits, but keep them no longer than a month. + $ExpireParams['major'] = array('max_age' => 32, + 'keep' => 8); + // Keep up to 4 minor edits, but keep them no longer than a week. + $ExpireParams['minor'] = array('max_age' => 7, + 'keep' => 4); + // Keep the latest contributions of the last 8 authors up to a year. + // Additionally, (in the case of a particularly active page) try to keep the + // latest contributions of all authors in the last week (even if there are + // more than eight of them,) but in no case keep more than twenty unique + // author revisions. + $ExpireParams['author'] = array('max_age' => 365, + 'keep' => 8, + 'min_age' => 7, + 'max_keep' => 20); ///////////////////////////////////////////////////////////////////// *************** *** 161,164 **** --- 225,232 ---- // CSS location + // + // Note that if you use the stock phpwiki style sheet, 'phpwiki.css', + // you should make sure that it's companion 'phpwiki-heavy.css' + // is installed in the same directory that the base style file is. define("CSS_URL", "phpwiki.css"); *************** *** 176,179 **** --- 244,248 ---- $dateformat = "%B %e, %Y"; // must not contain time + // FIXME: delete // this defines how many page names to list when displaying // the MostPopular pages; the default is to show the 20 most popular pages *************** *** 198,201 **** --- 267,271 ---- define('WIKI_PGSRC', "pgsrc"); // Default (old) behavior. //define('WIKI_PGSRC', 'wiki.zip'); // New style. + //define('WIKI_PGSRC', '../../../Logs/Hamwiki/hamwiki-20010830.zip'); // New style. // DEFAULT_WIKI_PGSRC is only used when the language is *not* *************** *** 314,321 **** include "lib/main.php"; ! // For emacs users // Local Variables: // mode: php ! // c-file-style: "ellemtel" // End: ?> --- 384,394 ---- include "lib/main.php"; ! // (c-file-style: "gnu") // Local Variables: // mode: php ! // tab-width: 8 ! // c-basic-offset: 4 ! // c-hanging-comment-ender-p: nil ! // indent-tabs-mode: nil // End: ?> Index: phpwiki.css =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/phpwiki.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** phpwiki.css 2001/02/15 21:33:06 1.2 --- phpwiki.css 2001/09/18 19:16:23 1.3 *************** *** 2,135 **** Classes: ! wikitext ! wikiword - A wiki page name ! rawurl - A raw url (like http://some.where.com/howdy.jpg) ! interwiki - An interwiki name ! linkurl - A link to an external URL ! interwikilink - A link to an external wiki ! wikilink = A link to an existing page ! wikiunknown = A link to a non-existing page ! wikiaction - A link which to an action (edit, diff, info...) ! wikiadmin - A link to an admin action (lock, remove ...) ! wikiunsafe - A link to an admin action which is located on an unlocked page. */ ! TABLE.outer { background-color: black; } ! TABLE.inner { background-color: white; } /* ! * WikiWords in sans-serif */ ! .wikiword ! { ! font-family: avantgarde, helvetica, sans-serif; ! } ! PRE .wikiword, ! TT .wikiword ! { ! font-family: monospace; ! } ! H1 .wikiword ! { ! font-size: large; ! } ! SMALL .wikiword ! { ! font-size: small; } ! .interwiki ! { ! font-family: zapf chancery, cursive; ! } ! /* ! * Raw URLS in smaller font */ ! .rawurl ! { ! font-family: serif; ! font-size: smaller; } ! /* ! * No underline for wikilinks. ! */ ! .wikilink, ! .wikiunknown, ! .wikiunknown U, ! .wikiaction, ! .wikiadmin, ! .interwikilink, ! .footnote A, ! .footnote-rev ! { ! text-decoration: none; ! /* color: #600; */ } ! .wikiunknown, ! .wikiunknown U { ! color: #600; } - /* ! * Different backgrounds depening on link type. */ ! /* ! .wikilink ! { ! background-color: #ddc; } */ - .wikiaction, - .wikiaction INPUT, - .wikiaction TABLE - { - background-color: #ddf; - } - .wikiadmin, - .wikiadmin INPUT, - .wikiadmin TABLE - { - background-color: #fdd; - } - .wikiunsafe - { - background-color: #eee; - } ! .wikilink:link ! { ! /* color: #c00; */ ! } ! .wikilink:visited, ! { ! /* color: #600; */ ! } /* ! * Special colors for the '?' after unknown wikiwords. */ ! A.wikiunknown ! { ! color: #fffff0; ! background-color: #663333; ! font-family: avantgarde, helvetica, sans-serif; ! text-decoration: none; ! } ! PRE A.wikiunknown, ! TT A.wikiunknown { ! font-family: monospace; } /* For emacs users --- 2,188 ---- Classes: ! DIV.wikitext - the transformed wiki page text. ! ! A.wiki - link to page in wiki. ! A.named-wiki - a named link to page in wiki (from e.g. [name|WikiPage]). ! A.interwiki - link to page in another wiki ! SPAN.wikipage - page name within interwiki link. ! A.named-interwiki - link to page in another wiki ! A.url - link to external URL from wiki page. ! A.named-url - link to external URL from wiki page. ! ! .wikiunknown A, .wikiunknown U ! .named-wikiunknown A, .named-wikiunknown U ! A.wikiaction ! A.wikiadmin ! .wikiunsafe ! ! A.backlinks ! TODO: Get rid of tables in wikiaction forms. */ + + /* NS4 doesn't grok @import. This allows us to put things which break NS4 + * in another file. + */ + @import url(phpwiki-heavy.css); + + BODY { background: ivory; } ! BODY { font-family: arial, helvetica, sans-serif; } /* ! * NS4, defaults from BODY don't always propagate correctly. ! * So we need this: ! */ ! .wikitext, .toolbar, P, TD { font-family: arial, helvetica, sans-serif; } ! ! INPUT.button { font-family: arial, helvetica, sans-serif; } ! ! .wikitext PRE { font-family: monospace; } ! ! DIV.wikitext { ! background: white; ! border: thin; ! border-color: black; ! border-style: solid; ! padding-left: 0.8em; ! padding-right: 0.8em; ! padding-top: 0px; ! padding-bottom: 0px; ! margin: 0.5ex 0px; ! /* This breaks Netscape 4: (display does not go full width). ! width: auto; */ ! clear: both; } ! INPUT.wikitext { margin:0px; } + DIV.toolbar { margin: 1ex 0ex; } /* ! * This is a kluge for NS4 which doesn't honor the clear: settings on ! * .tool-left and .tool-right. ! * ! * Putting in explicit <br clear="all"> messes up the formatting in ! * other browsers. Instead we'll put in a: ! * ! * <div class="br"><br class="ignore" clear="all"></div> ! * ! * The clear:both on DIV.br seems to work. And we'll disable the <br> altogether (in ! * CSS aware browsers) by setting display:none. ! * ! * Actually, I haven't yet found a browser which doesn't put a line break ! * between successive <div>'s. This makes the <br class="ignore"> completely ! * unnecessary. */ ! DIV.br { clear:both; line-height: 0px; } ! .ignore { display: none; } ! ! DIV.errors { ! background: #eee; ! border: medium; ! border-color: red; ! border-style: solid; ! padding-left: 0.8em; ! padding-right: 0.8em; ! padding-top: 0px; ! padding-bottom: 0px; ! margin: 1em; ! /* This breaks Netscape 4: (display does not go full width). ! width: auto; ! */ ! clear: both; } + .errors H4 { + color:red; + text-decoration: underline; + margin:0px; + } ! P.error { ! font-size: smaller; ! font-family: monospace; ! margin:0px; } ! .error UL { ! font-size: smaller; ! font-family: monospace; } /* ! * Style for <hr>s in wiki markup. */ ! .wikitext HR { ! background: #666; ! height: 1px; ! width: 90%; ! margin-left:auto; ! margin-right:auto; ! align:center; /* for NS4 */ } + + + /* + * Link styles + */ + /* Wiki Links */ + A.wiki { text-decoration: none; } + .wiki { font-weight: bold; } + /* This is obscene in NS4 + B .wiki, STRONG .wiki { font-size: larger; } */ ! /* Unknown links */ ! .wikiunknown A, .named-wikiunknown A, .wikiunknown U ! { text-decoration: none; } ! ! .wikiunknown, .named-wikiunknown ! {color: #600; } ! .wikiunknown A, .named-wikiunknown ! { color: white; background-color: #600; } ! ! ! /* Interwiki links */ ! A.interwiki { text-decoration: none; } ! .wikipage { font-weight: bold; } ! ! .interwiki, ! I .interwiki .wikipage, EM .interwiki .wikipage ! { font-style: oblique; } + .interwiki .wikipage, + I .interwiki, EM .interwiki + { font-style: normal; } /* ! * wikiaction, wikiadmin, wikiunsafe: */ ! A.wikiaction, A.wikiadmin { text-decoration: none; } ! A.wikiaction, .wikiaction TABLE, SPAN.wikiaction { background-color: #ddd; } ! A.wikiadmin, .wikiadmin TABLE { background-color: #fdd; } ! .wikiunsafe { background-color: #ccc; } ! ! /* ! * Put a border around wikiaction forms: ! * This doesn't work for NS4. ! */ ! .wikiaction TABLE, .wikiadmin TABLE { ! border-style: ridge; ! border-width: medium; } + .wikiaction TABLE { border-color: #9cf; } + .wikiadmin TABLE { border-color: #f99; } + + /* Backlinks */ + A.backlinks { color: #006; } + /* Make the textarea on the edit page full width */ + TEXTAREA.wikiedit { width: 100%; margin-top: 1ex; } /* For emacs users |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:28
|
Update of /cvsroot/phpwiki/phpwiki/templates In directory usw-pr-cvs1:/tmp/cvs-serv2684/templates Modified Files: README browse.html editpage.html message.html Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. Index: README =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/templates/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** README 2001/04/06 18:21:37 1.6 --- README 2001/09/18 19:16:24 1.7 *************** *** 18,21 **** --- 18,32 ---- The specification is relative to the index.php script. + + ========= + Tue Sep 18 12:00:12 PDT 2001 Jeff Dairiki <da...@da...> + + The rest of this file is currently obsolete, and should be ignored. + The template situation is in a state of flux, and will probably be + changed again very soon. See lib/Template.php for more, but mostly + just "stay tuned" for details. + + ========= + Template files are regular HTML files, which contain special placeholders. Placeholders are surrounded by '###'. Index: browse.html =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/templates/browse.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** browse.html 2001/07/20 17:40:12 1.19 --- browse.html 2001/09/18 19:16:24 1.20 *************** *** 1,58 **** ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <!-- phpwiki source: ! ###RCS_IDS### --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! ###ROBOTS_META### ! <base href="###BASE_URL###"> ! <title>###SPLIT_PAGE###</title> ! <link rel="stylesheet" title="phpwiki" href="###CSS_URL###" type="text/css"> </head> ! <body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta> ! <h1><a class="wikilink" href="###BROWSE###HomePage"><img src="###LOGO###" border=0 alt="[phpwiki]" align=middle width=50 height=50></a> ! <a class='wikiaction' ! href="###ACTION###search&searchtype=full&searchterm=###PAGEURL###" ! ><span class='wikiword'>###PAGE###</span></a></h1> ! ! ###IF:!ANONYMOUS### ! <p>You are logged in as <em>###USERID###</em>. ! [<a class="wikiaction" href="###ACTION###logout">Log Out</a>]</p> ! ###IF:ADMIN### ! ###IF LOCK###[<a class="wikiadmin" href="###ACTION###unlock">Unlock page</a>] ! ###IF !LOCK###[<a class="wikiadmin" href="###ACTION###lock">Lock page</a>] ! - - ! [<a class="wikiadmin" href="###ACTION###remove">Remove page</a>] ! ###ENDIF:ADMIN### ! <hr noshade> ! ###ENDIF:!ANONYMOUS### ! ! ###IF:ANONYMOUS### ! If you would like to, you may ! <a class="wikiaction" href="###ACTION###login">log in</a> ! (use any WikiWord as a user ID, any password.)</p> ! ###ENDIF:ANONYMOUS### ! ! <table class="outer" width="100%" cellspacing=2 border=0> ! <tr><td><table class="inner" width="100%" border=0 cellspacing=0 cellpadding=5> ! <tr><td class="wikitext">###CONTENT###</td></tr> ! </table></td></tr> ! </table> ! <hr noshade> ! ###IF ADMIN###<a class="wikiaction" href="###ACTION###edit&version=###VERSION###">Edit</a> Revision ###VERSION### ! ###IF:!ADMIN### ! ###IF LOCK###Page locked, revision ###VERSION### ! ###IF !LOCK###<a class="wikiaction" href="###ACTION###edit&version=###VERSION###">Edit</a> Revision ###VERSION### ! ###ENDIF:!ADMIN### ! | Created ###LASTMODIFIED### ! | <a href="###ACTION###info">Info</a> ! | <a href="###ACTION###diff&ver2=###VERSION###">Diff</a> ! <br><a class="wikilink" href="###BROWSE###FindPage"><span class="wikiword">FindPage</span></a> ! by browsing or searching ! ! <hr noshade> ! <small>###RELATEDPAGES###</small> </body> </html> --- 1,129 ---- ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <!-- phpwiki source: ! ${RCS_IDS} --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <!-- <meta name="robots" content="index,follow"> --> ! <base href="${BASE_URL}"> ! <title>${SPLIT_PAGE}</title> ! <!-- ! --> ! <link rel="stylesheet" title="phpwiki" href="${CSS_URL}" type="text/css"> </head> ! <body> ! <h1> ! <div><a class="wikilink" ! href="${BROWSE}HomePage" ! ><img src="${LOGO}" ! border=0 alt="[phpwiki]" ! align="right" width=50 height=50></a></div> ! <!--FIXME: this link is broken unless pages are in pathinfo --> ! <!--<a title="Get BackLinks for ${PAGE}" ! onmouseover="window.status='Get BackLinks for ${PAGE}';return true;" ! class="backlinks" ! href="${BROWSE}BackLinks?page=${PAGEURL}" ! ><span class="wikiword">${SPLIT_PAGE}</span></a>--> ! <?plugin-link BackLinks description="Get BackLinks for [pagename]" ! page="[pagename]" class="backlinks" ! linktext="${SPLIT_PAGE}" ?> ! </h1> ! <div class="br"><br clear="both" class="ignore"></div> ! <?php if (! $IS_CURRENT) { ?> ! <p><b>Note</b>: You are viewing an old revision of this page. ! Click <a href="${BROWSE}${PAGEURL}">here</a> to view the current version.</p> ! <hr class="ignore" noshade> ! <?php } ?> ! <div class="wikitext">${CONTENT}</div> ! <hr class="ignore" noshade> ! <form action="<?php echo WikiURL('TitleSearch'); ?>" method="get"> ! <!-- I would like not to have to use these tables, and managed to ! get this stuff to work more or less correctly using ! CSS's float:left; and float:right;. However float:right; seems ! to cause MSIE4.01/NT to hang. ! So, we use tables... --> ! <table class="toolbar" width="100%" ! cellpadding=0 cellspacing=0 border=0><tr valign="baseline"> ! <td> ! <?php if ($IS_CURRENT) { ?> ! Last edited on ${LASTMODIFIED} ! <?php } else { ?> ! Version ${VERSION}, saved on ${LASTMODIFIED} ! <?php } ?> ! </td> ! <td align="right"> ! <?php echo LinkExistingWikiWord('FindPage') ?> ! | <span><input type="hidden" name="auto_redirect" value="1"> ! <input type="text" name="s" size="12" ! title="Quick Search" ! onmouseover="window.status='Quick Search'; return true;" ! onmouseout="window.status=''; return true;"></span> ! <!-- | <a class="wikiaction" href="${BROWSE}LikePages?page=${PAGEURL}">LikePages</a> --> ! | <?plugin-link LikePages page="[pagename]" description="List LikePages for [pagename]"?> ! </td> ! </tr></table> ! <table class="toolbar" width="100%" ! cellpadding=0 cellspacing=0 border=0><tr valign="baseline"> ! <td> ! <?php if ($page->get('locked') && !$user->is_admin()) { ?> ! Page locked ! <?php } else { ?> ! <?php if ($IS_CURRENT) { ?> ! <a class="wikiaction" href="${ACTION}edit">Edit</a> ! <?php } else { ?> ! <a class="wikiaction" href="${ACTION}edit&version=${VERSION}" ! >Edit old revision</a> ! <?php } ?> ! <?php } ?> ! <?php if ($user->is_admin()) { ?> ! <?php if ($page->get('locked')) { ?> ! | <a class="wikiadmin" href="${ACTION}unlock">Unlock page</a> ! <?php } else { ?> ! | <a class="wikiadmin" href="${ACTION}lock">Lock page</a> ! <?php } ?> ! | <a class="wikiadmin" href="${ACTION}remove">Remove page</a> ! <?php } ?> ! | <a class="wikiaction" href="${ACTION}info">History</a> ! <?php if ($IS_CURRENT) { ?> ! | <a class="wikiaction" href="${ACTION}diff&previous=major">Diff</a> ! <?php } else { ?> ! | <a class="wikiaction" ! href="${ACTION}diff&version=${VERSION}&previous=major">Diff</a> ! <?php } ?> ! </td> ! <td align="right"> ! <?php if ($user->is_authenticated()) { ?> ! You are signed in as <?php echo LinkWikiWord($USERID); ?> ! | <a class="wikiaction" href="${ACTION}logout">SignOut</a> ! <?php } else { ?> ! <a class="wikiaction" href="${ACTION}login">SignIn</a> ! <?php } ?> ! </td> ! </tr></table> + <?php /* + <hr class="ignore" noshade> + <small>${RELATEDPAGES}</small> + */ ?> + <?php // FIXME:hack + ob_start(); + global $ErrorManager; + $ErrorManager->flushPostponedErrors(); + $errmsgs = ob_get_contents(); + ob_end_clean(); + if ($errmsgs) + echo "<div class='errors'><h4>PHP Warnings</h4>$errmsgs</div>"; + ?> + <div class="toolbar"> + <!-- For debugging only, really: --> + <?plugin-link _BackendInfo + linktext=DebugInfo + targetpage=DebugInfo + page=[pagename] + description="Get debugging information for [pagename]."?> + </div> + </form> </body> </html> Index: editpage.html =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/templates/editpage.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** editpage.html 2001/06/26 18:14:41 1.19 --- editpage.html 2001/09/18 19:16:24 1.20 *************** *** 1,57 **** ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <!-- phpwiki source: ! ###RCS_IDS### --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! ###ROBOTS_META### ! <base href="###BASE_URL###"> ! <title>Edit: ###SPLIT_PAGE###</title> ! <link rel="stylesheet" title="phpwiki" href="###CSS_URL###" type="text/css"> </head> ! <body bgcolor=ivory text=black alink=red link=darkblue vlink=darkmagenta> ! <form class="wikiaction" method="POST" action="###BROWSE_PAGE###"> ! <h1><a class="wikilink" href="###BROWSE###HomePage"><img src="###LOGO###" border=0 alt="[phpwiki]" width=50 height=50></a> ! Edit <span="wikiword">###PAGE###</span> ! <input type="submit" value=" Save "></h1> ! ! ###IF !CURRENT###<b>Editing old revision ###VERSION###. Saving this page will replace the current version with this text.</b> ! ! <textarea name="content" ! rows="###EDIT_AREA_HEIGHT###" ! cols="###EDIT_AREA_WIDTH###" ! wrap="virtual">###CONTENT###</textarea> ! <br> ! ###IF:MINOR_EDIT_CHECKBOX### ! ###MINOR_EDIT_CHECKBOX### This is a minor change, don't archive old version. ! <br> ! ###ENDIF:MINOR_EDIT_CHECKBOX### ! <input type="checkbox" name="convert" value="tabs" > ! I can't type tabs. ! Please <a class="wikilink" href="###BROWSE###ConvertSpacesToTabs"><span class="wikiword">ConvertSpacesToTabs</span></a> ! for me when I save. ! <p>You can change the size of the editing area. ! See <a class="wikilink" href="###BROWSE###UserPreferences"><span class="wikiword">UserPreferences</span></a>.</p> ! <p><a class="wikilink" href="###BROWSE###GoodStyle"><span class="wikiword">GoodStyle</span></a> tips for editing.</p> <hr noshade> <small> ! <b>Emphasis:</b> '' for italics, __ for bold, ''__ for both ! <br><b>Lists:</b> * for bullet lists, # for numbered lists, ''; term : definition'' for definition lists ! <br><b>References:</b> JoinCapitalizedWords or use square brackets for a [page link] or URL [http://cool.wiki.int/]. ! <br><b>Footnotes:</b> Use [1],[2],[3],... ! <br><b>Preventing linking:</b> Avoid linking with "!": ! !DoNotHyperlink, name links like [[text | URL] (double up on the "[") ! <br><b>Misc:</b>"!", "!!", "!!!" make headings, ! "%%%" makes a linebreak, "- - - -" makes a horizontal rule ! <br>more on ! <a class="wikilink" href="###BROWSE###TextFormattingRules"><b><span class="wikiword">TextFormattingRules</span></b></a> </small> <input type="hidden" name="action" value="save"> ! <input type="hidden" name="pagename" value="###PAGE###"> ! <input type="hidden" name="editversion" value="###CURRENT_VERSION###"> </form> </body> --- 1,111 ---- ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <!-- phpwiki source: ! ${RCS_IDS} --> + <base href="${BASE_URL}"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <meta name="robots" content="noindex,nofollow"> ! <link rel="stylesheet" title="phpwiki" href="${CSS_URL}" type="text/css"> ! ! <title>Edit: ${SPLIT_PAGE}</title> </head> ! <body> ! <h1> ! <div><a class="wikilink" ! href="${BROWSE}HomePage" ! ><img src="${LOGO}" border=0 align="right" ! alt="[phpwiki]" width=50 height=50></a></div> ! Edit <a href="${BROWSE}${PAGEURL}" ! class="wikilink"><span class="wikiword">${PAGE}</span></a> ! </h1> ! ! <?php if (!empty($PREVIEW_CONTENT)) { ?> ! <p><b>Preview only! Changes not saved.</b></p> ! <div class="wikitext">${PREVIEW_CONTENT}</div> ! <hr class="ignore" noshade> ! <?php } ?> ! ! <?php if (!$IS_CURRENT) { ?> ! <p><b>Warning: You are editing an old revision. ! Saving this page will overwrite the current version.</b></p> ! <hr class="ignore" noshade> ! <?php } ?> + <?php /* + * FIXME: Hack! + * The URL used for the form action parameter is bogus. + * This is needed, otherwise the redirect to the real browser + * page won't work with some browsers (NS4). (NS4 won't accept + * a redirect from a page to itself.) + */ ?> + + <form method="POST" action="${BROWSE}EditPage"> + <textarea class="wikiedit" + name="content" + rows="${EDIT_AREA_HEIGHT}" + cols="${EDIT_AREA_WIDTH}" + wrap="virtual">$FORMVARS[content]</textarea> + + <div class="toolbar" style="text-align: center;"> + Summary:<input type="text" class="wikitext" + name="summary" value="$FORMVARS[summary]" size=50> + </div> + <table class="toolbar" width="100%" + cellpadding=0 cellspacing=0 border=0><tr valign="baseline"> + <td> + <input type="checkbox" name="minor_edit" value="checked" $FORMVARS[minor_edit]> + This is a minor change. + </td> + <td align="center"> + <input type="submit" class="button" name="preview" value="Preview"> + | <input type="submit" class="button" value="Save"> + </td> + <td align="right"> + <?php if ($user->is_authenticated()) { ?> + You are signed in as <?php echo LinkWikiWord($USERID); ?> + <?php } else { ?> + Author will be logged as <i>${USERID}</i>. + <?php } ?> + </td> + </tr></table> + <p style="clear: both; padding: 2ex 0ex 0ex;"> + You can change the size of the editing area. + See <?php echo LinkExistingWikiWord('UserPreferences'); ?>. + Also see <?php echo LinkExistingWikiWord('GoodStyle') ?> tips for editing. + </p> <hr noshade> <small> ! <b>Emphasis:</b> ! '' for italics, ! __ for bold, ! ''__ for both ! <br><b>Lists:</b> ! * for bullet lists, ! # for numbered lists, ! ''; term : definition'' for definition lists ! <br><b>References:</b> ! JoinCapitalizedWords or use square brackets for a [page link] ! or URL [http://cool.wiki.int/]. ! <br><b>Footnotes:</b> ! Use [1],[2],[3],... ! <br><b>Preventing linking:</b> ! Avoid linking with "!": !DoNotHyperlink, ! name links like [[text | URL] (double up on the "[") ! <br><b>Misc:</b> ! "!", "!!", "!!!" make headings, ! "%%%" makes a linebreak, ! "- - - -" makes a horizontal rule ! <br> ! more on <?php echo LinkExistingWikiWord('TextFormattingRules') ?> </small> <input type="hidden" name="action" value="save"> ! <input type="hidden" name="pagename" value="$FORMVARS[pagename]"> ! <input type="hidden" name="editversion" value="$FORMVARS[editversion]"> ! <input type="hidden" name="version" value="$FORMVARS[version]"> </form> </body> Index: message.html =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/templates/message.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** message.html 2001/04/06 18:21:37 1.11 --- message.html 2001/09/18 19:16:24 1.12 *************** *** 1,20 **** ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <!-- phpwiki source: ! ###RCS_IDS### --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! ###ROBOTS_META### ! <base href="###BASE_URL###"> ! <title>###SPLIT_PAGE###</title> ! <link rel="stylesheet" title="phpwiki" href="###CSS_URL###" type="text/css"> </head> ! <body bgcolor=linen text=black alink=red link=darkblue vlink=darkmagenta> ! <h1><a class="wikilink" href="###BROWSE###HomePage"><img src="###LOGO###" border=0 alt="[phpwiki]" width=50 height=50></a> ! ###PAGE###</h1> ! ! ###CONTENT### </body> --- 1,27 ---- ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <!-- phpwiki source: ! ${RCS_IDS} --> + <base href="${BASE_URL}"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <meta name="robots" content="noindex,nofollow"> ! <link rel="stylesheet" title="phpwiki" href="${CSS_URL}" type="text/css"> ! <title>${TITLE}</title> </head> + <body> + <h1> + <div><a class="wikilink" + href="${BROWSE}HomePage" + ><img src="${LOGO}" align="right" + border=0 alt="[phpwiki]" + width=50 height=50 + ></a></div> + ${TITLE} + </h1> ! ${CONTENT} </body> |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:28
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv2684/pgsrc Modified Files: FindPage MostPopular PhpWikiAdministration ReleaseNotes Added Files: BackLinks DebugInfo FullTextSearch LikePages RecentChanges TitleSearch WikiPlugin Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. --- NEW FILE --- >From hos...@da... Sat Feb 10 21:28:19 2001 Subject: BackLinks From: hos...@da... (PhpWiki) Date: Fri, 31 Aug 2001 22:07:14 -0700 Mime-Version: 1.0 Content-Type: application/x-phpwiki; pagename=BackLinks; flags=PAGE_LOCKED Content-Transfer-Encoding: binary <?plugin BackLinks include_self=1 page||='' ?> --- NEW FILE --- <?plugin _BackendInfo page||='' ?> --- NEW FILE --- >From hos...@da... Sat Feb 10 21:28:19 2001 Subject: FullTextSearch From: hos...@da... (PhpWiki) Date: Wed, 12 Sep 2001 13:49:06 -0700 Mime-Version: 1.0 (Produced by PhpWiki 1.1.x) Content-Type: application/x-phpwiki; pagename=FullTextSearch; flags=PAGE_LOCKED Content-Transfer-Encoding: binary <?plugin FullTextSearch?> ---- Search Again: <?plugin-form TitleSearch?> <?plugin-form FullTextSearch?> --- NEW FILE --- LikePages are pages which share an initial or final word with that page. See also Wiki:LikePages and MeatBall:LikePages. ---- <?plugin LikePages page ?> --- NEW FILE --- >From hos...@da... Sat Feb 10 21:28:19 2001 Subject: TitleSearch From: hos...@da... (PhpWiki) Date: Wed, 12 Sep 2001 13:47:25 -0700 Mime-Version: 1.0 (Produced by PhpWiki 1.1.x) Content-Type: application/x-phpwiki; pagename=TitleSearch; flags=PAGE_LOCKED Content-Transfer-Encoding: binary <?plugin TitleSearch?> ---- Search Again: <?plugin-form TitleSearch?> <?plugin-form FullTextSearch?> --- NEW FILE --- The latest hacks include support for !WikiPlugins. !WikiPlugins allow one to easily add new types of dynamic content (as well as other functionality) to wiki pages within PhpWiki. In this very wiki, the RecentChanges, BackLinks, LikePages and DebugInfo pages are all implemented using plugins. I expect that the search result pages, as well as much PhpWikiAdministration will soon be implemented via plugins as well. (I think the oh-so-ugly [MagicPhpWikiURLs] can be replaced by plugins, too.) !Example Currently, one invokes a plugin by putting something like: <?''''plugin !BackLinks?> into a regular wiki-page. That particular example produces as list of pages which link to the current page. Here it is: <?plugin BackLinks?> (This is great for Category and Topic pages. You can use this to get an automatic in-line listing of pages in the Category or Topic.) !Details (This is all subject to change.) Plugins can take certain named arguments (most do). The values of these arguments can be determined four different ways. In order of precedence: # The plugin invocation can specify the value for an argument, like so: ;;: <?''''plugin !BackLinks page=!OtherPage ?> # The argument can be specified via an HTTP query argument. This doesn't happen (is not allowed) unless the argument is mentioned in the plugin invocation: ;;: <?''''plugin !BackLinks page ?> # Default values specified in the plugin invocation: ;;: <?''''plugin !BackLinks page||=!OtherPage ?> # The plugin must supply default values for each argument it uses. (The BackLinks plugin uses the current page as the default value for the ''page'' argument. !More Ideas for Plugins * Search * MostPopular * WantedPages, OrphanPages, other various indexing schemes. * Diff, PageHistory * TitleSearch: LikePages (match_head, match_tail). * Redirect plugin -- <?''''plugin Redirect target=!OtherPage ?> * Calendar Index: FindPage =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/FindPage,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** FindPage 2001/05/31 17:45:41 1.6 --- FindPage 2001/09/18 19:16:23 1.7 *************** *** 8,16 **** or ''sandwich''. ! %%Search%% Use the following for a full text search. This takes a few seconds. The results will show all lines on a given page that contain a match. ! %%Fullsearch%% ------ --- 8,16 ---- or ''sandwich''. ! <?plugin-form TitleSearch?> Use the following for a full text search. This takes a few seconds. The results will show all lines on a given page that contain a match. ! <?plugin-form FullTextSearch?> ------ Index: MostPopular =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/MostPopular,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MostPopular 2000/06/26 21:26:45 1.1 --- MostPopular 2001/09/18 19:16:23 1.2 *************** *** 1,4 **** ! The 20 most popular pages of this wiki: ! (hitcount, pagename) - %%Mostpopular%% --- 1,2 ---- ! <?plugin MostPopular limit=20 ?> Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** PhpWikiAdministration 2001/04/06 18:21:37 1.8 --- PhpWikiAdministration 2001/09/18 19:16:23 1.9 *************** *** 15,19 **** ! Log In ! __[Log In | phpwiki:?action=login]__ This allows you to login. --- 15,19 ---- ! Log In ! __[Log In | phpwiki:?action=login]__ This allows you to login. Index: ReleaseNotes =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/ReleaseNotes,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ReleaseNotes 2001/02/13 05:54:38 1.8 --- ReleaseNotes 2001/09/18 19:16:23 1.9 *************** *** 1,2 **** --- 1,12 ---- + Jeffs Hacks. + + * New database API. See lib/WikiDB.php and lib/WikiDB/backend.php for the bulk of the documentation on this. The new database can save multiple archived versions of each page. A mechanism for purging archived revisions is now in place as well. See the $!ExpireParams setting in index.php, and lib/!ArchiveCleaner.php for details. At this point, the DBA, MySQL and Postgres backends are functional. The DBA backend could use some performance optimization. The whole API is still subject to some change as I figure out a clean way to provide for a variety of (not all forseen) methods of indexing and searching the wiki. + * New WikiPlugin architecture. + * New template engine. This needs to be documented further, but, for now, see lib/Template.php. On second thought, don't (lib/Template.php desperately needs refactoring, still.) The basic advance is that PHP4's ob_*() functions can be used to capture output from eval()ed PHP code. This allows the templates to be PHP code... + * Edit preview button on the edit page. Now you can see what your edits look like before committing them. + * Reworked the style-sheets. I still need to clean this up some more. I would appreciate comments and bug reports on it. So far I've only tested the new style sheets with Netscape 4.77 and Mozilla 0.9.3 (both running under Linux.) + * Expanded syntax for text search, now searches like "wiki or web -page" (or "(wiki or web) and not page") will do more-or-less what they look like they'll do. + * Security Issues: PhpWiki will now work with PHP's register_globals set to off. + PhpWiki 1.3.x development branch. |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:27
|
Update of /cvsroot/phpwiki/phpwiki/schemas In directory usw-pr-cvs1:/tmp/cvs-serv2684/schemas Modified Files: schema.mysql schema.psql Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. Index: schema.mysql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/schemas/schema.mysql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** schema.mysql 2001/07/17 15:58:28 1.6 --- schema.mysql 2001/09/18 19:16:23 1.7 *************** *** 1,60 **** -- $Id$ ! drop table if exists phpwiki_pages; ! drop table if exists phpwiki_archive; ! drop table if exists phpwiki_links; ! drop table if exists phpwiki_hitcount; ! drop table if exists phpwiki_score; ! drop table if exists phpwiki_hottopics; - - CREATE TABLE phpwiki_pages ( - pagename VARCHAR(100) NOT NULL, - version INT NOT NULL DEFAULT 1, - flags INT NOT NULL DEFAULT 0, - author VARCHAR(100), - lastmodified INT NOT NULL, - created INT NOT NULL, - content MEDIUMTEXT NOT NULL, - refs TEXT, - PRIMARY KEY (pagename) - ); - - CREATE TABLE phpwiki_archive ( - pagename VARCHAR(100) NOT NULL, - version INT NOT NULL DEFAULT 1, - flags INT NOT NULL DEFAULT 0, - author VARCHAR(100), - lastmodified INT NOT NULL, - created INT NOT NULL, - content MEDIUMTEXT NOT NULL, - refs TEXT, - PRIMARY KEY (pagename, version) - ); - - CREATE TABLE phpwiki_links ( - frompage VARCHAR(100) NOT NULL, - topage VARCHAR(100) NOT NULL, - PRIMARY KEY (frompage, topage) - ); - - CREATE TABLE phpwiki_hitcount ( - pagename VARCHAR(100) NOT NULL, - hits INT NOT NULL DEFAULT 0, - PRIMARY KEY (pagename) - ); - - CREATE TABLE phpwiki_score ( - pagename VARCHAR(100) NOT NULL, - score INT NOT NULL DEFAULT 0, - PRIMARY KEY (pagename) - ); - - - -- tables below are not yet used - - CREATE TABLE phpwiki_hottopics ( - pagename VARCHAR(100) NOT NULL, - lastmodified INT NOT NULL, - PRIMARY KEY (pagename, lastmodified) - ); --- 1,47 ---- -- $Id$ ! drop table if exists page; ! CREATE TABLE page ( ! id INT NOT NULL, ! pagename VARCHAR(100) BINARY NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! pagedata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id), ! UNIQUE KEY (pagename) ! ); ! ! drop table if exists version; ! CREATE TABLE version ( ! id INT NOT NULL, ! version INT NOT NULL, ! mtime INT NOT NULL, ! minor_edit TINYINT DEFAULT 0, ! content MEDIUMTEXT NOT NULL DEFAULT '', ! versiondata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id,version), ! INDEX (mtime) ! ); ! ! drop table if exists recent; ! CREATE TABLE recent ( ! id INT NOT NULL, ! latestversion INT, ! latestmajor INT, ! latestminor INT, ! PRIMARY KEY (id) ! ); ! ! drop table if exists nonempty; ! CREATE TABLE nonempty ( ! id INT NOT NULL, ! PRIMARY KEY (id) ! ); ! ! drop table if exists link; ! CREATE TABLE link ( ! linkfrom INT NOT NULL, ! linkto INT NOT NULL, ! INDEX (linkfrom), ! INDEX (linkto) ! ); Index: schema.psql =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/schemas/schema.psql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** schema.psql 2001/07/18 04:59:47 1.8 --- schema.psql 2001/09/18 19:16:23 1.9 *************** *** 1,65 **** -- $Id$ ! drop table phpwiki_pages; ! drop table phpwiki_archive; ! drop table phpwiki_links; ! drop table phpwiki_hottopics; ! drop table phpwiki_hitcount; ! drop table phpwiki_score; ! ! CREATE TABLE phpwiki_pages ( ! pagename VARCHAR(100) NOT NULL, ! version INT NOT NULL DEFAULT 1, ! flags INT NOT NULL DEFAULT 0, ! author VARCHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! content TEXT NOT NULL, ! refs TEXT, ! PRIMARY KEY (pagename) ! ); ! ! CREATE TABLE phpwiki_archive ( ! pagename VARCHAR(100) NOT NULL, ! version INT NOT NULL DEFAULT 1, ! flags INT NOT NULL DEFAULT 0, ! author VARCHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! content TEXT NOT NULL, ! refs TEXT, ! PRIMARY KEY (pagename, version) ! ); ! ! CREATE TABLE phpwiki_links ( ! frompage VARCHAR(100) NOT NULL, ! topage VARCHAR(100) NOT NULL, ! PRIMARY KEY (frompage, topage) ! ); ! ! CREATE TABLE phpwiki_hottopics ( ! pagename VARCHAR(100) NOT NULL, ! lastmodified INT NOT NULL, ! PRIMARY KEY (pagename, lastmodified) ! ); ! ! CREATE TABLE phpwiki_hitcount ( ! pagename VARCHAR(100) NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! PRIMARY KEY (pagename) ! ); ! ! CREATE TABLE phpwiki_score ( ! pagename VARCHAR(100) NOT NULL, ! score INT NOT NULL DEFAULT 0, ! PRIMARY KEY (pagename) ! ); ! ! ! GRANT ALL ON phpwiki_pages TO nobody; ! GRANT ALL ON phpwiki_archive TO nobody; ! GRANT ALL ON phpwiki_links TO nobody; ! GRANT ALL ON phpwiki_hottopics TO nobody; ! GRANT ALL ON phpwiki_hitcount TO nobody; ! GRANT ALL ON phpwiki_score TO nobody; --- 1,126 ---- -- $Id$ ! \set QUIET + + --================================================================ + -- Prefix for table names. + -- + -- You should set this to the same value you specify for + -- $DBParams['prefix'] in index.php. + + \set prefix '' + + --================================================================ + -- Which postgres user gets access to the tables? + -- + -- You should set this to the name of the postgres + -- user who will be accessing the tables. + -- + -- Commonly, connections from php are made under + -- the user name of 'nobody' or 'apache'. + + \set httpd_user 'apache' + + --================================================================ + -- + -- Don't modify below this point unless you know what you are doing. + -- + --================================================================ + + \set qprefix '\'' :prefix '\'' + \set qhttp_user '\'' :httpd_user '\'' + \echo Initializing PhpWiki tables with: + \echo ' prefix = ' :qprefix + \echo ' httpd_user = ' :qhttp_user + \echo + \echo 'Expect some \'Relation \'*\' does not exists\' errors unless you are' + \echo 'overwriting existing tables.' + + \set page_tbl :prefix 'page' + \set page_id :prefix 'page_id' + \set page_nm :prefix 'page_nm' + + \set version_tbl :prefix 'version' + \set vers_id :prefix 'vers_id' + \set vers_mtime :prefix 'vers_mtime' + + \set recent_tbl :prefix 'recent' + \set recent_id :prefix 'recent_id' + + \set nonempty_tbl :prefix 'nonempty' + \set nonmt_id :prefix 'nonmt_id' + + \set link_tbl :prefix 'link' + \set link_from :prefix 'link_from' + \set link_to :prefix 'link_to' + + \echo Dropping :page_tbl + DROP TABLE :page_tbl; + \echo Creating :page_tbl + CREATE TABLE :page_tbl ( + id INT NOT NULL, + pagename VARCHAR(100) NOT NULL, + hits INT NOT NULL DEFAULT 0, + pagedata TEXT NOT NULL DEFAULT '' + ); + CREATE UNIQUE INDEX :page_id + ON :page_tbl (id); + CREATE UNIQUE INDEX :page_nm + ON :page_tbl (pagename); + + \echo Dropping :version_tbl + DROP TABLE :version_tbl; + \echo Creating :version_tbl + CREATE TABLE :version_tbl ( + id INT NOT NULL, + version INT NOT NULL, + mtime INT NOT NULL, + --FIXME: should use boolean, but that returns 't' or 'f'. not 0 or 1. + minor_edit INT2 DEFAULT 0, + content TEXT NOT NULL DEFAULT '', + versiondata TEXT NOT NULL DEFAULT '' + ); + CREATE UNIQUE INDEX :vers_id + ON :version_tbl (id,version); + CREATE INDEX :vers_mtime + ON :version_tbl (mtime); + + \echo Dropping :recent_tbl + DROP TABLE :recent_tbl; + \echo Creating :recent_tbl + CREATE TABLE :recent_tbl ( + id INT NOT NULL, + latestversion INT, + latestmajor INT, + latestminor INT + ); + CREATE UNIQUE INDEX :recent_id + ON :recent_tbl (id); + + + \echo Dropping :nonempty_tbl + DROP TABLE :nonempty_tbl; + \echo Creating :nonempty_tbl + CREATE TABLE :nonempty_tbl ( + id INT NOT NULL + ); + CREATE UNIQUE INDEX :nonmt_id + ON :nonempty_tbl (id); + + \echo Dropping :link_tbl + DROP TABLE :link_tbl; + \echo Creating :link_tbl + CREATE TABLE :link_tbl ( + linkfrom INT NOT NULL, + linkto INT NOT NULL + ); + CREATE INDEX :link_from ON :link_tbl (linkfrom); + CREATE INDEX :link_to ON :link_tbl (linkto); + + + GRANT ALL ON :page_tbl TO :httpd_user; + GRANT ALL ON :version_tbl TO :httpd_user; + GRANT ALL ON :recent_tbl TO :httpd_user; + GRANT ALL ON :nonempty_tbl TO :httpd_user; + GRANT ALL ON :link_tbl TO :httpd_user; |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:27
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB In directory usw-pr-cvs1:/tmp/cvs-serv2684/lib/WikiDB Added Files: SQL.php backend.php dba.php Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. ***** Error reading new file: [Errno 2] No such file or directory: 'SQL.php' ***** Error reading new file: [Errno 2] No such file or directory: 'backend.php' ***** Error reading new file: [Errno 2] No such file or directory: 'dba.php' |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:27
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/dumb In directory usw-pr-cvs1:/tmp/cvs-serv2684/lib/WikiDB/backend/dumb Added Files: AllRevisionsIter.php BackLinkIter.php MostPopularIter.php MostRecentIter.php TextSearchIter.php Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. ***** Error reading new file: [Errno 2] No such file or directory: 'AllRevisionsIter.php' ***** Error reading new file: [Errno 2] No such file or directory: 'BackLinkIter.php' ***** Error reading new file: [Errno 2] No such file or directory: 'MostPopularIter.php' ***** Error reading new file: [Errno 2] No such file or directory: 'MostRecentIter.php' ***** Error reading new file: [Errno 2] No such file or directory: 'TextSearchIter.php' |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:26
|
Update of /cvsroot/phpwiki/phpwiki/admin In directory usw-pr-cvs1:/tmp/cvs-serv2684/admin Modified Files: removepage.php wiki_port1_0.php Removed Files: lockpage.php Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. Index: removepage.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/admin/removepage.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** removepage.php 2001/02/15 19:32:55 1.3 --- removepage.php 2001/09/18 19:16:23 1.4 *************** *** 2,27 **** rcs_id('$Id$'); ! if (!function_exists('RemovePage')) ! { ! $html = gettext ("Function not yet implemented."); } ! else if (empty($verify) || $verify != 'okay') ! { ! $html = sprintf(gettext ("You are about to remove '%s' permanently!"), ! htmlspecialchars($pagename)); ! $html .= "\n<P>"; ! $html .= sprintf(gettext ("Click <a href=\"%s\">here</a> to remove the page now."), ! htmlspecialchars(WikiURL($pagename, array('action' => 'remove', ! 'verify' => 'okay')))); ! $html .= "\n<P>"; ! $html .= gettext ("Otherwise press the \"Back\" button of your browser."); } ! else ! { ! RemovePage($dbi, $pagename); ! $html = sprintf(gettext ("Removed page '%s' succesfully."), ! htmlspecialchars($pagename)); ! } ! ! echo GeneratePage('MESSAGE', $html, gettext ("Remove page"), 0); ?> --- 2,21 ---- rcs_id('$Id$'); ! if (empty($verify) || $verify != 'okay') { ! $html = sprintf(gettext ("You are about to remove '%s' permanently!"), ! htmlspecialchars($pagename)); ! $html .= "\n<P>"; ! $html .= sprintf(gettext ("Click <a href=\"%s\">here</a> to remove the page now."), ! htmlspecialchars(WikiURL($pagename, array('action' => 'remove', ! 'verify' => 'okay')))); ! $html .= "\n<P>"; ! $html .= gettext ("Otherwise press the \"Back\" button of your browser."); } ! else { ! $dbi->deletePage($pagename); ! $html = sprintf(gettext ("Removed page '%s' succesfully."), ! htmlspecialchars($pagename)); } ! require_once('lib/template.php'); ! echo GeneratePage('MESSAGE', $html, gettext("Remove page")); ?> Index: wiki_port1_0.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/admin/wiki_port1_0.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** wiki_port1_0.php 2001/06/26 18:16:06 1.4 --- wiki_port1_0.php 2001/09/18 19:16:23 1.5 *************** *** 7,10 **** --- 7,19 ---- <body bgcolor="navajowhite"> + <h1> Broken </h1> + <p>This script has not yet been fixed so that it works with this version of + PhpWiki. Sorry.</p> + <p>--<a href="mailto:da...@da...">JeffDairiki</a>.</p> + <hr> + </body> + </html> + <?php exit; ?> + <?php function port1_0RenderHash($dbi, $dbmh, $pagename) { --- lockpage.php DELETED --- |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 19:16:26
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend In directory usw-pr-cvs1:/tmp/cvs-serv2684/lib/WikiDB/backend Added Files: PearDB.php dba.php dbaBase.php mysql.php pgsql.php Log Message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. ***** Error reading new file: [Errno 2] No such file or directory: 'PearDB.php' ***** Error reading new file: [Errno 2] No such file or directory: 'dba.php' ***** Error reading new file: [Errno 2] No such file or directory: 'dbaBase.php' ***** Error reading new file: [Errno 2] No such file or directory: 'mysql.php' ***** Error reading new file: [Errno 2] No such file or directory: 'pgsql.php' |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 18:55:04
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/dumb In directory usw-pr-cvs1:/tmp/cvs-serv698/lib/WikiDB/backend/dumb Log Message: Directory /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/dumb added to the repository |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 18:54:20
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend In directory usw-pr-cvs1:/tmp/cvs-serv568/lib/WikiDB/backend Log Message: Directory /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend added to the repository |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 18:53:08
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB In directory usw-pr-cvs1:/tmp/cvs-serv332/lib/WikiDB Log Message: Directory /cvsroot/phpwiki/phpwiki/lib/WikiDB added to the repository |
From: Geoffrey T. D. <da...@us...> - 2001-09-18 18:21:02
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv26062/pgsrc Modified Files: TextFormattingRules Log Message: Merged back some stuff which inadvertently (I think) got tossed during the last edit. Index: TextFormattingRules =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/TextFormattingRules,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** TextFormattingRules 2001/08/26 17:00:50 1.14 --- TextFormattingRules 2001/09/18 18:20:59 1.15 *************** *** 50,60 **** * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | FrontPage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * [1], [2], [3], [4] refer to remote references. Click EditLinks on the edit form to enter URLs. These differ from the newer linking scheme; references are unique to a page. * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] ! HTML Mark-Up Language --- 50,75 ---- * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | HomePage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * You can create footnotes by using [[1], [[2], [[3], ... like this here [1]. See footnote for counterpart. (If the [[ is in the first column, it is a footnote ''definition'' rather than a footnote ''reference'' [1].) * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] + ! Tables + * Simple tables are available. A table row is introduced by a __|__ in the first column. It is best described by example: + || _''''_Name_''''_ |v _''''_Cost_''''_ |v _''''_Notes_''''_ + | _''''_First_''''_ | _''''_Last_''''_ + |> Jeff |< Dairiki |^ Cheap |< Not worth it + |> Marco |< Polo | Cheaper |< Not available + ;: will generate + || __Name__ |v __Cost__ |v __Notes__ + | __First__ | __Last__ + |> Jeff |< Dairiki |^ Cheap |< Not worth it + |> Marco |< Polo | Cheaper |< Not available + + ;: Note that multiple __|__'s lead to spanned columns, and __v__'s can be used to span rows. A __>__ generates a right justified column, __<__ a left justified column and __^__ a centered column (which is the default.) + + ! HTML Mark-Up Language *************** *** 63,64 **** --- 78,90 ---- * The & characters will not work * If you really must use HTML, your system administrator can enable this feature. Start each line with a bar (|). Note that this feature is disabled by default. + + ! More detail than you want to know + + See [MagicPhpWikiURLs] for gory details on how to write + various kind of wiki maintainance links. + + ----- + + Footnotes: + + [1] By using [[1] a second time (in the first column) the footnote itself is ''defined''. You may refer to a footnote as many times as you want, but you may only define it once on the page. Note the the [[1] in the footnote links back to the first reference, if there are multiple references there will be +'s after the [[1] which will link to the other references. (References which come ''after'' the footnote ''definition'' will not be linked to.) |
From: Steve W. <wai...@us...> - 2001-09-17 05:02:11
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv21710 Modified Files: Tag: release-1_2-branch FrontPage Log Message: Added link in FrontPage to PhpWikiAdministration. Index: FrontPage =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/Attic/FrontPage,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -r1.5 -r1.5.2.1 *** FrontPage 2000/11/06 16:14:43 1.5 --- FrontPage 2001/09/17 05:02:08 1.5.2.1 *************** *** 6,9 **** * Find out which pages are MostPopular. * Read the ReleaseNotes ! ! --- 6,8 ---- * Find out which pages are MostPopular. * Read the ReleaseNotes ! * Administer this Wiki in PhpWikiAdministration. \ No newline at end of file |
From: Steve W. <wai...@us...> - 2001-09-16 21:31:22
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv12944 Modified Files: HomePage Log Message: Mispelled Administer. Index: HomePage =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/HomePage,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** HomePage 2001/09/16 21:30:50 1.3 --- HomePage 2001/09/16 21:31:19 1.4 *************** *** 6,8 **** * Find out which pages are MostPopular. * Read the ReleaseNotes. ! * Administor this wiki via PhpWikiAdministration. \ No newline at end of file --- 6,8 ---- * Find out which pages are MostPopular. * Read the ReleaseNotes. ! * Administer this wiki via PhpWikiAdministration. \ No newline at end of file |
From: Steve W. <wai...@us...> - 2001-09-16 21:30:53
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv12804 Modified Files: HomePage Log Message: Added link to PhpWikiAdministration. This is really for the person who first installs PhpWiki, because we've gotten a lot of questions about this. I would think most people will remove this link when they personalize the HomePage, so putting it here should be fine. Index: HomePage =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/HomePage,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HomePage 2001/05/31 17:45:41 1.2 --- HomePage 2001/09/16 21:30:50 1.3 *************** *** 6,7 **** --- 6,8 ---- * Find out which pages are MostPopular. * Read the ReleaseNotes. + * Administor this wiki via PhpWikiAdministration. \ No newline at end of file |
From: Steve W. <wai...@us...> - 2001-08-27 03:55:16
|
Update of /cvsroot/phpwiki/phpwiki In directory usw-pr-cvs1:/tmp/cvs-serv20354 Modified Files: Tag: release-1_2-branch INSTALL.flatfile Log Message: updated my email address. Index: INSTALL.flatfile =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/INSTALL.flatfile,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -r1.2 -r1.2.2.1 *** INSTALL.flatfile 2001/02/01 04:34:08 1.2 --- INSTALL.flatfile 2001/08/27 03:55:13 1.2.2.1 *************** *** 128,132 **** Steve Wainstead ! sw...@wc... $Id$ --- 128,132 ---- Steve Wainstead ! sw...@pa... $Id$ |
From: Steve W. <wai...@us...> - 2001-08-26 17:11:55
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv22192 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Had to revert... the phpwiki: placeholder inserts index.phpadmin.php as a result. This is good enough for now. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -r1.2.2.3 -r1.2.2.4 *** PhpWikiAdministration 2001/08/26 17:07:19 1.2.2.3 --- PhpWikiAdministration 2001/08/26 17:11:53 1.2.2.4 *************** *** 1,5 **** !!! This works only if you are logged in as ADMIN. ! [ Login as admin | phpwiki:admin.php ] ! ----------- --- 1,4 ---- !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. ----------- |
From: Steve W. <wai...@us...> - 2001-08-26 17:07:22
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv21472 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Correction... made proper link to admin.php. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -r1.2.2.2 -r1.2.2.3 *** PhpWikiAdministration 2001/08/26 17:03:30 1.2.2.2 --- PhpWikiAdministration 2001/08/26 17:07:19 1.2.2.3 *************** *** 1,4 **** !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. ----------- --- 1,5 ---- !!! This works only if you are logged in as ADMIN. ! [ Login as admin | phpwiki:admin.php ] ! ----------- |
From: Steve W. <wai...@us...> - 2001-08-26 17:03:33
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv20809 Modified Files: Tag: release-1_2-branch PhpWikiAdministration Log Message: Added line pointing to (but not linking to) the admin.php page. Index: PhpWikiAdministration =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/PhpWikiAdministration,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -r1.2.2.1 -r1.2.2.2 *** PhpWikiAdministration 2001/02/08 18:28:31 1.2.2.1 --- PhpWikiAdministration 2001/08/26 17:03:30 1.2.2.2 *************** *** 1,3 **** ! !!! This works only if you are logged in as ADMIN ----------- --- 1,4 ---- ! !!! This works only if you are logged in as ADMIN. ! Go to !http://yourhost.yourdomain/yourwikidir/admin.php. ----------- |
From: Steve W. <wai...@us...> - 2001-08-26 17:00:54
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv20246 Modified Files: TextFormattingRules Log Message: Fixed some bugs in the page source in the "Emphasis" section. Index: TextFormattingRules =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/TextFormattingRules,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** TextFormattingRules 2001/04/06 18:21:37 1.13 --- TextFormattingRules 2001/08/26 17:00:50 1.14 *************** *** 32,36 **** !Indented Paragraphs - ''(Quotes)'' * semicolon-colon -- works like <BLOCKQUOTE> --- 32,35 ---- *************** *** 40,45 **** ! Emphasis ! * Use doubled single-quotes ('') for emphasis (usually ''italics'') ! * Use doubled underscores (__) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: --- 39,44 ---- ! Emphasis ! * Use doubled single-quotes ('____') for emphasis (usually ''italics'') ! * Use doubled underscores (_''''_) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: *************** *** 51,76 **** * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | HomePage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * You can create footnotes by using [[1], [[2], [[3], ... like this here [1]. See footnote for counterpart. (If the [[ is in the first column, it is a footnote ''definition'' rather than a footnote ''reference'' [1].) * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] - ! Tables - * Simple tables are available. A table row is introduced by a __|__ in the first column. It is best described by example: - || _''''_Name_''''_ |v _''''_Cost_''''_ |v _''''_Notes_''''_ - | _''''_First_''''_ | _''''_Last_''''_ - |> Jeff |< Dairiki |^ Cheap |< Not worth it - |> Marco |< Polo | Cheaper |< Not available - ;: will generate - || __Name__ |v __Cost__ |v __Notes__ - | __First__ | __Last__ - |> Jeff |< Dairiki |^ Cheap |< Not worth it - |> Marco |< Polo | Cheaper |< Not available - - ;: Note that multiple __|__'s lead to spanned columns, and __v__'s can be used to span rows. A __>__ generates a right justified column, __<__ a left justified column and __^__ a centered column (which is the default.) - - ! HTML Mark-Up Language --- 50,60 ---- * Hyperlinks to other pages within the Wiki are made by placing the page name in square brackets: [this is a page link] or UsingWikiWords (preferred) * Hyperlinks to external pages are done like this: [http://www.wcsb.org/] ! * You can name the links by providing a name, a bar (|) and then the hyperlink or pagename: [PhpWiki home page | http://phpwiki.sourceforge.net/] - [the front page | FrontPage] * You can suppress linking to old-style references and URIs by preceding the word with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/ ! * [1], [2], [3], [4] refer to remote references. Click EditLinks on the edit form to enter URLs. These differ from the newer linking scheme; references are unique to a page. * Also, the old way of linking URL's is still supported: precede URLs with "http:", "ftp:" or "mailto:" to create links automatically as in: http://c2.com/ * URLs ending with .png, .gif, or .jpg are inlined if in square brackets, by themselves: [http://phpwiki.sourceforge.net/phpwiki/images/png.png] ! HTML Mark-Up Language *************** *** 79,91 **** * The & characters will not work * If you really must use HTML, your system administrator can enable this feature. Start each line with a bar (|). Note that this feature is disabled by default. - - ! More detail than you want to know - - See [MagicPhpWikiURLs] for gory details on how to write - various kind of wiki maintainance links. - - ----- - - Footnotes: - - [1] By using [[1] a second time (in the first column) the footnote itself is ''defined''. You may refer to a footnote as many times as you want, but you may only define it once on the page. Note the the [[1] in the footnote links back to the first reference, if there are multiple references there will be +'s after the [[1] which will link to the other references. (References which come ''after'' the footnote ''definition'' will not be linked to.) --- 63,64 ---- |
From: Steve W. <wai...@us...> - 2001-08-26 16:44:30
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv17267 Modified Files: Tag: release-1_2-branch RecentChanges Log Message: Added PhpWikiAdministration to RecentChanges... this list should be dynamic however. For that matter I'd rather have a totally automated RecentChanges like UseMod does. Index: RecentChanges =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/Attic/RecentChanges,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -r1.14 -r1.14.2.1 *** RecentChanges 2000/11/06 16:14:43 1.14 --- RecentChanges 2001/08/26 16:44:28 1.14.2.1 *************** *** 12,15 **** --- 12,16 ---- * [MostPopular] * [PhpWiki] + * [PhpWikiAdministration] * [RecentChanges] * [RecentVisitors] |
From: Steve W. <wai...@us...> - 2001-08-26 16:43:11
|
Update of /cvsroot/phpwiki/phpwiki/pgsrc In directory usw-pr-cvs1:/tmp/cvs-serv17112 Modified Files: Tag: release-1_2-branch TextFormattingRules Log Message: Fixed bug in the page source; the "Emphasis" section was not rendering correctly. Index: TextFormattingRules =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/TextFormattingRules,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -r1.8.2.1 -r1.8.2.2 *** TextFormattingRules 2001/02/08 18:28:31 1.8.2.1 --- TextFormattingRules 2001/08/26 16:43:08 1.8.2.2 *************** *** 32,36 **** !Indented Paragraphs - ''(Quotes)'' * semicolon-colon -- works like <BLOCKQUOTE> --- 32,35 ---- *************** *** 40,45 **** ! Emphasis ! * Use doubled single-quotes ('') for emphasis (usually ''italics'') ! * Use doubled underscores (__) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: --- 39,44 ---- ! Emphasis ! * Use doubled single-quotes ('____') for emphasis (usually ''italics'') ! * Use doubled underscores (_''''_) for strong emphasis (usually __bold__) * Mix them at will: __''bold italics''__ * ''Emphasis'' can be used ''multiple'' times within a line, but ''cannot'' cross line boundaries: |
From: Geoffrey T. D. <da...@us...> - 2001-08-18 05:09:12
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv19382/lib Modified Files: Tag: release-1_2-branch db_filesystem.php Log Message: Fix SF bug #227748. When using the flat-file back end, page names with slashes in them didn't work. We fix this by urlencoding '%' '/' '\\' and ':' when they occur in page names. WARNING: If any pages currently in your flat-file database contain any of those characters in their titles, this change will make them invisible to PhpWiki. You should back them up before upgrading, and restore them after upgrading. Index: db_filesystem.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/db_filesystem.php,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -r1.4.2.3 -r1.4.2.4 *** db_filesystem.php 2001/08/18 02:38:34 1.4.2.3 --- db_filesystem.php 2001/08/18 05:09:09 1.4.2.4 *************** *** 42,49 **** } ! // Return hash of page + attributes or default function RetrievePage($dbi, $pagename, $pagestore) { ! $filename = $dbi[$pagestore] . "/" . $pagename; if ($fd = @fopen($filename, "rb")) { $locked = flock($fd, 1); # Read lock --- 42,61 ---- } ! // Sort of urlencode() the pagename. ! // We only encode a limited set of characters to minimize breakage ! // of existing databases. The encoded names can be decoded with ! // urldecode. ! function EncodePagename($pagename) { ! $bad_chars = '%/\\:'; // '%' must be first! ! for ($i = 0; $i < strlen($bad_chars); $i++) { ! $pagename = str_replace($bad_chars[$i], ! rawurlencode($bad_chars[$i]), $pagename); ! } ! return $pagename; ! } ! // Return hash of page + attributes or default function RetrievePage($dbi, $pagename, $pagestore) { ! $filename = $dbi[$pagestore] . "/" . EncodePagename($pagename); if ($fd = @fopen($filename, "rb")) { $locked = flock($fd, 1); # Read lock *************** *** 55,59 **** $pagehash = unserialize($data); if (!is_array($pagehash)) ! ExitWiki(sprintf("'%s': corrupt file", htmlspecialchars($filename))); } --- 67,71 ---- $pagehash = unserialize($data); if (!is_array($pagehash)) ! ExitWiki(sprintf(gettext("'%s': corrupt file"), htmlspecialchars($filename))); } *************** *** 82,86 **** } ! $filename = $dbi . "/" . $pagename; if($fd = fopen($filename, 'a+b')) { $locked = flock($fd,2); #Exclusive blocking lock --- 94,98 ---- } ! $filename = $dbi . "/" . EncodePagename($pagename); if($fd = fopen($filename, 'a+b')) { $locked = flock($fd,2); #Exclusive blocking lock *************** *** 116,125 **** function IsWikiPage($dbi, $pagename) { ! return file_exists($dbi['wiki'] . "/" . $pagename); } function IsInArchive($dbi, $pagename) { ! return file_exists($dbi['archive'] . "/" . $pagename); } --- 128,137 ---- function IsWikiPage($dbi, $pagename) { ! return file_exists($dbi['wiki'] . "/" . EncodePagename($pagename)); } function IsInArchive($dbi, $pagename) { ! return file_exists($dbi['archive'] . "/" . EncodePagename($pagename)); } *************** *** 200,203 **** --- 212,219 ---- while (list($key, $page) = each($pos['data'])) { $pagedata = RetrievePage($dbi, $page, $WikiPageStore); + if (!is_array($pagedata)) { + printf(gettext("%s: bad data<br>\n"), htmlspecialchars($page)); + continue; + } while (list($i, $line) = each($pagedata['content'])) { *************** *** 285,290 **** $d = opendir($dbi); while($entry = readdir($d)) { ! if ($entry != '.' && $entry != '..') ! $namelist[] = $entry; } --- 301,313 ---- $d = opendir($dbi); while($entry = readdir($d)) { ! if ($entry == '.' || $entry == '..') ! continue; ! $pagename = rawurldecode($entry); ! if ($entry != EncodePagename($pagename)) { ! printf(gettext("%s: Bad filename in database<br>\n"), ! htmlspecialchars("$dbi/$entry")); ! continue; ! } ! $namelist[] = $pagename; } |