# HG changeset patch
# User Dan
# Date 1193265003 14400
# Node ID 6eea55374f5bc36cf7f9862180e51792d8e34947
# Parent c312109501189f678991c27586b7cabbb1602ff4
Merging in some changes from Nighthawk
diff -r c31210950118 -r 6eea55374f5b decir/forum_index.php
--- a/decir/forum_index.php Wed Oct 17 23:44:22 2007 -0400
+++ b/decir/forum_index.php Wed Oct 24 18:30:03 2007 -0400
@@ -49,24 +49,16 @@
case FORUM_FORUM:
$color = ( $row['user_level'] >= USER_LEVEL_ADMIN ) ? 'AA0000' : ( ( $row['user_level'] >= USER_LEVEL_MOD ) ? '00AA00' : '0000AA' );
// Forum
- if ( $row['post_id'] )
- {
- $last_post_data = '
- ' . $row['topic_title'] . '
- ' . date('d M Y h:i a', $row['timestamp']) . '
- by ' . $row['username'] . '
- ';
- }
- else
- {
- $last_post_data = 'No posts';
- }
echo '
<icon> | '
. $row['forum_name'] . ' ' . $row['forum_desc'].' |
' . $row['num_topics'] . ' |
' . $row['num_posts'] . ' |
- ' . $last_post_data . '
+
+ ' . $row['topic_title'] . '
+ ' . date('d M Y h:i a', $row['timestamp']) . '
+ by ' . $row['username'] . '
+
|
';
break;
diff -r c31210950118 -r 6eea55374f5b plugins/Decir.php
--- a/plugins/Decir.php Wed Oct 17 23:44:22 2007 -0400
+++ b/plugins/Decir.php Wed Oct 24 18:30:03 2007 -0400
@@ -36,30 +36,14 @@
function decir_early_init(&$paths, &$session)
{
$paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral');
- $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/');
-
- // Decir's ACL rules
+ $paths->nslist['DecirForum'] = $paths->nslist['Special'] . 'Forum/ViewForum/';
+ $paths->nslist['DecirPost'] = $paths->nslist['Special'] . 'Forum/Post/';
+ $paths->nslist['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');
- $session->register_acl_type('decir_delete_own_post_soft', AUTH_ALLOW, 'Delete own posts (soft)', Array('decir_edit_own'), 'DecirPost');
- $session->register_acl_type('decir_delete_own_post_hard', AUTH_DISALLOW, 'Delete own posts (hard)', Array('decir_delete_own_post_soft'), 'DecirPost');
- $session->register_acl_type('decir_delete_other_post_soft', AUTH_DISALLOW, 'Delete others\' posts (soft)', Array('decir_edit_other'), 'DecirPost');
- $session->register_acl_type('decir_delete_other_post_hard', AUTH_DISALLOW, 'Delete others\' posts (hard)', Array('decir_delete_other_post_soft'), 'DecirPost');
- $session->register_acl_type('decir_undelete_own_post', AUTH_DISALLOW, 'Undelete own posts', Array('decir_edit_own'), 'DecirPost');
- $session->register_acl_type('decir_undelete_other_post', AUTH_DISALLOW, 'Undelete others\' posts', Array('decir_edit_other'), 'DecirPost');
- $session->register_acl_type('decir_undelete_own_topic', AUTH_DISALLOW, 'Undelete own topics', Array('read'), 'DecirTopic');
- $session->register_acl_type('decir_undelete_other_topic', AUTH_DISALLOW, 'Undelete others\' topics', Array('read'), 'DecirTopic');
- $session->register_acl_type('decir_see_deleted_post', AUTH_ALLOW, 'See placeholders for deleted posts', Array('read'), 'Special|DecirPost|DecirTopic|DecirForum');
- $session->register_acl_type('decir_see_deleted_post_full', AUTH_DISALLOW, 'Read the full contents of deleted posts', Array('decir_see_deleted_post'), 'Special|DecirPost|DecirTopic|DecirForum');
- $session->register_acl_type('decir_see_deleted_topic', AUTH_ALLOW, 'See placeholders for deleted topics', Array('read'), 'DecirTopic|DecirForum');
- $session->register_acl_type('decir_see_deleted_topic_full', AUTH_DISALLOW, 'Read the full contents of deleted topics', Array('decir_see_deleted_topic'), 'Special|DecirTopic|DecirForum');
}
function page_Special_Forum()
@@ -94,15 +78,6 @@
case 'new':
require('posting.php');
break;
- case 'edit':
- require('edit.php');
- break;
- case 'delete':
- require('delete.php');
- break;
- case 'restoretopic':
- require('restoretopic.php');
- break;
}
chdir($curdir);
@@ -111,13 +86,7 @@
function page_Admin_DecirGeneral()
{
- global $db, $session, $paths, $template, $plugins; // Common objects
- if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
- {
- echo 'Error: Not authenticated
It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.
';
- return;
- }
-
+ 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'); }
echo 'Hello world!';
}