Changeset 792 for trunk/admin/thumbnail.php
- Timestamp:
- Jun 11, 2005, 4:10:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/thumbnail.php
r716 r792 32 32 function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext) 33 33 { 34 global $conf, $lang, $ errors;34 global $conf, $lang, $page; 35 35 36 36 $filename = basename($path); … … 101 101 if (!is_writable($dirname)) 102 102 { 103 array_push($errors, '['.$dirname.'] : '.$lang['no_write_access']); 103 array_push($page['errors'], 104 '['.$dirname.'] : '.$lang['no_write_access']); 104 105 return false; 105 106 } … … 115 116 if (!is_writable($tndir)) 116 117 { 117 array_push($ errors, '['.$tndir.'] : '.$lang['no_write_access']);118 array_push($page['errors'], '['.$tndir.'] : '.$lang['no_write_access']); 118 119 return false; 119 120 } … … 149 150 } 150 151 151 $errors = array();152 152 $pictures = array(); 153 153 $stats = array(); … … 248 248 if (isset($_POST['submit'])) 249 249 { 250 $errors = array();251 250 $times = array(); 252 251 $infos = array(); … … 255 254 if (!ereg('^[0-9]{2,3}$', $_POST['width']) or $_POST['width'] < 10) 256 255 { 257 array_push($ errors, $lang['tn_err_width'].' 10');256 array_push($page['errors'], $lang['tn_err_width'].' 10'); 258 257 } 259 258 if (!ereg('^[0-9]{2,3}$', $_POST['height']) or $_POST['height'] < 10) 260 259 { 261 array_push($ errors, $lang['tn_err_height'].' 10');260 array_push($page['errors'], $lang['tn_err_height'].' 10'); 262 261 } 263 262 264 263 // picture miniaturization 265 if (count($ errors) == 0)264 if (count($page['errors']) == 0) 266 265 { 267 266 $num = 1; … … 346 345 } 347 346 // +-----------------------------------------------------------------------+ 348 // | errors display |349 // +-----------------------------------------------------------------------+350 if (count($errors) != 0)351 {352 $template->assign_block_vars('errors',array());353 foreach ($errors as $error)354 {355 $template->assign_block_vars('errors.error',array('ERROR'=>$error));356 }357 }358 // +-----------------------------------------------------------------------+359 347 // | form & pictures without thumbnails display | 360 348 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.