Changeset 10160
- Timestamp:
- Apr 8, 2011, 12:51:54 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions.inc.php
r10061 r10160 1247 1247 { 1248 1248 $update['high_filesize'] = $infos['filesize']; 1249 $update['high_width'] = $infos['width']; 1250 $update['high_height'] = $infos['height']; 1249 1251 $update['has_high'] = 'true'; 1250 1252 } … … 1375 1377 $insert['has_high'] = 'true'; 1376 1378 $insert['high_filesize'] = $high_infos['filesize']; 1379 $insert['high_width'] = $high_infos['width']; 1380 $insert['high_height'] = $high_infos['height']; 1377 1381 } 1378 1382 -
trunk/picture.php
r10157 r10160 904 904 905 905 // size in pixels 906 if ($picture['current']['is_picture'] and isset($picture['current']['width']) ) 906 if ($picture['current']['is_picture'] AND $picture['current']['has_high']) 907 { 908 if (!empty($picture['current']['high_width'])) 909 { 910 $infos['INFO_DIMENSIONS'] = $picture['current']['high_width'].'*'.$picture['current']['high_height']; 911 } 912 else if ($hi_size = @getimagesize($hi_url)) 913 { 914 pwg_query(' 915 UPDATE ' . IMAGES_TABLE . ' 916 SET 917 high_width = \'' . $hi_size[0].'\', 918 high_height = \''.$hi_size[1] .'\' 919 WHERE id = ' . $picture['current']['id'] . '; 920 '); 921 922 $infos['INFO_DIMENSIONS'] = $hi_size[0].'*'.$hi_size[1]; 923 } 924 } 925 else if ($picture['current']['is_picture'] and isset($picture['current']['width']) ) 907 926 { 908 927 if ($picture['current']['scaled_width'] !== $picture['current']['width'] ) … … 920 939 } 921 940 922 // hd size in pixels923 if ($picture['current']['is_picture'] AND $picture['current']['has_high'])924 {925 if (!empty($picture['current']['high_width']))926 {927 $infos['INFO_DIMENSIONS'] = $picture['current']['high_width'].'*'.$picture['current']['high_height'];928 }929 else930 {931 $hi_size = @getimagesize($hi_url);932 if ($hi_size !== false)933 {934 pwg_query('935 UPDATE ' . IMAGES_TABLE . '936 SET937 high_width = \'' . $hi_size[0].'\',938 high_height = \''.$hi_size[1] .'\'939 WHERE id = ' . $picture['current']['id'] . ';940 ');941 942 $infos['INFO_DIMENSIONS'] = $hi_size[0].'*'.$hi_size[1];943 }944 }945 }946 947 941 // filesize 948 if (!empty($picture['current']['filesize'])) 942 if ($picture['current']['has_high'] and !empty($picture['current']['high_filesize'])) 943 { 944 $infos['INFO_FILESIZE'] = 945 sprintf(l10n('%d Kb'), $picture['current']['high_filesize']); 946 } 947 else if (!empty($picture['current']['filesize'])) 949 948 { 950 949 $infos['INFO_FILESIZE'] = 951 950 sprintf(l10n('%d Kb'), $picture['current']['filesize']); 952 }953 954 // hd filesize955 if ($picture['current']['has_high'] and !empty($picture['current']['high_filesize']))956 {957 $infos['INFO_FILESIZE'] =958 sprintf(l10n('%d Kb'), $picture['current']['high_filesize']);959 951 } 960 952
Note: See TracChangeset
for help on using the changeset viewer.