|
From: Paul S. O. <ps...@us...> - 2001-11-26 20:46:58
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv20530/admin
Modified Files:
admin_forums.php
Log Message:
Ooops, no default auth levels were set for new forums
Index: admin_forums.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_forums.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** admin_forums.php 2001/11/26 00:01:38 1.27
--- admin_forums.php 2001/11/26 20:46:54 1.28
***************
*** 34,37 ****
--- 34,53 ----
require('pagestart.inc');
+ $forum_auth_ary = array(
+ "auth_view" => AUTH_ALL,
+ "auth_read" => AUTH_ALL,
+ "auth_post" => AUTH_ALL,
+ "auth_reply" => AUTH_ALL,
+ "auth_edit" => AUTH_REG,
+ "auth_delete" => AUTH_REG,
+ "auth_sticky" => AUTH_REG,
+ "auth_announce" => AUTH_MOD,
+ "auth_vote" => AUTH_REG,
+ "auth_pollcreate" => AUTH_REG
+ );
+
+ //
+ // Mode setting
+ //
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
***************
*** 353,359 ****
$next_id = $max_id + 1;
// There is no problem having duplicate forum names so we won't check for it.
! $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable)
! VALUES ('" . $next_id . "', '" . $HTTP_POST_VARS['forumname'] . "', " . intval($HTTP_POST_VARS['cat_id']) . ", '" . $HTTP_POST_VARS['forumdesc'] . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . ")";
if( !$result = $db->sql_query($sql) )
{
--- 369,387 ----
$next_id = $max_id + 1;
+ //
+ // Default permissions of public ::
+ //
+ $field_sql = "";
+ $value_sql = "";
+ while( list($field, $value) = each($forum_auth_ary) )
+ {
+ $field_sql .= ", $field";
+ $value_sql .= ", $value";
+
+ }
+
// There is no problem having duplicate forum names so we won't check for it.
! $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
! VALUES ('" . $next_id . "', '" . $HTTP_POST_VARS['forumname'] . "', " . intval($HTTP_POST_VARS['cat_id']) . ", '" . $HTTP_POST_VARS['forumdesc'] . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
if( !$result = $db->sql_query($sql) )
{
|