fixed log-password bugs

This commit is contained in:
following
2013-07-26 18:17:57 +02:00
parent b7a165a1d1
commit 743b708b74
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ class cache
// TODO: use prepared one way hash
function validateLogPW($nLogType, $sLogPW)
{
if ($sLogPW == '')
if (!$this->requireLogPW())
return true;
if (sql_value("SELECT `require_password` FROM `log_types` WHERE `id`='&1'", 0, $nLogType) == 0)
+1 -1
View File
@@ -260,7 +260,7 @@
$tpl->assign('masslog', cachelog::isMasslogging($user->getUserId()) && $suppressMasslogWarning == 0);
// show number of found on log page
$tpl->assign('showstatfounds', $user->showStatFounds());
$tpl->assign('logpw', $cache->requireLogPW());
}
else
{
+1 -1
View File
@@ -180,7 +180,7 @@ function _chkFound () {
{if $logpw}
<tr>
<td colspan="2">{t}passwort to log:{/t}
<input class="input100" type="text" name="log_pw" maxlength="20" value="" /> {if $validate.pwOk==false}<span class="errormsg">{t}Invalid password!{/t}</span>{else}({if $cachetype==6}{t}only for attended-logs{/t}{else}{t}only for found logs{/t}{/if}){/if}
<input class="input100" type="text" name="log_pw" maxlength="20" value="" /> {if !$validate.logPw}<span class="errormsg">{t}Invalid password!{/t}</span>{else}({if $cachetype==6}{t}only for attended-logs{/t}{else}{t}only for found logs{/t}{/if}){/if}
</td>
</tr>
<tr><td class="spacer" colspan="2"></td></tr>