Merge pull request #550 from fermionic/20121222-use-smarty-template-engine
only use Smarty if the view/smarty3/ directory is writable
This commit is contained in:
commit
a0d7f7a6d3
15
boot.php
15
boot.php
|
@ -1946,3 +1946,18 @@ function clear_cache($basepath = "", $path = "") {
|
|||
closedir($dh);
|
||||
}
|
||||
}
|
||||
|
||||
function set_template_engine(&$a, $engine = 'internal') {
|
||||
|
||||
$a->theme['template_engine'] = 'internal';
|
||||
|
||||
if(is_writable('view/smarty3/')) {
|
||||
switch($engine) {
|
||||
case 'smarty3':
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -920,7 +920,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
|||
|
||||
$o = '';
|
||||
|
||||
$geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : '');
|
||||
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
|
||||
|
||||
/* $plaintext = false;
|
||||
if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function cleanzero_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
<script>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
<script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'testbubble',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function darkzero_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
$a = get_app();
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function get_diabook_config($key, $default = false) {
|
||||
if (local_user()) {
|
||||
|
|
|
@ -22,7 +22,7 @@ $a->theme_info = array(
|
|||
'family' => 'dispy',
|
||||
'version' => '1.2.2'
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function dispy_init(&$a) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$a->theme_info = array();
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function duepuntozero_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$a->theme_info = array();
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
<script>
|
||||
|
|
|
@ -15,7 +15,7 @@ $a->videowidth = 250;
|
|||
$a->videoheight = 200;
|
||||
$a->theme_thread_allow = false;
|
||||
$a->force_max_items = 10;
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function frost_mobile_content_loaded(&$a) {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $a->theme_info = array();
|
|||
$a->videowidth = 400;
|
||||
$a->videoheight = 330;
|
||||
$a->theme_thread_allow = false;
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function frost_content_loaded(&$a) {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function greenzero_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function purplezero_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
$a->theme_info = array();
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function quattro_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
$a->theme_info = array(
|
||||
'extends' => 'duepuntozero',
|
||||
);
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function slackr_init(&$a) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
$a = get_app();
|
||||
$a->theme_info = array();
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
function smoothly_init(&$a) {
|
||||
$cssFile = null;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Maintainer: Mike Macgirvin <mike@macgirvin.com>
|
||||
*/
|
||||
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
<script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Description: "Vier" uses the font awesome font library: http://fortawesome.github.com/Font-Awesome/
|
||||
*/
|
||||
|
||||
$a->theme['template_engine'] = 'smarty3';
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$a->theme_info = array();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user