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 8d4c4c9d37
commit e549648187
2 changed files with 4 additions and 5 deletions

View File

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

View File

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