--- phpwiki-1.2.5/ChangeLog.orig 2004-05-04 14:12:06.000000000 +0100 +++ phpwiki-1.2.5/ChangeLog 2004-11-28 19:26:29.303096900 +0100 @@ -1,3 +1,16 @@ +2004-11-28 19:19 rurban + + Release 1.2.5 + * admin.php, index.php, lib/config.php(global, compute_default_scripturl): + import _SERVER and _GET/_POST to support register_globals=off + * admin.php: on (un)lock=pagename display the (un)lock'ed page not FrontPage + * lib/pgsql.php, lib/config.php: add pg_user and pg_pass + (patch #1001339 by Jack Twilley) + * lib/dbalib.php, lib/dbmlib.php, lib/db_filesystem: fix GetAllWikiPagenames() + using $dbi['wiki']. This fixes zip and dumpserial on dba, dbm and file. + * lib/msql.php: typo in GetAllWikiPageNames(). + This fixes zip and dumpserial on msql. + 2004-05-04 14:23 rurban Release 1.2.4 --- phpwiki-1.2.5/admin.php.orig 2000-11-13 11:59:27.000000000 +0100 +++ phpwiki-1.2.5/admin.php 2004-11-28 18:46:03.787401100 +0100 @@ -3,9 +3,15 @@ function rcs_id($id) {} // otherwise this gets in the way define('WIKI_ADMIN', true); // has to be before includes + if (!ini_get('register_globals')) { + extract($HTTP_SERVER_VARS); + } include("lib/config.php"); include("lib/stdlib.php"); + if (!ini_get('register_globals')) { + import_request_variables('gps'); + } // set these to your preferences. For heaven's sake // pick a good password! @@ -32,6 +38,7 @@ if (isset($lock) || isset($unlock)) { include ('admin/lockpage.php'); + $QUERY_STRING = $pagename; } elseif (isset($zip)) { include ('lib/ziplib.php'); include ('admin/zip.php'); --- phpwiki-1.2.5/index.php.orig 2001-08-18 01:35:10.000000000 +0100 +++ phpwiki-1.2.5/index.php 2004-11-28 18:19:26.924044800 +0100 @@ -13,6 +13,9 @@ // All requests require the database $dbi = OpenDataBase($WikiPageStore); } + if (!ini_get('register_globals')) { + import_request_variables('gps'); + } // Allow choice of submit buttons to determine type of search: if (isset($searchtype) && ($searchtype == 'full')) --- phpwiki-1.2.5/lib/config.php.orig 2001-11-09 16:36:03.000000000 +0100 +++ phpwiki-1.2.5/lib/config.php 2004-11-28 18:47:32.693651100 +0100 @@ -6,6 +6,9 @@ set_magic_quotes_runtime(0); error_reporting(E_ALL ^ E_NOTICE); + if (!ini_get('register_globals')) { + extract($HTTP_SERVER_VARS); + } if (!function_exists('rcs_id')) { function rcs_id($id) { echo "\n"; }; @@ -113,6 +116,8 @@ } elseif ($WhichDatabase == 'pgsql') { $pg_dbhost = "localhost"; $pg_dbport = "5432"; + $pg_dbuser = ""; // username as used in step 2 of INSTALL.mysql + $pg_dbpass = ""; // password of above user (or leave blank if none) $WikiDataBase = "wiki"; // name of the database in Postgresql $WikiPageStore = "wiki"; $ArchivePageStore = "archive"; @@ -268,7 +273,11 @@ ////////////////////////////////////////////////////////////////////// // you shouldn't have to edit anyting below this line function compute_default_scripturl() { - global $SERVER_PORT, $SERVER_NAME, $SCRIPT_NAME, $HTTPS; + global $HTTP_SERVER_VARS, $SERVER_PORT, $SERVER_NAME, $SCRIPT_NAME, $HTTPS; + if (!ini_get('register_globals')) { + extract($HTTP_SERVER_VARS); + } + if (!empty($HTTPS) && $HTTPS != 'off') { $proto = 'https'; $dflt_port = 443; --- phpwiki-1.2.5/lib/db_filesystem.php.orig 2001-11-08 00:19:16.000000000 +0100 +++ phpwiki-1.2.5/lib/db_filesystem.php 2004-11-28 19:10:44.412401100 +0100 @@ -308,7 +308,7 @@ function GetAllWikiPagenames($dbi) { $namelist = array(); - $d = opendir($dbi); + $d = opendir($dbi['wiki']); while($entry = readdir($d)) { if ($entry == '.' || $entry == '..') continue; --- phpwiki-1.2.5/lib/dbalib.php.orig 2004-05-04 13:52:47.203125000 +0100 +++ phpwiki-1.2.5/lib/dbalib.php 2004-11-28 19:05:26.818651100 +0100 @@ -388,9 +388,9 @@ $namelist = array(); $ctr = 0; - $namelist[$ctr] = $key = dba_firstkey($dbi); + $namelist[$ctr] = $key = dba_firstkey($dbi['wiki']); - while ($key = dba_nextkey($dbi)) { + while ($key = dba_nextkey($dbi['wiki'])) { $ctr++; $namelist[$ctr] = $key; } --- phpwiki-1.2.5/lib/dbmlib.php.orig 2001-11-08 00:19:16.000000000 +0100 +++ phpwiki-1.2.5/lib/dbmlib.php 2004-11-28 19:07:43.365526100 +0100 @@ -365,9 +365,9 @@ $namelist = array(); $ctr = 0; - $namelist[$ctr] = $key = dbmfirstkey($dbi); + $namelist[$ctr] = $key = dbmfirstkey($dbi['wiki']); - while ($key = dbmnextkey($dbi, $key)) { + while ($key = dbmnextkey($dbi['wiki'], $key)) { $ctr++; $namelist[$ctr] = $key; } --- phpwiki-1.2.5/lib/msql.php.orig 2001-11-16 03:53:21.000000000 +0100 +++ phpwiki-1.2.5/lib/msql.php 2004-11-28 18:57:08.271776100 +0100 @@ -541,7 +541,7 @@ } } - function GetAllWikiPageNames($dbi_) { + function GetAllWikiPageNames($dbi) { $res = msql_query("select pagename from wiki", $dbi['dbc']); $rows = msql_num_rows($res); for ($i = 0; $i < $rows; $i++) { --- phpwiki-1.2.5/lib/pgsql.php.orig 2001-11-15 02:20:39.000000000 +0100 +++ phpwiki-1.2.5/lib/pgsql.php 2004-11-28 18:07:30.189669800 +0100 @@ -29,10 +29,12 @@ // open a database and return a hash function OpenDataBase($table) { - global $WikiDataBase, $pg_dbhost, $pg_dbport; + global $WikiDataBase, $pg_dbhost, $pg_dbport, $pg_dbuser, $pg_dbpass; $connectstring = $pg_dbhost?"host=$pg_dbhost ":""; $connectstring .= $pg_dbport?"port=$pg_dbport ":""; + $connectstring .= $pg_dbuser?"user=$pg_dbuser ":""; + $connectstring .= $pg_dbpass?"password=$pg_dbpass ":""; $connectstring .= $WikiDataBase?"dbname=$WikiDataBase":""; if (!($dbc = pg_pconnect($connectstring))) { --- phpwiki-1.2.5/pgsrc/RecentVisitors.orig 2001-02-02 04:51:58.000000000 +0100 +++ phpwiki-1.2.5/pgsrc/RecentVisitors 2004-11-28 18:49:10.006151100 +0100 @@ -1,5 +1,5 @@ Sign and date your name below! -Arno Hollosi, Aredridel Stauck, Jeff Dairiki, Steve Wainstead, the PhpWiki authors. +Arno Hollosi, Aredridel Stauck, Jeff Dairiki, Steve Wainstead, Reini Urban, the PhpWiki authors. --- phpwiki-1.2.5/pgsrc/ReleaseNotes.orig 2004-05-04 14:03:03.578125000 +0100 +++ phpwiki-1.2.5/pgsrc/ReleaseNotes 2004-11-28 19:27:33.006221900 +0100 @@ -1,9 +1,16 @@ -PhpWiki 1.2.4 improves possible deadlocks in DBA, and fixes problems - with DBA open failures. +PhpWiki 1.2.5 supports now register_globals=off, +* adds user/password to pgsql, +* fix zip and dumpserial on dba, dbm, msql and file, +* and fixes a minor (un)lock issue, displaying the (un)locked page afterwards and not the FrontPage. + +PhpWiki 1.2.4 improves possible deadlocks in DBA, +* and fixes problems with DBA open failures. PhpWiki 1.2.3 just adds the RELATEDPAGES footer support to dba, - adds remove to dba, - and fixes one minor aesthetic error on info w/o "Show the page source" +* adds remove to dba, +* and fixes one minor aesthetic error on info w/o "Show the page source" + +--[ReiniUrban|http://phpwiki.org/ReiniUrban] PhpWiki 1.2 is a huge advance over version 1.0: