Blame
Date:
Fri Jul 22 04:00:49 2022 UTC
Message:
Daily backup
01
2021-12-17
jrmu
<?php if (!defined('PmWiki')) exit();
02
2021-12-17
jrmu
/* Copyright 2002-2005 Patrick R. Michaud (pmichaud@pobox.com)
03
2021-12-17
jrmu
This file is part of PmWiki; you can redistribute it and/or modify
04
2021-12-17
jrmu
it under the terms of the GNU General Public License as published
05
2021-12-17
jrmu
by the Free Software Foundation; either version 2 of the License, or
06
2021-12-17
jrmu
(at your option) any later version. See pmwiki.php for full details.
07
2021-12-17
jrmu
08
2021-12-17
jrmu
This script enables per-page and per-group customizations in the
09
2021-12-17
jrmu
local/ subdirectory (or whatever directory is given by $LocalDir).
10
2021-12-17
jrmu
For example, to create customizations for the 'Demo' group, place
11
2021-12-17
jrmu
them in a file called local/Demo.php. To customize a single page,
12
2021-12-17
jrmu
use the full page name (e.g., local/Demo.MyPage.php).
13
2021-12-17
jrmu
Per-page/per-group customizations can be handled at any time by adding
14
2021-12-17
jrmu
include_once("scripts/pgcust.php");
15
2021-12-17
jrmu
to config.php. It is automatically included by scripts/stdconfig.php
16
2021-12-17
jrmu
unless $EnablePGCust is set to zero in config.php.
17
2021-12-17
jrmu
18
2021-12-17
jrmu
A page's customization is loaded first, followed by any group
19
2021-12-17
jrmu
customization. If no page or group customizations are loaded,
20
2021-12-17
jrmu
then 'local/default.php' is loaded.
21
2021-12-17
jrmu
22
2021-12-17
jrmu
A per-page configuration file can prevent its group's config from
23
2021-12-17
jrmu
loading by setting $EnablePGCust=0;. A per-page configuration file
24
2021-12-17
jrmu
can force group customizations to be loaded first by using include_once
25
2021-12-17
jrmu
on the group customization file.
26
2021-12-17
jrmu
27
2021-12-17
jrmu
*/
28
2021-12-17
jrmu
29
2021-12-17
jrmu
$f = 1;
30
2021-12-17
jrmu
for($p=$pagename;$p;$p=preg_replace('/\\.*[^.]*$/','',$p)) {
31
2021-12-17
jrmu
if (!IsEnabled($EnablePGCust,1)) return;
32
2021-12-17
jrmu
if (file_exists("$LocalDir/$p.php"))
33
2021-12-17
jrmu
{ include_once("$LocalDir/$p.php"); $f=0; }
34
2021-12-17
jrmu
}
35
2021-12-17
jrmu
36
2021-12-17
jrmu
if ($f && IsEnabled($EnablePGCust,1) && file_exists("$LocalDir/default.php"))
37
2021-12-17
jrmu
include_once("$LocalDir/default.php");
38
2021-12-17
jrmu
39
2021-12-17
jrmu
IRCNow