Merge branch 'dev/kolab3' of ssh://git.kolabsys.com/git/roundcube into dev/kolab3
This commit is contained in:
commit
e7ea756cdb
2 changed files with 19 additions and 10 deletions
|
@ -12,5 +12,9 @@ REQUIREMENTS
|
||||||
* libkolabxml PHP bindings
|
* libkolabxml PHP bindings
|
||||||
- kolabformat.so loaded into PHP
|
- kolabformat.so loaded into PHP
|
||||||
- kolabformat.php placed somewhere in the include_path
|
- kolabformat.php placed somewhere in the include_path
|
||||||
* Horde Kolab_Format package and all of its dependencies
|
* PEAR: HTTP/Request2
|
||||||
|
* PEAR: Net/URL2
|
||||||
|
|
||||||
|
* Optional for old format support:
|
||||||
|
Horde Kolab_Format package and all of its dependencies
|
||||||
|
which are at least Horde_(Browser,DOM,NLS,String,Utils)
|
||||||
|
|
|
@ -712,7 +712,7 @@ class kolab_storage_folder
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result && is_a($result, 'PEAR_Error')) {
|
if ($result && is_object($result) && is_a($result, 'PEAR_Error')) {
|
||||||
return PEAR::raiseError(sprintf("Failed triggering folder %s. Error was: %s",
|
return PEAR::raiseError(sprintf("Failed triggering folder %s. Error was: %s",
|
||||||
$this->name, $result->getMessage()));
|
$this->name, $result->getMessage()));
|
||||||
}
|
}
|
||||||
|
@ -730,18 +730,23 @@ class kolab_storage_folder
|
||||||
*/
|
*/
|
||||||
private function trigger_url($url, $auth_user = null, $auth_passwd = null)
|
private function trigger_url($url, $auth_user = null, $auth_passwd = null)
|
||||||
{
|
{
|
||||||
require_once('HTTP/Request.php');
|
require_once('HTTP/Request2.php');
|
||||||
|
|
||||||
$request = new HTTP_Request($url);
|
try {
|
||||||
|
$request = new HTTP_Request2($url);
|
||||||
|
|
||||||
// set authentication credentials
|
// set authentication credentials
|
||||||
if ($auth_user && $auth_passwd)
|
if ($auth_user && $auth_passwd)
|
||||||
$request->setBasicAuth($auth_user, $auth_passwd);
|
$request->setAuth($auth_user, $auth_passwd);
|
||||||
|
|
||||||
$result = $request->sendRequest(true);
|
$result = $request->send();
|
||||||
// rcube::write_log('trigger', $request->getResponseBody());
|
// rcube::write_log('trigger', $result->getBody());
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
return PEAR::raiseError($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue