This repository was archived by the owner on Aug 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ public function infoCommand() {
5858 * @return void
5959 */
6060 public function createSysNewsCommand ($ header , $ text = '' ) {
61-
61+ /** @var $service Tx_Coreapi_Service_SiteApiService */
62+ $ service = $ this ->objectManager ->get ('Tx_Coreapi_Service_SiteApiService ' );
63+ $ service ->createSysNews ($ header , $ text );
6264 }
6365
6466}
Original file line number Diff line number Diff line change 3030 */
3131class Tx_Coreapi_Service_SiteApiService {
3232
33- /*
34- * site:sysNews Create a sys news, e.g. for new deployment
35- */
36-
3733 /**
3834 * Get some basic site information
3935 *
@@ -51,6 +47,22 @@ public function getSiteInfo() {
5147 return $ data ;
5248 }
5349
50+ /**
51+ * Create a sys news record
52+ *
53+ * @param string $header header
54+ * @param string $text text
55+ * @return void
56+ */
57+ public function createSysNews ($ header , $ text ) {
58+ $ GLOBALS ['TYPO3_DB ' ]->exec_INSERTquery ('sys_news ' , array (
59+ 'title ' => $ header ,
60+ 'content ' => $ text ,
61+ 'tstamp ' => $ GLOBALS ['EXEC_TIME ' ],
62+ 'crdate ' => $ GLOBALS ['EXEC_TIME ' ],
63+ ));
64+ }
65+
5466 /**
5567 * Get disku usage
5668 *
You can’t perform that action at this time.
0 commit comments