1 | <?php |
---|
2 | |
---|
3 | # |
---|
4 | |
---|
5 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
6 | |
---|
7 | # creer le lanceur dans tmp/fcconfig_domaine.inc |
---|
8 | function creer_fastcache() { |
---|
9 | |
---|
10 | $cfg = @unserialize($GLOBALS['meta']['fastcache']); |
---|
11 | $debug = var_export($cfg['debug'] === 'on', true); |
---|
12 | $pnghack = var_export($cfg['pnghack'] === 'on', true); |
---|
13 | $toutes = var_export($cfg['toutes'] === 'on', true); |
---|
14 | |
---|
15 | if (!$periode = intval($cfg['periode'])) |
---|
16 | $periode = 180; |
---|
17 | $periode = var_export($periode, true); |
---|
18 | |
---|
19 | $stats = var_export($GLOBALS['meta']['activer_statistiques'] === 'oui', true); |
---|
20 | $dir_plugin_fastcache = var_export(_DIR_PLUGIN_FASTCACHE, true); |
---|
21 | $dir_tmp = var_export(_DIR_TMP, true); |
---|
22 | |
---|
23 | $meta = var_export(_FILE_META, true); |
---|
24 | $prefix = var_export($GLOBALS['cookie_prefix'], true); |
---|
25 | |
---|
26 | $memoization = var_export(find_in_path('inc/memoization.php'), true); |
---|
27 | $cfg_memoization = var_export($GLOBALS['meta']['memoization'], true); |
---|
28 | |
---|
29 | $contenu = '<'.'?php' . |
---|
30 | <<<CONFIG |
---|
31 | |
---|
32 | // Voir la configuration du plugin dans CFG |
---|
33 | @define ('_FC_DEBUG', $debug); |
---|
34 | @define ('_FC_PERIODE', $periode); |
---|
35 | @define ('_FC_STATS_SPIP', $stats); |
---|
36 | @define ('_DIR_PLUGIN_FASTCACHE', $dir_plugin_fastcache); |
---|
37 | @define ('_DIR_TMP', $dir_tmp); |
---|
38 | @define ('_FC_META', $meta); |
---|
39 | @define ('_FC_IE_PNGHACK', $pnghack); |
---|
40 | @define ('_FC_TOUTES', $toutes); |
---|
41 | @define ('_FC_COOKIE_PREFIX', $prefix); |
---|
42 | @define ('_FC_MEMOIZATION', $memoization); |
---|
43 | @define ('_FC_CFG_MEMOIZATION', $cfg_memoization); |
---|
44 | |
---|
45 | CONFIG |
---|
46 | |
---|
47 | . "include '" . _DIR_PLUGIN_FASTCACHE . "fastcache.php';\n\n?" |
---|
48 | . ">\n"; |
---|
49 | |
---|
50 | ecrire_fichier(_FC_LANCEUR, $contenu); |
---|
51 | } |
---|
52 | |
---|
53 | ?> |
---|