Changeset 2858 for trunk/system/libraries/Image.php
- Timestamp:
- 06/18/2008 01:21:06 PM (5 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Image.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Image.php
r2667 r2858 284 284 * 285 285 * @throws Kohana_Exception 286 * @param string new image filename 287 * @return object 288 */ 289 public function save($new_image = FALSE) 286 * @param string new image filename 287 * @param integer permissions for new image 288 * @return object 289 */ 290 public function save($new_image = FALSE, $chmod = 0644) 290 291 { 291 292 // If no new image is defined, use the current image … … 302 303 throw new Kohana_Exception('image.directory_unwritable', $dir); 303 304 304 // Process the image with the driver 305 $status = $this->driver->process($this->image, $this->actions, $dir, $file); 305 if ($status = $this->driver->process($this->image, $this->actions, $dir, $file)) 306 { 307 if ($chmod !== FALSE) 308 { 309 // Set permissions 310 chmod($new_image, $chmod); 311 } 312 } 306 313 307 314 // Reset the actions
