diff -r 0417a5a0c7be -r 6f8b7c6fac02 plugins/Decir.php --- a/plugins/Decir.php Wed Jun 13 22:33:54 2007 -0400 +++ b/plugins/Decir.php Wed Oct 17 20:23:51 2007 -0400 @@ -36,14 +36,16 @@ function decir_early_init(&$paths, &$session) { $paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral'); - $paths->nslist['DecirForum'] = $paths->nslist['Special'] . 'Forum/ViewForum/'; - $paths->nslist['DecirPost'] = $paths->nslist['Special'] . 'Forum/Post/'; - $paths->nslist['DecirTopic'] = $paths->nslist['Special'] . 'Forum/Topic/'; + $paths->create_namespace('DecirForum', $paths->nslist['Special'] . 'Forum/ViewForum/'); + $paths->create_namespace('DecirPost', $paths->nslist['Special'] . 'Forum/Post/'); + $paths->create_namespace('DecirTopic', $paths->nslist['Special'] . 'Forum/Topic/'); $session->register_acl_type('decir_see_forum', AUTH_ALLOW, 'See forum in index', Array('read'), 'DecirForum'); $session->register_acl_type('decir_view_forum', AUTH_ALLOW, 'View forum', Array('decir_see_forum'), 'DecirForum'); $session->register_acl_type('decir_post', AUTH_ALLOW, 'Post new topics', Array('decir_view_forum'), 'DecirForum'); $session->register_acl_type('decir_reply', AUTH_ALLOW, 'Reply to topics', Array('decir_post'), 'DecirTopic'); + $session->register_acl_type('decir_edit_own', AUTH_ALLOW, 'Edit own posts', Array('decir_post'), 'DecirPost'); + $session->register_acl_type('decir_edit_other', AUTH_DISALLOW, 'Edit others\' posts', Array('decir_post'), 'DecirPost'); } function page_Special_Forum() @@ -53,6 +55,7 @@ if ( getConfig('decir_version') != ENANO_DECIR_VERSION || isset($_POST['do_install_finish']) ) { require(DECIR_ROOT . '/install.php'); + return false; } $act = strtolower( ( $n = $paths->getParam(0) ) ? $n : 'Index' ); @@ -77,6 +80,12 @@ case 'new': require('posting.php'); break; + case 'edit': + require('edit.php'); + break; + case 'delete': + require('delete.php'); + break; } chdir($curdir); @@ -85,7 +94,13 @@ function page_Admin_DecirGeneral() { - global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { header('Location: '.makeUrl($paths->nslist['Special'].'Administration'.urlSeparator.'noheaders')); die('Hacking attempt'); } + global $db, $session, $paths, $template, $plugins; // Common objects + if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '
It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.
'; + return; + } + echo 'Hello world!'; }