Changeset 579 for trunk/admin/picture_modify.php
- Timestamp:
- Oct 23, 2004, 7:56:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/picture_modify.php
r577 r579 188 188 $row = mysql_fetch_array(mysql_query($query)); 189 189 190 // some fields are nullable in the images table191 $nullables = array('name','author','keywords','date_creation','comment',192 'width','height');193 foreach ($nullables as $field)194 {195 if (!isset($row[$field]))196 {197 $row[$field] = '';198 }199 }200 201 190 if (empty($row['name'])) 202 191 { … … 211 200 $dir_path = get_cat_display_name($current_category['name'], '->', ''); 212 201 213 // thumbnail url 214 if (isset($row['tn_ext']) and $row['tn_ext'] != '') 215 { 216 $thumbnail_url = get_complete_dir($row['storage_category_id']); 217 $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail']; 218 $thumbnail_url.= get_filename_wo_extension($row['file']); 219 $thumbnail_url.= '.'.$row['tn_ext']; 220 } 221 else 222 { 223 $thumbnail_url = PHPWG_ROOT_PATH; 224 $thumbnail_url = 'template/'.$user['template'].'/mimetypes/'; 225 $thumbnail_url.= strtolower(get_extension($row['file'])).'.png'; 226 } 202 $thumbnail_url = get_thumbnail_src($row['file'], 203 $row['storage_category_id'], 204 @$row['tn_ext']); 227 205 228 206 $url_img = PHPWG_ROOT_PATH.'picture.php?image_id='.$_GET['image_id']; 229 207 $url_img .= '&cat='.$row['storage_category_id']; 230 208 $date = isset($_POST['date_creation']) && empty($errors) 231 ?$_POST['date_creation']:date_convert_back( $row['date_creation']);209 ?$_POST['date_creation']:date_convert_back(@$row['date_creation']); 232 210 233 211 // retrieving all the linked categories … … 258 236 'DEFAULT_NAME_IMG'=>str_replace('_',' ',get_filename_wo_extension($row['file'])), 259 237 'FILE_IMG'=>$row['file'], 260 'NAME_IMG'=>isset($_POST['name'])?$_POST['name']: $row['name'],261 'SIZE_IMG'=> $row['width'].' * '.$row['height'],262 'FILESIZE_IMG'=> $row['filesize'].' KB',238 'NAME_IMG'=>isset($_POST['name'])?$_POST['name']:@$row['name'], 239 'SIZE_IMG'=>@$row['width'].' * '.@$row['height'], 240 'FILESIZE_IMG'=>@$row['filesize'].' KB', 263 241 'REGISTRATION_DATE_IMG'=> format_date($row['date_available']), 264 'AUTHOR_IMG'=>isset($_POST['author'])?$_POST['author']: $row['author'],242 'AUTHOR_IMG'=>isset($_POST['author'])?$_POST['author']:@$row['author'], 265 243 'CREATION_DATE_IMG'=>$date, 266 'KEYWORDS_IMG'=>isset($_POST['keywords'])?$_POST['keywords']: $row['keywords'],267 'COMMENT_IMG'=>isset($_POST['comment'])?$_POST['comment']: $row['comment'],244 'KEYWORDS_IMG'=>isset($_POST['keywords'])?$_POST['keywords']:@$row['keywords'], 245 'COMMENT_IMG'=>isset($_POST['comment'])?$_POST['comment']:@$row['comment'], 268 246 'ASSOCIATED_CATEGORIES'=>$categories, 269 247
Note: See TracChangeset
for help on using the changeset viewer.