Changeset 6890
- Timestamp:
- May 1, 2008, 3:11:12 AM (15 years ago)
- 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 20 20 */ 21 21 var $requests; 22 23 var $source_filename;24 22 25 23 var $generator; … … 100 98 } 101 99 102 $this->set_source_filename();103 100 $this->generator->setOutputFormat($this->requests['f']); 104 $this->generator->setCacheFilename($this-> source_filename, $w, $h);101 $this->generator->setCacheFilename($this->requests['filename'], $w, $h); 105 102 106 103 if ($this->generator->isCacheReadable()) { … … 157 154 } 158 155 } 159 160 /**161 * ソースファイル名(拡張子からフォーマットも)設定162 * @access protected163 */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 }174 156 } 175 157 -
OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img/Generator.php
r6889 r6890 206 206 } 207 207 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 210 213 $f = $this->getOutputFormat(); 211 214 212 215 $this->cache_fullpath = 213 216 $this->cache_dir . '/' . 214 $this->getCachePath($ source_filename, $w, $h, $f);217 $this->getCachePath($filename, $w, $h, $f); 215 218 } 216 219
Note: See TracChangeset
for help on using the changeset viewer.