mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing an error in I18n class that would sometimes show up when using Scaffolded methods
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4227 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
9f48b1d28c
commit
8b79b227cc
1 changed files with 3 additions and 5 deletions
|
@ -121,18 +121,16 @@ class I18n extends Object {
|
|||
if(is_null($domain)) {
|
||||
if (preg_match('/views{0,1}\\'.DS.'([^\/]*)/', $directory, $regs)) {
|
||||
$domain = $regs[1];
|
||||
$directory = null;
|
||||
} elseif (preg_match('/controllers{0,1}\\'.DS.'([^\/]*)/', $directory, $regs)) {
|
||||
$domain = ($regs[1]);
|
||||
$directory = null;
|
||||
$domain = $regs[1];
|
||||
}
|
||||
|
||||
if(isset($domain) && $domain == 'templates') {
|
||||
if (preg_match('/templates{0,1}\\'.DS.'([^\/]*)/', $directory, $regs)) {
|
||||
$domain = ($regs[1]);
|
||||
$directory = null;
|
||||
$domain = $regs[1];
|
||||
}
|
||||
}
|
||||
$directory = null;
|
||||
}
|
||||
|
||||
if(!isset($_this->__domains[$_this->category][$domain])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue