|
@@ -31,7 +31,7 @@ require 'lib/ght.php';
|
|
|
require 'lib/booltostr.php';
|
|
|
|
|
|
const SNAME='Verbose';
|
|
|
-const SVERS='0.3.5';
|
|
|
+const SVERS='0.3.6';
|
|
|
const SREPO='https://git.lattuga.net/pongrebio/verbose';
|
|
|
const DEFAC=500;
|
|
|
const MINAC=100;
|
|
@@ -80,7 +80,7 @@ $debug.='CONF: '.preprint($conf)."<br>\n";
|
|
|
|
|
|
$coopts=[
|
|
|
'expires'=>$now+365*24*60*60,
|
|
|
- 'path'=>preg_replace('#[^/]+$#','',$_SERVER['REQUEST_URI']),
|
|
|
+ 'path'=>preg_replace('#[^/]+$#','',$_SERVER['REQUEST_URI']),
|
|
|
'domain'=>$_SERVER['SERVER_NAME'],
|
|
|
'secure'=>false,
|
|
|
'httponly'=>false,
|
|
@@ -142,7 +142,7 @@ if (isset($_GET['code']) && isset($_COOKIE['verbose_host']) && isset($_COOKIE['v
|
|
|
header('Location: '.$location,true,302);
|
|
|
else
|
|
|
echo "<a href=\"{$location}\">".htmlentities($location)."</a><br>\n";
|
|
|
- exit(0);
|
|
|
+ exit(0);
|
|
|
} else {
|
|
|
$authmsgs.='<div class="error">Sorry, there was an error trying to authorize you: '.htmlentities($res['error'])."</div>\n";
|
|
|
}
|
|
@@ -174,7 +174,7 @@ if ($host!==false && $token!==false && trim($token)!='') {// trim($token)!='' is
|
|
|
setcookie('verbose_token',$token,$coopts);
|
|
|
$myacc=$myacc['data'];
|
|
|
$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);
|
|
|
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;
|
|
@@ -714,7 +714,7 @@ function ckf() {
|
|
|
if (i==len-1) sep='.';
|
|
|
msg+='<li>'+msgs[i]+sep+'</li>';
|
|
|
}
|
|
|
- pmsg.innerHTML=msg+'</ul><p> </p><p class=\"firstp\">Do you want to continue?</p><p> </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> </p><p class=\"firstp\">Do you want to continue?</p><p> </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');
|
|
|
return false;
|
|
|
} else {
|