Merge pull request #3004 from acs-ferreira/patch-15

Cleanup
This commit is contained in:
Lucas Bartholemy 2018-02-13 17:41:45 +01:00 committed by GitHub
commit f2f66eea2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}
}
?>