mirror of https://github.com/sualko/cloud_bbb
fix: use custom 404 page
parent
39acceb24d
commit
e7bcdffe0a
|
@ -6,8 +6,8 @@ use OCA\BigBlueButton\Controller\JoinController;
|
||||||
use OCA\BigBlueButton\NoPermissionException;
|
use OCA\BigBlueButton\NoPermissionException;
|
||||||
use OCA\BigBlueButton\NoPermissionResponse;
|
use OCA\BigBlueButton\NoPermissionResponse;
|
||||||
use OCA\BigBlueButton\NotFoundException;
|
use OCA\BigBlueButton\NotFoundException;
|
||||||
|
use OCA\BigBlueButton\NotFoundResponse;
|
||||||
use OCP\AppFramework\Middleware;
|
use OCP\AppFramework\Middleware;
|
||||||
use OCP\AppFramework\Http\NotFoundResponse;
|
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class JoinMiddleware extends Middleware {
|
class JoinMiddleware extends Middleware {
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace OCA\BigBlueButton;
|
||||||
|
|
||||||
|
use OCP\Template;
|
||||||
|
use OCP\AppFramework\Http\Response;
|
||||||
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||||
|
|
||||||
|
class NotFoundResponse extends Response {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->setContentSecurityPolicy(new ContentSecurityPolicy());
|
||||||
|
$this->setStatus(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
$template = new Template('bbb', '404', 'guest');
|
||||||
|
return $template->fetchPage();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
/** @var array $_ */
|
||||||
|
/** @var \OCP\IL10N $l */
|
||||||
|
/** @var \OCP\Defaults $theme */
|
||||||
|
?>
|
||||||
|
<div class="body-login-container update">
|
||||||
|
<div class="icon-big icon-search icon-white"></div>
|
||||||
|
<h2><?php p($l->t('Room not found')); ?></h2>
|
||||||
|
<p class="infogroup"><?php p($l->t('The room could not be found. Maybe it was deleted?')); ?></p>
|
||||||
|
<p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>">
|
||||||
|
<?php p($l->t('Back to %s', [$theme->getName()])); ?>
|
||||||
|
</a></p>
|
||||||
|
</div>
|
Loading…
Reference in New Issue