Permalink
Browse files

Small cleanups

  • Loading branch information...
flack committed Jan 8, 2018
1 parent 1adc44a commit 6949149ee99032789d47063c5ba64abbf003f691
@@ -470,12 +470,10 @@ public function _handler_copy($handler_id, array $args, array &$data)
midgard_admin_asgard_plugin::bind_to_object($this->_object, $handler_id, $data);
// Set the page title
switch ($handler_id) {
case '____mfa-asgard-object_copy_tree':
$data['page_title'] = sprintf($this->_l10n->get('copy %s and its descendants'), $this->_object->{$target['label']});
break;
default:
$data['page_title'] = sprintf($this->_l10n->get('copy %s'), $this->_object->{$target['label']});
if ($handler_id === '____mfa-asgard-object_copy_tree') {
$data['page_title'] = sprintf($this->_l10n->get('copy %s and its descendants'), $this->_object->{$target['label']});
} else {
$data['page_title'] = sprintf($this->_l10n->get('copy %s'), $this->_object->{$target['label']});
}
$data['target'] = $target;
@@ -50,17 +50,13 @@ public function _handler_frontpage($handler_id, array $args, array &$data)
{
midcom::get()->auth->require_valid_user();
$selected_time = time();
switch ($this->_config->get('start_view')) {
case 'day':
return new midcom_response_relocate('agendaDay/' . date('Y-m-d', $selected_time) . '/');
case 'month':
return new midcom_response_relocate('month/' . date('Y-m-d', $selected_time) . '/');
default:
case 'week':
return new midcom_response_relocate('agendaWeek/' . date('Y-m-d', $selected_time) . '/');
$view = $this->_config->get('start_view');
if ($view == 'day') {
$view = 'agendaDay';
} elseif ($view != 'month') {
$view = 'agendaWeek';
}
return new midcom_response_relocate($view . '/' . date('Y-m-d', $selected_time) . '/');
}
/**
@@ -161,8 +161,6 @@ public static function get_file_type($mimetype)
$subtype = preg_replace('/^vnd\./', '', $subtype);
$subtype = preg_replace('/^x-/', '', $subtype);
break;
default:
break;
}
@@ -8,7 +8,6 @@
namespace midcom\dba;
use midgard_query_builder;
use midcom;
use midcom_error;
use midcom_core_privilege;

0 comments on commit 6949149

Please sign in to comment.