[pmwiki-devel] Require a password to edit RecentChanges (etc.) pages: regex problem
Patrick R. Michaud
pmichaud at pobox.com
Wed Dec 6 11:11:31 CST 2006
On Tue, Dec 05, 2006 at 08:02:39PM +1300, Simon wrote:
> I've added the following to my config.php,
> but I don't get the prompt for a password.
> I suspect my regex is wrong, can anyone help please
>
> ## Require a password to edit RecentChanges (etc.) pages.
> if ($action=='edit'
> &&
> preg_match('/\\.(Search|(Main|Side)Bar|Group(Header|Footer|Attributes)|(All)?RecentChanges)$/',
> $pagename))
> { $DefaultPasswords['edit'] = crypt('mysecretpassword!'); }
Hmmm, this looks okay to me. Keep in mind that if you've already
entered the password (or the admin password) then you won't get
a password prompt. You might try doing ?action=logout just to make
sure there aren't any passwords already entered.
Pm
More information about the pmwiki-devel
mailing list