@@ -200,7 +200,7 @@ public function companiesAction(FilterDto $filter, string $export = ''): Respons
200200 }
201201
202202 $ limit = (int )($ this ->settings ['tracking ' ]['company ' ]['connectionLimit ' ] ?? 0 );
203- $ statistics = $ this ->wiredmindsRepository ->getStatus ()[0 ] ?? ['hits ' => 0 , 'misses ' => 0 ];
203+ $ statistics = $ this ->leadfeederRepository ->getStatus ()[0 ] ?? ['hits ' => 0 , 'misses ' => 0 ];
204204 $ available = $ limit - $ statistics ['hits ' ] - $ statistics ['misses ' ];
205205 if ($ available < 0 ) {
206206 $ available = 0 ;
@@ -220,8 +220,9 @@ public function companiesAction(FilterDto $filter, string $export = ''): Respons
220220 'latestPagevisitsWithCompanies ' => $ this ->pagevisitsRepository ->findLatestPagevisitsWithCompanies (
221221 $ filter ->setLimit (8 )
222222 ),
223- 'wiredminds ' => [
224- 'status ' => $ this ->wiredmindsRepository ->getStatus () !== [],
223+ 'leadfeeder ' => [
224+ 'status ' => ($ this ->settings ['tracking ' ]['company ' ]['token ' ] ?? '' ) !== ''
225+ && ($ this ->settings ['tracking ' ]['company ' ]['accountId ' ] ?? '' ) !== '' ,
225226 'statistics ' => $ statistics ,
226227 'limit ' => $ limit ,
227228 'overall ' => $ limit ,
@@ -233,12 +234,12 @@ public function companiesAction(FilterDto $filter, string $export = ''): Respons
233234 return $ this ->defaultRendering ();
234235 }
235236
236- public function companiesDisabledAction (string $ tokenWiredminds = '' ): ResponseInterface
237+ public function companiesDisabledAction (string $ leadfeederToken = '' , string $ leadfeederAccountId = '' ): ResponseInterface
237238 {
238- if ($ tokenWiredminds !== '' ) {
239+ if ($ leadfeederToken !== '' && $ leadfeederAccountId !== '' ) {
239240 try {
240241 $ companyConfigurationService = GeneralUtility ::makeInstance (CompanyConfigurationService::class);
241- $ companyConfigurationService ->add ($ tokenWiredminds );
242+ $ companyConfigurationService ->add ($ leadfeederToken , $ leadfeederAccountId );
242243 $ this ->addFlashMessage (LocalizationUtility ::translateByKey ('module.companiesDisabled.token.success ' ));
243244 } catch (Throwable $ exception ) {
244245 $ this ->addFlashMessage ($ exception ->getMessage (), '' , ContextualFeedbackSeverity::ERROR );
@@ -528,7 +529,8 @@ protected function addDocumentHeaderForCurrentController(): void
528529
529530 protected function isCompaniesViewDisabled (): bool
530531 {
531- return ($ this ->settings ['tracking ' ]['company ' ]['_enable ' ] ?? '' ) !== '1 ' ||
532- ($ this ->settings ['tracking ' ]['company ' ]['token ' ] ?? '' ) === '' ;
532+ return ($ this ->settings ['tracking ' ]['company ' ]['_enable ' ] ?? '' ) !== '1 '
533+ || ($ this ->settings ['tracking ' ]['company ' ]['token ' ] ?? '' ) === ''
534+ || ($ this ->settings ['tracking ' ]['company ' ]['accountId ' ] ?? '' ) === '' ;
533535 }
534536}
0 commit comments