From 9883357c45d51c15ee23575c55f22bd70455713c Mon Sep 17 00:00:00 2001 From: Fabian Galinski <fabian@sgalinski.de> Date: Tue, 30 May 2017 19:40:38 +0200 Subject: [PATCH] [TASK] Add sg_ajax as a suggestion --- ext_emconf.php | 1 + ext_localconf.php | 10 ++++++---- ext_tables.php | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ext_emconf.php b/ext_emconf.php index fface53..4e64fb5 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -29,6 +29,7 @@ $EM_CONF[$_EXTKEY] = [ 'suggests' => [ 'sg_comments' => '2.1.0-', 'rx_shariff' => '5.0.1-', + 'sg_ajax' => '1.0.6-', ], ], 'suggests' => [], diff --git a/ext_localconf.php b/ext_localconf.php index 5206b70..0ed3fdf 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -63,10 +63,12 @@ $tsPath = $extPath . 'Configuration/TypoScript/Common/'; ['PageBrowser' => '',] ); -\SGalinski\SgAjax\Service\AjaxRegistration::configureAjaxFrontendPlugin('sg_news', [ - 'Ajax\Like' => 'addLike', - ] -); +if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sg_ajax')) { + \SGalinski\SgAjax\Service\AjaxRegistration::configureAjaxFrontendPlugin('sg_news', [ + 'Ajax\Like' => 'addLike', + ] + ); +} // hook registration $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = diff --git a/ext_tables.php b/ext_tables.php index 8fe702b..eaa1b09 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -138,4 +138,6 @@ $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'][$customPageDoktype] = 'tcar 'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $customPageDoktype . ')' ); -\SGalinski\SgAjax\Service\AjaxRegistration::registerAjaxFrontendPlugin('sg_news'); +if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sg_ajax')) { + \SGalinski\SgAjax\Service\AjaxRegistration::registerAjaxFrontendPlugin('sg_news'); +} -- GitLab