Changeset 7660
- Timestamp:
- Jul 9, 2008, 3:16:12 AM (13 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
r7639 r7660 204 204 * @param int $h 205 205 * @param string $format 206 * @param string $suffix 206 207 * @return string 207 208 */ 208 function get_cache_path($filename, $w, $h, $format) 209 { 210 $prefix = OPENPNE_IMG_CACHE_PREFIX; 211 212 $filename = $prefix . str_replace('.', '_', $filename) . '.' . $format; 213 if ($w && $h) { 214 $path = sprintf('%s/w%d_h%d/%s', $format, $w, $h, $filename); 215 } else { 216 $path = sprintf('%s/w_h/%s', $format, $filename); 217 } 218 219 return $path; 209 function get_cache_path($filename, $w, $h, $format, $suffix = '') 210 { 211 return OpenPNE_Img_Cache::getCachePath($filename, $w, $h, $format, $suffix); 220 212 } 221 213 -
OpenPNE/branches/work/ebihara/prj_renew_OpenPNE_Img/webapp/lib/OpenPNE/Img/Cache.php
r7659 r7660 86 86 } 87 87 88 /** 89 * ファイル名、画像サイズ、画像フォーマットからキャッシュパスを取得 90 * 91 * @static 92 * @param string $filename 93 * @param int $width 94 * @param int $height 95 * @param string $format 96 * @param string $suffix 97 * @return string 98 */ 99 function getCachePath($filename, $width, $height, $format, $suffix = '') 100 { 101 $prefix = OPENPNE_IMG_CACHE_PREFIX; 102 103 $filename = $prefix . str_replace('.', '_', $filename) . '.' . $format; 104 if ($width && $height) { 105 $path = sprintf('%s/w%d_h%d%s/%s', $format, $width, $height, $suffix, $filename); 106 } else { 107 $path = sprintf('%s/w_h%s/%s', $format, $suffix, $filename); 108 } 109 110 return $path; 111 } 88 112 } 89 113
Note: See TracChangeset
for help on using the changeset viewer.