22
« Last post by Disapper on May 15, 2024, 10:35:50 AM »
this here is the original file
<?php
$prefs['_GLOBAL']['suppress_version_warning'] = false;
$prefs['_GLOBAL']['sync_collection_workaround'] = false;
$domain = getenv('HTTP_HOST');
if( empty($domain) ) $domain = getenv('DOMAIN');
// Figure out the expected formatting based on username
$userName = (string) $_SERVER['_RCUBE'];
$userFormat = (string) '%l@%d';
if( strpos($userName, '/') === false) {
$userFormat = '%l';
}
$prefs['cPCardDAV'] = array(
'name' => 'cPanel CardDAV',
'username' => $userFormat,
'password' => '%p',
'url' => 'https://' . $domain . ':2080/addressbooks/' . $userFormat . '/addressbook/',
'active' => true,
'fixed' => array( 'name', 'username', 'password' ),
'hide' => false,
);
?>
this one is yours
$prefs['_GLOBAL']['suppress_version_warning'] = false;
$prefs['_GLOBAL']['sync_collection_workaround'] = false;
if(file_exists('/var/cpanel/calendarserver')) {
$domain = getenv('HTTP_HOST');
if( empty($domain) ) $domain = getenv('DOMAIN');
// Figure out the expected formatting based on username
$userName = (string) $_SERVER['_RCUBE'];
$userFormat = (string) '%l@%d';
if( strpos($userName, '/') === false) {
$userFormat = '%l';
}
$prefs['cPCardDAV'] = array(
'name' => 'cPanel CardDAV',
'username' => $userFormat,
'password' => '%p',
'url' => 'https://' . $domain . ':2080/addressbooks/' . $userFormat . '/addressbook/',
'active' => true,
'fixed' => array( 'name', 'username', 'password' ),
'hide' => false,
);
}
This is the only difference between the two
if(file_exists('/var/cpanel/calendarserver')) {
which I added to my file and it still didn't work.