Added default article category
authorMarcel Werk <burntime@woltlab.com>
Wed, 13 Jul 2016 10:13:58 +0000 (12:13 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 13 Jul 2016 10:14:36 +0000 (12:14 +0200)
wcfsetup/install/files/acp/post_install.php

index c606ef1f3b1360e077d90e73f81984becf6c32ae..607c357514d7c1025894934e551427b1c9e65c88 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+use wcf\data\category\CategoryEditor;
+use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\user\UserEditor;
 use wcf\data\user\UserProfileAction;
 use wcf\system\WCF;
@@ -19,3 +21,10 @@ $action = new UserProfileAction([$editor], 'updateUserRank');
 $action->executeAction();
 $action = new UserProfileAction([$editor], 'updateUserOnlineMarking');
 $action->executeAction();
+
+// add default article category
+CategoryEditor::create([
+       'objectTypeID' => ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.category', 'com.woltlab.wcf.article.category'),
+       'title' => 'Default Category',
+       'time' => TIME_NOW
+]);