Small cleanup

This commit is contained in:
buddh4 2019-03-04 02:03:17 +01:00
parent 8d3770a388
commit 37cdcaab71
7 changed files with 12 additions and 5 deletions

View File

@ -8,6 +8,7 @@
namespace humhub\components;
use Exception;
use humhub\components\behaviors\PolymorphicRelation;
use humhub\libs\Helpers;
use humhub\modules\content\models\Content;
@ -361,8 +362,10 @@ abstract class SocialActivity extends \yii\base\BaseObject implements rendering\
*
* If no $content is provided the contentPreview of $source is returned.
*
* @param Content $content
* @param ContentOwner $content
* @param int $maxLength
* @return string|null
* @throws Exception
*/
public function getContentPreview(ContentOwner $content = null, $maxLength = 25)
{

View File

@ -54,7 +54,6 @@ humhub.module('activity', function (module, require, $) {
initLoadCount: STREAM_INIT_COUNT,
loadCount: STREAM_LOAD_COUNT,
streamEntryClass: ActivityStreamEntry,
});
});

View File

@ -43,5 +43,4 @@ class Comments extends \yii\base\Widget
'total' => $commentCount
]);
}
}

View File

@ -312,6 +312,7 @@ class ContentActiveRecord extends ActiveRecord implements ContentOwner, Movable
*
* @param array $params optional parameters for WallEntryWidget
* @return string
* @throws \Exception
*/
public function getWallOut($params = [])
{
@ -413,6 +414,7 @@ class ContentActiveRecord extends ActiveRecord implements ContentOwner, Movable
* @param null $user
* @return bool
* @since 1.3
* @throws \Throwable
*/
public function isOwner($user = null)
{

View File

@ -719,9 +719,11 @@ class Content extends ContentDeprecated implements Movable, ContentOwner
* @param $permission
* @param array $params
* @param bool $allowCaching
* @return bool
* @throws Exception
* @throws \yii\base\InvalidConfigException
* @see PermissionManager::can()
* @since 1.2.1
* @return bool
*/
public function can($permission, $params = [], $allowCaching = true)
{
@ -734,6 +736,8 @@ class Content extends ContentDeprecated implements Movable, ContentOwner
* @since 1.1
* @param User|integer $user
* @return boolean can view this content
* @throws Exception
* @throws \Throwable
*/
public function canView($user = null)
{

View File

@ -14,6 +14,7 @@ use humhub\modules\content\components\ContentActiveRecord;
use humhub\modules\content\components\ContentAddonActiveRecord;
use humhub\widgets\JsWidget;
use yii\base\InvalidArgumentException;
use yii\db\ActiveRecord;
/**
* AbstractRichText serves as the base class for rich text implementations.

View File

@ -281,7 +281,6 @@ class FunctionalTester extends \Codeception\Actor
$space = Space::findOne(['guid' => $guid]);
$space->enableModule($moduleId);
Yii::$app->moduleManager->flushCache();
\humhub\modules\space\models\Module::flushCache();
}
}