OSDN Git Service

アウトラインプラグインのページ指定対応
[fswiki/fswiki.git] / wiki.cgi
index 2b671a5..54ef377 100644 (file)
--- a/wiki.cgi
+++ b/wiki.cgi
@@ -47,7 +47,7 @@ my $cgi = $wiki->get_CGI();
 Util::override_die();
 eval {
        # SessionÍѥǥ£¥ì¥¯¥È¥ê¤ÏFarm¤Ç¤â¶¦Ä̤˻ÈÍѤ¹¤ë
-       $wiki->config('session_dir',$wiki->config('log_dir'));
+       $wiki->config('session_dir',$wiki->config('log_dir')) if (!$wiki->config('session_dir'));
        
        #==============================================================================
        # Farm¤È¤·¤ÆÆ°ºî¤¹¤ë¾ì¹ç
@@ -95,6 +95,8 @@ eval {
                $wiki->config('tmpl_dir')."/site/".$config->{site_tmpl_theme}."/".$config->{site_tmpl_theme}.".tmpl");
        $wiki->config('site_handyphone_tmpl',
                $wiki->config('tmpl_dir')."/site/".$config->{site_tmpl_theme}."/".$config->{site_tmpl_theme}."_handyphone.tmpl");
+       $wiki->config('site_smartphone_tmpl',
+               $wiki->config('tmpl_dir')."/site/".$config->{site_tmpl_theme}."/".$config->{site_tmpl_theme}."_smartphone.tmpl");
 
        #==============================================================================
        # ¥¿¥¤¥à¥¢¥¦¥È¤·¤Æ¤¤¤ë¥»¥Ã¥·¥ç¥ó¤òÇË´þ
@@ -138,8 +140,10 @@ eval {
        my $is_smartphone = &Util::smartphone();
        my $template_name = "";
 
-       if ($is_handyphone || $is_smartphone) {
+       if ($is_handyphone) {
                $template_name = 'site_handyphone_tmpl';
+       } elsif ($is_smartphone) {
+               $template_name = 'site_smartphone_tmpl';
        } else {
                $template_name = 'site_tmpl';
        }
@@ -241,7 +245,7 @@ eval {
                IS_LOGIN => defined($login)
        );
 
-       if ($is_handyphone || $is_smartphone) {
+       if ($is_handyphone) {
                # ·ÈÂÓÅÅÏÃÍѽèÍý
                $output = $template->output;
                &Jcode::convert(\$output,"sjis");
@@ -292,7 +296,7 @@ eval {
        # ½ÐÎϽèÍý
        #------------------------------------------------------------------------------
        # ¥Ø¥Ã¥À¤Î½ÐÎÏ
-       if($is_handyphone || $is_smartphone){
+       if($is_handyphone){
                print "Content-Type: text/html;charset=Shift_JIS\n";
        } else {
                print "Content-Type: text/html;charset=EUC-JP\n";