diff --git a/core/src/plugins/access.fs/class.fsAccessDriver.php b/core/src/plugins/access.fs/class.fsAccessDriver.php
index 8a946130f5..12887d2e4b 100644
--- a/core/src/plugins/access.fs/class.fsAccessDriver.php
+++ b/core/src/plugins/access.fs/class.fsAccessDriver.php
@@ -1963,7 +1963,7 @@ public function makeSharedRepositoryOptions($httpVars, $repository)
$newOptions = array(
"PATH" => $repository->getOption("PATH").AJXP_Utils::decodeSecureMagic($httpVars["file"]),
"CREATE" => false,
- "RECYCLE_BIN" => "",
+ "RECYCLE_BIN" => isSet($httpVars["inherit_recycle"])? $repository->getOption("RECYCLE_BIN") : "",
"DEFAULT_RIGHTS" => "");
if ($repository->getOption("USE_SESSION_CREDENTIALS")===true) {
$newOptions["ENCODED_CREDENTIALS"] = AJXP_Safe::getEncodedCredentialString();
diff --git a/core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php b/core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php
index 9fece68793..0a5b85b3f1 100755
--- a/core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php
+++ b/core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php
@@ -122,7 +122,9 @@ public function loadUserFeed($actionName, $httpVars, $fileVars)
if($rightString == "r" | $rightString == "rw") $authRepos[] = $repoId;
}
}
- $res = $this->eventStore->loadEvents($authRepos, $userId, $userGroup, 0, 10);
+ $offset = isSet($httpVars["offset"]) ? intval($httpVars["offset"]): 0;
+ $limit = isSet($httpVars["limit"]) ? intval($httpVars["limit"]): 15;
+ $res = $this->eventStore->loadEvents($authRepos, $userId, $userGroup, $offset, $limit, (isSet($httpVars["repository_id"])?false:true));
$mess = ConfService::getMessages();
$format = "html";
if (isSet($httpVars["format"])) {
diff --git a/core/src/plugins/core.notifications/interface.AJXP_FeedStore.php b/core/src/plugins/core.notifications/interface.AJXP_FeedStore.php
index aea640a59c..0767d84c21 100644
--- a/core/src/plugins/core.notifications/interface.AJXP_FeedStore.php
+++ b/core/src/plugins/core.notifications/interface.AJXP_FeedStore.php
@@ -47,9 +47,10 @@ public function persistEvent($hookName, $data, $repositoryId, $repositoryScope,
* @param string $userGroup
* @param integer $offset
* @param integer $limit
+ * @param boolean $enlargeToOwned
* @return AJXP_Notification[]
*/
- public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = 0, $limit = 10);
+ public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = 0, $limit = 10, $enlargeToOwned = true);
/**
* @abstract
diff --git a/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php b/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
index 9d1df04da2..6ab24c2a7e 100644
--- a/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
+++ b/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
@@ -90,12 +90,13 @@ public function persistEvent($hookName, $data, $repositoryId, $repositoryScope,
* @param integer $limit
* @return An array of stdClass objects with keys hookname, arguments, author, date, repository
*/
- public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = 0, $limit = 10)
+ public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = 0, $limit = 10, $enlargeToOwned = true)
{
if($this->sqlDriver["password"] == "XXXX") return array();
require_once(AJXP_BIN_FOLDER."/dibi.compact.php");
dibi::connect($this->sqlDriver);
- $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s AND
+ if ($enlargeToOwned) {
+ $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s AND
( [repository_id] IN (%s) OR [repository_owner] = %s )
AND (
[repository_scope] = 'ALL'
@@ -103,6 +104,16 @@ public function loadEvents($filterByRepositories, $userId, $userGroup, $offset =
OR ([repository_scope] = 'GROUP' AND [user_group] = %s )
)
ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $userId, $userId, $userGroup, $limit, $offset);
+ } else {
+ $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s AND
+ ( [repository_id] IN (%s))
+ AND (
+ [repository_scope] = 'ALL'
+ OR ([repository_scope] = 'USER' AND [user_id] = %s )
+ OR ([repository_scope] = 'GROUP' AND [user_group] = %s )
+ )
+ ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $userId, $userGroup, $limit, $offset);
+ }
$data = array();
foreach ($res as $n => $row) {
$object = new stdClass();
diff --git a/core/src/plugins/meta.comments/class.CommentsMetaManager.php b/core/src/plugins/meta.comments/class.CommentsMetaManager.php
index c39db14451..bb5a3400d4 100644
--- a/core/src/plugins/meta.comments/class.CommentsMetaManager.php
+++ b/core/src/plugins/meta.comments/class.CommentsMetaManager.php
@@ -135,7 +135,7 @@ public function switchActions($actionName, $httpVars, $fileVars)
HTMLWriter::charsetHeader("application/json");
if ($feedStore !== false) {
- $data = $feedStore->findMetaObjectsByIndexPath(ConfService::getRepository()->getId(), $uniqNode->getPath(), AuthService::getLoggedUser()->getId(), AuthService::getLoggedUser()->getGroupPath(), 0, 20, "date", "asc");
+ $data = $feedStore->findMetaObjectsByIndexPath(ConfService::getRepository()->getId(), $uniqNode->getPath(), AuthService::getLoggedUser()->getId(), AuthService::getLoggedUser()->getGroupPath(), 0, 100, "date", "asc");
$theFeed = array();
foreach ($data as $stdObject) {
$rPath = substr($stdObject->path, strlen($uniqNode->getPath()));
@@ -150,7 +150,7 @@ public function switchActions($actionName, $httpVars, $fileVars)
"rpath" => $rPath
);
if (isSet($previous) && $previous["author"] == $newItem["author"] && $previous["path"] == $newItem["path"] && $previous["hdate"] == $newItem["hdate"] ) {
- $theFeed[count($theFeed) - 1]["content"].= $newItem["content"];
+ $theFeed[count($theFeed) - 1]["content"].= '
--
'.$newItem["content"];
} else {
$theFeed[] = $newItem;
diff --git a/core/src/plugins/meta.comments/class.CommentsPanel.js b/core/src/plugins/meta.comments/class.CommentsPanel.js
index 6d05dc4c3b..4db7d5ad9c 100644
--- a/core/src/plugins/meta.comments/class.CommentsPanel.js
+++ b/core/src/plugins/meta.comments/class.CommentsPanel.js
@@ -17,6 +17,43 @@
*
* The latest code can be found at