This particular block of code has been giving me a lot of problems (line 130 of cmis.module):
$cmis_transport = $cmis_repository->settings['transport'];
foreach (module_implements('cmis_invoke') as $module) {
//Determine which module to use and change the cmis_transport mechanism from the default set in cmis_get_repository
if($module != $cmis_transport){
$cmis_transport = $module;
break;
}
}
// invoke hook_cmis()
if (module_exists($cmis_transport)) {
return module_invoke($cmis_transport, 'cmis_invoke', $url, $properties, $cmis_repository->settings);
}
So lets say you set your transport to be "foo" in your conf array. your module, foo, implements hook_cmis_invoke(). Great. So does cmis_common, so when the foreach runs, it overrides your transport setting (which should invoke foo_cmis_invoke) and substitutes it with cmis_common_cmis_invoke...!!! It's super annoying, which has lead me to comment out the above foreach entirely. Is there a reason this is included in the original code?
Comments
Comment #1
IanNorton commentedHi,
Thanks for reporting this, what the code should allow you to do is override the default cmis_invoke method with another module, this is to allow people to implement different authentication mechanisms for their CMIS repos like OAuth etc.
How the code should now work is if the cmis repo is defined in the conf array and different to the default then it'll use this as the transport, if the transport isn't specified or is cmis_common, then the code will look for modules implementing cmis_invoke.
I'm pretty sure the above should fix this issue that you're seeing, i've pushed it out as the latest dev release.
Comment #2
IanNorton commentedFixed in dev and latest stable release.
Comment #3
erdbeer commentedHello,
I use OpenLDAP.
Can anyone tell me what should I o that headerswing works?
In which files must I edit what?
Thanks
Erdbeer