Skip to content

Commit

Permalink
[TASK] Remove usage of cruser_id
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Apr 15, 2024
1 parent 50c3961 commit 6d1350d
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 39 deletions.
25 changes: 0 additions & 25 deletions Classes/Domain/Model/News.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ class News extends AbstractEntity
*/
protected $deleted = false;

/**
* @var int
*/
protected $cruserId = 0;

/**
* @var string
*/
Expand Down Expand Up @@ -1268,26 +1263,6 @@ public function getDayOfTimestamp(): int
return (int)$this->tstamp->format('d');
}

/**
* Get id of creator user
*
* @return int
*/
public function getCruserId(): int
{
return $this->cruserId;
}

/**
* Set cruser id
*
* @param int $cruserId id of creator user
*/
public function setCruserId($cruserId): void
{
$this->cruserId = $cruserId;
}

/**
* Get editlock flag
*
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/z_misc_12_adoptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
if ($versionInformation->getMajorVersion() > 11) {
foreach (['news', 'link', 'tag'] as $tableSuffix) {
// remove cruser_id
unset($GLOBALS['TCA']['tx_news_domain_model_' . $tableSuffix]['ctrl']['cruser_id']);
// set datetime for tstamp/crdate
foreach (['tstamp', 'crdate'] as $dateField) {
$GLOBALS['TCA']['tx_news_domain_model_' . $tableSuffix]['columns'][$dateField]['config'] = [
Expand Down
1 change: 0 additions & 1 deletion Configuration/TCA/tx_news_domain_model_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
'label_alt_force' => true,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
Expand Down
8 changes: 1 addition & 7 deletions Configuration/TCA/tx_news_domain_model_news.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
'hideAtCopy' => true,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
Expand Down Expand Up @@ -203,12 +202,7 @@
],
],
],
'cruser_id' => [
'label' => 'cruser_id',
'config' => [
'type' => 'passthrough',
],
],

'pid' => [
'label' => 'pid',
'config' => [
Expand Down
1 change: 0 additions & 1 deletion Configuration/TCA/tx_news_domain_model_tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
Expand Down
3 changes: 0 additions & 3 deletions ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ CREATE TABLE tx_news_domain_model_news (
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
editlock tinyint(4) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
Expand Down Expand Up @@ -114,7 +113,6 @@ CREATE TABLE tx_news_domain_model_link (
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumtext,
Expand All @@ -140,7 +138,6 @@ CREATE TABLE tx_news_domain_model_tag (
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
hidden tinyint(4) DEFAULT '0' NOT NULL,
Expand Down

0 comments on commit 6d1350d

Please sign in to comment.