<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$table_editor->describe('description','description',false);
$table_editor->apply($page, $action, $id);
}
- function handler_wiki(&$page, $action='list') {
+
+ function handler_wiki(&$page, $action='list')
+ {
require_once 'wiki.inc.php';
// update wiki perms
}
}
ksort($wiki_pages);
+ $wiki_tree = array();
+ foreach ($wiki_pages as $file => $desc) {
+ list($cat, $name) = explode('.', $file);
+ if (!isset($wiki_tree[$cat])) {
+ $wiki_tree[$cat] = array();
+ }
+ $wiki_tree[$cat][$name] = $desc;
+ }
+
+
$page->changeTpl('admin/wiki.tpl');
- $page->assign('wiki_pages', $wiki_pages);
+ $page->assign('wiki_pages', $wiki_tree);
$page->assign('perms_opts', $perms);
}
}