[Svn-src-all:898] [version-2_5-dev 19786] スマートフォン、モバイルでのresize_image.phpのリダイレクト防止
yomoro
admin @ mail.ec-cube.net
2010年 12月 29日 (水) 15:11:36 JST
Subversion committed to /home/svn/open 19786
http://svn.ec-cube.net/open_trac/changeset/19786
┌────────────────────────────┐
│更新者 : yomoro │
│更新日時: 2010-12-29 15:11:36 +0900 (水, 29 12月 2010)│
└────────────────────────────┘
Log:
--------------------------------------------------------
スマートフォン、モバイルでのresize_image.phpのリダイレクト防止
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_5-dev/html/require.php
変更: branches/version-2_5-dev/html/require.php
===================================================================
--- branches/version-2_5-dev/html/require.php 2010-12-29 04:10:01 UTC (rev 19785)
+++ branches/version-2_5-dev/html/require.php 2010-12-29 06:11:36 UTC (rev 19786)
@@ -29,11 +29,20 @@
define('FRONT_FUNCTION_PC_SITE', true);
require_once HTML_PATH . HTML2DATA_DIR . 'require_base.php';
+if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) {
+ $path = $matches[1];
+ } else {
+ $path = '';
+}
+
+if(!preg_match("/resize_image.php/i", $path)) {
// 携帯端末の場合、モバイルサイトへリダイレクトする
SC_MobileUserAgent::sfAutoRedirectMobileSite();
// スマートフォンの場合、リダイレクト
SC_SmartphoneUserAgent::sfAutoRedirectSmartphoneSite();
+exit;
+}
// 絵文字変換 (除去) フィルターを組み込む。
ob_start(array('SC_MobileEmoji', 'handler'));
Svn-src-all メーリングリストの案内