@@ -31,7 +31,6 @@ |
||
31 | 31 | use Agavi\Storage\Storage; |
32 | 32 | use Agavi\Translation\TranslationManager; |
33 | 33 | use Agavi\User\User; |
34 | -use Agavi\Util\Toolkit; |
|
35 | 34 | |
36 | 35 | /** |
37 | 36 | * Context provides information about the current application context, |
@@ -384,14 +384,14 @@ discard block |
||
384 | 384 | // We have a namespace, get the name |
385 | 385 | if (strpos($modelName, '\\') !== false) { |
386 | 386 | // Remove any submodel-references |
387 | - $modelName = substr($modelName, strrpos($modelName, '\\')+1); |
|
387 | + $modelName = substr($modelName, strrpos($modelName, '\\') + 1); |
|
388 | 388 | } |
389 | 389 | $file = null; |
390 | 390 | $rc = null; |
391 | 391 | |
392 | 392 | // We have a namespace, get the name |
393 | 393 | if (strpos($modelName, '\\') !== false) { |
394 | - $modelName = substr($modelName, strrpos($modelName, '\\')+1); |
|
394 | + $modelName = substr($modelName, strrpos($modelName, '\\') + 1); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | $ns = Config::get('app.namespace'); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | |
470 | 470 | if (is_callable(array($model, 'initialize'))) { |
471 | 471 | // pass the constructor params again. dual use for the win |
472 | - $model->initialize($this, (array) $parameters); |
|
472 | + $model->initialize($this, (array)$parameters); |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | return $model; |
@@ -401,8 +401,9 @@ discard block |
||
401 | 401 | if ($moduleName === null) { |
402 | 402 | |
403 | 403 | // If we have a base namespace defined, add it to the model name |
404 | - if ($ns) |
|
405 | - $class = $ns . '\\Models\\' . $origModelName . 'Model'; |
|
404 | + if ($ns) { |
|
405 | + $class = $ns . '\\Models\\' . $origModelName . 'Model'; |
|
406 | + } |
|
406 | 407 | |
407 | 408 | // global model |
408 | 409 | // let's try to autoload that baby |
@@ -421,8 +422,9 @@ discard block |
||
421 | 422 | // if the module is disabled. |
422 | 423 | } |
423 | 424 | |
424 | - if ($ns) |
|
425 | - $class = $ns . '\\Modules\\' . $moduleName . '\\Models\\' . $origModelName . 'Model'; |
|
425 | + if ($ns) { |
|
426 | + $class = $ns . '\\Modules\\' . $moduleName . '\\Models\\' . $origModelName . 'Model'; |
|
427 | + } |
|
426 | 428 | |
427 | 429 | // module model |
428 | 430 | // let's try to autoload the baby |