Commit 4b97b6a8 authored by Mathias Brodala's avatar Mathias Brodala Committed by Andreas Fernandez
Browse files

[TASK] Clean up DataMapper::convertClassNameToTableName

This removes pointless code which ends up doing strtolower(NULL).

Also make the class name argument mandatory since it does not make
sense to pass nothing or NULL and the core does not do this in any
case.

The latter change makes this mildly breaking if code relies on the
old behavior.

Resolves: #67248
Releases: master
Change-Id: I3f3339ea005831fc3d78974d8883c20ad04ec4ec
Reviewed-on: http://review.typo3.org/39900


Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent 35bde18a
====================================================================
Important: #67248 - Clean up DataMapper::convertClassNameToTableName
====================================================================
Description
===========
As a side effect of cleaning up ``DataMapper::convertClassNameToTableName`` the ``$className`` argument is now mandatory.
......@@ -545,13 +545,8 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
* @param string $className
* @return string The selector name
*/
public function convertClassNameToTableName($className = NULL) {
if ($className !== NULL) {
$tableName = $this->getDataMap($className)->getTableName();
} else {
$tableName = strtolower($className);
}
return $tableName;
public function convertClassNameToTableName($className) {
return $this->getDataMap($className)->getTableName();
}
/**
......
Supports Markdown
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