|
14 | 14 | */ |
15 | 15 |
|
16 | 16 | $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'); |
19 | 19 | $list = new ContentList(); |
20 | | -$list->getConditionBuilder()->add('content.position', array( |
21 | | - 'sidebar' |
22 | | -)); |
| 20 | +$list->getConditionBuilder()->add('content.position', |
| 21 | + array( |
| 22 | + 'sidebar' |
| 23 | + )); |
23 | 24 | $list->getConditionBuilder()->add('content.contentTypeID', array( |
24 | | - $id |
| 25 | + $id |
25 | 26 | )); |
26 | 27 | $list->readObjects(); |
27 | 28 |
|
|
32 | 33 | $action->executeAction(); |
33 | 34 |
|
34 | 35 | $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 | +); |
37 | 39 | $list = new ContentList(); |
38 | 40 | $list->getConditionBuilder()->add('content.contentTypeID', array( |
39 | | - $id |
| 41 | + $id |
40 | 42 | )); |
41 | 43 | $list->readObjects(); |
42 | 44 | $affectedObjects = $list->getObjects(); |
43 | 45 |
|
44 | 46 | // clear compiled |
45 | 47 | 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 | + } |
57 | 60 | } |
0 commit comments