-// several files are used for wiki :
-// - spool/wiki.d/PageName : the wiki page
-// - spool/wiki.d/cache_PageName.tpl : the template cache
-// - spool/templates_c/%%...%%cache_PageName.tpl.php : the PHP from Smarty
-function wiki_clear_cache($n) {
- global $page, $wikisite, $wikisites;
- $oldwikisite = $wikisite;
- foreach ($wikisites as $s) {
- $wikisite = $s;
- $tpl = wiki_template($n);
- @unlink($tpl);
- $page->clear_compiled_tpl($tpl);
+function wiki_get_perms($n)
+{
+ $file = wiki_work_dir().'/'.str_replace('/', '.', $n);
+ $lines = explode("\n", @file_get_contents($file));
+ foreach ($lines as $line) {
+ @list($k, $v) = explode('=', $line, 2);
+ if ($k == 'platal_perms') {
+ return explode(':', $v);
+ }