|
|
@ -1,10 +1,15 @@
|
|
|
|
<?php /* -*- php -*- */
|
|
|
|
<?php /* -*- php -*- */
|
|
|
|
|
|
|
|
|
|
|
|
function fulcrm_apiv2_install() {
|
|
|
|
function fulcrm_apiv2_install() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
$url = $GLOBALS[ 'base_url' ];
|
|
|
|
$url = $GLOBALS[ 'base_url' ];
|
|
|
|
$url = parse_url( $url, PHP_URL_HOST );
|
|
|
|
$url = parse_url( $url, PHP_URL_HOST );
|
|
|
|
$url = explode( '.', $url );
|
|
|
|
$url = explode( '.', $url );
|
|
|
|
$url = array_reverse( $url );
|
|
|
|
$url = array_reverse( $url );
|
|
|
|
|
|
|
|
} catch ( Exception $e ) {
|
|
|
|
|
|
|
|
$url = array();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$url[] = fulcrm_uuid_uuid4();
|
|
|
|
$url[] = fulcrm_uuid_uuid4();
|
|
|
|
$url = implode( '.', $url );
|
|
|
|
$url = implode( '.', $url );
|
|
|
|
set_variable( 'fulcrm_apiv2_client_id', $url );
|
|
|
|
set_variable( 'fulcrm_apiv2_client_id', $url );
|
|
|
|