improvement issue 0000127&0000301:

o Fix Missing Adviser tests
  o Improve pwg_high , set to is_the_guest default value for enabled_high


git-svn-id: http://piwigo.org/svn/trunk@1106 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2006-03-27 21:19:31 +00:00
commit 51a4de797c
3 changed files with 6 additions and 8 deletions

View file

@ -78,8 +78,8 @@ $navigation.= '</a>';
// +-----------------------------------------------------------------------+
// | virtual categories management |
// +-----------------------------------------------------------------------+
// request to delete a virtual category
if (isset($_GET['delete']) and is_numeric($_GET['delete']))
// request to delete a virtual category / not for an adviser
if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser())
{
delete_categories(array($_GET['delete']));
array_push($page['infos'], $lang['cat_virtual_deleted']);

View file

@ -78,6 +78,7 @@ if ($user['is_the_guest'])
$user['recent_period'] = $conf['recent_period'];
$user['expand'] = $conf['auto_expand'];
$user['show_nb_comments'] = $conf['show_nb_comments'];
$user['enabled_high'] = $conf['newuser_default_enabled_high'];
}
// calculation of the number of picture to display per page

View file

@ -99,7 +99,7 @@ $url_self = duplicate_picture_URL();
* Actions finish by a redirection
*/
if (isset($_GET['action']))
if (isset($_GET['action']) and !is_adviser())
{
switch ($_GET['action'])
{
@ -139,7 +139,7 @@ DELETE FROM '.FAVORITES_TABLE.'
}
case 'set_as_representative' :
{
if (is_admin() and isset($page['category']) and !is_adviser())
if (is_admin() and isset($page['category']))
{
$query = '
UPDATE '.CATEGORIES_TABLE.'
@ -158,11 +158,8 @@ UPDATE '.CATEGORIES_TABLE.'
break;
}
case 'add_to_caddie' :
{
if (!is_adviser())
{
fill_caddie(array($page['image_id']));
}
redirect($url_self);
break;
}