[Vtigercrm-commits] [vtiger development] #7456: sync webservice returns php warnings
vtiger development
vtiger-tickets at trac.vtiger.com
Thu Jul 26 05:16:45 PDT 2012
#7456: sync webservice returns php warnings
-------------------------+--------------------------------------------------
Reporter: sikstrom | Owner: developer
Type: defect | Status: new
Priority: unassigned | Milestone: Unassigned
Component: webservices | Version: 5.4.0
Severity: Medium | Resolution:
Keywords: webservice |
-------------------------+--------------------------------------------------
Comment (by sikstrom):
Not sure if i should create a new report on this one, but i think the
following problem is closely related to this bug;
íf i want to do application sync, i would pass syncType=application in the
url.
I am quite confident that syncType never gets passed on to vtws_sync.
Instead syncType gets called with the user-value, and $user is not set.
Because of this, the following "hack" was made:
{{{
$applicationSync = false;
if(is_object($syncType) && ($syncType instanceof Users)){
$user = $syncType;
} else if($syncType == 'application'){
$applicationSync = true;
}
}
}}}
I don't mean to offend anyone, but seriously, this looks like a very quick
and dirty workaround to me, and I'd never personally accept something like
that in my own code.
Now I'm not entirely sure of how vtiger registers this method as web
service, but based on educated guesses, it's done in the following lines
from modules/Users/DefaultDataPopulator.php
{{{
"sync" => array(
"include" => array(
"include/Webservices/GetUpdates.php"
),
"handler" => "vtws_sync",
"params" => array(
"modifiedTime" => "DateTime",
"elementType" => "String"
),
"prelogin" => 0,
"type" => "GET"
),
}}}
- which is indeed is missing the syncType parameter.
I think this should be enough information to solve the problem the "right"
way. If I can do anything to help further, just ask!
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7456#comment:5>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
More information about the vtigercrm-commits
mailing list