Project

General

Profile

Actions

Bug #22594

closed

Class prefix problem in getUserObj and callUserFunction (t3lib_div)

Added by Jean-David Gadina over 14 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2010-05-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the t3lib_div class, methods getUserObj and callUserFunction actually check that classes/functions have a valid prefix.

The prefix can be "tx_", for TYPO3 extensions, or a prefix defined in the installTool, for user classes/functions (default value is "user_").

Those two methods should IMHO also allow the "Tx_" prefix (with a T in uppercase), as it is the prefix used when developing extensions with "extbase".

Actually, here's the condition:

if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
self::isFirstPartOfStr(trim($funcRef),'tx_')
)

Should be something like:

if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
!(self::isFirstPartOfStr(trim($funcRef),'tx_') || self::isFirstPartOfStr(trim($funcRef),'Tx_'))
)

Both method should be changed. Please see the attached patch.

(issue imported from #M14313)


Files

t3lib_div.patch (781 Bytes) t3lib_div.patch Administrator Admin, 2010-05-05 17:43
BUGFIX-14313.patch (555 Bytes) BUGFIX-14313.patch Administrator Admin, 2011-01-18 18:01

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #25704: Use consistent class namesClosedTolleiv Nietsch2011-04-01

Actions
Actions #1

Updated by Chris topher over 14 years ago

Hi Jean-David,

do you know that you must send your patch to Core List to get your fix integrated in the next releases?
Check out http://typo3.org/teams/core/core-mailinglist-rules/

Actions #2

Updated by Peter Niederlag almost 14 years ago

BUGFIX-14313.patch solves this against current trunk by adding a strtolower()

Actions #3

Updated by Oliver Hader over 13 years ago

  • Target version changed from 0 to 4.3.12
Actions #4

Updated by Oliver Hader over 13 years ago

  • Status changed from New to Accepted
Actions #5

Updated by Mr. Hudson over 13 years ago

Patch set 1 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609

Actions #6

Updated by Steffen Müller over 13 years ago

I used a more speaking subject in the git commit msg: "Allow Tx_ as class prefix in getUserObj and callUserFunction".
Please change the subject of the issue accordingly.

Actions #7

Updated by Mr. Hudson over 13 years ago

Patch set 2 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609

Actions #8

Updated by Mr. Hudson over 13 years ago

Patch set 3 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609

Actions #9

Updated by Mr. Hudson over 13 years ago

Patch set 4 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609

Actions #10

Updated by Mr. Hudson over 13 years ago

Patch set 5 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609

Actions #11

Updated by Anonymous over 13 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Ernesto Baschny over 13 years ago

  • Status changed from Resolved to Under Review

It's still under review for 4.5:

https://review.typo3.org/2287

Actions #13

Updated by Ernesto Baschny over 13 years ago

  • Status changed from Under Review to Resolved

Also resolved for 4.5!

Actions #14

Updated by Steffen Gebert over 13 years ago

  • Target version changed from 4.3.12 to 4.5.4
Actions #15

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF