-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathfunctions.php
More file actions
30 lines (25 loc) · 619 Bytes
/
functions.php
File metadata and controls
30 lines (25 loc) · 619 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
// more functions
if (!function_exists('next_ad_int_hash_equals')) {
function next_ad_int_hash_equals($a, $b)
{
$ret = strlen($a) ^ strlen($b);
$ret |= array_sum(unpack("C*", $a ^ $b));
return !$ret;
}
}
if (!function_exists('next_ad_int_angular_ajax_params_to_post')) {
function next_ad_int_angular_ajax_params_to_post()
{
$isAjax = (defined('DOING_AJAX') && DOING_AJAX);
if ($isAjax) {
$params = json_decode(file_get_contents('php://input'), true);
if (empty($params)) {
return;
}
foreach ($params as $paramKey => $paramVal) {
$_POST[$paramKey] = $paramVal;
}
}
}
}