Skip to content
Snippets Groups Projects
Commit ccf4c783 authored by Paul Ilea's avatar Paul Ilea
Browse files

[TASK] Backend utility class rename, typo3 v7 compatibility update

parent 125f32b8
No related branches found
No related tags found
1 merge request!2Feature be module
......@@ -27,8 +27,8 @@ namespace SGalinski\SgNews\Controller;
***************************************************************/
use In2code\Powermail\Utility\LocalizationUtility;
use SGalinski\SgNews\Service\BackendNewsUtility;
use SGalinski\SgNews\Service\LicensingService;
use SGalinski\SgNews\Utility\BackendNewsUtility;
use TYPO3\CMS\Backend\Clipboard\Clipboard;
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\Components\DocHeaderComponent;
......
......@@ -25,7 +25,7 @@ namespace SGalinski\SgNews\Hooks;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgNews\Service\BackendNewsUtility;
use SGalinski\SgNews\Utility\BackendNewsUtility;
use TYPO3\CMS\Backend\Utility\BackendUtility;
/**
......
<?php
namespace SGalinski\SgNews\Service;
namespace SGalinski\SgNews\Utility;
/***************************************************************
* Copyright notice
......@@ -32,6 +32,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Database\DatabaseConnection;
use TYPO3\CMS\Core\Database\QueryGenerator;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
......@@ -390,8 +391,12 @@ class BackendNewsUtility {
];
/** @var DatabaseConnection $databaseConnection */
$databaseConnection = $GLOBALS['TYPO3_DB'];
$orderBy = '';
if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
$orderBy = 'sorting';
}
$languageRows = $databaseConnection->exec_SELECTgetRows(
'uid, title, flag', 'sys_language', 'hidden = 0', '', 'sorting'
'uid, title, flag', 'sys_language', 'hidden = 0', '', $orderBy
);
if ($languageRows) {
/** @var BackendUserAuthentication $backendUser */
......
......@@ -26,7 +26,7 @@ namespace SGalinski\SgNews\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgNews\Service\BackendNewsUtility;
use SGalinski\SgNews\Utility\BackendNewsUtility;
use SGalinski\SgNews\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Backend\Utility\BackendUtility;
......
......@@ -26,8 +26,8 @@ namespace SGalinski\SgNews\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgNews\Service\BackendNewsUtility;
use SGalinski\SgNews\Service\LicensingService;
use SGalinski\SgNews\Utility\BackendNewsUtility;
use SGalinski\SgNews\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment