source: branches/version-2_13-dev/data/smarty_extends/block.marquee.php @ 23605

Revision 23605, 654 bytes checked in by kimoto, 12 years ago (diff)

#2448 typo修正・ソース整形・ソースコメントの改善 for 2.13.3

Scrutinizer Auto-Fixes

This patch was automatically generated as part of the following inspection:
 https://scrutinizer-ci.com/g/nobuhiko/EC-CUBE/inspections/d8722894-69a6-4b1b-898d-43618035c60d

Enabled analysis tools:

  • PHP Analyzer
  • PHP PDepend
  • PHP Similarity Analyzer
  • PHP Change Tracking Analyzer
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/**
3 * marqueeタグで囲む。
4 *
5 * DoCoMoの携帯端末の場合はmarqueeを使用しない。
6 *
7 * @return string 出力
8 */
9function smarty_block_marquee($params, $content, &$smarty, &$repeat)
10{
11    // {/marquee}の場合のみ出力する。
12    if ($repeat || !isset($content)) {
13    return null;
14    }
15
16    // 末尾の改行などを取り除く。
17    $content = rtrim($content);
18
19    // marqueeタグを使用しない場合
20    if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE && SC_MobileUserAgent::getCarrier() == 'docomo') {
21    return "<div>\n$content\n</div>\n";
22    }
23
24    return "<marquee>\n$content\n</marquee>\n";
25}
Note: See TracBrowser for help on using the repository browser.