Fixing https call for synchronous ajax request

This commit is contained in:
2016-03-21 20:36:59 +01:00
parent f3d4e01779
commit 9b0d1d0cb9
3 changed files with 4 additions and 3 deletions

View File

@@ -471,7 +471,8 @@ class Databap extends PhpObject
'versionHtml'=>$this->getItemBlock(), 'versionHtml'=>$this->getItemBlock(),
'types'=>$this->getTypeInfo('title'), 'types'=>$this->getTypeInfo('title'),
'msg_types'=>self::$MESSAGE_TYPES, 'msg_types'=>self::$MESSAGE_TYPES,
'cur_date'=>date(self::DATE_FORMAT)); 'cur_date'=>date(self::DATE_FORMAT),
'serv_name'=>$_GET['serv_name']);
$oPage->setTag('constants', $this->jsonConvert($asConstants)); $oPage->setTag('constants', $this->jsonConvert($asConstants));
//Variables //Variables

View File

@@ -41,7 +41,7 @@ class ToolBox
//Add Server Name //Add Server Name
$sServerName = array_key_exists('SERVER_NAME', $_SERVER)?$_SERVER['SERVER_NAME']:$_SERVER['PWD']; $sServerName = array_key_exists('SERVER_NAME', $_SERVER)?$_SERVER['SERVER_NAME']:$_SERVER['PWD'];
$sAppPath = $_SERVER['REQUEST_SCHEME'].str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME'])); $sAppPath = $_SERVER['REQUEST_SCHEME'].'://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME']));
$_GET['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':''); $_GET['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':'');
} }

2
jquery/databap.js vendored Normal file → Executable file
View File

@@ -433,7 +433,7 @@ function Databap()
return $.ajax return $.ajax
( (
{ {
url: self.consts.process_url, url: self.consts.serv_name+self.consts.process_url,
type: "GET", type: "GET",
data: vars, data: vars,
dataType: "html", dataType: "html",