Replace the two functions below in cls_wiki.php. Problem caused because I was not re-setting the page after calling the LoadCustom function. This then led on the fact that the custom.php files under that directory need to then be loaded also... Anyway, heres the fix.
Another problem... Formatted text not showing properly.. Edit the page and cut'n'paste to get formatting... ' Darren
//function LoadCustom()----------------------------------------------------
function LoadCustom($lRecursiveLoad = true) {
$this->Debug("LoadCustom()", TRUE); // debug call
$mydir="";
$this->Page = clsutil::FormatPageName($this->env['GetVars']['page']);
foreach ($this->Page as $key => $val) { // transfer info to $env...
$GLOBALS['Page'][$key] = $val;
}
// loop through groups/subgroups/etc...
$dirlist = explode("/", $this->Page['DataDir']);
unset($dirlist[count($dirlist) - 1]);
if (! $lRecursiveLoad) {
unset($dirlist[count($dirlist) - 1]);
unset($dirlist[count($dirlist) - 1]);
}
// expose ALL global vars here pls...
foreach ($GLOBALS as $key => $val) {
$$key =& $GLOBALS[$key];
}
foreach ($dirlist as $dir) {
$mydir .= "$dir/";
$this->Debug("Changing to directory $mydir", true);// debug call
if (is_dir($mydir)) {
if (file_exists($mydir.$this->env['CustomFile']) ) { // Now add in any custom files...
include_once($mydir.$this->env['CustomFile']);
$this->SetPasswords(); // Set passwords if specified in local.php file
}
}
}
}
//function Go()------------------------------------------------------------
function Go() {
$this->Debug("Go()", TRUE); // debug call
$this->env['PHPStart'] = clsutil::GrabTime(); // start time
/* Need to call LoadCustom twice. First time to pick up changes to
GroupDefaults, etc... The second to pick up the defaults from the
page directories themselves.. */
$this->LoadCustom(FALSE);
$this->LoadCustom();
$this->PreChecks(); // Some pre-checks...
$this->env['Stack'] = new clsStack(); // Create stack object
$lAction = $this->env['GetVars']['action'];
$cAction = new clsAction(); // new action class
$cAction->SetPage($this->Page); // Set Page
$cAction->Process($lAction); // Call the action
}
Hi Darren,
Thanks for the fix - i can confirm that it seems to work - have done some quick testing. The "Start Page" link in the "Main Menu" section on the left does not reflect the settings in custom.php. Meaning that setting $GroupDefault? $SubGroupDefault? and $PageDefault? in custom.php is not reflected in the "Start Page" link it will still go to "http://xyz.../wikidx.php?page=wikidx/default/homepage".
Kind regard Uffe Jakobsen
Uffe, wow! quick response...
For the 'Start Page' problem, I have added a fix in Bug22 Response & Fix. ' Darren