File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 11<?php
22use wcf \data \category \CategoryEditor ;
33use wcf \data \object \type \ObjectTypeCache ;
4+ use wcf \data \package \update \server \PackageUpdateServerAction ;
45use wcf \system \WCF ;
56
67/**
2526 'title ' => 'Default Category ' ,
2627 'time ' => TIME_NOW
2728));
29+
30+ // add codequake update server
31+ if (isset ($ this ->instruction ['attributes ' ]['installupdateserver ' ]) && $ this ->instruction ['attributes ' ]['installupdateserver ' ] == 1 ) {
32+ $ serverURL = 'http://codequake.de/packages/typhoon/ ' ;
33+
34+ // check if update server already exists
35+ $ sql = "SELECT packageUpdateServerID
36+ FROM wcf " .WCF_N ."_package_update_server
37+ WHERE serverURL = ? " ;
38+ $ statement = WCF ::getDB ()->prepareStatement ($ sql );
39+ $ statement ->execute (array ($ serverURL ));
40+ $ row = $ statement ->fetchArray ();
41+ if ($ row === false ) {
42+ $ objectAction = new PackageUpdateServerAction (array (), 'create ' , array ('data ' => array (
43+ 'serverURL ' => $ serverURL
44+ )));
45+ $ objectAction ->executeAction ();
46+ }
47+ }
Original file line number Diff line number Diff line change 5959 <instruction type =" userNotificationEvent" >xml/userNotificationEvent.xml</instruction >
6060
6161 <!-- scripts -->
62- <instruction type =" script" >acp/install_de.codequake.cms.php</instruction >
62+ <instruction type =" script" installupdateserver = " 1 " >acp/install_de.codequake.cms.php</instruction >
6363 </instructions >
6464
6565 <instructions type =" update" fromversion =" 2.0.0 RC 1" >
You can’t perform that action at this time.
0 commit comments