[Slashdotjp-dev 1119] [646] Fix: force mobile mode when ssi=yes and m=1 for prog2file

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2008年 5月 14日 (水) 18:28:16 JST


Revision: 646
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=646
Author:   tach
Date:     2008-05-14 18:28:16 +0900 (Wed, 14 May 2008)

Log Message:
-----------
Fix: force mobile mode when ssi=yes and m=1 for prog2file

Modified Paths:
--------------
    slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm
    slashjp/branches/2.5.0.192/debian/changelog


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm
===================================================================
--- slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm	2008-05-14 05:58:33 UTC (rev 645)
+++ slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm	2008-05-14 09:28:16 UTC (rev 646)
@@ -1625,15 +1625,20 @@
 	$constants->{tweak_japanese} and $user->{aton} = '';
 
 	# mobile theme for slashdot.jp
-	if ($constants->{mobile_enabled} && $ENV{GATEWAY_INTERFACE}) {
+	if ($constants->{mobile_enabled}) {
+		if ($ENV{GATEWAY_INTERFACE}) {
 #print STDERR $r->header_in('user-agent') . " =~ $constants->{mobile_useragent_regex}\n";
-		if ($constants->{mobile_useragent_regex} &&
-		    $r->header_in('user-agent') =~ $constants->{mobile_useragent_regex}) {
-			$user->{mobile} = 1;
+			if ($constants->{mobile_useragent_regex} &&
+			    $r->header_in('user-agent') =~ $constants->{mobile_useragent_regex}) {
+				$user->{mobile} = 1;
 #print STDERR "MOBILE SKIN MATCH: " . $r->header_in('user-agent') . "\n";
-		} elsif ($r->args() =~ m{\bm=[1-9a-zA-Z]}) {
-			$user->{mobile} = 1;
+			} elsif ($r->args() =~ m{\bm=[1-9a-zA-Z]}) {
+				$user->{mobile} = 1;
 #print STDERR "FORCE MOBILE MODE: " . $r->args() . "\n";
+			}
+		} else {
+			$user->{mobile} = 1 if (getCurrentForm('m'));
+			setCurrentForm('m', undef);
 		}
 
 		# settings for mobile mode

Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-05-14 05:58:33 UTC (rev 645)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-05-14 09:28:16 UTC (rev 646)
@@ -1,8 +1,9 @@
 slash (2.5.0.192-13) unstable; urgency=low
 
   * Fix: linkStory() add '?m=1'
+  * Fix: force mobile mode when ssi=yes and m=1 for prog2file
 
- -- Taku YASUI <tach****@osdn*****>  Wed, 14 May 2008 05:57:47 +0000
+ -- Taku YASUI <tach****@osdn*****>  Wed, 14 May 2008 09:27:31 +0000
 
 slash (2.5.0.192-12) unstable; urgency=low
 


Slashdotjp-dev メーリングリストの案内
アーカイブの一覧に戻る