Changeset 15383 for branches


Ignore:
Timestamp:
2007/08/28 10:39:18 (17 years ago)
Author:
nanasess
Message:

getLocation() 関数で, $useSSL が escape(デフォルト値) の場合は, 現在のスキーマを適用するように修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/LC_Page.php

    r15348 r15383  
    191191     * @param string $path 結果を取得するためのパス 
    192192     * @param array $param URL に付与するパラメータの配列 
    193      * @param boolean $useSSL 結果に SSL_URL を使用する場合 true, 
     193     * @param mixed $useSSL 結果に SSL_URL を使用する場合 true, 
    194194     *                         SITE_URL を使用する場合 false, 
    195      *                         デフォルト false 
     195     *                         デフォルト "escape" 現在のスキーマを使用 
    196196     * @param string $documentRoot DocumentRoot の文字列. 指定しない場合は, 
    197197     *                              $_SERVER['DOCUMENT_ROOT'] が付与される. 
     
    199199     * @see Net_URL 
    200200     */ 
    201     function getLocation($path, $param = array(), $useSSL = false, $documentRoot = "") { 
     201    function getLocation($path, $param = array(), $useSSL = "escape", $documentRoot = "") { 
    202202 
    203203        // TODO $_SERVER['DOCUMENT_ROOT'] をインストーラでチェックする. 
     
    222222        // 先頭の / を削除 
    223223        $root = substr_replace($root, "", 0, 1); 
    224         if ($useSSL) { 
     224 
     225        // スキーマを定義 
     226        if ($useSSL === true) { 
    225227            $url = SSL_URL . $root; 
     228        } elseif ($useSSL === false){ 
     229            $url = SITE_URL . $root; 
     230        } elseif ($useSSL == "escape") { 
     231            if (SC_Utils_Ex::sfIsHTTPS()) { 
     232                $url = SSL_URL . $root; 
     233            } else { 
     234                $url = SITE_URL . $root; 
     235            } 
    226236        } else { 
    227             $url = SITE_URL . $root; 
     237            die("[BUG] Illegal Parametor of \$useSSL "); 
    228238        } 
    229239 
Note: See TracChangeset for help on using the changeset viewer.