mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-23 06:39:18 +00:00
Don't query the entries unless we actually have a collection.
This commit is contained in:
parent
b806fa8305
commit
c0f7949ec4
@ -120,6 +120,9 @@ else {
|
|||||||
}
|
}
|
||||||
if ( $editor->Available() ) {
|
if ( $editor->Available() ) {
|
||||||
$c->page_title = $editor->Title(translate('Collection').': '.$editor->Value('dav_displayname'));
|
$c->page_title = $editor->Title(translate('Collection').': '.$editor->Value('dav_displayname'));
|
||||||
|
$entryqry = new AwlQuery( 'SELECT count(*) as count from caldav_data where collection_id='.$editor->Value('collection_id') );
|
||||||
|
$entryqry->Exec('admin-collection-edit');
|
||||||
|
$entries = $entryqry->Fetch(); $entries = $entries->count;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$c->page_title = $editor->Title(translate('Create New Collection'));
|
$c->page_title = $editor->Title(translate('Create New Collection'));
|
||||||
@ -129,11 +132,9 @@ else {
|
|||||||
$editor->Assign('user_no', $usr->user_no);
|
$editor->Assign('user_no', $usr->user_no);
|
||||||
$editor->Assign('is_calendar', 't' );
|
$editor->Assign('is_calendar', 't' );
|
||||||
$editor->Assign('use_default_privs', 't');
|
$editor->Assign('use_default_privs', 't');
|
||||||
|
$entries = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$entryqry = new AwlQuery( 'SELECT count(*) as count from caldav_data where collection_id='.$id );
|
|
||||||
$entryqry->Exec('admin-collection-edit');
|
|
||||||
$entries = $entryqry->Fetch(); $entries = $entries->count;
|
|
||||||
|
|
||||||
$privilege_xlate = array(
|
$privilege_xlate = array(
|
||||||
'read' => translate('Read'),
|
'read' => translate('Read'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user