|
|
|
@ -44,6 +44,16 @@ function fulcrm_apiv2_prevent_loop( $headers ) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fulcrm_apiv2_url_to_type( $url ) {
|
|
|
|
|
preg_match( '/https:\/\/[^\/]+\/api\/v2\/([a-z_0-9]+)\/([0-9]+)?\//', $url, $matches );
|
|
|
|
|
return $matches[ 1 ];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fulcrm_apiv2_url_to_pk( $url ) {
|
|
|
|
|
preg_match( '/https:\/\/[^\/]+\/api\/v2\/([a-z_0-9]+)\/([0-9]+)?\//', $url, $matches );
|
|
|
|
|
return intval( $matches[ 2 ] );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fulcrm_apiv2_http( $method, $object = null, $data = null, $query = null ) {
|
|
|
|
|
$url = null;
|
|
|
|
|
|
|
|
|
|