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

Changeset 6890


Ignore:
Timestamp:
May 1, 2008, 3:11:12 AM (11 years ago)
Author:
ebihara
Message:

OpenPNE_Img::set_source_filename()をOpenPNE_Img_Generator::setCacheFileName()に吸収

Location:
OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img.php

    r6889 r6890  
    2020     */
    2121    var $requests;
    22 
    23     var $source_filename;
    2422
    2523    var $generator;
     
    10098        }
    10199
    102         $this->set_source_filename();
    103100        $this->generator->setOutputFormat($this->requests['f']);
    104         $this->generator->setCacheFilename($this->source_filename, $w, $h);
     101        $this->generator->setCacheFilename($this->requests['filename'], $w, $h);
    105102
    106103        if ($this->generator->isCacheReadable()) {
     
    157154        }
    158155    }
    159 
    160     /**
    161      * ソースファイル名(拡張子からフォーマットも)設定
    162      * @access protected
    163      */
    164     function set_source_filename()
    165     {
    166         if ($this->requests['filename']) {
    167             //DBから取得する場合
    168             $this->source_filename = $this->requests['filename'];
    169         }
    170 
    171         $pieces = explode('.', $this->source_filename);
    172         $this->generator->setSourceFormat($this->generator->checkFormatString(array_pop($pieces)));
    173     }
    174156}
    175157
  • OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img/Generator.php

    r6889 r6890  
    206206    }
    207207
    208     function setCacheFileName($source_filename, $w, $h)
    209     {
     208    function setCacheFileName($filename, $w, $h)
     209    {
     210        $pieces = explode('.', $filename);
     211        $this->setSourceFormat($this->checkFormatString(array_pop($pieces)));
     212
    210213        $f = $this->getOutputFormat();
    211214
    212215        $this->cache_fullpath =
    213216                 $this->cache_dir . '/' .
    214                  $this->getCachePath($source_filename, $w, $h, $f);
     217                 $this->getCachePath($filename, $w, $h, $f);
    215218    }
    216219
Note: See TracChangeset for help on using the changeset viewer.