Browse Source

only use Smarty if the view/smarty3/ directory is writable; location bug fix

pull/550/head
Zach Prezkuta 8 years ago
parent
commit
53a4cf5339
20 changed files with 34 additions and 19 deletions
  1. +15
    -0
      boot.php
  2. +1
    -1
      include/conversation.php
  3. +1
    -1
      view/theme/cleanzero/theme.php
  4. +1
    -1
      view/theme/comix-plain/theme.php
  5. +1
    -1
      view/theme/comix/theme.php
  6. +1
    -1
      view/theme/darkbubble/theme.php
  7. +1
    -1
      view/theme/darkzero/theme.php
  8. +1
    -1
      view/theme/diabook/theme.php
  9. +1
    -1
      view/theme/dispy/theme.php
  10. +1
    -1
      view/theme/duepuntozero/theme.php
  11. +1
    -1
      view/theme/facepark/theme.php
  12. +1
    -1
      view/theme/frost-mobile/theme.php
  13. +1
    -1
      view/theme/frost/theme.php
  14. +1
    -1
      view/theme/greenzero/theme.php
  15. +1
    -1
      view/theme/purplezero/theme.php
  16. +1
    -1
      view/theme/quattro/theme.php
  17. +1
    -1
      view/theme/slackr/theme.php
  18. +1
    -1
      view/theme/smoothly/theme.php
  19. +1
    -1
      view/theme/testbubble/theme.php
  20. +1
    -1
      view/theme/vier/theme.php

+ 15
- 0
boot.php View File

@ -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;
}
}
}

+ 1
- 1
include/conversation.php View File

@ -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')) )


+ 1
- 1
view/theme/cleanzero/theme.php View File

@ -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


+ 1
- 1
view/theme/comix-plain/theme.php View File

@ -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>


+ 1
- 1
view/theme/comix/theme.php View File

@ -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>


+ 1
- 1
view/theme/darkbubble/theme.php View File

@ -10,7 +10,7 @@
$a->theme_info = array(
'extends' => 'testbubble',
);
$a->theme['template_engine'] = 'smarty3';
set_template_engine($a, 'smarty3');
$a->page['htmlhead'] .= <<< EOT


+ 1
- 1
view/theme/darkzero/theme.php View File

@ -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


+ 1
- 1
view/theme/diabook/theme.php View File

@ -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()) {


+ 1
- 1
view/theme/dispy/theme.php View File

@ -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
- 1
view/theme/duepuntozero/theme.php View File

@ -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
- 1
view/theme/facepark/theme.php View File

@ -1,6 +1,6 @@
<?php
$a->theme_info = array();
$a->theme['template_engine'] = 'smarty3';
set_template_engine($a, 'smarty3');
$a->page['htmlhead'] .= <<< EOT
<script>


+ 1
- 1
view/theme/frost-mobile/theme.php View File

@ -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) {


+ 1
- 1
view/theme/frost/theme.php View File

@ -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) {


+ 1
- 1
view/theme/greenzero/theme.php View File

@ -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


+ 1
- 1
view/theme/purplezero/theme.php View File

@ -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


+ 1
- 1
view/theme/quattro/theme.php View File

@ -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


+ 1
- 1
view/theme/slackr/theme.php View File

@ -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


+ 1
- 1
view/theme/smoothly/theme.php View File

@ -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;


+ 1
- 1
view/theme/testbubble/theme.php View File

@ -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>


+ 1
- 1
view/theme/vier/theme.php View File

@ -7,7 +7,7 @@
* Maintainer: Ike <http://pirati.ca/profile/heluecht>
*/
$a->theme['template_engine'] = 'smarty3';
set_template_engine($a, 'smarty3');
$a->theme_info = array();


Loading…
Cancel
Save