aboutsummaryrefslogtreecommitdiffstats
path: root/admin/batch_manager_unit.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_unit.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 '')
-rw-r--r--admin/batch_manager_unit.php31
1 files changed, 11 insertions, 20 deletions
diff --git a/admin/batch_manager_unit.php b/admin/batch_manager_unit.php
index 0531c866c..068182050 100644
--- a/admin/batch_manager_unit.php
+++ b/admin/batch_manager_unit.php
@@ -76,23 +76,21 @@ SELECT id, date_creation
$data['comment'] = strip_tags(@$_POST['description-'.$row['id']]);
}
- if (isset($_POST['date_creation_action-'.$row['id']]))
+ if (!empty($_POST['date_creation-'.$row['id']]))
{
- if ('set' == $_POST['date_creation_action-'.$row['id']])
+ if (!empty($row['date_creation']))
{
- $data['date_creation'] =
- $_POST['date_creation_year-'.$row['id']]
- .'-'.$_POST['date_creation_month-'.$row['id']]
- .'-'.$_POST['date_creation_day-'.$row['id']];
+ list(, $time) = explode(' ', $row['date_creation']);
}
- else if ('unset' == $_POST['date_creation_action-'.$row['id']])
+ else
{
- $data['date_creation'] = '';
+ $time = '00:00:00';
}
+ $data['date_creation'] = $_POST['date_creation-'.$row['id']].' '.$time;
}
else
{
- $data['date_creation'] = $row['date_creation'];
+ $data['date_creation'] = null;
}
$datas[] = $data;
@@ -128,15 +126,10 @@ $template->set_filenames(
$base_url = PHPWG_ROOT_PATH.'admin.php';
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-
$template->assign(
array(
'U_ELEMENTS_PAGE' => $base_url.get_query_string_diff(array('display','start')),
- 'F_ACTION'=>$base_url.get_query_string_diff(array()),
- 'month_list' => $month_list,
+ 'F_ACTION' => $base_url.get_query_string_diff(array()),
'level_options' => get_privacy_level_options(),
)
);
@@ -232,11 +225,11 @@ SELECT *
// creation date
if (!empty($row['date_creation']))
{
- list($year,$month,$day) = explode('-', $row['date_creation']);
+ list($date) = explode(' ', $row['date_creation']);
}
else
{
- list($year,$month,$day) = array('',0,0);
+ $date = '';
}
$query = '
@@ -267,9 +260,7 @@ SELECT
'AUTHOR' => htmlspecialchars(@$row['author']),
'LEVEL' => !empty($row['level'])?$row['level']:'0',
'DESCRIPTION' => htmlspecialchars(@$row['comment']),
- 'DATE_CREATION_YEAR' => $year,
- 'DATE_CREATION_MONTH' => (int)$month,
- 'DATE_CREATION_DAY' => (int)$day,
+ 'DATE_CREATION' => $date,
'TAGS' => $tag_selection,
)
));