diff options
author | plegall <plg@piwigo.org> | 2004-12-25 19:33:36 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2004-12-25 19:33:36 +0000 |
commit | 4c8d18de5b904eddaa900deca20c7d6f7ac928d1 (patch) | |
tree | 0eb36bf58ca6f4ae7018f13ecb64705fc09ca299 /include | |
parent | 30d71ba9cb7870ae2ee2fba58d1bc157159484e5 (diff) |
- user permissions ask update at each admin page generation. Table
user_forbidden must be updated only if current user is not in
administrative section
- bug fixed : category.php, error on page title when non category selected
- admin/search : bug on variable $PHP_SELF, replaced by $_SERVER['PHP_SELF']
- admin/user_perm : inheritence management. When a category become
authorized, all parent categories become authorized, when a category
become forbidden, all child category become forbidden
- no more recursivity in delete_categories function
- new function get_fs_directories for future new method of synchronization
- new function get_uppercat_ids replacing several pieces of code doing the
same
- new function get_fulldirs used for metadata function get_filelist and
future new method of synchronization
- new function get_fs for future new method of synchronization
- typo correction on lang item "about_message"
- no link to category privacy status management on user permission anymore
(giving the menu item instead)
git-svn-id: http://piwigo.org/svn/trunk@657 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/functions_category.inc.php | 10 | ||||
-rw-r--r-- | include/user.inc.php | 14 |
2 files changed, 14 insertions, 10 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 1c04c70d2..287075d43 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -714,7 +714,7 @@ SELECT COUNT(1) AS count } else { - $page['title'] = $lang['diapo_default_page_title']; + $page['title'] = $lang['no_category']; } pwg_debug( 'end initialize_category' ); } @@ -763,10 +763,10 @@ function display_select_cat_wrapper($query, $selecteds, $blockname, $categories = array(); if (!empty($result)) { - while ($row = mysql_fetch_array($result)) - { - array_push($categories, $row); - } + while ($row = mysql_fetch_array($result)) + { + array_push($categories, $row); + } } usort($categories, 'global_rank_compare'); display_select_categories($categories, $selecteds, $blockname, $fullname); diff --git a/include/user.inc.php b/include/user.inc.php index 468eca3f0..635d77fdb 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -120,12 +120,16 @@ if ($user['is_the_guest']) } // if no information were found about user in user_forbidden table OR the -// forbidden categories must be updated -if (!isset($user['need_update']) - or !is_bool($user['need_update']) - or $user['need_update'] == true) +// forbidden categories must be updated : only if current user is in public +// part +if (!defined('IN_ADMIN') or !IN_ADMIN) { - $user['forbidden_categories'] = calculate_permissions($user['id']); + if (!isset($user['need_update']) + or !is_bool($user['need_update']) + or $user['need_update'] == true) + { + $user['forbidden_categories'] = calculate_permissions($user['id']); + } } // forbidden_categories is a must be empty, at least |