aboutsummaryrefslogtreecommitdiffstats
path: root/admin/picture_modify.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-06-11 14:10:04 +0000
committerplegall <plg@piwigo.org>2005-06-11 14:10:04 +0000
commite851f504acebc9422b79f58da25420666da6e296 (patch)
treef90d0104a9799caa29bcd47d0bd2c6edabcefe79 /admin/picture_modify.php
parent4fedaac43ac404dc50193d6032307697412bb2c9 (diff)
- errors and informations boxes : management centralized in admin.php,
$errors and $infos arrays replaced by $page['errors'] and $page['infos'], special management for admin/update.php (more complex management) git-svn-id: http://piwigo.org/svn/trunk@792 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/picture_modify.php')
-rw-r--r--admin/picture_modify.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index fc2e2eb51..64d6cf04b 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -31,16 +31,15 @@ if(!defined("PHPWG_ROOT_PATH"))
}
include_once(PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
//--------------------------------------------------------- update informations
-$errors = array();
// first, we verify whether there is a mistake on the given creation date
if (isset($_POST['date_creation']) and !empty($_POST['date_creation']))
{
if (!check_date_format($_POST['date_creation']))
{
- array_push($errors, $lang['err_date']);
+ array_push($page['errors'], $lang['err_date']);
}
}
-if (isset($_POST['submit']) and count($errors) == 0)
+if (isset($_POST['submit']) and count($page['errors']) == 0)
{
$query = 'UPDATE '.IMAGES_TABLE.' SET name = ';
if ($_POST['name'] == '')
@@ -160,7 +159,7 @@ $thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
$url_img = PHPWG_ROOT_PATH.'picture.php?image_id='.$_GET['image_id'];
$url_img .= '&amp;cat='.$row['storage_category_id'];
-$date = isset($_POST['date_creation']) && empty($errors)
+$date = isset($_POST['date_creation']) && empty($page['errors'])
?$_POST['date_creation']:date_convert_back(@$row['date_creation']);
$url = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=';
@@ -212,16 +211,6 @@ $template->assign_vars(array(
'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?'.$_SERVER['QUERY_STRING'])
));
-//-------------------------------------------------------------- errors display
-if (count($errors) != 0)
-{
- $template->assign_block_vars('errors',array());
- foreach ($errors as $error)
- {
- $template->assign_block_vars('errors.error',array('ERROR'=>$error));
- }
-}
-
// associate to another category ?
$query = '
SELECT id,name,uppercats,global_rank