config.inc 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. // auth method: generic (auth/plugins/generic_conf.inc) or ldap (auth/plugins/ldap_conf.inc)
  3. $config['auth_method']='generic';
  4. // set to true for debugging XML response, otherwise set to false to avoid browser
  5. // to show http authentication window after unsuccessful authentication
  6. $config['auth_send_authenticate_header']=false;
  7. // successfull authentication XML specification (change the "http://www.server.com:80" to your protocol/server/port)
  8. $config['accounts']=array('resources'=>array());
  9. // note: if you want to use regex values, then use one of the following formats (the second example is with regex modifier): 're:.*someregex.*[0-9]$' or 're|i:.*someregex.*[0-9]$'
  10. // note: 'crossdomain' and 'withcredentials' are still available but there is NO REASON to use them (crossDomain is detected automatically, and I've never seen anyone who understand when to use withCredentials /there is NO REASON to set it to true!/)
  11. // note: 'syncinterval' was removed - use globalSyncResourcesInterval in config.js instead
  12. $config['accounts']['resources'][]=array(
  13. 'resource'=>array(
  14. 'type'=>array('calendar'=>''),
  15. 'href'=>(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://www.server.com:80/caldav.php/'.$_SERVER['PHP_AUTH_USER'].'/',
  16. 'hreflabel'=>'null', // if undefined or empty href value is used (see above)
  17. 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  18. 'settingsaccount'=>'true', // client properties are saved here (note: set it to true only for ONE account)
  19. 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it)
  20. 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')),
  21. 'ignorealarms'=>'false', // see auth/doc/example_config_response.xml for proper use, for example: 'ignorealarms'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  22. 'backgroundcalendars'=>'', // see auth/doc/example_config_response.xml for proper use, for example: 'backgroundcalendars'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re|i:^/caldav.php/user/collection[0-9]/$')),
  23. 'userauth'=>array(
  24. 'username'=>$_SERVER['PHP_AUTH_USER'],
  25. 'password'=>$_SERVER['PHP_AUTH_PW']
  26. ),
  27. 'timeout'=>90000,
  28. 'locktimeout'=>10000
  29. )
  30. );
  31. /*
  32. // additional accounts
  33. $config['accounts']['resources'][]=array(
  34. 'resource'=>array(
  35. 'type'=>array('calendar'=>''),
  36. 'href'=>'http://www.server.com:80/caldav.php/resource/',
  37. 'hreflabel'=>'null', // if undefined or empty href value is used (see above)
  38. 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  39. 'settingsaccount'=>'false', // client properties are saved here (note: set it to true only for ONE account)
  40. 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it)
  41. 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')),
  42. 'ignorealarms'=>'false', // see auth/doc/example_config_response.xml for proper use, for example: 'ignorealarms'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  43. 'backgroundcalendars'=>'', // see auth/doc/example_config_response.xml for proper use, for example: 'backgroundcalendars'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re|i:^/caldav.php/user/collection[0-9]/$')),
  44. 'userauth'=>array(
  45. 'username'=>$_SERVER['PHP_AUTH_USER'],
  46. 'password'=>$_SERVER['PHP_AUTH_PW']
  47. ),
  48. 'timeout'=>90000,
  49. 'locktimeout'=>10000
  50. )
  51. );
  52. */
  53. ?>