# Conflicts:
#	protected/humhub/docs/CHANGELOG.md
This commit is contained in:
buddh4 2017-10-23 11:36:18 +02:00
commit 0025a001c3
6 changed files with 39 additions and 44 deletions

View File

@ -5,6 +5,7 @@ HumHub Change Log
--------------------------------
Important note for LDAP users: There is a new setting "ID Attribute" which should be set to clearly identify users.
Important note for Git/Composer installations: http://www.yiiframework.com/news/148/important-note-about-bower-and-the-asset-plugin/
- Fix: Readonly markdown field issue.
- Enh: Fixed registration approval/denial mails and made their default value configurable.
@ -50,6 +51,7 @@ Important note for LDAP users: There is a new setting "ID Attribute" which shoul
- Fix wrong Comment date issue in notification mails
- Enh: Added `data-file-*` attributes to download links, for beeing able to intercept file downloads
- Enh: Added `apple-mobile-web-app-*` and `mobile-web-app-capable` meta tags to `head.php`
- Fix #2783: E-Mail notification link broken when guest mode is enabled (Buliwyfa)
- Enh: Added `ContentActiveRecord::silentContentCreation` for disabling ContentCreated Activity/Notification on ContentActiveRecord level
- Enh: Now the `NewContent` live event is always fired with `sourceClass` and `sourceId` information and a `silent` flag for silent content creations

View File

@ -32,7 +32,7 @@ git clone https://github.com/humhub/humhub.git
3. Navigate to your HumHub webroot and fetch dependencies:
```
php composer.phar global require "fxp/composer-asset-plugin:~1.3"
php composer.phar global require "fxp/composer-asset-plugin:^1.4.2"
php composer.phar update
```

View File

@ -2,7 +2,7 @@
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/
@ -11,6 +11,7 @@ namespace humhub\modules\notification\controllers;
use Yii;
use humhub\components\Controller;
use humhub\modules\notification\models\Notification;
use humhub\components\access\ControllerAccess;
/**
* EntryController
@ -23,12 +24,10 @@ class EntryController extends Controller
/**
* @inheritdoc
*/
public function behaviors()
public function getAccessRules()
{
return [
'acl' => [
'class' => \humhub\components\behaviors\AccessControl::className(),
]
[ControllerAccess::RULE_LOGGED_IN_ONLY]
];
}
@ -40,7 +39,7 @@ class EntryController extends Controller
$notificationModel = Notification::findOne(['id' => Yii::$app->request->get('id'), 'user_id' => Yii::$app->user->id]);
if ($notificationModel === null) {
throw new \yii\web\HttpException(404, Yii::t('NotificationModule.error','The requested content is not valid or was removed!'));
throw new \yii\web\HttpException(404, Yii::t('NotificationModule.error', 'The requested content is not valid or was removed!'));
}
$notification = $notificationModel->getClass();
@ -48,7 +47,7 @@ class EntryController extends Controller
if ($notification->markAsSeenOnClick) {
$notification->markAsSeen();
}
// Redirect to notification URL
return $this->redirect($notification->getUrl());
}

View File

@ -99,7 +99,7 @@ humhub.module('stream', function (module, require, $) {
var that = this;
var stream = this.stream();
promise.then(function ($confirm) {
if ($confirm) {
that.remove(); // Make sure to remove the wallentry node.
@ -262,7 +262,6 @@ humhub.module('stream', function (module, require, $) {
that.remove().then(function () {
stream.loadEntry(that.getKey(), {'prepend': true});
});
module.log.success('success.pin');
} else if (data.info) {
module.log.info(data.info, true);
} else {
@ -298,9 +297,8 @@ humhub.module('stream', function (module, require, $) {
StreamEntry.prototype.unpin = function (evt) {
var that = this;
this.loader();
client.post(evt.url).then(function (data) {
client.post(evt.url).then(function () {
that.stream().init();
module.log.success('success.unpin');
}).catch(function (e) {
module.log.error(e, true);
that.loader(false);
@ -897,7 +895,7 @@ humhub.module('stream', function (module, require, $) {
/**
* Simple stream component can be used for static streams without load logic (only reload single content).
*
*
* @param {type} container
* @param {type} cfg
* @returns {humhub.streamL#5.SimpleStream}
@ -924,7 +922,7 @@ humhub.module('stream', function (module, require, $) {
return client.get(contentModule.config.reloadUrl, {data: {id: contentId}}).then(function (response) {
if (response.output) {
entry.replace(response.output);
}
}
return response;
}).catch(function (err) {
module.log.error(err, true);
@ -995,11 +993,11 @@ humhub.module('stream', function (module, require, $) {
/*
This can be used to trace the currently visible entries
var lastKey;
// Defines our base y position for changing the current entry
var yLimit = scrollTop + (windowHeight / 2);
// Get id of current scroll item
//TODO: chache the entry nodes !
var matchingNodes = stream.$entryCache.map(function () {
@ -1008,11 +1006,11 @@ humhub.module('stream', function (module, require, $) {
return $this;
}
});
// Get the id of the current element
var $current = matchingNodes[matchingNodes.length - 1];
var currentKey = $current && $current.length ? $current.data('content-key') : "";
if (lastKey !== currentKey) {
lastKey = currentKey;
// Set/remove active class
@ -1082,4 +1080,4 @@ humhub.module('stream', function (module, require, $) {
getStream: getStream,
getEntry: getEntry
});
});
});

View File

@ -113,7 +113,6 @@ class StreamCest
$I->click('.preferences .dropdown-toggle', $newEntrySelector);
$I->waitForText('Pin', 10);
$I->click('Pin', $newEntrySelector);
$I->seeSuccess('The content has been pinned.');
$I->see('This is my first stream test post!', '.s2_streamContent div:nth-child(1)');
$I->see('Pinned', $newEntrySelector);
@ -122,7 +121,6 @@ class StreamCest
$I->click('.preferences .dropdown-toggle', $newEntrySelector);
$I->waitForText('Unpin', 10);
$I->click('Unpin', $newEntrySelector);
$I->seeSuccess('The content has been unpinned.');
$I->see('This is my second stream test post!', '.s2_streamContent div:nth-child(1)');
$I->dontSee('Pinned', $newEntrySelector);
}
@ -145,7 +143,7 @@ class StreamCest
$I->click('.preferences .dropdown-toggle', $newEntrySelector);
$I->waitForText('Edit', 10);
$I->click('Edit', $newEntrySelector);
$I->waitForElementVisible($newEntrySelector . ' .content_edit', 20);
$I->amGoingTo('cancel my edit');
$I->click('.preferences .dropdown-toggle', $newEntrySelector);
@ -154,43 +152,43 @@ class StreamCest
$I->waitForElementNotVisible($newEntrySelector . ' .content_edit', 20);
$I->waitForElementVisible($newEntrySelector . ' .content', 20);
$I->see('This is my first stream test post!', $newEntrySelector);
$I->amGoingTo('edit my new post');
$I->click('.preferences .dropdown-toggle', $newEntrySelector);
$I->waitForText('Edit', 10);
$I->click('Edit', $newEntrySelector);
$I->waitForElementVisible($newEntrySelector . ' .content_edit', 20);
$I->fillField($newEntrySelector . ' [contenteditable]', 'This is my edited post!');
$I->click('Save', $newEntrySelector);
$I->seeSuccess('Saved');
$I->seeElement($newEntrySelector);
$I->see('This is my edited post!', $newEntrySelector);
}
public function testEmptyStream(AcceptanceTester $I)
{
$I->amUser();
$I->amOnSpace3();
$I->wantToTest('the empty stream message and filter');
$I->waitForText('This space is still empty!');
$I->dontSeeElement('#filter');
$I->amGoingTo('create a new post and delete it afterwards');
$I->createPost('This is my first stream test post!');
$I->wait(1);
$I->wait(1);
$I->amGoingTo('Delete my new post again.');
$I->dontSee('This space is still empty!');
$I->seeElement('#filter');
$I->click('.preferences .dropdown-toggle', '[data-stream-entry]:nth-of-type(1)');
$I->wait(1);
$I->click('Delete');
$I->waitForElementVisible('#globalModalConfirm', 5);
$I->see('Confirm post deletion');
$I->click('Delete', '#globalModalConfirm');
@ -199,7 +197,7 @@ class StreamCest
$I->see('This space is still empty!');
$I->dontSeeElement('#filter');
}
public function testFilterInvolved(AcceptanceTester $I)
{
$I->amUser();
@ -209,25 +207,25 @@ class StreamCest
$I->waitForElementVisible('#filter_entry_userinvolved');
$I->click('#filter_entry_userinvolved');
$I->waitForText('No matches with your selected filters!');
$I->createPost('Involved Post.');
$I->dontSee('No matches with your selected filters!');
$I->amGoingTo('Reset filter');
$I->click('.stream-filter', '#filter');
$I->waitForElementVisible('#filter_entry_userinvolved');
$I->click('#filter_entry_userinvolved');
$I->waitForElementVisible('[data-content-key="10"]');
$I->click('Comment', '[data-content-key="10"]');
$I->waitForElementVisible('#newCommentForm_humhubmodulespostmodelsPost_10');
$I->fillField('#newCommentForm_humhubmodulespostmodelsPost_10', 'My Comment');
$I->click('Send', '#comment_create_form_humhubmodulespostmodelsPost_10');
$I->waitForText('My Comment', 30, '#comment_humhubmodulespostmodelsPost_10 .comment');
$I->click('Like', '[data-content-key="11"]');
$I->click('.stream-filter', '#filter');
$I->waitForElementVisible('#filter_entry_userinvolved');
$I->click('#filter_entry_userinvolved');
@ -267,15 +265,15 @@ class StreamCest
$I->click('Comment', $post4Selector);
$I->fillField($post4Selector . ' [contenteditable]', 'My Comment!');
$I->click('Send', $post4Selector . ' .comment-buttons');
$I->scrollTop();
$I->click('.stream-sorting', '#filter');
$I->waitForElementVisible('#sorting_u');
$I->click('#sorting_u');
$I->wait(2);
$I->waitForElementVisible($post4Selector);
$I->see('POST4', '.s2_streamContent > [data-stream-entry]:nth-of-type(1)');
$I->see('POST5', '.s2_streamContent > [data-stream-entry]:nth-of-type(2)');
$I->see('POST3', '.s2_streamContent > [data-stream-entry]:nth-of-type(3)');

View File

@ -178,8 +178,6 @@ class CoreJsConfig extends Widget
'text' => [
'success.archive' => Yii::t('ContentModule.widgets_views_stream', 'The content has been archived.'),
'success.unarchive' => Yii::t('ContentModule.widgets_views_stream', 'The content has been unarchived.'),
'success.pin' => Yii::t('ContentModule.widgets_views_stream', 'The content has been pinned.'),
'success.unpin' => Yii::t('ContentModule.widgets_views_stream', 'The content has been unpinned.'),
'success.delete' => Yii::t('ContentModule.widgets_views_stream', 'The content has been deleted.'),
'info.editCancel' => Yii::t('ContentModule.widgets_views_stream', 'Your last edit state has been saved!'),
]