- Fixes data not being passed to API buildRequest method
This commit is contained in:
@ -22,7 +22,9 @@ class API {
|
|||||||
$this->action = isset($_GET['action']) ?
|
$this->action = isset($_GET['action']) ?
|
||||||
Helpers::underscoreToCamelCase($_GET['action']) :
|
Helpers::underscoreToCamelCase($_GET['action']) :
|
||||||
false;
|
false;
|
||||||
$this->data = self::decodeRequestData($_GET['data']);
|
$this->data = isset($_GET['data']) ?
|
||||||
|
self::decodeRequestData($_GET['data']) :
|
||||||
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
@ -47,7 +49,6 @@ class API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static function decodeRequestData($data) {
|
static function decodeRequestData($data) {
|
||||||
if(!$data) return false;
|
|
||||||
$data = base64_decode($data);
|
$data = base64_decode($data);
|
||||||
return (is_serialized($data)) ?
|
return (is_serialized($data)) ?
|
||||||
unserialize($data) :
|
unserialize($data) :
|
||||||
|
@ -68,6 +68,7 @@ class Links {
|
|||||||
$tracked_link = API::buildRequest(
|
$tracked_link = API::buildRequest(
|
||||||
TrackAPI::ENDPOINT,
|
TrackAPI::ENDPOINT,
|
||||||
TrackAPI::ACTION_CLICK,
|
TrackAPI::ACTION_CLICK,
|
||||||
|
$data,
|
||||||
$encode_data = false
|
$encode_data = false
|
||||||
);
|
);
|
||||||
// first, replace URL in the extracted HTML source with encoded link
|
// first, replace URL in the extracted HTML source with encoded link
|
||||||
|
Reference in New Issue
Block a user