aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Render')
-rw-r--r--Zotlabs/Render/Comanche.php7
-rw-r--r--[-rwxr-xr-x]Zotlabs/Render/SimpleTemplate.php0
-rw-r--r--[-rwxr-xr-x]Zotlabs/Render/SmartyInterface.php2
-rw-r--r--[-rwxr-xr-x]Zotlabs/Render/SmartyTemplate.php16
-rw-r--r--[-rwxr-xr-x]Zotlabs/Render/TemplateEngine.php0
5 files changed, 14 insertions, 11 deletions
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php
index cf87cc7d7..5ce05243b 100644
--- a/Zotlabs/Render/Comanche.php
+++ b/Zotlabs/Render/Comanche.php
@@ -330,6 +330,8 @@ class Comanche {
$name = str_replace($mtch[0], '', $name);
}
}
+ else
+ $var = [];
if($channel_id) {
$m = menu_fetch($name, $channel_id, get_observer_hash());
@@ -408,7 +410,8 @@ class Comanche {
}
//emit the block
- $o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
+ $wrap = (! x($var, 'wrap') || $var['wrap'] == 'none' ? false : true);
+ $o .= ($wrap ? '' : '<div class="' . $class . '">');
if($r[0]['title'] && trim($r[0]['body']) != '$content') {
$o .= '<h3>' . $r[0]['title'] . '</h3>';
@@ -421,7 +424,7 @@ class Comanche {
$o .= prepare_text($r[0]['body'], $r[0]['mimetype']);
}
- $o .= (($var['wrap'] == 'none') ? '' : '</div>');
+ $o .= ($wrap ? '' : '</div>');
}
}
diff --git a/Zotlabs/Render/SimpleTemplate.php b/Zotlabs/Render/SimpleTemplate.php
index ff1bb5c3c..ff1bb5c3c 100755..100644
--- a/Zotlabs/Render/SimpleTemplate.php
+++ b/Zotlabs/Render/SimpleTemplate.php
diff --git a/Zotlabs/Render/SmartyInterface.php b/Zotlabs/Render/SmartyInterface.php
index a40effecf..d80ea3f3a 100755..100644
--- a/Zotlabs/Render/SmartyInterface.php
+++ b/Zotlabs/Render/SmartyInterface.php
@@ -35,7 +35,7 @@ class SmartyInterface extends Smarty {
$this->right_delimiter = App::get_template_rdelim('smarty3');
// Don't report errors so verbosely
- $this->error_reporting = E_ALL & (~E_NOTICE);
+ $this->error_reporting = E_ALL & ~E_WARNING & ~E_NOTICE;
}
function parsed($template = '') {
diff --git a/Zotlabs/Render/SmartyTemplate.php b/Zotlabs/Render/SmartyTemplate.php
index 61fb72f8a..2cb96521b 100755..100644
--- a/Zotlabs/Render/SmartyTemplate.php
+++ b/Zotlabs/Render/SmartyTemplate.php
@@ -8,16 +8,16 @@ use App;
class SmartyTemplate implements TemplateEngine {
static $name ="smarty3";
-
+
public function __construct() {
// Cannot use get_config() here because it is called during installation when there is no DB.
// FIXME: this may leak private information such as system pathnames.
- $basecompiledir = ((array_key_exists('smarty3_folder', App::$config['system']))
+ $basecompiledir = ((array_key_exists('smarty3_folder', App::$config['system']))
? App::$config['system']['smarty3_folder'] : '');
if (! $basecompiledir) {
- $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . "/" . TEMPLATE_BUILD_PATH;
+ $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . TEMPLATE_BUILD_PATH;
}
if (! is_dir($basecompiledir)) {
@os_mkdir(TEMPLATE_BUILD_PATH, STORAGE_DEFAULT_PERMISSIONS, true);
@@ -30,7 +30,7 @@ class SmartyTemplate implements TemplateEngine {
}
App::$config['system']['smarty3_folder'] = $basecompiledir;
}
-
+
// TemplateEngine interface
public function replace_macros($s, $r) {
@@ -52,9 +52,9 @@ class SmartyTemplate implements TemplateEngine {
}
$s->assign($key, $value);
}
- return $s->parsed($template);
+ return $s->parsed($template);
}
-
+
public function get_markup_template($file, $root = '') {
$template_file = theme_include($file, $root);
if ($template_file) {
@@ -62,7 +62,7 @@ class SmartyTemplate implements TemplateEngine {
$template->filename = $template_file;
return $template;
- }
+ }
return EMPTY_STR;
}
@@ -84,7 +84,7 @@ class SmartyTemplate implements TemplateEngine {
$template = new SmartyInterface();
$template->filename = $template_file;
return $template;
- }
+ }
return "";
}
diff --git a/Zotlabs/Render/TemplateEngine.php b/Zotlabs/Render/TemplateEngine.php
index 600ff913e..600ff913e 100755..100644
--- a/Zotlabs/Render/TemplateEngine.php
+++ b/Zotlabs/Render/TemplateEngine.php