aboutsummaryrefslogtreecommitdiffstats
path: root/admin/batch_manager_global.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-05-17 22:04:36 +0000
committermistic100 <mistic@piwigo.org>2014-05-17 22:04:36 +0000
commit914b6d96d2cae67507ef848a7a229fd5319d7968 (patch)
tree97d0c9f0741ddb6ddee8cfbb20717b6b0fd9b75e /admin/batch_manager_global.php
parentce8a29810abe6f7fdf82043b32ca87ba0f14220c (diff)
feature 3080 : simpler date inputs (one input + fontello + picker selects)
git-svn-id: http://piwigo.org/svn/trunk@28497 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/batch_manager_global.php')
-rw-r--r--admin/batch_manager_global.php33
1 files changed, 7 insertions, 26 deletions
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