From 914b6d96d2cae67507ef848a7a229fd5319d7968 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 17 May 2014 22:04:36 +0000 Subject: feature 3080 : simpler date inputs (one input + fontello + picker selects) git-svn-id: http://piwigo.org/svn/trunk@28497 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager_global.php | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'admin/batch_manager_global.php') diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index 3268ea278..1d72e2e2d 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -286,17 +286,14 @@ DELETE // date_creation if ('date_creation' == $action) { - $date_creation = sprintf( - '%u-%u-%u', - $_POST['date_creation_year'], - $_POST['date_creation_month'], - $_POST['date_creation_day'] - ); - - if (isset($_POST['remove_date_creation'])) + if (isset($_POST['remove_date_creation']) || empty($_POST['date_creation'])) { $date_creation = null; } + else + { + $date_creation = $_POST['date_creation'].' 00:00:00'; + } $datas = array(); foreach ($collection as $image_id) @@ -567,24 +564,8 @@ if (count($page['cat_elements_id']) > 0) } // creation date -$day = -empty($_POST['date_creation_day']) ? date('j') : $_POST['date_creation_day']; - -$month = -empty($_POST['date_creation_month']) ? date('n') : $_POST['date_creation_month']; - -$year = -empty($_POST['date_creation_year']) ? date('Y') : $_POST['date_creation_year']; - -$month_list = $lang['month']; -$month_list[0]='------------'; -ksort($month_list); -$template->assign( array( - 'month_list' => $month_list, - 'DATE_CREATION_DAY' => (int)$day, - 'DATE_CREATION_MONTH'=> (int)$month, - 'DATE_CREATION_YEAR' => (int)$year, - ) +$template->assign('DATE_CREATION', + empty($_POST['date_creation']) ? date('y-n-j') : $_POST['date_creation'] ); // image level options -- cgit v1.2.3