[xoops-cvslog 197] CVS update: xoops2jp/html/modules/system/admin/tplsets

Back to archive index

onokazu onoka****@users*****
2005年 6月 25日 (土) 00:14:50 JST


Index: xoops2jp/html/modules/system/admin/tplsets/main.php
diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.2 xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.3
--- xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.2	Tue Jun 21 15:11:06 2005
+++ xoops2jp/html/modules/system/admin/tplsets/main.php	Sat Jun 25 00:14:50 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: main.php,v 1.2.6.9.2.2 2005/06/21 06:11:06 minahito Exp $
+// $Id: main.php,v 1.2.6.9.2.3 2005/06/24 15:14:50 onokazu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -197,7 +197,7 @@
             foreach ($notinst_files as $nfile) {
                 if ($nfile != 'index.html') {
                     echo  '<tr><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;">&nbsp;</td><td style="background-color:#FFFF99; padding: 5px;">';
-                    $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/'.$nfile;
+                    $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/'.$nfile;
                     if (file_exists($physical_file)) {
                         echo '[<a href="admin.php?fct=tplsets&amp;moddir='.$moddir.'&amp;tplset='.$tplset.'&amp;op=importtpl&amp;file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]';
                     } else {
@@ -227,7 +227,7 @@
             }
             echo  '<tr class="'.$class.'"><td class="head"><span style="font-weight:bold;">'.$btemplates[$j]->getVar('tpl_file').'</span><br /><br /><span style="font-weight:normal;">'.$btemplates[$j]->getVar('tpl_desc').'</span></td><td>'.formatTimestamp($last_modified, 'l').'</td>';
             $filename = $btemplates[$j]->getVar('tpl_file');
-            $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$filename;
+            $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$filename;
             if ($tplset != 'default') {
                 if (file_exists($physical_file)) {
                     $mtime = filemtime($physical_file);
@@ -257,7 +257,7 @@
             foreach ($bnotinst_files as $nfile) {
                 if ($nfile != 'index.html') {
                     echo  '<tr style="background-color:#FFFF99;"><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;">&nbsp;</td><td style="background-color:#FFFF99; padding: 5px;">';
-                    $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$nfile;
+                    $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$nfile;
                     if (file_exists($physical_file)) {
                         echo '[<a href="admin.php?fct=tplsets&amp;moddir='.$moddir.'&amp;tplset='.$tplset.'&amp;op=importtpl&amp;file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]';
                     } else {
@@ -1083,7 +1083,7 @@
             for ($i = 0; $i < $fcount; $i++) {
                 $newtpl =& $tplfiles[$i]->xoopsClone();
                 $newtpl->setVar('tpl_id', 0);
-                $newtpl->setVar('tpl_tplset', $_POST['tplset']);
+                $newtpl->setVar('tpl_tplset', $tplset);
                 $newtpl->setVar('tpl_lastmodified', time());
                 $newtpl->setVar('tpl_lastimported', 0);
                 if (!$tpltpl_handler->insert($newtpl)) {
@@ -1358,6 +1358,9 @@
         xoops_cp_footer();
         break;
     case 'importtpl_go':
+        if (!xoops_confirm_validate()) {
+            redirect_header('admin.php?fct=tplsets',3,'Ticket Error');
+        }
         $tplset = $_POST['tplset'];
         $moddir = $_POST['moddir'];
         $id = !empty($_POST['id']) ? intval($_POST['id']) : 0;
@@ -1374,10 +1377,10 @@
         if (is_object($tplfile)) {
             switch ($tplfile->getVar('tpl_type')) {
                 case 'module':
-                    $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file');
+                    $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file');
                     break;
                 case 'block':
-                    $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file');
+                    $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file');
                     break;
                 default:
                     break;


xoops-cvslog メーリングリストの案内
Back to archive index