diff options
Diffstat (limited to 'admin/cat_modify.php')
-rw-r--r-- | admin/cat_modify.php | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/admin/cat_modify.php b/admin/cat_modify.php index ff05946d9..4eeeffe42 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -114,27 +114,23 @@ if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) ) //--------------------------------------------------------- form criteria check if (isset($_POST['submit'])) { - $data = - array( - 'id' => $_GET['cat_id'], - 'name' => @$_POST['name'], - 'comment' => - $conf['allow_html_descriptions'] ? - @$_POST['comment'] : strip_tags(@$_POST['comment']), - ); + $data = array( + 'id' => $_GET['cat_id'], + 'name' => @$_POST['name'], + 'comment' => + $conf['allow_html_descriptions'] ? + @$_POST['comment'] : strip_tags(@$_POST['comment']), + ); if ($conf['activate_comments']) { $data['commentable'] = isset($_POST['commentable'])?$_POST['commentable']:'false'; } - - mass_updates( + + single_update( CATEGORIES_TABLE, - array( - 'primary' => array('id'), - 'update' => array_diff(array_keys($data), array('id')) - ), - array($data) + $data, + array('id' => $data['id']) ); // retrieve cat infos before continuing (following updates are expensive) @@ -235,6 +231,7 @@ $template->assign( ) ), + 'U_ADD_PHOTOS_ALBUM' => $base_url.'photos_add&album='.$category['id'], 'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'], 'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify', @@ -252,7 +249,7 @@ if ($category['has_images']) { $template->assign( 'U_MANAGE_ELEMENTS', - $base_url.'batch_manager&cat='.$category['id'] + $base_url.'batch_manager&filter=album-'.$category['id'] ); $query = ' @@ -268,16 +265,16 @@ SELECT if ($min_date == $max_date) { - $intro = sprintf( - l10n('This album contains %d photos, added on %s.'), + $intro = l10n( + 'This album contains %d photos, added on %s.', $image_count, format_date($min_date) ); } else { - $intro = sprintf( - l10n('This album contains %d photos, added between %s and %s.'), + $intro = l10n( + 'This album contains %d photos, added between %s and %s.', $image_count, format_date($min_date), format_date($max_date) @@ -289,7 +286,7 @@ else $intro = l10n('This album contains no photo.'); } -$intro.= '<br>'.sprintf(l10n('Numeric identifier : %d'), $category['id']); +$intro.= '<br>'.l10n('Numeric identifier : %d', $category['id']); $template->assign('INTRO', $intro); |