1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 22:14:59 +02:00

[ticket/10392] Alter parent namespace stripping.

PHPBB3-10392
This commit is contained in:
Chris Smith 2011-09-27 01:06:43 +01:00
parent 118bc6198e
commit 1f14013093

View File

@ -871,8 +871,15 @@ class phpbb_template_filter extends php_user_filter
{
// Strip the trailing period.
$namespace = substr($namespace, 0, -1);
$local_namespace = substr(strrchr($namespace, '.'), 1);
$local_namespace = ($local_namespace) ? $local_namespace : $namespace;
if (($pos = strrpos($namespace, '.')) !== false)
{
$local_namespace = substr($namespace, $pos + 1);
}
else
{
$local_namespace = $namespace;
}
$expr = true;