aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-02-09 21:46:28 +0000
committerplegall <plg@piwigo.org>2005-02-09 21:46:28 +0000
commit10adb2a72cd06cb6017fcb86bc70d7bc6cc7bb94 (patch)
treea6846c1358d274c984fa09372284f6d181f6b3ec /admin
parent1c7a70ff2d9980fed0a0a387bf96e4d7030fe9cc (diff)
- bug fixed : even with a wrong date given, tries to update (should not)
git-svn-id: http://piwigo.org/svn/trunk@732 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/picture_modify.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index b165d28d8..fc2e2eb51 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -40,7 +40,7 @@ if (isset($_POST['date_creation']) and !empty($_POST['date_creation']))
array_push($errors, $lang['err_date']);
}
}
-if (isset($_POST['submit']))
+if (isset($_POST['submit']) and count($errors) == 0)
{
$query = 'UPDATE '.IMAGES_TABLE.' SET name = ';
if ($_POST['name'] == '')
@@ -61,7 +61,7 @@ if (isset($_POST['submit']))
$query.= "'".htmlentities($_POST['comment'],ENT_QUOTES)."'";
$query.= ', date_creation = ';
- if (check_date_format($_POST['date_creation']))
+ if (!empty($_POST['date_creation']))
$query.= "'".date_convert($_POST['date_creation'])."'";
else if ($_POST['date_creation'] == '')
$query.= 'NULL';