Changeset 17676


Ignore:
Timestamp:
2008/11/01 16:22:26 (15 years ago)
Author:
Seasoft
Message:

merge 17654,17656,17657,17659,17660,17666,17669

Location:
branches/comu-ver2/data
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/SC_MobileImage.php

    r16582 r17676  
    6767            // auはHTMLのbyte数上限に画像ファイルサイズが含まれないのでimageFileSizeのまま。 
    6868            if ($carrier == "docomo" or $carrier == "softbank") { 
    69                 // 計算式:(利用端末で表示可能なcacheサイズ - HTMLのバイト数 - 変換後の画像名のバイト数(目安値) ) / HTML中の画像数 
    70                 $temp_imagefilesize = ($cacheSize - strlen($buffer) - (140 * $result) ) / $result; 
     69                if( $result != false && $result > 0){ 
     70                    // 計算式:(利用端末で表示可能なcacheサイズ - HTMLのバイト数 - 変換後の画像名のバイト数(目安値) ) / HTML中の画像数 
     71                    $temp_imagefilesize = ($cacheSize - strlen($buffer) - (140 * $result) ) / $result; 
     72                } else { 
     73                    // 計算式:(利用端末で表示可能なcacheサイズ - HTMLのバイト数 ) 
     74                    $temp_imagefilesize = ($cacheSize - strlen($buffer) ); 
     75                } 
    7176                // 計算結果が端末の表示可能ファイルサイズ上限より小さい場合は計算結果の値を有効にする 
    7277                if ($temp_imagefilesize < $imageFileSize) { 
  • branches/comu-ver2/data/class/SC_MobileUserAgent.php

    r17581 r17676  
    5050            return 'ezweb'; 
    5151        case 'V': 
     52            return 'softbank'; 
     53        case 'S': 
    5254            return 'softbank'; 
    5355        default: 
  • branches/comu-ver2/data/class/helper/SC_Helper_Mobile.php

    r17605 r17676  
    5656     */ 
    5757    function lfMobileConvertInputValue(&$value) { 
    58         // Shift JIS から内部エンコーディングに変換する。 
    59         // SoftBank 以外の絵文字は外字領域に含まれるため、この段階で除去される。 
    60         $value = mb_convert_encoding($value, CHAR_CODE, 'SJIS'); 
    61  
    62         // SoftBank の絵文字を除去する。 
    63         $value = preg_replace('/\\x1b\\$[^\\x0f]*\\x0f/', '', $value); 
     58        if (is_array($value)) { 
     59            foreach($value as $key => $val ){ 
     60                $this->lfMobileConvertInputValue($value[$key]); 
     61            } 
     62        } else { 
     63            // Shift JIS から内部エンコーディングに変換する。 
     64            $value = mb_convert_encoding($value, CHAR_CODE, 'SJIS'); 
     65            // SoftBank? 以外の絵文字は外字領域に含まれるため、この段階で除去される。 
     66            // SoftBank? の絵文字を除去する。 
     67            $value = preg_replace('/\\x1b\\$[^\\x0f]*\\x0f/', '', $value); 
     68        } 
    6469    } 
    6570 
  • branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php

    r16996 r17676  
    7171 
    7272        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
    73  
    74         $tpl_onload = ""; 
    75  
     73         
    7674        // 現在の階層を取得 
    7775        if($_POST['mode'] != "") { 
     
    144142                    $arrErr['create_file'] = "※ ".$_POST['create_file']."の作成に失敗しました。<br/>"; 
    145143                } else { 
    146                     $tpl_onload .= "alert('フォルダを作成しました。');"; 
     144                    $this->tpl_onload .= "alert('フォルダを作成しました。');"; 
    147145                } 
    148146            } 
     
    155153                $arrErr['upload_file'] = $ret; 
    156154            } else { 
    157                 $tpl_onload .= "alert('ファイルをアップロードしました。');"; 
     155                $this->tpl_onload .= "alert('ファイルをアップロードしました。');"; 
    158156            } 
    159157            break; 
     
    188186        $treeView = "fnTreeView('tree', arrTree, '$now_dir', 'tree_select_file', 'tree_status', 'move');"; 
    189187        if (!empty($this->tpl_onload)) { 
    190             $this->tpl_onload .= $treeView . $tpl_onload; 
     188            $this->tpl_onload .= $treeView; 
    191189        } else { 
    192190            $this->tpl_onload = $treeView; 
  • branches/comu-ver2/data/class/pages/inquiry/LC_Page_Inquiry.php

    r17094 r17676  
    8888 
    8989        if ( ( ! $_POST['mode'] == 'confirm' ) && ( ! is_numeric($_REQUEST['question_id']) ) ){ 
    90             echo "不正アクセス"; 
    91             exit; 
     90            SC_Utils_Ex::sfDispSiteError(PAGE_ERROR); 
    9291        } 
    9392 
     
    9594        $sql = "SELECT question_id, question FROM dtb_question WHERE question_id = ?"; 
    9695        $result = $conn->getAll( $sql, array($_REQUEST['question_id']) ); 
     96        if ( count($result) <= 0 ){ 
     97            SC_Utils_Ex::sfDispSiteError(PAGE_ERROR); 
     98        } 
    9799        $this->QUESTION = $this->lfGetArrInput( unserialize( $result[0]['question'] ) ); 
    98100 
  • branches/comu-ver2/data/class/pages/preview/LC_Page_Preview.php

    r16934 r17676  
    6767            $objView->display(SITE_FRAME); 
    6868        } 
     69        SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", false, "", true); 
    6970    } 
    7071 
  • branches/comu-ver2/data/module/Smarty/libs/plugins/function.html_options.php

    r15532 r17676  
    3131{ 
    3232    require_once $smarty->_get_plugin_filepath('shared','escape_special_chars'); 
    33      
     33 
    3434    $name = null; 
    3535    $values = null; 
     
    3737    $selected = array(); 
    3838    $output = null; 
    39      
     39 
    4040    $extra = ''; 
    41      
     41 
    4242    foreach($params as $_key => $_val) { 
    4343        switch($_key) { 
     
    4545                $$_key = (string)$_val; 
    4646                break; 
    47              
     47 
    4848            case 'options': 
    4949                $$_key = (array)$_val; 
    5050                break; 
    51                  
     51 
    5252            case 'values': 
    5353            case 'output': 
     
    5858                $$_key = array_map('strval', array_values((array)$_val)); 
    5959                break; 
    60                  
     60 
    6161            default: 
    6262                if(!is_array($_val)) { 
     
    7575 
    7676    if (isset($options)) { 
    77          
     77 
    7878        foreach ($options as $_key=>$_val) 
    7979            $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected); 
    8080 
    8181    } else { 
    82          
     82 
    8383        foreach ($values as $_i=>$_key) { 
    8484            $_val = isset($output[$_i]) ? $output[$_i] : ''; 
     
    101101            smarty_function_escape_special_chars($key) . '"'; 
    102102        if (in_array((string)$key, $selected)) 
    103             $_html_result .= ' selected="selected"'; 
     103            $_html_result .= ' selected'; 
    104104        $_html_result .= '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n"; 
    105105    } else { 
Note: See TracChangeset for help on using the changeset viewer.