]> git.mxchange.org Git - friendica.git/commitdiff
Switch register_template_engine() to the only one available
authorHypolite Petovan <mrpetovan@gmail.com>
Thu, 1 Feb 2018 18:33:04 +0000 (13:33 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 2 Feb 2018 12:46:13 +0000 (07:46 -0500)
- get_declared_classes() can't be used with autoloading
- Removed killme() to prevent infinite loop during App object
instantiation

src/App.php

index 7c87130b35d4e1d0197d2453f2e57bf33ca9d3f8..6eff22f5494378dc5d892b83893f4ac14cb382f5 100644 (file)
@@ -288,12 +288,7 @@ class App
                $this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == 'Apache-HttpClient/UNAVAILABLE (java 1.4)');
 
                // Register template engines
-               $dc = get_declared_classes();
-               foreach ($dc as $k) {
-                       if (in_array('Friendica\Render\ITemplateEngine', class_implements($k))) {
-                               $this->register_template_engine($k);
-                       }
-               }
+               $this->register_template_engine('Friendica\Render\FriendicaSmartyEngine');
 
                self::$a = $this;
        }
@@ -602,7 +597,7 @@ class App
                        $this->template_engines[$name] = $class;
                } else {
                        echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
-                       killme();
+                       die();
                }
        }