[Slim-Checkins] r10621 - in /trunk/server: HTML/EN/settings/performance.html Slim/Web/Setup.pm

kdf at svn.slimdevices.com kdf at svn.slimdevices.com
Tue Nov 7 21:44:49 PST 2006


Author: kdf
Date: Tue Nov  7 21:44:49 2006
New Revision: 10621

URL: http://svn.slimdevices.com?rev=10621&view=rev
Log:
Bug: n/a
Description: rework control of the appearance of the forking prefs, only handle http port change message when the pref actually changes


Modified:
    trunk/server/HTML/EN/settings/performance.html
    trunk/server/Slim/Web/Setup.pm

Modified: trunk/server/HTML/EN/settings/performance.html
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/settings/performance.html?rev=10621&r1=10620&r2=10621&view=diff
==============================================================================
--- trunk/server/HTML/EN/settings/performance.html (original)
+++ trunk/server/HTML/EN/settings/performance.html Tue Nov  7 21:44:49 2006
@@ -74,7 +74,7 @@
 
 		</select>
 
-		[% IF forkedWeb.size %]
+		[% IF forkingPrefs %]
 		<div class="prefHead">[% "SETUP_FORKEDWEB" | string | upper %]</div>
 		<div class="prefDesc">[% "SETUP_FORKEDWEB_DESC" | string %]</div>
 
@@ -84,9 +84,7 @@
 			<option [% IF forkedWeb %]selected [% END %]value="1">[% 'SETUP_FORKEDWEB_ENABLE' | getstring %]</option>
 		
 		</select>
-		[% END %]
-
-		[% IF forkedStreaming.size %]
+		
 		<div class="prefHead">[% "SETUP_FORKEDSTREAMING" | string | upper %]</div>
 		<div class="prefDesc">[% "SETUP_FORKEDSTREAMING_DESC" | string %]</div>
 

Modified: trunk/server/Slim/Web/Setup.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Web/Setup.pm?rev=10621&r1=10620&r2=10621&view=diff
==============================================================================
--- trunk/server/Slim/Web/Setup.pm (original)
+++ trunk/server/Slim/Web/Setup.pm Tue Nov  7 21:44:49 2006
@@ -1730,13 +1730,15 @@
 		push @prefs,
 			'forkedWeb',
 			'forkedStreaming';
+		
+		$paramRef->{'forkingPrefs'} = 1;
 	}
 
 	# If this is a settings update
 	if ($paramRef->{'submit'}) {
 
 		for my $pref (@prefs) {
-			Slim::Utils::Prefs::set($pref,    $paramRef->{$pref});
+			Slim::Utils::Prefs::set($pref,    $paramRef->{$pref}) if $paramRef->{$pref};
 		}
 	}
 
@@ -1822,6 +1824,12 @@
 	if ($paramRef->{'submit'}) {
 
 		$paramRef->{'warning'} = "";
+
+		if ($paramRef->{'httpport'} ne Slim::Utils::Prefs::get('httpport')) {
+			Slim::Utils::Prefs::set('httpport', $paramRef->{'httpport'});
+			$paramRef->{'warning'} .= string("SETUP_HTTPPORT_OK").'<blockquote><a target="_top" href="'.Slim::Utils::Prefs::homeURL().'">'
+								. Slim::Utils::Prefs::homeURL()."</a></blockquote><br>";
+		}
 
 		for my $pref (@prefs) {
 
@@ -1847,10 +1855,6 @@
 
 			Slim::Utils::Prefs::set($pref,    $paramRef->{$pref}) if $paramRef->{$pref};
 
-			if ($pref eq 'httpport' && $paramRef->{'httpport'}) {
-				$paramRef->{'warning'} .= string("SETUP_HTTPPORT_OK").'<blockquote><a target="_top" href="'.Slim::Utils::Prefs::homeURL().'">'
-									. Slim::Utils::Prefs::homeURL()."</a></blockquote><br>";
-			}
 		}
 	}
 



More information about the checkins mailing list