|
From: Paul S. O. <ps...@us...> - 2002-03-22 17:25:30
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv18956
Modified Files:
upgrade.php
Log Message:
A few permission related discrepancies ... hopefully fixed while hopefully not breaking anything else
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/upgrade.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** upgrade.php 19 Mar 2002 23:21:23 -0000 1.25
--- upgrade.php 22 Mar 2002 17:25:27 -0000 1.26
***************
*** 70,74 ****
);
-
// ---------------
// Begin functions
--- 70,73 ----
***************
*** 1350,1355 ****
flush();
! $sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete)
! VALUES ($group_id, $forum_id, 1, 1, 1, 1, 1, 1)";
$result = query($sql, "Unable to set group auth access.");
--- 1349,1354 ----
flush();
! $sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate)
! VALUES ($group_id, $forum_id, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1)";
$result = query($sql, "Unable to set group auth access.");
***************
*** 1488,1507 ****
flush();
- // Old auth structure:
- // forum_type: (only concerns viewing)
- // 0 = Public
- // 1 = Private
- switch( $row['forum_type'] )
- {
- case 0:
- $auth_view = AUTH_ALL;
- $auth_read = AUTH_ALL;
- break;
- default:
- $auth_view = AUTH_ALL;
- $auth_read = AUTH_ALL;
- break;
- }
-
// forum_access: (only concerns posting)
// 1 = Registered users only
--- 1487,1490 ----
***************
*** 1512,1515 ****
--- 1495,1500 ----
case 1:
// Public forum, no anonymous posting
+ $auth_view = AUTH_ALL;
+ $auth_read = AUTH_ALL;
$auth_post = AUTH_REG;
$auth_reply = AUTH_REG;
***************
*** 1524,1529 ****
$auth_post = AUTH_ALL;
$auth_reply = AUTH_ALL;
! $auth_edit = AUTH_ALL;
! $auth_delete = AUTH_ALL;
$auth_vote = AUTH_ALL;
$auth_pollcreate = AUTH_ALL;
--- 1509,1514 ----
$auth_post = AUTH_ALL;
$auth_reply = AUTH_ALL;
! $auth_edit = AUTH_REG;
! $auth_delete = AUTH_REG;
$auth_vote = AUTH_ALL;
$auth_pollcreate = AUTH_ALL;
***************
*** 1543,1546 ****
--- 1528,1558 ----
}
+ // Old auth structure:
+ // forum_type: (only concerns viewing)
+ // 0 = Public
+ // 1 = Private
+ switch( $row['forum_type'] )
+ {
+ case 0:
+ $auth_view = AUTH_ALL;
+ $auth_read = AUTH_ALL;
+ break;
+ default:
+ //
+ // Make it really private ...
+ //
+ $auth_view = AUTH_ACL;
+ $auth_read = AUTH_ACL;
+ $auth_post = AUTH_ACL;
+ $auth_reply = AUTH_ACL;
+ $auth_edit = AUTH_ACL;
+ $auth_delete = AUTH_ACL;
+ $auth_vote = AUTH_ACL;
+ $auth_pollcreate = AUTH_ACL;
+ $auth_sticky = AUTH_ACL;
+ $auth_announce = AUTH_MOD;
+ break;
+ }
+
$sql = "UPDATE " . FORUMS_TABLE . " SET
auth_view = $auth_view,
|