зеркало из https://github.com/nextcloud/activity.git
Коммит
7a8b4417de
|
@ -234,7 +234,7 @@ class Data
|
|||
'SELECT * '
|
||||
. ' FROM `*PREFIX*activity` '
|
||||
. ' WHERE `affecteduser` = ? ' . $limitActivities
|
||||
. ' ORDER BY `timestamp` desc',
|
||||
. ' ORDER BY `timestamp` DESC',
|
||||
$count, $start);
|
||||
$result = $query->execute($parameters);
|
||||
|
||||
|
|
|
@ -64,6 +64,12 @@ class GroupHelper
|
|||
}
|
||||
|
||||
if (!$this->getGroupKey($activity)) {
|
||||
if (!empty($this->openGroup)) {
|
||||
$this->activities[] = $this->openGroup;
|
||||
$this->openGroup = array();
|
||||
$this->groupKey = '';
|
||||
$this->groupTime = 0;
|
||||
}
|
||||
$this->activities[] = $activity;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -153,6 +153,82 @@ class GroupHelperTest extends \PHPUnit_Framework_TestCase {
|
|||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
true,
|
||||
array(
|
||||
array(
|
||||
'activity_id' => 3,
|
||||
'user' => 'user',
|
||||
'affecteduser' => 'affecteduser',
|
||||
'app' => 'files',
|
||||
'type' => 'file_created',
|
||||
'subject' => 'created_self',
|
||||
'subjectparams' => serialize(array('testing/file3.txt')),
|
||||
'message' => '',
|
||||
'messageparams' => serialize(array()),
|
||||
'file' => 'testing/file3.txt',
|
||||
'timestamp' => time(),
|
||||
),
|
||||
array(
|
||||
'activity_id' => 2,
|
||||
'user' => 'user',
|
||||
'affecteduser' => 'affecteduser',
|
||||
'app' => 'files',
|
||||
'type' => 'file_created',
|
||||
'subject' => 'created_self',
|
||||
'subjectparams' => serialize(array('testing/file2.txt')),
|
||||
'message' => '',
|
||||
'messageparams' => serialize(array()),
|
||||
'file' => 'testing/file2.txt',
|
||||
'timestamp' => time(),
|
||||
),
|
||||
array(
|
||||
'activity_id' => 1,
|
||||
'user' => 'user',
|
||||
'affecteduser' => 'affecteduser',
|
||||
'app' => 'files',
|
||||
'type' => 'shared',
|
||||
'subject' => 'shared_link_self',
|
||||
'subjectparams' => serialize(array('testing/file1.txt')),
|
||||
'message' => '',
|
||||
'messageparams' => serialize(array()),
|
||||
'file' => 'testing/file1.txt',
|
||||
'timestamp' => time() - 10,
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'activity_id' => 3,
|
||||
'activity_ids' => array(3, 2),
|
||||
'user' => 'user',
|
||||
'affecteduser' => 'affecteduser',
|
||||
'app' => 'files',
|
||||
'type' => 'file_created',
|
||||
'subject' => 'created_self',
|
||||
'subjectparams' => array(array(
|
||||
'testing/file3.txt',
|
||||
'testing/file2.txt',
|
||||
)),
|
||||
'message' => '',
|
||||
'messageparams' => array(),
|
||||
'file' => 'testing/file3.txt',
|
||||
'typeicon' => 'icon-add-color',
|
||||
),
|
||||
array(
|
||||
'activity_id' => 1,
|
||||
'user' => 'user',
|
||||
'affecteduser' => 'affecteduser',
|
||||
'app' => 'files',
|
||||
'type' => 'shared',
|
||||
'subject' => 'shared_link_self',
|
||||
'subjectparams' => array('testing/file1.txt'),
|
||||
'message' => '',
|
||||
'messageparams' => array(),
|
||||
'file' => 'testing/file1.txt',
|
||||
'typeicon' => 'icon-share',
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
true,
|
||||
array(
|
||||
|
|
Загрузка…
Ссылка в новой задаче