@@ 28-50 (lines=23) @@ | ||
25 | use OCP\Template; |
|
26 | use OCP\IConfig; |
|
27 | ||
28 | class BackgroundJobs implements ISettings { |
|
29 | protected $config; |
|
30 | ||
31 | public function __construct(IConfig $config) { |
|
32 | $this->config = $config; |
|
33 | } |
|
34 | ||
35 | public function getPriority() { |
|
36 | return 0; |
|
37 | } |
|
38 | ||
39 | public function getPanel() { |
|
40 | $tmpl = new Template('settings', 'panels/admin/backgroundjobs'); |
|
41 | $tmpl->assign('cron_log', $this->config->getSystemValue('cron_log', true)); |
|
42 | $tmpl->assign('lastcron', $this->config->getAppValue('core', 'lastcron', false)); |
|
43 | $tmpl->assign('backgroundjobs_mode', $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax')); |
|
44 | return $tmpl; |
|
45 | } |
|
46 | ||
47 | public function getSectionID() { |
|
48 | return 'general'; |
|
49 | } |
|
50 | } |
|
51 |
@@ 28-60 (lines=33) @@ | ||
25 | use OCP\Settings\ISettings; |
|
26 | use OCP\Template; |
|
27 | ||
28 | class Legal implements ISettings { |
|
29 | ||
30 | /** |
|
31 | * @var IConfig |
|
32 | */ |
|
33 | protected $config; |
|
34 | ||
35 | public function __construct(IConfig $config) { |
|
36 | $this->config = $config; |
|
37 | } |
|
38 | ||
39 | public function getPriority() { |
|
40 | return 5; |
|
41 | } |
|
42 | ||
43 | public function getPanel() { |
|
44 | $template = new Template('settings', 'panels/admin/legal'); |
|
45 | $template->assign('read-only', $this->config->isSystemConfigReadOnly()); |
|
46 | $template->assign( |
|
47 | 'legal_imprint', |
|
48 | $this->config->getAppValue('core', 'legal.imprint_url', '') |
|
49 | ); |
|
50 | $template->assign( |
|
51 | 'legal_privacy_policy', |
|
52 | $this->config->getAppValue('core', 'legal.privacy_policy_url', '') |
|
53 | ); |
|
54 | return $template; |
|
55 | } |
|
56 | ||
57 | public function getSectionID() { |
|
58 | return 'general'; |
|
59 | } |
|
60 | } |
|
61 |