mirror of
https://github.com/friendica/friendica
synced 2024-11-18 15:03:41 +00:00
Various improvements/fixes
- Fix potential missing variable - Improve replaceMacros doc - Fix CSS value in smoothly
This commit is contained in:
parent
2241ba4540
commit
38109665c7
3 changed files with 15 additions and 14 deletions
|
@ -994,6 +994,7 @@ function builtin_activity_puller($item, &$conv_responses) {
|
||||||
function format_like($cnt, array $arr, $type, $id) {
|
function format_like($cnt, array $arr, $type, $id) {
|
||||||
$o = '';
|
$o = '';
|
||||||
$expanded = '';
|
$expanded = '';
|
||||||
|
$phrase = '';
|
||||||
|
|
||||||
if ($cnt == 1) {
|
if ($cnt == 1) {
|
||||||
$likers = $arr[0];
|
$likers = $arr[0];
|
||||||
|
|
|
@ -48,29 +48,29 @@ class Renderer extends BaseObject
|
||||||
'internal' => '',
|
'internal' => '',
|
||||||
'smarty3' => '}}'
|
'smarty3' => '}}'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is our template processor
|
* @brief This is our template processor
|
||||||
*
|
*
|
||||||
* @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
|
* @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
|
||||||
* @param array $r key value pairs (search => replace)
|
* @param array $vars key value pairs (search => replace)
|
||||||
*
|
*
|
||||||
* @return string substituted string
|
* @return string substituted string
|
||||||
*/
|
*/
|
||||||
public static function replaceMacros($s, $r)
|
public static function replaceMacros($s, $vars)
|
||||||
{
|
{
|
||||||
$stamp1 = microtime(true);
|
$stamp1 = microtime(true);
|
||||||
$a = self::getApp();
|
$a = self::getApp();
|
||||||
|
|
||||||
// pass $baseurl to all templates
|
// pass $baseurl to all templates
|
||||||
$r['$baseurl'] = System::baseUrl();
|
$vars['$baseurl'] = System::baseUrl();
|
||||||
$t = self::getTemplateEngine();
|
$t = self::getTemplateEngine();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$output = $t->replaceMacros($s, $r);
|
$output = $t->replaceMacros($s, $vars);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
|
echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->saveTimestamp($stamp1, "rendering");
|
$a->saveTimestamp($stamp1, "rendering");
|
||||||
|
|
|
@ -20,7 +20,7 @@ Orange - #fec01d
|
||||||
/* For general iPad layouts */
|
/* For general iPad layouts */
|
||||||
#body {
|
#body {
|
||||||
-moz-background-clip: border;
|
-moz-background-clip: border;
|
||||||
-moz-background-origin: pdading;
|
-moz-background-origin: padding;
|
||||||
-moz-background-size: auto auto;
|
-moz-background-size: auto auto;
|
||||||
background-attachment: scroll;
|
background-attachment: scroll;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
Loading…
Reference in a new issue