Commit a43af409 authored by Nigel McNie's avatar Nigel McNie
Browse files

When setting view access, don't require that the caller pass in a start and stop date.

parent ced8c4f8
......@@ -568,8 +568,12 @@ class View {
foreach ($accessdata as $item) {
$accessrecord = new StdClass;
$accessrecord->view = $this->get('id');
$accessrecord->startdate = db_format_timestamp($item['startdate']);
$accessrecord->stopdate = db_format_timestamp($item['stopdate']);
if (isset($item['startdate'])) {
$accessrecord->startdate = db_format_timestamp($item['startdate']);
}
if (isset($item['stopdate'])) {
$accessrecord->stopdate = db_format_timestamp($item['stopdate']);
}
switch ($item['type']) {
case 'public':
case 'loggedin':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment