From ba921e3e8f25d8a8c13a732b7aff9a6d4554e9e8 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 29 May 2009 00:19:32 +0000 Subject: [PATCH] Add missing flags for options in previous upgrades. --- docs/upgrades/upgrade_7.7.7-7.7.8.pl | 37 ++++++++++++++++++++++++++++ etc/WebGUI.conf.original | 32 +++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_7.7.7-7.7.8.pl b/docs/upgrades/upgrade_7.7.7-7.7.8.pl index e6b0f2195..3c3117266 100644 --- a/docs/upgrades/upgrade_7.7.7-7.7.8.pl +++ b/docs/upgrades/upgrade_7.7.7-7.7.8.pl @@ -33,6 +33,8 @@ my $session = start(); # this line required # upgrade functions go here messageStateCleanup($session); addOgoneToConfig( $session ); +addSurveyExpressionEngineConfigFlag($session); +addMobileStyleConfig($session); finish($session); # this line required @@ -96,6 +98,41 @@ sub addSurveyExpressionEngineConfigFlag{ print "Done.\n" unless $quiet; } +#---------------------------------------------------------------------------- +sub addMobileStyleConfig { + my $session = shift; + print "\tAdding mobile style user agents to config file... " unless $quiet; + $session->config->set('mobileUserAgents', [ + 'AvantGo', + 'DoCoMo', + 'Vodafone', + 'EudoraWeb', + 'Minimo', + 'UP\.Browser', + 'PLink', + 'Plucker', + 'NetFront', + '^WM5 PIE$', + 'Xiino', + 'iPhone', + 'Opera Mobi', + 'BlackBerry', + 'Opera Mini', + 'HP iPAQ', + 'IEMobile', + 'Profile/MIDP', + 'Smartphone', + 'Symbian ?OS', + 'J2ME/MIDP', + 'PalmSource', + 'PalmOS', + 'Windows CE', + 'Opera Mini', + ]); + print "Done.\n" unless $quiet; +} + + # -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- #---------------------------------------------------------------------------- diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index d54a7d4b4..f9d800dea 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -1030,6 +1030,36 @@ "extrasCdn" : "http://content.example.com/extras", "extrasSsl" : "https://content.example.com/extras", "extrasExclude": ["tinymce", "^blah$"] - } + }, + +#A list of UserAgents of recognized mobile platforms. If useMobileStyle is set in the +#Admin settings, then the mobile style will be used for these browsers. + "mobileUserAgents" : [ + "AvantGo", + "DoCoMo", + "Vodafone", + "EudoraWeb", + "Minimo", + "UP\\.Browser", + "PLink", + "Plucker", + "NetFront", + "^WM5 PIE$", + "Xiino", + "iPhone", + "Opera Mobi", + "BlackBerry", + "Opera Mini", + "HP iPAQ", + "IEMobile", + "Profile/MIDP", + "Smartphone", + "Symbian ?OS", + "J2ME/MIDP", + "PalmSource", + "PalmOS", + "Windows CE", + "Opera Mini" + ], }