[Svn-src-all:3877] [version-2_12-dev 22791] #2230 (携帯用画像変換処理で、画面下部の画像が変換されない)

AMUAMU admin @ mail.ec-cube.net
2013年 5月 1日 (水) 00:50:52 JST


Subversion committed to /home/svn/open 22791
http://svn.ec-cube.net/open_trac/changeset/22791
┌────────────────────────────┐
│更新者 :  AMUAMU                                       │
│更新日時:  2013-05-01 00:50:51 +0900 (水, 01  5月 2013)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#2230 (携帯用画像変換処理で、画面下部の画像が変換されない)
#1596 (Windows環境で、携帯において画像が表示されない場合がある)

breakとcontinueの間違いと思われる部分の改修
preg_replaceの後方参照が間違って適用される場合がある問題の修正

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_12-dev/data/class/SC_MobileImage.php

変更: branches/version-2_12-dev/data/class/SC_MobileImage.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_MobileImage.php	2013-04-29 21:54:04 UTC (rev 22790)
+++ branches/version-2_12-dev/data/class/SC_MobileImage.php	2013-04-30 15:50:51 UTC (rev 22791)
@@ -29,7 +29,7 @@
 /**
  * 画像変換クラス
  */
-class SC_MobileImage 
+class SC_MobileImage
 {
     /**
      * 画像を端末の解像度に合わせて変換する
@@ -99,11 +99,11 @@
             foreach ($images[1] as $key => $path) {
                 // resize_image.phpは除外
                 if (stripos($path, ROOT_URLPATH . 'resize_image.php') !== FALSE) {
-                    break;
+                    continue;
                 }
 
                 $realpath = html_entity_decode($path, ENT_QUOTES);
-                $realpath = preg_replace('|^' . ROOT_URLPATH . '|', HTML_REALDIR, $realpath);
+                $realpath = substr_replace($realpath, HTML_REALDIR, 0, strlen(ROOT_URLPATH));
                 $converted = $imageConverter->execute($realpath);
                 if (isset($converted['outputImageName'])) {
                     $buffer = str_replace($path, MOBILE_IMAGE_URLPATH . $converted['outputImageName'], $buffer);




Svn-src-all メーリングリストの案内