mirror of
https://github.com/humhub/humhub.git
synced 2025-02-24 19:23:21 +01:00
commit
f2f66eea2a
@ -2,19 +2,22 @@
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2016 HumHub GmbH & Co. KG
|
||||
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\modules\post\widgets;
|
||||
|
||||
use humhub\modules\content\widgets\WallCreateContentForm;
|
||||
use humhub\modules\post\permissions\CreatePost;
|
||||
|
||||
/**
|
||||
* This widget is used include the post form.
|
||||
* It normally should be placed above a steam.
|
||||
*
|
||||
* @since 0.5
|
||||
*/
|
||||
class Form extends \humhub\modules\content\widgets\WallCreateContentForm
|
||||
class Form extends WallCreateContentForm
|
||||
{
|
||||
|
||||
/**
|
||||
@ -27,7 +30,7 @@ class Form extends \humhub\modules\content\widgets\WallCreateContentForm
|
||||
*/
|
||||
public function renderForm()
|
||||
{
|
||||
return $this->render('form', array());
|
||||
return $this->render('form', []);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -35,7 +38,7 @@ class Form extends \humhub\modules\content\widgets\WallCreateContentForm
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
if (!$this->contentContainer->permissionManager->can(new \humhub\modules\post\permissions\CreatePost())) {
|
||||
if (!$this->contentContainer->permissionManager->can(new CreatePost())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -43,5 +46,3 @@ class Form extends \humhub\modules\content\widgets\WallCreateContentForm
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user