Browse files

Fixes #4256 reruns the forum topic upgrade by checking the 5 oldest t…

…opics
  • Loading branch information...
1 parent be12f79 commit 6dc5a90146595b78f5fd0d9b10b628a78ca2dac7 @cash cash committed Dec 31, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 mod/groups/upgrades/2011030101.php
View
6 mod/groups/upgrades/2011030101.php
@@ -9,6 +9,7 @@
'type' => 'object',
'subtype' => 'groupforumtopic',
'limit' => 5,
+ 'order_by' => 'e.time_created asc',
));
// if not topics, no upgrade required
@@ -31,6 +32,11 @@
*/
function groups_2011030101($topic) {
+ // do not upgrade topics that have already been upgraded
+ if ($topic->description) {
+ return true;
+ }
+
$annotation = $topic->getAnnotations('group_topic_post', 1);
if (!$annotation) {
// no text for this forum post so we delete (probably caused by #2624)

0 comments on commit 6dc5a90

Please sign in to comment.