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:
phpnut 2006-12-28 16:51:12 +00:00
parent 9f48b1d28c
commit 8b79b227cc

View file

@ -121,19 +121,17 @@ 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]);
$domain = $regs[1];
}
}
$directory = null;
}
}
}
if(!isset($_this->__domains[$_this->category][$domain])) {
$_this->__bindTextDomain($domain, $directory);