Changeset 16396


Ignore:
Timestamp:
2007/10/12 18:10:03 (16 years ago)
Author:
nanasess
Message:

プレビュー修正

Location:
branches/feature-module-update/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/helper/SC_Helper_PageLayout.php

    r16268 r16396  
    4040        }else{ 
    4141            $arrPageData = $this->lfgetPageData(" page_id = ? " , array("0")); 
     42            $objPage->tpl_mainpage = USER_PATH . "templates/" 
     43                . TEMPLATE_NAME . "/" . $arrPageData[0]['filename'] . ".tpl"; 
    4244        } 
    4345 
  • branches/feature-module-update/data/class/pages/admin/design/LC_Page_Admin_Design.php

    r15829 r16396  
    182182 
    183183                $_SESSION['preview'] = "ON"; 
    184                 $this->sendRedirect($this->getLocation(URL_DIR . "preview/index.php")); 
     184 
     185                $this->sendRedirect($this->getLocation(URL_DIR . "preview/index.php", array("filename" => $arrPageData[0]["filename"]))); 
    185186 
    186187            }else{ 
     
    419420 
    420421        // tplファイルの削除 
    421         $del_tpl = USER_PATH . "templates/" . TEMPLATE_NAME . "/" 
    422             . $arrPreData[0]['filename'] . '.tpl'; 
     422        $del_tpl = USER_PATH . "templates/" . $arrPreData[0]['filename'] . '.tpl'; 
    423423 
    424424        if (file_exists($del_tpl)){ 
     
    426426        } 
    427427 
     428        $tplfile = TEMPLATE_DIR . $arrPageData[0]['filename']; 
     429 
     430        // filename が空の場合にはMYページと判断 
     431        if($arrPageData[0]['filename'] == ""){ 
     432            $tplfile = TEMPLATE_DIR . "mypage/index"; 
     433        } 
     434 
    428435        // プレビュー用tplファイルのコピー 
    429         $tplfile = $arrPageData[0]['tpl_dir'] . $arrPageData[0]['filename']; 
    430  
    431         if($tplfile == ""){ 
    432             // tplファイルが空の場合にはMYページと判断 
    433             $tplfile = "user_data/templates/mypage/index"; 
    434         } 
    435         copy(HTML_PATH . $tplfile . ".tpl", USER_PATH . "templates/" 
     436        copy($tplfile . ".tpl", USER_PATH . "templates/" 
    436437             . TEMPLATE_NAME . "/" . $filename . ".tpl"); 
    437438 
Note: See TracChangeset for help on using the changeset viewer.