aboutsummaryrefslogtreecommitdiffstats
path: root/admin/picture_modify.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-02-03 15:25:52 +0000
committermistic100 <mistic@piwigo.org>2013-02-03 15:25:52 +0000
commitf7d95017a4c62fa99f85674c6542196640ac48a4 (patch)
tree6a6e0055c3deb1477b209dc280b6b0a07bc02583 /admin/picture_modify.php
parent5b22fcea0eff97187eacd965a54d04d8c2568b6a (diff)
bug:2822 editing photo replaces date_creation time to 00:00:00
git-svn-id: http://piwigo.org/svn/trunk@20531 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/picture_modify.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index e6152988b..033e52139 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -146,7 +146,8 @@ if (isset($_POST['submit']) and count($page['errors']) == 0)
$data{'date_creation'} =
$_POST['date_creation_year']
.'-'.$_POST['date_creation_month']
- .'-'.$_POST['date_creation_day'];
+ .'-'.$_POST['date_creation_day']
+ .' '.$_POST['date_creation_time'];
}
else
{
@@ -349,18 +350,20 @@ unset($day, $month, $year);
if (isset($_POST['date_creation_action'])
and 'set' == $_POST['date_creation_action'])
{
- foreach (array('day', 'month', 'year') as $varname)
+ foreach (array('day', 'month', 'year', 'time') as $varname)
{
$$varname = $_POST['date_creation_'.$varname];
}
}
else if (isset($row['date_creation']) and !empty($row['date_creation']))
{
- list($year, $month, $day) = explode('-', $row['date_creation']);
+ list($year, $month, $day) = explode('-', substr($row['date_creation'],0,10));
+ $time = substr($row['date_creation'],11);
}
else
{
list($year, $month, $day) = array('', 0, 0);
+ $time = '00:00:00';
}
@@ -373,6 +376,7 @@ $template->assign(
'DATE_CREATION_DAY_VALUE' => $day,
'DATE_CREATION_MONTH_VALUE' => $month,
'DATE_CREATION_YEAR_VALUE' => $year,
+ 'DATE_CREATION_TIME_VALUE' => $time,
'month_list' => $month_list,
)
);