Commit suicide if Pictures is enabled
This commit is contained in:
parent
9e15c7d05c
commit
6cd1884ce0
|
@ -87,12 +87,23 @@ class PageController extends Controller {
|
|||
*/
|
||||
public function index() {
|
||||
$appName = $this->appName;
|
||||
if (\OCP\App::isEnabled('gallery')) {
|
||||
$url = $this->urlGenerator->linkToRoute(
|
||||
$appName . '.page.error_page',
|
||||
[
|
||||
'message' => "You need to disable the Pictures app before being able to use the Gallery app",
|
||||
'code' => Http::STATUS_INTERNAL_SERVER_ERROR
|
||||
]
|
||||
);
|
||||
|
||||
// Parameters sent to the template
|
||||
$params = ['appName' => $appName];
|
||||
return new RedirectResponse($url);
|
||||
} else {
|
||||
// Parameters sent to the template
|
||||
$params = ['appName' => $appName];
|
||||
|
||||
// Will render the page using the template found in templates/index.php
|
||||
return new TemplateResponse($appName, 'index', $params);
|
||||
// Will render the page using the template found in templates/index.php
|
||||
return new TemplateResponse($appName, 'index', $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
if (isset($_['code'])) {
|
||||
if ($_['code'] === 404) {
|
||||
print_unescaped($this->inc('part.filenotfounderror'));
|
||||
} elseif ($_['code'] === 500) {
|
||||
print_unescaped($this->inc('part.internalservererror'));
|
||||
} else {
|
||||
print_unescaped($this->inc('part.linkerror'));
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
style(
|
||||
$_['appName'],
|
||||
[
|
||||
'404'
|
||||
'error'
|
||||
]
|
||||
);
|
||||
?>
|
||||
<ul>
|
||||
<li class="error error-broken-link">
|
||||
<p><?php p($l->t("Sorry, this file could not be found")) ?></p>
|
||||
<p><?php p($l->t("Sorry, this file could not be found.")) ?></p>
|
||||
|
||||
<p><?php p($l->t('Reasons might be:')); ?></p>
|
||||
<ul>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* @var $_ array
|
||||
*/
|
||||
/**
|
||||
* @var $l OC_L10N
|
||||
*/
|
||||
style(
|
||||
$_['appName'],
|
||||
[
|
||||
'error'
|
||||
]
|
||||
);
|
||||
?>
|
||||
<ul>
|
||||
<li class="error error-broken-link">
|
||||
<p><?php p($l->t("Sorry, but the server could not fulfill your request.")) ?></p>
|
||||
|
||||
<p><?php p($l->t('Possible reasons for the problem:')); ?></p>
|
||||
<ul>
|
||||
<li><?php p($l->t('a conflicting app was installed')); ?></li>
|
||||
<li><?php p($l->t('a required component is missing or was disconnected')); ?></li>
|
||||
<li><?php p($l->t('the filesystem is not readable')); ?></li>
|
||||
</ul>
|
||||
</br>
|
||||
<p><?php p($l->t('Here is the error message returned by the server: ')); ?>
|
||||
<strong><?php p($_['message'] . ' (' . $_['code'] . ')'); ?></strong></p>
|
||||
</br>
|
||||
<p><?php p($l->t('For more information, please contact your friendly ownCloud administrator.')); ?></p>
|
||||
</li>
|
||||
</ul>
|
|
@ -8,7 +8,7 @@
|
|||
style(
|
||||
$_['appName'],
|
||||
[
|
||||
'404'
|
||||
'error'
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue