ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12949


Ignore:
Timestamp:
Sep 25, 2009, 1:29:16 PM (10 years ago)
Author:
ebihara
Message:

[sfImageHandlerPlugin] merged changes from goto_doctrine branch

Location:
OpenPNE3/plugins/sfImageHandlerPlugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/sfImageHandlerPlugin/trunk/lib/image/sfImageHandler.class.php

    r10095 r12949  
    4040    if (isset($options['filename']))
    4141    {
    42       $this->storage = FilePeer::retrieveByFilename($options['filename']);
     42      $this->storage = Doctrine::getTable('File')->retrieveByFilename($options['filename']);
    4343    }
    4444
     
    4949  public function createImage()
    5050  {
    51     $fp = $this->storage->getFileBin()->getBin();
    52     $contents = stream_get_contents($fp);
     51    $contents = $this->storage->getFileBin()->getBin();
    5352
    5453    $info = $this->generator->resize($contents, $this->storage->getImageFormat());
  • OpenPNE3/plugins/sfImageHandlerPlugin/trunk/modules/image/actions/actions.class.php

    r9820 r12949  
    3232    $this->forward404Unless($image->isValidSource(), 'Invalid URL.');
    3333
    34     $this->getResponse()->setContentType($image->getContentType());
    3534    $binary = $image->createImage();
    36     return $this->renderText($binary);
     35
     36    header('Content-Type:'.$image->getContentType());
     37    echo $binary;
     38
     39    exit;
    3740  }
    3841}
Note: See TracChangeset for help on using the changeset viewer.