mirror of
https://github.com/humhub/humhub.git
synced 2025-04-21 07:31:53 +02:00
Small cleanup
This commit is contained in:
parent
8d3770a388
commit
37cdcaab71
@ -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)
|
||||
{
|
||||
|
@ -54,7 +54,6 @@ humhub.module('activity', function (module, require, $) {
|
||||
initLoadCount: STREAM_INIT_COUNT,
|
||||
loadCount: STREAM_LOAD_COUNT,
|
||||
streamEntryClass: ActivityStreamEntry,
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -43,5 +43,4 @@ class Comments extends \yii\base\Widget
|
||||
'total' => $commentCount
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user