[Svn-src-all:2750] [version-2_12-dev 21649] #675 モバイルサイトを使わない場合、パラメータ設定により明示的に利用を制限する
yomoro
admin @ mail.ec-cube.net
2012年 3月 15日 (木) 15:44:22 JST
Subversion committed to /home/svn/open 21649
http://svn.ec-cube.net/open_trac/changeset/21649
┌────────────────────────────┐
│更新者 : yomoro │
│更新日時: 2012-03-15 15:44:21 +0900 (木, 15 3月 2012)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#675 モバイルサイトを使わない場合、パラメータ設定により明示的に利用を制限する
USE_MOBILE === false の場合はページを表示しない形で対処。(PCサイトをそのまま表示する事も考えたが、どちらにせよモバイルでcookieが使えないとサイト閲覧もままならないのでそのまま表示しない形とした。エラー文表示等要検討。)
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_12-dev/data/Smarty/templates/admin/design/subnavi.tpl
U branches/version-2_12-dev/data/class/SC_Display.php
変更: branches/version-2_12-dev/data/Smarty/templates/admin/design/subnavi.tpl
===================================================================
--- branches/version-2_12-dev/data/Smarty/templates/admin/design/subnavi.tpl 2012-03-14 18:49:28 UTC (rev 21648)
+++ branches/version-2_12-dev/data/Smarty/templates/admin/design/subnavi.tpl 2012-03-15 06:44:21 UTC (rev 21649)
@@ -34,6 +34,7 @@
<li<!--{if $tpl_subno == 'up_down'}--> class="on"<!--{/if}--> id="navi-design-add-<!--{$smarty.const.DEVICE_TYPE_PC}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/up_down.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_PC}-->"><span>テンプレート追加</span></a></li>
</ul>
</li>
+<!--{if $smarty.const.USE_MOBILE !== false}-->
<li class="on_level2"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/<!--{$smarty.const.DIR_INDEX_PATH}-->?device_type_id=<!--{$smarty.const.DEVICE_TYPE_MOBILE}-->"><span>モバイル</span></a>
<ul class="level2">
<li<!--{if $tpl_subno == 'layout'}--> class="on"<!--{/if}--> id="navi-design-layout_<!--{$smarty.const.DEVICE_TYPE_MOBILE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/<!--{$smarty.const.DIR_INDEX_PATH}-->?device_type_id=<!--{$smarty.const.DEVICE_TYPE_MOBILE}-->"><span>レイアウト設定</span></a></li>
@@ -45,6 +46,7 @@
<li<!--{if $tpl_subno == 'up_down'}--> class="on"<!--{/if}--> id="navi-design-add-<!--{$smarty.const.DEVICE_TYPE_MOBILE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/up_down.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_MOBILE}-->"><span>テンプレート追加</span></a></li>
</ul>
</li>
+<!--{/if}-->
<li class="on_level2"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/<!--{$smarty.const.DIR_INDEX_PATH}-->?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>スマートフォン</span></a>
<ul class="level2">
<li<!--{if $tpl_subno == 'layout'}--> class="on"<!--{/if}--> id="navi-design-layout-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/<!--{$smarty.const.DIR_INDEX_PATH}-->?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>レイアウト設定</span></a></li>
変更: branches/version-2_12-dev/data/class/SC_Display.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Display.php 2012-03-14 18:49:28 UTC (rev 21648)
+++ branches/version-2_12-dev/data/class/SC_Display.php 2012-03-15 06:44:21 UTC (rev 21649)
@@ -103,8 +103,11 @@
switch ($device) {
case DEVICE_TYPE_MOBILE:
- $this->response->setContentType('text/html');
- $this->setView(new SC_MobileView_Ex());
+ if (USE_MOBILE === false) {
+ exit;
+ }
+ $this->response->setContentType('text/html');
+ $this->setView(new SC_MobileView_Ex());
break;
case DEVICE_TYPE_SMARTPHONE:
$this->setView(new SC_SmartphoneView_Ex());
Svn-src-all メーリングリストの案内