diff --git a/include/text.php b/include/text.php index 58f69449f..628da1c1b 100644 --- a/include/text.php +++ b/include/text.php @@ -477,7 +477,6 @@ function get_markup_template($s, $root = '') { // $tt = microtime() - $ts; // $a->page['debug'] .= "$tt
\n"; // return $file_contents; -// logger($template_file); return file_get_contents($template_file); } }} diff --git a/mod/install.php b/mod/install.php index d4e04c1a9..91b5e3d2d 100755 --- a/mod/install.php +++ b/mod/install.php @@ -177,8 +177,6 @@ function install_content(&$a) { check_htconfig($checks); - check_smarty3($checks); - check_keys($checks); if(x($_POST,'phpath')) @@ -430,22 +428,6 @@ function check_htconfig(&$checks) { } -function check_smarty3(&$checks) { - $status = true; - $help = ""; - if( !is_writable('view/smarty3') ) { - - $status=false; - $help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL; - $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL; - $help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL; - $help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL; - } - - check_add($checks, t('view/smarty3 is writable'), $status, true, $help); - -} - function check_htaccess(&$checks) { $a = get_app(); $status = true; diff --git a/view/smarty3/admin_logs.tpl b/view/smarty3/admin_logs.tpl index 4f79515ad..e5412429f 100644 --- a/view/smarty3/admin_logs.tpl +++ b/view/smarty3/admin_logs.tpl @@ -4,9 +4,9 @@
- {{include file="file:{{$field_checkbox}}" field=$debugging}} - {{include file="file:{{$field_input}}" field=$logfile}} - {{include file="file:{{$field_select}}" field=$loglevel}} + {{include file="field_checkbox.tpl" field=$debugging}} + {{include file="field_input.tpl" field=$logfile}} + {{include file="field_select.tpl" field=$loglevel}}
diff --git a/view/smarty3/admin_remoteupdate.tpl b/view/smarty3/admin_remoteupdate.tpl index 2e52e99a6..6260741ed 100644 --- a/view/smarty3/admin_remoteupdate.tpl +++ b/view/smarty3/admin_remoteupdate.tpl @@ -84,10 +84,10 @@

Your friendica installation is not writable by web server.

{{if $canftp}}

You can try to update via FTP

- {{include file="file:{{$field_input}}" field=$ftphost}} - {{include file="file:{{$field_input}}" field=$ftppath}} - {{include file="file:{{$field_input}}" field=$ftpuser}} - {{include file="file:{{$field_password}}" field=$ftppwd}} + {{include file="field_input.tpl" field=$ftphost}} + {{include file="field_input.tpl" field=$ftppath}} + {{include file="field_input.tpl" field=$ftpuser}} + {{include file="field_password.tpl" field=$ftppwd}}
{{/if}} {{/if}} diff --git a/view/smarty3/admin_site.tpl b/view/smarty3/admin_site.tpl index 290ee0bb1..79e68a40c 100644 --- a/view/smarty3/admin_site.tpl +++ b/view/smarty3/admin_site.tpl @@ -41,65 +41,65 @@ - {{include file="file:{{$field_input}}" field=$sitename}} - {{include file="file:{{$field_textarea}}" field=$banner}} - {{include file="file:{{$field_select}}" field=$language}} - {{include file="file:{{$field_select}}" field=$theme}} - {{include file="file:{{$field_select}}" field=$theme_mobile}} - {{include file="file:{{$field_select}}" field=$ssl_policy}} - {{include file="file:{{$field_checkbox}}" field=$new_share}} + {{include file="field_input.tpl" field=$sitename}} + {{include file="field_textarea.tpl" field=$banner}} + {{include file="field_select.tpl" field=$language}} + {{include file="field_select.tpl" field=$theme}} + {{include file="field_select.tpl" field=$theme_mobile}} + {{include file="field_select.tpl" field=$ssl_policy}} + {{include file="field_checkbox.tpl" field=$new_share}}

{{$registration}}

- {{include file="file:{{$field_input}}" field=$register_text}} - {{include file="file:{{$field_select}}" field=$register_policy}} - {{include file="file:{{$field_input}}" field=$daily_registrations}} - {{include file="file:{{$field_checkbox}}" field=$no_multi_reg}} - {{include file="file:{{$field_checkbox}}" field=$no_openid}} - {{include file="file:{{$field_checkbox}}" field=$no_regfullname}} + {{include file="field_input.tpl" field=$register_text}} + {{include file="field_select.tpl" field=$register_policy}} + {{include file="field_input.tpl" field=$daily_registrations}} + {{include file="field_checkbox.tpl" field=$no_multi_reg}} + {{include file="field_checkbox.tpl" field=$no_openid}} + {{include file="field_checkbox.tpl" field=$no_regfullname}}

{{$upload}}

- {{include file="file:{{$field_input}}" field=$maximagesize}} - {{include file="file:{{$field_input}}" field=$maximagelength}} - {{include file="file:{{$field_input}}" field=$jpegimagequality}} + {{include file="field_input.tpl" field=$maximagesize}} + {{include file="field_input.tpl" field=$maximagelength}} + {{include file="field_input.tpl" field=$jpegimagequality}}

{{$corporate}}

- {{include file="file:{{$field_input}}" field=$allowed_sites}} - {{include file="file:{{$field_input}}" field=$allowed_email}} - {{include file="file:{{$field_checkbox}}" field=$block_public}} - {{include file="file:{{$field_checkbox}}" field=$force_publish}} - {{include file="file:{{$field_checkbox}}" field=$no_community_page}} - {{include file="file:{{$field_checkbox}}" field=$ostatus_disabled}} - {{include file="file:{{$field_checkbox}}" field=$diaspora_enabled}} - {{include file="file:{{$field_checkbox}}" field=$dfrn_only}} - {{include file="file:{{$field_input}}" field=$global_directory}} - {{include file="file:{{$field_checkbox}}" field=$thread_allow}} - {{include file="file:{{$field_checkbox}}" field=$newuser_private}} + {{include file="field_input.tpl" field=$allowed_sites}} + {{include file="field_input.tpl" field=$allowed_email}} + {{include file="field_checkbox.tpl" field=$block_public}} + {{include file="field_checkbox.tpl" field=$force_publish}} + {{include file="field_checkbox.tpl" field=$no_community_page}} + {{include file="field_checkbox.tpl" field=$ostatus_disabled}} + {{include file="field_checkbox.tpl" field=$diaspora_enabled}} + {{include file="field_checkbox.tpl" field=$dfrn_only}} + {{include file="field_input.tpl" field=$global_directory}} + {{include file="field_checkbox.tpl" field=$thread_allow}} + {{include file="field_checkbox.tpl" field=$newuser_private}}

{{$advanced}}

- {{include file="file:{{$field_checkbox}}" field=$no_utf}} - {{include file="file:{{$field_checkbox}}" field=$verifyssl}} - {{include file="file:{{$field_input}}" field=$proxy}} - {{include file="file:{{$field_input}}" field=$proxyuser}} - {{include file="file:{{$field_input}}" field=$timeout}} - {{include file="file:{{$field_input}}" field=$delivery_interval}} - {{include file="file:{{$field_input}}" field=$poll_interval}} - {{include file="file:{{$field_input}}" field=$maxloadavg}} - {{include file="file:{{$field_input}}" field=$abandon_days}} - {{include file="file:{{$field_input}}" field=$lockpath}} - {{include file="file:{{$field_input}}" field=$temppath}} - {{include file="file:{{$field_input}}" field=$basepath}} + {{include file="field_checkbox.tpl" field=$no_utf}} + {{include file="field_checkbox.tpl" field=$verifyssl}} + {{include file="field_input.tpl" field=$proxy}} + {{include file="field_input.tpl" field=$proxyuser}} + {{include file="field_input.tpl" field=$timeout}} + {{include file="field_input.tpl" field=$delivery_interval}} + {{include file="field_input.tpl" field=$poll_interval}} + {{include file="field_input.tpl" field=$maxloadavg}} + {{include file="field_input.tpl" field=$abandon_days}} + {{include file="field_input.tpl" field=$lockpath}} + {{include file="field_input.tpl" field=$temppath}} + {{include file="field_input.tpl" field=$basepath}}

{{$performance}}

- {{include file="file:{{$field_checkbox}}" field=$use_fulltext_engine}} - {{include file="file:{{$field_input}}" field=$itemcache}} - {{include file="file:{{$field_input}}" field=$itemcache_duration}} + {{include file="field_checkbox.tpl" field=$use_fulltext_engine}} + {{include file="field_input.tpl" field=$itemcache}} + {{include file="field_input.tpl" field=$itemcache_duration}}
diff --git a/view/smarty3/api_friends_xml.tpl b/view/smarty3/api_friends_xml.tpl index fe92eea6d..d3a218142 100644 --- a/view/smarty3/api_friends_xml.tpl +++ b/view/smarty3/api_friends_xml.tpl @@ -2,6 +2,6 @@ {{foreach $users as $u}} - {{include file="file:{{$api_user_xml}}" user=$u}} + {{include file="api_user_xml.tpl" user=$u}} {{/foreach}} diff --git a/view/smarty3/api_timeline_xml.tpl b/view/smarty3/api_timeline_xml.tpl index 48e932866..f14d73e9c 100644 --- a/view/smarty3/api_timeline_xml.tpl +++ b/view/smarty3/api_timeline_xml.tpl @@ -10,7 +10,7 @@ {{$status.in_reply_to_screen_name}} {{$status.geo}} {{$status.favorited}} -{{include file="file:{{$api_user_xml}}" user=$status.user}} {{$status.statusnet_html}} +{{include file="api_user_xml.tpl" user=$status.user}} {{$status.statusnet_html}} {{$status.statusnet_conversation_id}} {{$status.url}} {{$status.coordinates}} diff --git a/view/smarty3/contact_edit.tpl b/view/smarty3/contact_edit.tpl index d12fdd44f..4f65f76a3 100644 --- a/view/smarty3/contact_edit.tpl +++ b/view/smarty3/contact_edit.tpl @@ -65,7 +65,7 @@ {{/if}}
- {{include file="file:{{$field_checkbox}}" field=$hidden}} + {{include file="field_checkbox.tpl" field=$hidden}}

{{$lbl_info1}}

diff --git a/view/smarty3/contacts-template.tpl b/view/smarty3/contacts-template.tpl index 3c998f792..de074fc3c 100644 --- a/view/smarty3/contacts-template.tpl +++ b/view/smarty3/contacts-template.tpl @@ -15,7 +15,7 @@ {{foreach $contacts as $c}} - {{include file="file:{{$contact_template}}" contact=$c}} + {{include file="contact_template.tpl" contact=$c}} {{/foreach}}
diff --git a/view/smarty3/field.tpl b/view/smarty3/field.tpl index c364bd91e..b7111ce5c 100644 --- a/view/smarty3/field.tpl +++ b/view/smarty3/field.tpl @@ -1,4 +1,4 @@ {{if $field.0==select}} - {{include file="file:{{$field_select}}"}} + {{include file="field_select.tpl"}} {{/if}} diff --git a/view/smarty3/filebrowser.tpl b/view/smarty3/filebrowser.tpl index c5171ae84..787f7c0cd 100644 --- a/view/smarty3/filebrowser.tpl +++ b/view/smarty3/filebrowser.tpl @@ -77,7 +77,7 @@
- +
diff --git a/view/smarty3/filer_dialog.tpl b/view/smarty3/filer_dialog.tpl index 5444d7f4d..ae59ab713 100644 --- a/view/smarty3/filer_dialog.tpl +++ b/view/smarty3/filer_dialog.tpl @@ -1,4 +1,4 @@ -{{include file="file:{{$field_combobox}}"}} +{{include file="field_combobox.tpl"}}
diff --git a/view/smarty3/group_edit.tpl b/view/smarty3/group_edit.tpl index e381ff47b..424d1c125 100644 --- a/view/smarty3/group_edit.tpl +++ b/view/smarty3/group_edit.tpl @@ -5,7 +5,7 @@ - {{include file="file:{{$field_input}}" field=$gname}} + {{include file="field_input.tpl" field=$gname}} {{if $drop}}{{$drop}}{{/if}}
@@ -17,7 +17,7 @@ {{if $groupedit_info}}
- {{include file="file:{{$groupeditortpl}}" groupeditor=$groupedit_info}} + {{include file="groupeditor.tpl" groupeditor=$groupedit_info}}
{{/if}} {{if $desc}}
{{$desc}}
{{/if}} diff --git a/view/smarty3/install_db.tpl b/view/smarty3/install_db.tpl index 3d9a107fe..ef8510ae3 100644 --- a/view/smarty3/install_db.tpl +++ b/view/smarty3/install_db.tpl @@ -18,10 +18,10 @@ -{{include file="file:{{$field_input}}" field=$dbhost}} -{{include file="file:{{$field_input}}" field=$dbuser}} -{{include file="file:{{$field_password}}" field=$dbpass}} -{{include file="file:{{$field_input}}" field=$dbdata}} +{{include file="field_input.tpl" field=$dbhost}} +{{include file="field_input.tpl" field=$dbuser}} +{{include file="field_password.tpl" field=$dbpass}} +{{include file="field_input.tpl" field=$dbdata}} diff --git a/view/smarty3/install_settings.tpl b/view/smarty3/install_settings.tpl index 83efa3d71..dcb2f2242 100644 --- a/view/smarty3/install_settings.tpl +++ b/view/smarty3/install_settings.tpl @@ -16,7 +16,7 @@ -{{include file="file:{{$field_input}}" field=$adminmail}} +{{include file="field_input.tpl" field=$adminmail}} {{$timezone}} diff --git a/view/smarty3/intros.tpl b/view/smarty3/intros.tpl index abf198158..6132bfc75 100644 --- a/view/smarty3/intros.tpl +++ b/view/smarty3/intros.tpl @@ -14,8 +14,8 @@
-{{include file="file:{{$field_checkbox}}" field=$hidden}} -{{include file="file:{{$field_checkbox}}" field=$activity}} +{{include file="field_checkbox.tpl" field=$hidden}} +{{include file="field_checkbox.tpl" field=$activity}} diff --git a/view/smarty3/login.tpl b/view/smarty3/login.tpl index 6695495c0..331caeb24 100644 --- a/view/smarty3/login.tpl +++ b/view/smarty3/login.tpl @@ -3,17 +3,17 @@
- {{include file="file:{{$field_input}}" field=$lname}} - {{include file="file:{{$field_password}}" field=$lpassword}} + {{include file="field_input.tpl" field=$lname}} + {{include file="field_password.tpl" field=$lpassword}}
{{if $openid}}
- {{include file="file:{{$field_openid}}" field=$lopenid}} + {{include file="field_openid.tpl" field=$lopenid}}
{{/if}} - {{include file="file:{{$field_checkbox}}" field=$lremember}} + {{include file="field_checkbox.tpl" field=$lremember}}