summaryrefslogtreecommitdiff
path: root/app/Core/Tool.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-16 13:59:37 -0700
committerFrédéric Guillot <fred@kanboard.net>2014-08-16 13:59:37 -0700
commit925b0ba2e56117e3bbe2947d7938ed35815efa1a (patch)
tree7c6f47dcaffa9bb03cbd0c807849fcbb82be3e1c /app/Core/Tool.php
parent498408d5075cf0060e0f53e58261e6537e0f6080 (diff)
Authentication backends refactoring
Diffstat (limited to 'app/Core/Tool.php')
-rw-r--r--app/Core/Tool.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Core/Tool.php b/app/Core/Tool.php
index 1a2e9904..85b684e2 100644
--- a/app/Core/Tool.php
+++ b/app/Core/Tool.php
@@ -34,8 +34,11 @@ class Tool
public static function loadModel(Registry $registry, $name)
{
- $class = '\Model\\'.ucfirst($name);
- $registry->$name = new $class($registry);
+ if (! isset($registry->$name)) {
+ $class = '\Model\\'.ucfirst($name);
+ $registry->$name = new $class($registry);
+ }
+
return $registry->shared($name);
}
}