- Timestamp:
- 2008/03/10 10:42:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php
r17112 r17114 90 90 91 91 // CSSファイルの読み込み 92 if($css_name != '' && file_exists($css_path)){93 $css_data = file_get_contents($css_path);92 if($css_name != ''){ 93 $css_data = $objFileManager->sfReadFile($css_path); 94 94 } 95 95 // テキストエリアに表示 … … 131 131 132 132 function lfExecuteConfirm($css_dir, $css_name, $old_css_name, $css_path) { 133 $objFileManager = new SC_Helper_FileManager_Ex(); 134 133 135 // エラーチェック 134 136 $this->arrErr = $this->lfErrorCheck($_POST, $css_dir); … … 137 139 if (count($this->arrErr) == 0) { 138 140 // 旧ファイルの削除 139 if ($old_css_name != '' && $old_css_name != $css_name && file_exists($css_dir . $old_css_name . '.css')) {140 unlink($css_dir . $old_css_name . '.css');141 if ($old_css_name != '' && $old_css_name != $css_name) { 142 $objFileManager->sfDeleteDir($css_dir . $old_css_name . '.css'); 141 143 } 142 144 // プレビュー用テンプレートに書き込み 143 $fp = fopen($css_path,"w"); // TODO 144 fwrite($fp, $_POST['css']); 145 fclose($fp); 145 $objFileManager->sfWriteFile($css_path, $_POST['css']); 146 146 147 147 $this->tpl_onload="alert('登録が完了しました。');"; … … 152 152 153 153 function lfExecuteDelete($css_path) { 154 $objFileManager = new SC_Helper_FileManager_Ex(); 155 154 156 // css_name が空でない場合にはdeleteを実行 155 if ($_POST['css_name'] !== '' && file_exists($css_path)) {156 unlink($css_path);157 if ($_POST['css_name'] !== '') { 158 $objFileManager->sfDeleteDir($css_path); 157 159 } 158 160 $this->sendRedirect($this->getLocation("./css.php"));
Note: See TracChangeset
for help on using the changeset viewer.