changeset 98:0f00192e64af

Obey userKeyLength site setting here when printing voting login.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 18 Oct 2013 20:30:37 +0300
parents 2f3fd26babed
children 2169c3177f47
files vote.inc.php
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vote.inc.php	Fri Oct 18 20:30:12 2013 +0300
+++ b/vote.inc.php	Fri Oct 18 20:30:37 2013 +0300
@@ -1,5 +1,6 @@
 <?
-$sessionType = "vote";
+$sessionType = "user";
+$userKeyLen = stGetSetting("userKeyLength");
 
 // Check if voting is enabled
 if (!stChkSetting("allowVoting"))
@@ -28,7 +29,7 @@
   " ".stGetFormHiddenInput("goto", "vote")."\n".
   " <div class=\"votectrl\">\n".
   "  Enter your vote key:\n".
-  "  ".stGetFormTextInput(30, 30, "key", "", "", stGetSessionItem("key"), "autocomplete=\"off\"")."\n".
+  "  ".stGetFormTextInput($userKeyLen > 30 ? $userKeyLen : 30, $userKeyLen, 30, "key", "", "", stGetSessionItem("key"), "autocomplete=\"off\"")."\n".
   "  ".stGetFormSubmitInput("login", "Login")."\n".
   " </div>\n".
   "</form>\n";