Changeset 14143
- Timestamp:
- Apr 14, 2012, 6:52:20 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r13651 r14143 735 735 736 736 $query = ' 737 SELECT id,path,representative_ext,file,filesize,level,name 737 SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation 738 738 FROM '.IMAGES_TABLE; 739 739 -
trunk/include/calendar_monthly.class.php
r12922 r14143 351 351 $page['chronology_date'][CDAY]=$day; 352 352 $query = ' 353 SELECT id, file,representative_ext,path,width, height, '.pwg_db_get_dayofweek($this->date_field).'-1 as dow';353 SELECT id, file,representative_ext,path,width,height,rotation, '.pwg_db_get_dayofweek($this->date_field).'-1 as dow'; 354 354 $query.= $this->inner_sql; 355 355 $query.= $this->get_date_where(); … … 393 393 394 394 list($cell_width, $cell_height) = ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size; 395 if ($cell_width>120) 396 { 397 $cell_width = $cell_height = 120; 398 } 395 399 396 400 $tpl_weeks = array(); -
trunk/include/derivative.inc.php
r13843 r14143 27 27 public $id; 28 28 public $rel_path; 29 public $rotation = 0; 29 30 30 31 private $size=null; … … 59 60 $height = $infos['height']; 60 61 62 $this->rotation = intval($infos['rotation']) % 4; 61 63 // 1 or 5 => 90 clockwise 62 64 // 3 or 7 => 270 clockwise 63 if ($ infos['rotation'] % 2 != 0)65 if ($this->rotation % 2) 64 66 { 65 67 $width = $infos['height']; … … 174 176 if ( $src->has_size() && $params->is_identity( $src->get_size() ) ) 175 177 { 176 // todo - what if we have a watermark maybe return a smaller size? 177 $params = null; 178 $rel_path = $rel_url = $src->rel_path; 179 return; 178 if (!$params->use_watermark && !$src->rotation) 179 { 180 $params = null; 181 $rel_path = $rel_url = $src->rel_path; 182 return; 183 } 184 $defined_types = array_keys(ImageStdParams::get_defined_type_map()); 185 for ($i=0; $i<count($defined_types); $i++) 186 { 187 if ($defined_types[$i] == $params->type) 188 { 189 for ($i--; $i>=0; $i--) 190 { 191 $smaller = ImageStdParams::get_by_type($defined_types[$i]); 192 if ($smaller->sizing->max_crop==$params->sizing->max_crop && $smaller->is_identity( $src->get_size() )) 193 { 194 $params = $smaller; 195 self::build($src, $params, $rel_path, $rel_url, $is_cached); 196 return; 197 } 198 } 199 break; 200 } 201 } 180 202 } 181 203 -
trunk/include/ws_functions.inc.php
r13544 r14143 225 225 } 226 226 227 $query_model = 'SELECT id, path, representative_ext, width, height227 $query_model = 'SELECT id, path, representative_ext, width,height,rotation 228 228 FROM '.IMAGES_TABLE.' 229 229 WHERE '.implode(' AND ', $where_clauses).'
Note: See TracChangeset
for help on using the changeset viewer.