Skip to content

Commit 327d493

Browse files
author
mutec
committed
...
1 parent 7cb090c commit 327d493

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

files/acp/update_210rc3.php

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
*/
1515

1616
$id = ObjectTypeCache::getInstance()->getObjectTypeIDByName(
17-
'de.codequake.cms.content.type',
18-
'de.codequake.cms.content.type.headline');
17+
'de.codequake.cms.content.type',
18+
'de.codequake.cms.content.type.headline');
1919
$list = new ContentList();
20-
$list->getConditionBuilder()->add('content.position', array(
21-
'sidebar'
22-
));
20+
$list->getConditionBuilder()->add('content.position',
21+
array(
22+
'sidebar'
23+
));
2324
$list->getConditionBuilder()->add('content.contentTypeID', array(
24-
$id
25+
$id
2526
));
2627
$list->readObjects();
2728

@@ -32,26 +33,28 @@
3233
$action->executeAction();
3334

3435
$id = ObjectTypeCache::getInstance()->getObjectTypeIDByName(
35-
'de.codequake.cms.content.type',
36-
'de.codequake.cms.content.type.template');
36+
'de.codequake.cms.content.type',
37+
'de.codequake.cms.content.type.template'
38+
);
3739
$list = new ContentList();
3840
$list->getConditionBuilder()->add('content.contentTypeID', array(
39-
$id
41+
$id
4042
));
4143
$list->readObjects();
4244
$affectedObjects = $list->getObjects();
4345

4446
// clear compiled
4547
foreach ($affectedObjects as $content) {
46-
if (! empty($content->compiled)) {
47-
$contentData = $content->contentData;
48-
$tmpArray = unserialze($contentData);
49-
unset($tmpArray['compiled']);
50-
$contentData = serialze($tmpArray);
51-
52-
$contentEditor = new ContentEditor($content);
53-
$contentEditor->update(array(
54-
'contentData' => $contentData
55-
));
56-
}
48+
if (! empty($content->compiled)) {
49+
$contentData = $content->contentData;
50+
$tmpArray = unserialze($contentData);
51+
unset($tmpArray['compiled']);
52+
$contentData = serialze($tmpArray);
53+
54+
$contentEditor = new ContentEditor($content);
55+
$contentEditor->update(
56+
array(
57+
'contentData' => $contentData
58+
));
59+
}
5760
}

0 commit comments

Comments
 (0)