- correctly display subcategories

- use L_TRANSLATION_INFO [Bug #2357]
- always begin with ACL_UNSET in permission trace
- allow copy permissions when editing a forum
- default to parent forum for copying permissions
- no duplication of the breadcrumps on registration [Bug #2307]


git-svn-id: file:///svn/phpbb/trunk@6107 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-06-20 19:00:30 +00:00
parent c125ae1276
commit 4448249a44
12 changed files with 36 additions and 26 deletions

View file

@ -100,12 +100,10 @@
<dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
</dl>
<!-- IF S_ADD_ACTION -->
<dl>
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
</fieldset>
<div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->>

View file

@ -19,6 +19,7 @@
<div id="page-footer">
<!-- IF S_COPYRIGHT_HTML -->
Powered by phpBB {VERSION} &copy; 2006 <a href="http://www.phpbb.com/">phpBB Group</a>
{L_TRANSLATION_INFO}
<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT -->

View file

@ -17,6 +17,7 @@
<!-- IF S_COPYRIGHT_HTML -->
<br />Powered by phpBB {VERSION} &copy; 2006 <a href="http://www.phpbb.com/">phpBB Group</a>
{TRANSLATION_INFO}
<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT -->

View file

@ -142,8 +142,20 @@ class acp_forums
$forum_perm_from = request_var('forum_perm_from', 0);
// Copy permissions?
if ($forum_perm_from && $action == 'add')
if ($forum_perm_from)
{
// if we edit a forum delete current permissions first
if ($action == 'edit')
{
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
WHERE forum_id = ' . (int) $forum_data['forum_id'];
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
WHERE forum_id = ' . (int) $forum_data['forum_id'];
$db->sql_query($sql);
}
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
@ -468,6 +480,7 @@ class acp_forums
'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'U_EDIT_ACTION' => $this->u_action . "&amp;parent_id={$this->parent_id}&amp;action=$action&amp;f=$forum_id",
'L_COPY_PERMISSIONS_EXPLAIN' => $user->lang['COPY_PERMISSIONS_' . strtoupper($action) . '_EXPLAIN'],
'L_TITLE' => $user->lang[$this->page_title],
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
@ -501,7 +514,7 @@ class acp_forums
'S_STATUS_OPTIONS' => $statuslist,
'S_PARENT_OPTIONS' => $parents_list,
'S_STYLES_OPTIONS' => $styles_list,
'S_FORUM_OPTIONS' => make_forum_select(false, false, false),
'S_FORUM_OPTIONS' => make_forum_select(($action == 'add') ? $forum_data['parent_id'] : false, false, false, false, false),
'S_SHOW_DISPLAY_ON_INDEX' => $s_show_display_on_index,
'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'S_FORUM_ORIG_POST' => (isset($old_forum_type) && $old_forum_type == FORUM_POST) ? true : false,

View file

@ -982,6 +982,7 @@ class acp_permissions
}
$db->sql_freeresult($result);
$total = ACL_UNSET;
if (sizeof($groups))
{
// Get group auth settings
@ -993,7 +994,6 @@ class acp_permissions
}
unset($hold_ary);
$total = ACL_UNSET;
foreach ($groups as $id => $row)
{
switch ($row['auth_setting'])

View file

@ -156,7 +156,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$parent_id = $forum_id;
$forum_rows[$forum_id] = $row;
if (!$row['parent_id'] && $row['forum_type'] == FORUM_CAT && $row['parent_id'] == $root_data['forum_id'])
if ($row['forum_type'] == FORUM_CAT && $row['parent_id'] == $root_data['forum_id'])
{
$branch_root_id = $forum_id;
}
@ -228,7 +228,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
foreach ($forum_rows as $row)
{
// Empty category
if (!$row['parent_id'] && $row['forum_type'] == FORUM_CAT)
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
{
$template->assign_block_vars('forumrow', array(
'S_IS_CAT' => true,

View file

@ -62,7 +62,7 @@ class ucp_remind
$messenger = new messenger(false);
$messenger->template('user_activate_passwd', $row['user_lang']);
$messenger->template('user_activate_passwd', $user_row['user_lang']);
$messenger->replyto($user->data['user_email']);
$messenger->to($user_row['user_email'], $user_row['username']);

View file

@ -38,7 +38,8 @@ $lang = array_merge($lang, array(
'AUTO_PRUNE_VIEWED_EXPLAIN' => 'Number of days since topic was viewed after which topic is removed.',
'COPY_PERMISSIONS' => 'Copy permissions from',
'COPY_PERMISSIONS_EXPLAIN' => 'Once created, the forum will have the same permissions as the one you select here. If no forum is selected the newly created forum will not be visible until permissions had been set.',
'COPY_PERMISSIONS_ADD_EXPLAIN' => 'Once created, the forum will have the same permissions as the one you select here. If no forum is selected the newly created forum will not be visible until permissions had been set.',
'COPY_PERMISSIONS_EDIT_EXPLAIN' => 'If you select to copy permissions, the forum will have the same permissions as the one you select here. This will overwrite any permissions you have previously set for this forum with the permissions of the forum you select here. If no forum is selected the current permissions will be kept.',
'CREATE_FORUM' => 'Create new forum',
'DECIDE_MOVE_DELETE_CONTENT' => 'Delete content or move to forum',

View file

@ -29,6 +29,7 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
'TRANSLATION_INFO' => 'blah',
'ENCODING' => 'iso-8859-1',
'DIRECTION' => 'ltr',
'LEFT' => 'left',
@ -50,6 +51,7 @@ $lang = array_merge($lang, array(
'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.',
'ADMINISTRATOR' => 'Administrator',
'ADMINISTRATORS' => 'Administrators',
'AGE' => 'Age',
'ALLOWED' => 'Allowed',
'ALL_FILES' => 'All files',
'ALL_FORUMS' => 'All forums',

View file

@ -14,8 +14,8 @@
<div id="wrapfooter">
<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
<span class="copyright">Powered by <a href="http://www.phpbb.com/" target="_blank">phpBB</a> &copy; 2002, 2006 phpBB Group<br />
{TRANSLATION_INFO}<!-- IF DEBUG_OUTPUT --><br />[ {DEBUG_OUTPUT} ]<!-- ENDIF --></span>
<span class="copyright">Powered by <a href="http://www.phpbb.com/" target="_blank">phpBB</a> &copy; 2002, 2006 phpBB Group
{L_TRANSLATION_INFO}<!-- IF DEBUG_OUTPUT --><br />[ {DEBUG_OUTPUT} ]<!-- ENDIF --></span>
</div>
</body>

View file

@ -15,12 +15,6 @@
<form name="register" method="post" action="{S_UCP_ACTION}">
<table width="80%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td class="nav"><a href="{U_INDEX}">{L_INDEX}</a></td>
</tr>
</table>
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th colspan="2" height="28" valign="middle">{L_REGISTRATION}</th>

View file

@ -12,8 +12,8 @@
<!-- BEGIN forumrow -->
<!-- IF forumrow.S_IS_CAT -->
<tr>
<td class="cat" colspan="2"><a class="cattitle" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></td>
<td class="catdiv" colspan="3" align="right">&nbsp;</td>
<td class="cat" colspan="2"><h4><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></h4></td>
<td class="catdiv" colspan="3">&nbsp;</td>
</tr>
<!-- ELSEIF forumrow.S_IS_LINK -->
<tr>