[pmwiki-users] Problem with shared group and AllRecentChanges

chr at home.se chr at home.se
Sat Aug 6 05:16:04 CDT 2005


Hi

I'm using Site/ as a shared group and have a problem with the creation of
AllRecentChanges. Since this page is to be specific to each field, I've
renamed it as Field.AllRecentChanges instead of Site.AllRecentChanges with 
this code

	$RecentChangesFmt = array(
	  'Field.AllRecentChanges' =>
	  '* [[$Group.$Name]]  . . . $CurrentTime $[by] $AuthorLink',
	  '$Group.RecentChanges' =>
	  '* [[$Group/$Name]]  . . . $CurrentTime $[by] $AuthorLink');

So when I edit a page such as Main.HomePage, the result is stored in
Field.AllRecentChanges in the correct field. If I however edit a page in
the shared group, the result is written to the directory where the shared
pages are kept...

I assume this code is the culprit:

  $WikiLibDirs = array(&$WikiDir,
                       new PageStore("$FarmD/shared.d/\$FullName"),
                       new PageStore('$FarmD/wikilib.d/$FullName'));

  // Force use of directory shared.d/ for edits to the group 'Site'
  $group = FmtPageName('$Group', $pagename);
  if(($action == 'edit' && ($group == 'Site' ||
                            $group == 'Playground' ||
                            $group == 'SiteTest')) ||
     ($action == 'approvesites') ||
     ($action == 'approveurls')) {
    $WikiLibDirs[] = $WikiDir;
    $WikiDir = new PageStore("$FarmD/shared.d/\$FullName");
  }

where the problem is that whenever I edit a shared page, $WikiDir is 
changed so Field.AllRecentChanges gets stored in the wrong directory.

How can I get around this problem? 

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list