Changeset 10157
- Timestamp:
- Apr 8, 2011, 11:09:13 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_upload.inc.php
r9952 r10157 348 348 $update['has_high'] = 'true'; 349 349 $update['high_filesize'] = $high_infos['filesize']; 350 $update['high_width'] = $high_infos['width']; 351 $update['high_height'] = $high_infos['height']; 350 352 } 351 353 else … … 353 355 $update['has_high'] = 'false'; 354 356 $update['high_filesize'] = null; 357 $update['high_width'] = null; 358 $update['high_height'] = null; 355 359 } 356 360 … … 388 392 $insert['has_high'] = 'true'; 389 393 $insert['high_filesize'] = $high_infos['filesize']; 394 $insert['high_width'] = $high_infos['width']; 395 $insert['high_height'] = $high_infos['height']; 390 396 } 391 397 -
trunk/admin/site_reader_local.php
r8728 r10157 155 155 global $conf; 156 156 157 $update_fields = array('filesize', 'width', 'height', 'high_filesize' );157 $update_fields = array('filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height'); 158 158 159 159 if ($conf['use_exif']) … … 200 200 { 201 201 $high_file = dirname($file).'/pwg_high/'.basename($file); 202 203 202 $data['high_filesize'] = floor(filesize($high_file)/1024); 203 204 if ($high_size = @getimagesize($high_file)) 205 { 206 $data['high_width'] = $high_size[0]; 207 $data['high_height'] = $high_size[1]; 208 } 204 209 } 205 210 -
trunk/admin/site_reader_remote.php
r8728 r10157 44 44 ); 45 45 $this->metadata_attributes = array( 46 'filesize', 'width', 'height', 'high_filesize' 46 'filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height', 47 47 ); 48 48 -
trunk/install/piwigo_structure-mysql.sql
r9086 r10157 193 193 `storage_category_id` smallint(5) unsigned default NULL, 194 194 `high_filesize` mediumint(9) unsigned default NULL, 195 `high_width` smallint(9) unsigned default NULL, 196 `high_height` smallint(9) unsigned default NULL, 195 197 `level` tinyint unsigned NOT NULL default '0', 196 198 `md5sum` char(32) default NULL, -
trunk/install/piwigo_structure-pdo-sqlite.sql
r8802 r10157 189 189 "storage_category_id" INTEGER, 190 190 "high_filesize" INTEGER, 191 "high_width" INTEGER, 192 "high_height" INTEGER, 191 193 "level" INTEGER default 0 NOT NULL, 192 194 "md5sum" CHAR(32), -
trunk/install/piwigo_structure-pgsql.sql
r8802 r10157 233 233 "storage_category_id" INTEGER, 234 234 "high_filesize" INTEGER, 235 "high_width" INTEGER, 236 "high_height" INTEGER, 235 237 "level" INTEGER default 0 NOT NULL, 236 238 "md5sum" CHAR(32), -
trunk/install/piwigo_structure-sqlite.sql
r8802 r10157 189 189 "storage_category_id" INTEGER, 190 190 "high_filesize" INTEGER, 191 "high_width" INTEGER, 192 "high_height" INTEGER, 191 193 "level" INTEGER default 0 NOT NULL, 192 194 "md5sum" CHAR(32), -
trunk/picture.php
r10122 r10157 920 920 } 921 921 922 // hd size in pixels 923 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 else 930 { 931 $hi_size = @getimagesize($hi_url); 932 if ($hi_size !== false) 933 { 934 pwg_query(' 935 UPDATE ' . IMAGES_TABLE . ' 936 SET 937 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 922 947 // filesize 923 948 if (!empty($picture['current']['filesize'])) … … 925 950 $infos['INFO_FILESIZE'] = 926 951 sprintf(l10n('%d Kb'), $picture['current']['filesize']); 952 } 953 954 // hd filesize 955 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']); 927 959 } 928 960 -
trunk/tools/create_listing_file.php
r10000 r10157 739 739 $high_file = $file_dir.'/'.$conf['high'].'/'.$file_base; 740 740 $element['high_filesize'] = floor(filesize($high_file) / 1024); 741 742 if ($high_size = @getimagesize($high_file)) 743 { 744 $element['high_width'] = $high_size[0]; 745 $element['high_height'] = $high_size[1]; 746 } 741 747 } 742 748
Note: See TracChangeset
for help on using the changeset viewer.