This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
friendica
/
friendica
mirror of
https://github.com/friendica/friendica.git
Watch
1
Star
2
Fork
1
Code
Issues
Releases
49
Wiki
Activity
Browse Source
Pass App class instace to all templates via "$APP" variable
pull/2312/head
Fabrixxm
5 years ago
parent
f0912d6219
commit
9fcd74f470
2 changed files
with
3 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
include/friendica_smarty.php
+1
-1
include/text.php
+ 2
- 0
include/friendica_smarty.php
View File
@ -60,6 +60,8 @@ class FriendicaSmartyEngine implements ITemplateEngine {
$template
=
$s
;
$s
=
new
FriendicaSmarty
();
}
$r
[
'$APP'
]
=
get_app
();
// "middleware": inject variables into templates
$arr
=
array
(
+ 1
- 1
include/text.php
View File
@ -22,7 +22,7 @@ function replace_macros($s,$r) {
$a
=
get_app
();
// pass $baseurl to all templates
$r
[
'$baseurl'
]
=
z_root
();
$r
[
'$baseurl'
]
=
$a
->
get_baseurl
();
$t
=
$a
->
template_engine
();
Write
Preview
Loading…
Cancel
Save