Exemplo n.º 1
0
 /**
  * @test
  */
 public function getExtSqlUpdateStatements()
 {
     $dbSchema = tx_additionalreports_util::getDatabaseSchema();
     $allExtension = tx_additionalreports_util::getInstExtList(PATH_typo3conf . 'ext/', $dbSchema);
     $this->testArray($allExtension['ter']['tt_news']['fdfile']['tt_news']['fields']);
 }
 /**
  * Generate the loaded extension report
  *
  * @return string HTML code
  */
 public static function displayExtensions()
 {
     $extensionsToUpdate = 0;
     $extensionsModified = 0;
     $dbSchema = tx_additionalreports_util::getDatabaseSchema();
     $allExtension = tx_additionalreports_util::getInstExtList(PATH_typo3conf . 'ext/', $dbSchema);
     $listExtensionsTer = array();
     $listExtensionsDev = array();
     $listExtensionsUnloaded = array();
     if (count($allExtension['ter']) > 0) {
         foreach ($allExtension['ter'] as $extKey => $itemValue) {
             $currentExtension = self::getExtensionInformations($itemValue);
             if (version_compare($itemValue['EM_CONF']['version'], $itemValue['lastversion']['version'], '<')) {
                 $extensionsToUpdate++;
             }
             if (count($itemValue['affectedfiles']) > 0) {
                 $extensionsModified++;
             }
             $listExtensionsTer[] = $currentExtension;
         }
     }
     if (count($allExtension['dev']) > 0) {
         foreach ($allExtension['dev'] as $extKey => $itemValue) {
             $listExtensionsDev[] = self::getExtensionInformations($itemValue);
         }
     }
     if (count($allExtension['unloaded']) > 0) {
         foreach ($allExtension['unloaded'] as $extKey => $itemValue) {
             $listExtensionsUnloaded[] = self::getExtensionInformations($itemValue);
         }
     }
     $addContent = '';
     $addContent .= count($allExtension['ter']) + count($allExtension['dev']) . ' ' . self::getLl('extensions_extensions');
     $addContent .= '<br/>';
     $addContent .= count($allExtension['ter']) . ' ' . self::getLl('extensions_ter');
     $addContent .= '  /  ';
     $addContent .= count($allExtension['dev']) . ' ' . self::getLl('extensions_dev');
     $addContent .= '<br/>';
     $addContent .= $extensionsToUpdate . ' ' . self::getLl('extensions_toupdate');
     $addContent .= '  /  ';
     $addContent .= $extensionsModified . ' ' . self::getLl('extensions_extensionsmodified');
     $addContentItem = tx_additionalreports_util::writeInformation(self::getLl('pluginsmode5') . '<br/>' . self::getLl('extensions_updateter') . '', $addContent);
     $view = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
     $view->setTemplatePathAndFilename(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('additional_reports') . 'Resources/Private/Templates/extensions-fluid.html');
     $view->assign('listExtensionsTer', $listExtensionsTer);
     $view->assign('listExtensionsDev', $listExtensionsDev);
     $view->assign('listExtensionsUnloaded', $listExtensionsUnloaded);
     return $addContentItem . $view->render();
 }