Correctly calls “submit” where it didn’t; fixed a flaw; bumped version to 0.3.6

This commit is contained in:
pezcurrel 2024-01-09 19:55:16 +01:00
parent 6c38b489ff
commit fa6a00ebd3

View file

@ -31,7 +31,7 @@ require 'lib/ght.php';
require 'lib/booltostr.php'; require 'lib/booltostr.php';
const SNAME='Verbose'; const SNAME='Verbose';
const SVERS='0.3.5'; const SVERS='0.3.6';
const SREPO='https://git.lattuga.net/pongrebio/verbose'; const SREPO='https://git.lattuga.net/pongrebio/verbose';
const DEFAC=500; const DEFAC=500;
const MINAC=100; const MINAC=100;
@ -174,7 +174,7 @@ if ($host!==false && $token!==false && trim($token)!='') {// trim($token)!='' is
setcookie('verbose_token',$token,$coopts); setcookie('verbose_token',$token,$coopts);
$myacc=$myacc['data']; $myacc=$myacc['data'];
$loggedin=true; $loggedin=true;
if ($_POST['round']==0 || $_POST['act']=='login') { if ($_POST['round']==0 || (isset($_POST['act']) && $_POST['act']=='login')) {
$res=mastget($host,$token,'/api/v1/instance',$timeout); $res=mastget($host,$token,'/api/v1/instance',$timeout);
if ($res['ok'] && isset($res['data']['configuration']['statuses']['max_characters']) && preg_match('#^\d+$#',$res['data']['configuration']['statuses']['max_characters'])===1) { if ($res['ok'] && isset($res['data']['configuration']['statuses']['max_characters']) && preg_match('#^\d+$#',$res['data']['configuration']['statuses']['max_characters'])===1) {
$avchars=$res['data']['configuration']['statuses']['max_characters']+0; $avchars=$res['data']['configuration']['statuses']['max_characters']+0;
@ -714,7 +714,7 @@ function ckf() {
if (i==len-1) sep='.'; if (i==len-1) sep='.';
msg+='<li>'+msgs[i]+sep+'</li>'; msg+='<li>'+msgs[i]+sep+'</li>';
} }
pmsg.innerHTML=msg+'</ul><p>&nbsp;</p><p class=\"firstp\">Do you want to continue?</p><p>&nbsp;</p><button class=\"halfbutton\" onclick=\"document.mainform.submit();\">Yes</button><button class=\"halfbutton\" onclick=\"swpdisp(\'popup\',\'flex\',\'none\');event.stopPropagation();\">No</button>'; pmsg.innerHTML=msg+'</ul><p>&nbsp;</p><p class=\"firstp\">Do you want to continue?</p><p>&nbsp;</p><button class=\"halfbutton\" onclick=\"document.mainform.submit(true);\">Yes</button><button class=\"halfbutton\" onclick=\"swpdisp(\'popup\',\'flex\',\'none\');event.stopPropagation();\">No</button>';
swpdisp('popup','none','flex'); swpdisp('popup','none','flex');
return false; return false;
} else { } else {