On Thu, May 24, 2007 at 06:16:05PM +0200, Christophe David wrote:
> While you are at it, I have one more suggestion for this new recipe:
> 
> SDV('ImportFilesPattern', '.*'), and a check when importing that this
> pattern is met.
> 
> This would allow things like $ImportFilesPattern =
> '^(Alice|Bob|Charlie)\..*' to restrict imports to these groups.

This already exists in import.php, as $ImportFilePattern (no 's').

So, to restrict importing to the Alice, Bob, and Charlie groups, use:

  $ImportFilePattern = "^((Alice|Bob|Charlie)\.$NamePattern)$";

The outer parens are needed so that ImportText knows what
part of the filename to use as the page name.  The default
setting in import.php is:

  SDV($ImportFilePattern, "^($GroupPattern\.$NamePattern)(\.txt)?$");

This accepts any valid pagename, followed by an optional ".txt"
extension.

Pm


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to