diff --git a/appinfo/update.php b/appinfo/update.php index 484b2f41..3ae9206b 100644 --- a/appinfo/update.php +++ b/appinfo/update.php @@ -65,6 +65,15 @@ if (version_compare($installedVersion, '1.1.6', '<')) { $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', '<')) { $subject_map = array( '%s created' => 'created_self', @@ -84,18 +93,3 @@ if (version_compare($installedVersion, '1.1.10', '<')) { $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'])); - } -}