change default to disable last/next event for users, as it's quite a performance drain

This commit is contained in:
ralf 2023-04-25 17:01:49 +02:00
parent 92724b727d
commit 34e71f2ed2
2 changed files with 4 additions and 5 deletions

View File

@ -39,9 +39,9 @@
<row>
<et2-description value="Disable Last/Next Event column"></et2-description>
<et2-select id="newsettings[disable_event_column]">
<option value="">Allow</option>
<option value="contacts">Allow for contacts only</option>
<option value="True">Disabled</option>
<option value="false">Allow</option>
</et2-select>
</row>
<row>

View File

@ -1794,9 +1794,8 @@ class Contacts extends Contacts\Storage
*/
function read_calendar($uids,$extra_title=true)
{
if (!$GLOBALS['egw_info']['user']['apps']['calendar'] ||
$GLOBALS['egw_info']['server']['disable_event_column'] == 'True'
)
if (empty($GLOBALS['egw_info']['user']['apps']['calendar']) ||
$GLOBALS['egw_info']['server']['disable_event_column'] == 'True')
{
return array();
}
@ -1807,7 +1806,7 @@ class Contacts extends Contacts\Storage
foreach($uids as $id => $uid)
{
$type = is_numeric($uid[0]) ? 'u' : $uid[0];
if($GLOBALS['egw_info']['server']['disable_event_column'] == 'contacts' && $type == 'u')
if($GLOBALS['egw_info']['server']['disable_event_column'] !== 'false' && $type === 'u')
{
continue;
}