Index: branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php	(revision 19768)
+++ branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php	(revision 19795)
@@ -80,5 +80,5 @@
             $bloc_id = $_REQUEST['bloc_id'];
         } else {
-            $bloc_id = 1;
+            $bloc_id = null;
         }
         $this->bloc_id = $bloc_id;
@@ -93,5 +93,5 @@
 
         $this->objLayout = new SC_Helper_PageLayout_Ex();
-        $package_path = $this->objLayout->getTemplatePath($device_type_id);
+        $package_path = $this->objLayout->getTemplatePath($device_type_id) . BLOC_DIR;
 
         // ブロック一覧を取得
@@ -103,8 +103,8 @@
                                                 array($bloc_id, $device_type_id));
 
-            $arrBlocData[0]['tpl_path'] = $this->objLayout->getTemplatePath($device_type_id) . $arrBlocData[0]['tpl_path'];
+            $tplPath = $package_path . $arrBlocData[0]['filename'] . '.tpl';
 
             // テンプレートファイルの読み込み
-            $arrBlocData[0]['tpl_data'] = file_get_contents($arrBlocData[0]['tpl_path']);
+            $arrBlocData[0]['tpl_data'] = file_get_contents($tplPath);
             $this->arrBlocData = $arrBlocData[0];
         }
@@ -124,7 +124,8 @@
             // ディレクトリの作成
             SC_Utils::sfMakeDir($prev_path);
-            $fp = fopen($prev_path,"w");
-            fwrite($fp, $_POST['bloc_html']); // FIXME いきなり POST はちょっと...
-            fclose($fp);
+            $res = file_put_contents($new_bloc_path, $_POST['bloc_html']);
+            if ($res === false) {
+                SC_Utils_Ex::sfDispException();
+            }
 
             // プレビューデータ表示
@@ -147,16 +148,16 @@
 
                 // 旧ファイルの削除
-                $old_bloc_path = $package_path . $arrBlocData[0]['tpl_path'];
-                if (file_exists($old_bloc_path)) {
-                    unlink($old_bloc_path);
+                if (file_exists($tplPath)) {
+                    unlink($tplPath);
                 }
 
                 // ファイル作成
-                $new_bloc_path = $package_path . BLOC_DIR . $_POST['filename'] . ".tpl";
+                $new_bloc_path = $package_path . $_POST['filename'] . ".tpl";
                 // ディレクトリの作成
                 SC_Utils::sfMakeDir($new_bloc_path);
-                $fp = fopen($new_bloc_path,"w");
-                fwrite($fp, $_POST['bloc_html']); // FIXME いきなり POST はちょっと...
-                fclose($fp);
+                $res = file_put_contents($new_bloc_path, $_POST['bloc_html']);
+                if ($res === false) {
+                    SC_Utils_Ex::sfDispException();
+                }
 
                 $arrBlocData = $this->lfGetBlocData("filename = ? AND device_type_id = ?",
@@ -198,7 +199,6 @@
 
                 // ファイルの削除
-                $del_file = $package_path . BLOC_DIR . $arrBlocData[0]['filename']. '.tpl';
-                if(file_exists($del_file)){
-                    unlink($del_file);
+                if (file_exists($tplPath)) {
+                    unlink($tplPath);
                 }
             }
@@ -254,5 +254,5 @@
         // 更新データ生成
         $arrUpdData = array("bloc_name" => $arrData['bloc_name'],
-                            "tpl_path" => BLOC_DIR . $arrData['filename'] . '.tpl',
+                            "tpl_path" => $arrData['filename'] . '.tpl',
                             "filename" => $arrData['filename']);
 
Index: branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php	(revision 19680)
+++ branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php	(revision 19795)
@@ -44,5 +44,5 @@
     function init() {
         parent::init();
-        $this->tpl_mainpage = "rss/product.tpl";
+        $this->tpl_mainpage = "rss/products.tpl";
         $this->encode = "UTF-8";
         $this->title = "商品一覧情報";
Index: branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php
===================================================================
--- branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php	(revision 19777)
+++ branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php	(revision 19795)
@@ -139,5 +139,5 @@
                         $arrNavi[$key]['php_path'] = HTML_PATH . $val['php_path'];
                     } else {
-                        $arrNavi[$key]['tpl_path'] = $this->getTemplatePath($device_type_id) . $val['tpl_path'];
+                        $arrNavi[$key]['tpl_path'] = $this->getTemplatePath($device_type_id) . BLOC_DIR . $val['tpl_path'];
                     }
                     // phpから呼び出されるか、tplファイルが存在する場合
