* Calendar: added configuration "Use range-views to optimise calendar queries?", to go back to algorithm before 14.2.20150121

This commit is contained in:
Ralf Becker 2015-03-31 14:28:35 +00:00
parent 5026216842
commit 69dc97f8b2
2 changed files with 11 additions and 9 deletions

View File

@ -142,7 +142,7 @@ class calendar_so
*/
protected function cal_range_view($start, $end, array $_where=null, $deleted=false)
{
if (!$start) // using view without start-date is slower!
if ($GLOBALS['egw_info']['server']['no_timerange_views'] || !$start) // using view without start-date is slower!
{
return $this->cal_table; // no need / use for a view
}
@ -172,7 +172,7 @@ class calendar_so
*/
protected function dates_range_view($start, $end, array $_where=null, $deleted=false)
{
if (!$start || !$end) // using view without start- AND end-date is slower!
if ($GLOBALS['egw_info']['server']['no_timerange_views'] || !$start || !$end) // using view without start- AND end-date is slower!
{
return $this->dates_table; // no need / use for a view
}

View File

@ -9,13 +9,6 @@
<!-- END header -->
<!-- BEGIN body -->
<tr class="row_on">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="row_off">
<td colspan="2">&nbsp;<b>{lang_Calendar} {lang_site_configuration}</b></td>
</tr>
<tr class="row_on">
<td>&nbsp;{lang_Do_you_wish_to_autoload_calendar_holidays_files_dynamically?}</td>
<td>
@ -72,6 +65,15 @@
</td>
</tr>
<tr class="row_off">
<td>&nbsp;{lang_Use_range-views_to_optimise_calendar_queries?}</td>
<td>
<select name="newsettings[no_timerange_views]">
<option value="">{lang_Yes}</option>
<option value="true"{selected_no_timerange_views_true}>{lang_No}</option>
</select>
</td>
</tr>
<tr class="row_on">
<td>&nbsp;<b>{lang_Security}</b>: {lang_How_many_appointments_should_non-admins_be_able_to_export}
{lang_(empty_=_use_global_limit,_no_=_no_export_at_all)}:</td>
<td><input name="newsettings[calendar_export_limit]" value="{value_calendar_export_limit}" size="5"></td>