Exemplo n.º 1
0
 /**
  * Initialize webservice for the given module
  * @param Vtiger_Module Instance of the module.
  */
 static function initialize($moduleInstance)
 {
     if ($moduleInstance->isentitytype) {
         // TODO: Enable support when webservice API support is added.
         if (function_exists('vtws_addDefaultModuleTypeEntity')) {
             vtws_addDefaultModuleTypeEntity($moduleInstance->name);
             self::log("Initializing webservices support ...DONE");
         }
     }
 }
Exemplo n.º 2
0
function VT520GA_webserviceMigrate()
{
    require_once 'include/Webservices/Utils.php';
    $customWebserviceDetails = array("name" => "revise", "include" => "include/Webservices/Revise.php", "handler" => "vtws_revise", "prelogin" => 0, "type" => "POST");
    $customWebserviceParams = array(array("name" => 'element', "type" => 'Encoded'));
    echo 'INITIALIZING WEBSERVICE...';
    $operationId = vtws_addWebserviceOperation($customWebserviceDetails['name'], $customWebserviceDetails['include'], $customWebserviceDetails['handler'], $customWebserviceDetails['type']);
    if ($operationId === null && $operationId > 0) {
        echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE';
        die;
    }
    $sequence = 1;
    foreach ($customWebserviceParams as $param) {
        $status = vtws_addWebserviceOperationParam($operationId, $param['name'], $param['type'], $sequence++);
        if ($status === false) {
            echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE HALFWAY THOURGH';
            die;
        }
    }
    $moduleList = vtws_getModuleNameList();
    foreach ($moduleList as $moduleName) {
        vtws_addDefaultModuleTypeEntity($moduleName);
    }
    ExecuteQuery("delete from vtiger_ws_fieldtype where uitype=116;");
    ExecuteQuery("update vtiger_field set uitype=117 where tabid=29 and fieldname='currency_id';");
}