From: Geoffrey T. D. <da...@us...> - 2001-04-09 19:31:51
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv22779/lib Modified Files: main.php Log Message: Restrict the conditions under which we try to load initial page contents from pgsrc. Now we only load pgsrc iff the user is attempt to browse the HomePage. This allows some hope of fixing things if the configured pgsrc, e.g. doesn't include a HomePage. (Without this patch, one gets stuck in a loop --- every attempt to do anything with the wiki results in a load of pgsrc.) Index: main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** main.php 2001/04/07 00:34:30 1.12 --- main.php 2001/04/09 19:31:49 1.13 *************** *** 97,106 **** $dbi = OpenDataBase($WikiPageStore); ! // if there is no HomePage, create a basic set of Wiki pages ! if ( ! IsWikiPage($dbi, gettext("HomePage")) ) ! { ! include_once("lib/loadsave.php"); ! SetupWiki($dbi); ! ExitWiki(); } --- 97,107 ---- $dbi = OpenDataBase($WikiPageStore); ! if ( $action == 'browse' && $pagename == gettext("HomePage") ) { ! // if there is no HomePage, create a basic set of Wiki pages ! if ( ! IsWikiPage($dbi, gettext("HomePage")) ) { ! include_once("lib/loadsave.php"); ! SetupWiki($dbi); ! ExitWiki(); ! } } |