We can not update "A shared B with you" activities

This commit is contained in:
Joas Schilling 2014-06-03 11:55:02 +02:00
Родитель 3bd40bc392
Коммит 8bfc9edaf4
1 изменённых файлов: 9 добавлений и 15 удалений

Просмотреть файл

@ -65,6 +65,15 @@ if (version_compare($installedVersion, '1.1.6', '<')) {
$query->execute(array('activity', 'notify_stream', 'notify_email')); $query->execute(array('activity', 'notify_stream', 'notify_email'));
} }
if (version_compare($installedVersion, '1.1.11', '<')) {
$query = \OC_DB::prepare(
'DELETE FROM `*PREFIX*activity`'
. ' WHERE `subject` = ?'
);
$query->execute(array('%s shared %s with you'));
}
if (version_compare($installedVersion, '1.1.10', '<')) { if (version_compare($installedVersion, '1.1.10', '<')) {
$subject_map = array( $subject_map = array(
'%s created' => 'created_self', '%s created' => 'created_self',
@ -84,18 +93,3 @@ if (version_compare($installedVersion, '1.1.10', '<')) {
$query->execute(array($new_subject, $old_subject)); $query->execute(array($new_subject, $old_subject));
} }
} }
if (version_compare($installedVersion, '1.1.11', '<')) {
$query = \OC_DB::prepare(
'SELECT `activity_id`, `subjectparams` '
. 'FROM `*PREFIX*activity` '
. 'WHERE `subject` = ?');
$result = $query->execute(array('shared_with_by'));
while ($row = $result->fetchRow()) {
$subjectparams = unserialize($row['subjectparams']);
$username = array_shift($subjectparams);
array_push($subjectparams, $username);
$query = \OC_DB::prepare('UPDATE `*PREFIX*activity` SET `subjectparams` = ? WHERE `activity_id` = ?');
$query->execute(array(serialize($subjectparams), $row['activity_id']));
}
}