Changeset 13843 for trunk/i.php
- Timestamp:
- Apr 1, 2012, 2:02:36 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/i.php
r13736 r13843 445 445 try 446 446 { 447 $query = 'SELECT coi, width, height FROM '.$prefixeTable.'images WHERE path=\''.$page['src_location'].'\''; 447 $query = ' 448 SELECT 449 id, 450 coi, 451 width, 452 height, 453 rotation 454 FROM '.$prefixeTable.'images 455 WHERE path=\''.$page['src_location'].'\' 456 ;'; 457 448 458 if ( ($row=pwg_db_fetch_assoc(pwg_query($query))) ) 449 459 { … … 453 463 } 454 464 $page['coi'] = $row['coi']; 465 466 include_once(PHPWG_ROOT_PATH . 'admin/include/image.class.php'); 467 468 if (empty($row['rotation'])) 469 { 470 $page['rotation_angle'] = pwg_image::get_rotation_angle($page['src_path']); 471 472 single_update( 473 $prefixeTable.'images', 474 array('rotation' => pwg_image::get_rotation_code_from_angle($page['rotation_angle'])), 475 array('id' => $row['id']) 476 ); 477 } 478 else 479 { 480 $page['rotation_angle'] = pwg_image::get_rotation_angle_from_code($row['rotation']); 481 } 482 455 483 } 456 484 if (!$row) … … 472 500 ierror("dir create error", 500); 473 501 } 474 475 include_once(PHPWG_ROOT_PATH . 'admin/include/image.class.php');476 502 477 503 ignore_user_abort(true); … … 483 509 $changes = 0; 484 510 485 // todo rotate 511 // rotate 512 if (0 != $page['rotation_angle']) 513 { 514 $image->rotate($page['rotation_angle']); 515 } 486 516 487 517 // Crop & scale … … 555 585 $image->strip(); 556 586 } 587 557 588 $image->set_compression_quality( $params->quality ); 558 589 $image->write( $page['derivative_path'] );
Note: See TracChangeset
for help on using the changeset viewer.