Merge "inputs.less: Change focus state"
[lhc/web/wiklou.git] / includes / TemplateParser.php
index 41ae4a4..a178fed 100644 (file)
@@ -97,7 +97,7 @@ class TemplateParser {
 
                // Fetch a secret key for building a keyed hash of the PHP code
                $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
-               $secretKey = $config->get( 'SecretKey' );
+               $secretKey = $config->get( 'SecretKey' ) ? : 'key';
 
                // See if the compiled PHP code is stored in cache.
                // CACHE_ACCEL throws an exception if no suitable object cache is present, so fall
@@ -166,6 +166,16 @@ class TemplateParser {
 
        /**
         * Returns HTML for a given template by calling the template function with the given args
+        *
+        * @code
+        *     echo $templateParser->processTemplate(
+        *         'ExampleTemplate',
+        *         array(
+        *             'username' => $user->getName(),
+        *             'message' => 'Hello!'
+        *         )
+        *     );
+        * @endcode
         * @param string $templateName The name of the template
         * @param mixed $args
         * @param array $scopes