summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-05-27 21:56:25 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-05-27 21:56:25 +0000
commitba9a07d36f4c7e63b105158b809a4c5598f13056 (patch)
treedb9b80f0ec42112ff4b7697bea87aa0fc17ac001 /pages
parentf9d736451137081201834e60421816c3fbddcce9 (diff)
downloadvdr-plugin-live-ba9a07d36f4c7e63b105158b809a4c5598f13056.tar.gz
vdr-plugin-live-ba9a07d36f4c7e63b105158b809a4c5598f13056.tar.bz2
- empty display of "last channel" when 0
Diffstat (limited to 'pages')
-rw-r--r--pages/setup.ecpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index 2cde9da..a95f55d 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -1,12 +1,13 @@
<%pre>
#include "setup.h"
+#include "tools.h"
using namespace vdrlive;
using namespace std;
</%pre>
<%args>
- int lastchannel = 0;
+ string lastchannel;
bool useauth = 0;
string login;
string pass;
@@ -21,7 +22,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
}>
<%cpp>
if ( request.getMethod() == "POST") {
- LiveSetup().SetLastChannel(lastchannel);
+ LiveSetup().SetLastChannel(lastchannel != "" ? lexical_cast< int >(lastchannel):0);
LiveSetup().SetUseAuth(useauth);
if (useauth) {
LiveSetup().SetAdminLogin(login);
@@ -32,7 +33,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
LiveSetup().SaveSetup();
}
pageTitle = tr("Setup");
- lastchannel = LiveSetup().GetLastChannel();
+ int ilastchannel = LiveSetup().GetLastChannel();
+ if (ilastchannel == std::numeric_limits< int >::max())
+ lastchannel = "";
+ else
+ lastchannel = lexical_cast<std::string, int>(ilastchannel);
+
login = LiveSetup().GetAdminLogin();
useauth = LiveSetup().UseAuth();
times = LiveSetup().GetTimes();