diff options
author | Nils Adermann <naderman@naderman.de> | 2006-06-20 19:00:30 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-06-20 19:00:30 +0000 |
commit | 4448249a4433c9047b886efe2ec06dce6c4276f8 (patch) | |
tree | c03475df6cdc346279f33f6931c5214055a8db93 | |
parent | c125ae12761e99a0f11703bbbec0defb29ad90c4 (diff) | |
download | forums-4448249a4433c9047b886efe2ec06dce6c4276f8.tar forums-4448249a4433c9047b886efe2ec06dce6c4276f8.tar.gz forums-4448249a4433c9047b886efe2ec06dce6c4276f8.tar.bz2 forums-4448249a4433c9047b886efe2ec06dce6c4276f8.tar.xz forums-4448249a4433c9047b886efe2ec06dce6c4276f8.zip |
- 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
-rw-r--r-- | phpBB/adm/style/acp_forums.html | 10 | ||||
-rw-r--r-- | phpBB/adm/style/overall_footer.html | 3 | ||||
-rw-r--r-- | phpBB/adm/style/simple_footer.html | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 21 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_permissions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 4 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_remind.php | 2 | ||||
-rw-r--r-- | phpBB/language/en/acp/forums.php | 3 | ||||
-rw-r--r-- | phpBB/language/en/common.php | 2 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/overall_footer.html | 4 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/ucp_register.html | 6 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/viewforum_subforum.html | 4 |
12 files changed, 36 insertions, 26 deletions
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index bf4434d972..e596ce73e7 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -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 --> + <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> </fieldset> <div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->> diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 1ca5c4304e..44ff7ccd6a 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -19,8 +19,9 @@ <div id="page-footer"> <!-- IF S_COPYRIGHT_HTML --> Powered by phpBB {VERSION} © 2006 <a href="http://www.phpbb.com/">phpBB Group</a> + {L_TRANSLATION_INFO} <!-- ENDIF --> - + <!-- IF DEBUG_OUTPUT --> <!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF --> {DEBUG_OUTPUT} diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 8dbec6ace3..6ac945912d 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,6 +17,7 @@ <!-- IF S_COPYRIGHT_HTML --> <br />Powered by phpBB {VERSION} © 2006 <a href="http://www.phpbb.com/">phpBB Group</a> + {TRANSLATION_INFO} <!-- ENDIF --> <!-- IF DEBUG_OUTPUT --> diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index ac4112a773..75395d4b81 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -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,8 +480,9 @@ class acp_forums 'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id, 'U_EDIT_ACTION' => $this->u_action . "&parent_id={$this->parent_id}&action=$action&f=$forum_id", - 'L_TITLE' => $user->lang[$this->page_title], - 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '', + '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) : '', 'FORUM_NAME' => $forum_data['forum_name'], 'FORUM_DATA_LINK' => $forum_data['forum_link'], @@ -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, diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 277281497b..5505794999 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -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']) diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index b095b3e286..94e1e0d5cc 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -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, diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 9419684725..6117e50c95 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -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']); diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index ff12e687e8..2087fbf22b 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -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', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index ef9da82592..3b5f6a796f 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -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', diff --git a/phpBB/styles/subSilver/template/overall_footer.html b/phpBB/styles/subSilver/template/overall_footer.html index 136b555331..9288a50415 100644 --- a/phpBB/styles/subSilver/template/overall_footer.html +++ b/phpBB/styles/subSilver/template/overall_footer.html @@ -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> © 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> © 2002, 2006 phpBB Group + {L_TRANSLATION_INFO}<!-- IF DEBUG_OUTPUT --><br />[ {DEBUG_OUTPUT} ]<!-- ENDIF --></span> </div> </body> diff --git a/phpBB/styles/subSilver/template/ucp_register.html b/phpBB/styles/subSilver/template/ucp_register.html index 70a3572ba8..514e088784 100644 --- a/phpBB/styles/subSilver/template/ucp_register.html +++ b/phpBB/styles/subSilver/template/ucp_register.html @@ -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> diff --git a/phpBB/styles/subSilver/template/viewforum_subforum.html b/phpBB/styles/subSilver/template/viewforum_subforum.html index cb152010c5..64a31583ee 100644 --- a/phpBB/styles/subSilver/template/viewforum_subforum.html +++ b/phpBB/styles/subSilver/template/viewforum_subforum.html @@ -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"> </td> + <td class="cat" colspan="2"><h4><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></h4></td> + <td class="catdiv" colspan="3"> </td> </tr> <!-- ELSEIF forumrow.S_IS_LINK --> <tr> |