Commit 0d0b4dd4 authored by Paul Ilea's avatar Paul Ilea

[TASK] Code cleanup

parent d34f7e85
......@@ -8,9 +8,7 @@ use SGalinski\SgRoutes\Domain\Repository\CategoryRepository;
use SGalinski\SgRoutes\Domain\Repository\RouteRepository;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Routing\SiteMatcher;
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/***************************************************************
......@@ -86,7 +84,6 @@ class PageDataHandlerHook {
return;
}
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$routeRepository = $objectManager->get(RouteRepository::class);
$routeExists = $routeRepository->sourceUrlRouteExists($site->getRootPageId(), $oldDestinationUrl);
......@@ -121,8 +118,6 @@ class PageDataHandlerHook {
$newRoute->setDescription(
'Automated slug update routing for page uid ' . $parentPageId . '(' . $language->getTwoLetterIsoCode() . ')'
);
$newRoute->setCrdate($GLOBALS['EXEC_TIME']);
$newRoute->setTstamp($GLOBALS['EXEC_TIME']);
$routeRepository->add($newRoute);
$routeRepository->persistAll();
}
......@@ -138,7 +133,7 @@ class PageDataHandlerHook {
$rootPageUid = (int) $rootPageUid;
if ($rootPageUid <= 0) {
return null;
return NULL;
}
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
......
......@@ -23,16 +23,11 @@ return [
'origUid' => 't3_origuid',
'delete' => 'deleted',
'hideTable' => TRUE,
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'sortby' => 'sorting',
'iconfile' => 'EXT:sg_routes/Resources/Public/Icons/tx_sgroutes_domain_model_route.svg'
],
'interface' => [
'showRecordFieldList' => 'hidden, use_regular_expression, source_url, source_url_case_sensitive, destination_url, redirect_url_parameters, redirect_code, description',
'showRecordFieldList' => 'use_regular_expression, source_url, source_url_case_sensitive, destination_url, redirect_url_parameters, redirect_code, description',
],
'types' => [
'1' => [
......
......@@ -16,13 +16,10 @@ CREATE TABLE tx_sgroutes_domain_model_route (
categories int(11) DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
......@@ -53,10 +50,7 @@ CREATE TABLE tx_sgroutes_domain_model_category (
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment