- new : maintenance screen in administration. There you can update
categories informations (number of images, date of the last added element), update images informations (path, average rate), purge obsolete sessions, purge history. - new : ability to have random representative for categories. This configuration parameter is set to false by default. - new : ability to set an element as representative of a category without belonging to the category. Thus, administrator can choose representative even for empty categories. - improvement : semantically superior design for category edition screen by regrouping fields in fieldsets. The improved screen contains action buttons as in category list screen. - new : ability to move a virtual category (ie change its parent category). - bug fixed : the sync_users function checks all user children tables (access, cache, group association). git-svn-id: http://piwigo.org/svn/trunk@809 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
273884a652
commit
1549745402
14 changed files with 912 additions and 179 deletions
|
|
@ -72,6 +72,16 @@ UPDATE '.CATEGORIES_TABLE.'
|
|||
set_cat_status($_POST['cat_true'], 'private');
|
||||
break;
|
||||
}
|
||||
case 'representative' :
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.CATEGORIES_TABLE.'
|
||||
SET representative_picture_id = NULL
|
||||
WHERE id IN ('.implode(',', $_POST['cat_true']).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (isset($_POST['trueify'])
|
||||
|
|
@ -110,6 +120,13 @@ UPDATE '.CATEGORIES_TABLE.'
|
|||
set_cat_status($_POST['cat_false'], 'public');
|
||||
break;
|
||||
}
|
||||
case 'representative' :
|
||||
{
|
||||
// theoretically, all categories in $_POST['cat_false'] contain at
|
||||
// least one element, so PhpWebGallery can find a representant.
|
||||
set_random_representant($_POST['cat_false']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
@ -178,7 +195,6 @@ SELECT id,name,uppercats,global_rank
|
|||
'L_CAT_OPTIONS_INFO' => $lang['cat_upload_info'],
|
||||
)
|
||||
);
|
||||
$template->assign_block_vars('upload', array());
|
||||
break;
|
||||
}
|
||||
case 'comments' :
|
||||
|
|
@ -201,7 +217,6 @@ SELECT id,name,uppercats,global_rank
|
|||
'L_CAT_OPTIONS_INFO' => $lang['cat_comments_info'],
|
||||
)
|
||||
);
|
||||
$template->assign_block_vars('comments', array());
|
||||
break;
|
||||
}
|
||||
case 'visible' :
|
||||
|
|
@ -224,7 +239,6 @@ SELECT id,name,uppercats,global_rank
|
|||
'L_CAT_OPTIONS_INFO' => $lang['cat_lock_info'],
|
||||
)
|
||||
);
|
||||
$template->assign_block_vars('visible', array());
|
||||
break;
|
||||
}
|
||||
case 'status' :
|
||||
|
|
@ -247,7 +261,29 @@ SELECT id,name,uppercats,global_rank
|
|||
'L_CAT_OPTIONS_INFO' => $lang['cat_status_info'],
|
||||
)
|
||||
);
|
||||
$template->assign_block_vars('status', array());
|
||||
break;
|
||||
}
|
||||
case 'representative' :
|
||||
{
|
||||
$query_true = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE representative_picture_id IS NOT NULL
|
||||
;';
|
||||
$query_false = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE nb_images != 0
|
||||
AND representative_picture_id IS NULL
|
||||
;';
|
||||
$template->assign_vars(
|
||||
array(
|
||||
'L_CAT_TITLE' => l10n('Representative'),
|
||||
'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
|
||||
'L_CAT_OPTIONS_FALSE' => l10n('randomly represented'),
|
||||
'L_CAT_OPTIONS_INFO' => l10n('')
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue