The function "template_escape" doesn't exist anymore.
This commit is contained in:
parent
88a9e4a904
commit
9612496e9e
|
@ -780,25 +780,14 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$profile_name_e = $profile_name;
|
||||||
$profile_name_e = template_escape($profile_name);
|
$item['title_e'] = $item['title'];
|
||||||
$item['title_e'] = template_escape($item['title']);
|
$body_e = $body;
|
||||||
$body_e = template_escape($body);
|
$tags_e = $tags;
|
||||||
$tags_e = template_escape($tags);
|
$hashtags_e = $hashtags;
|
||||||
$hashtags_e = template_escape($hashtags);
|
$mentions_e = $mentions;
|
||||||
$mentions_e = template_escape($mentions);
|
$location_e = $location;
|
||||||
$location_e = template_escape($location);
|
$owner_name_e = $owner_name;
|
||||||
$owner_name_e = template_escape($owner_name);
|
|
||||||
} else {
|
|
||||||
$profile_name_e = $profile_name;
|
|
||||||
$item['title_e'] = $item['title'];
|
|
||||||
$body_e = $body;
|
|
||||||
$tags_e = $tags;
|
|
||||||
$hashtags_e = $hashtags;
|
|
||||||
$mentions_e = $mentions;
|
|
||||||
$location_e = $location;
|
|
||||||
$owner_name_e = $owner_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($item['item_network'] == "") {
|
if ($item['item_network'] == "") {
|
||||||
$item['item_network'] = $item['network'];
|
$item['item_network'] = $item['network'];
|
||||||
|
|
|
@ -443,10 +443,6 @@ function profile_sidebar($profile, $block = 0)
|
||||||
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);
|
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
|
||||||
$location = template_escape($location);
|
|
||||||
}
|
|
||||||
|
|
||||||
$tpl = get_markup_template('profile_vcard.tpl');
|
$tpl = get_markup_template('profile_vcard.tpl');
|
||||||
$o .= replace_macros(
|
$o .= replace_macros(
|
||||||
$tpl,
|
$tpl,
|
||||||
|
|
|
@ -143,12 +143,7 @@ function directory_content(App $a) {
|
||||||
|
|
||||||
$about = ((x($profile,'about') == 1) ? t('About:') : False);
|
$about = ((x($profile,'about') == 1) ? t('About:') : False);
|
||||||
|
|
||||||
if($a->theme['template_engine'] === 'internal') {
|
$location_e = $location;
|
||||||
$location_e = template_escape($location);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$location_e = $location;
|
|
||||||
}
|
|
||||||
|
|
||||||
$photo_menu = array(
|
$photo_menu = array(
|
||||||
'profile' => array(t("View Profile"), zrl($profile_link))
|
'profile' => array(t("View Profile"), zrl($profile_link))
|
||||||
|
|
|
@ -69,13 +69,7 @@ function fbrowser_content(App $a) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$types = Photo::supportedTypes();
|
$types = Photo::supportedTypes();
|
||||||
$ext = $types[$rr['type']];
|
$ext = $types[$rr['type']];
|
||||||
|
$filename_e = $rr['filename'];
|
||||||
if($a->theme['template_engine'] === 'internal') {
|
|
||||||
$filename_e = template_escape($rr['filename']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$filename_e = $rr['filename'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Take the largest picture that is smaller or equal 640 pixels
|
// Take the largest picture that is smaller or equal 640 pixels
|
||||||
$p = q("SELECT `scale` FROM `photo` WHERE `resource-id` = '%s' AND `height` <= 640 AND `width` <= 640 ORDER BY `resource-id`, `scale` LIMIT 1",
|
$p = q("SELECT `scale` FROM `photo` WHERE `resource-id` = '%s' AND `height` <= 640 AND `width` <= 640 ORDER BY `resource-id`, `scale` LIMIT 1",
|
||||||
|
@ -117,14 +111,9 @@ function fbrowser_content(App $a) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
list($m1,$m2) = explode("/",$rr['filetype']);
|
list($m1,$m2) = explode("/",$rr['filetype']);
|
||||||
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
|
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
|
||||||
|
$filename_e = $rr['filename'];
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
return array(System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png');
|
||||||
$filename_e = template_escape($rr['filename']);
|
|
||||||
} else {
|
|
||||||
$filename_e = $rr['filename'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array( System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png');
|
|
||||||
}
|
}
|
||||||
$files = array_map("_map_files2", $files);
|
$files = array_map("_map_files2", $files);
|
||||||
|
|
||||||
|
|
|
@ -450,17 +450,10 @@ function message_content(App $a) {
|
||||||
if ($extracted['images'])
|
if ($extracted['images'])
|
||||||
$message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']);
|
$message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']);
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$from_name_e = $message['from-name'];
|
||||||
$from_name_e = template_escape($message['from-name']);
|
$subject_e = $message['title'];
|
||||||
$subject_e = template_escape($message['title']);
|
$body_e = Smilies::replace(bbcode($message['body']));
|
||||||
$body_e = template_escape(Smilies::replace(bbcode($message['body'])));
|
$to_name_e = $message['name'];
|
||||||
$to_name_e = template_escape($message['name']);
|
|
||||||
} else {
|
|
||||||
$from_name_e = $message['from-name'];
|
|
||||||
$subject_e = $message['title'];
|
|
||||||
$body_e = Smilies::replace(bbcode($message['body']));
|
|
||||||
$to_name_e = $message['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$contact = Contact::getDetailsByURL($message['from-url']);
|
$contact = Contact::getDetailsByURL($message['from-url']);
|
||||||
if (isset($contact["thumb"]))
|
if (isset($contact["thumb"]))
|
||||||
|
@ -492,11 +485,7 @@ function message_content(App $a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('mail_display.tpl');
|
$tpl = get_markup_template('mail_display.tpl');
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$subjtxt_e = $message['title'];
|
||||||
$subjtxt_e = template_escape($message['title']);
|
|
||||||
} else {
|
|
||||||
$subjtxt_e = $message['title'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$thread_id' => $a->argv[1],
|
'$thread_id' => $a->argv[1],
|
||||||
|
@ -566,15 +555,9 @@ function render_messages(array $msg, $t) {
|
||||||
else
|
else
|
||||||
$participants = sprintf(t("%s and You"), $rr['from-name']);
|
$participants = sprintf(t("%s and You"), $rr['from-name']);
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$subject_e = (($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>');
|
||||||
$subject_e = template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>'));
|
$body_e = $rr['body'];
|
||||||
$body_e = template_escape($rr['body']);
|
$to_name_e = $rr['name'];
|
||||||
$to_name_e = template_escape($rr['name']);
|
|
||||||
} else {
|
|
||||||
$subject_e = (($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>');
|
|
||||||
$body_e = $rr['body'];
|
|
||||||
$to_name_e = $rr['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$contact = Contact::getDetailsByURL($rr['url']);
|
$contact = Contact::getDetailsByURL($rr['url']);
|
||||||
if (isset($contact["thumb"]))
|
if (isset($contact["thumb"]))
|
||||||
|
|
|
@ -1155,13 +1155,8 @@ function photos_content(App $a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('photos_upload.tpl');
|
$tpl = get_markup_template('photos_upload.tpl');
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$albumselect_e = $albumselect;
|
||||||
$albumselect_e = template_escape($albumselect);
|
$aclselect_e = (($visitor) ? '' : populate_acl($a->user));
|
||||||
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user)));
|
|
||||||
} else {
|
|
||||||
$albumselect_e = $albumselect;
|
|
||||||
$aclselect_e = (($visitor) ? '' : populate_acl($a->user));
|
|
||||||
}
|
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$pagename' => t('Upload Photos'),
|
'$pagename' => t('Upload Photos'),
|
||||||
|
@ -1236,11 +1231,7 @@ function photos_content(App $a) {
|
||||||
if ($can_post) {
|
if ($can_post) {
|
||||||
$edit_tpl = get_markup_template('album_edit.tpl');
|
$edit_tpl = get_markup_template('album_edit.tpl');
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$album_e = $album;
|
||||||
$album_e = template_escape($album);
|
|
||||||
} else {
|
|
||||||
$album_e = $album;
|
|
||||||
}
|
|
||||||
|
|
||||||
$o .= replace_macros($edit_tpl,array(
|
$o .= replace_macros($edit_tpl,array(
|
||||||
'$nametext' => t('New album name: '),
|
'$nametext' => t('New album name: '),
|
||||||
|
@ -1277,13 +1268,8 @@ function photos_content(App $a) {
|
||||||
|
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['type']];
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$imgalt_e = $rr['filename'];
|
||||||
$imgalt_e = template_escape($rr['filename']);
|
$desc_e = $rr['desc'];
|
||||||
$desc_e = template_escape($rr['desc']);
|
|
||||||
} else {
|
|
||||||
$imgalt_e = $rr['filename'];
|
|
||||||
$desc_e = $rr['desc'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$photos[] = array(
|
$photos[] = array(
|
||||||
'id' => $rr['id'],
|
'id' => $rr['id'],
|
||||||
|
@ -1548,15 +1534,9 @@ function photos_content(App $a) {
|
||||||
$public_post_link = '&public=1';
|
$public_post_link = '&public=1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$album_e = $ph[0]['album'];
|
||||||
$album_e = template_escape($ph[0]['album']);
|
$caption_e = $ph[0]['desc'];
|
||||||
$caption_e = template_escape($ph[0]['desc']);
|
$aclselect_e = populate_acl($ph[0]);
|
||||||
$aclselect_e = template_escape(populate_acl($ph[0]));
|
|
||||||
} else {
|
|
||||||
$album_e = $ph[0]['album'];
|
|
||||||
$caption_e = $ph[0]['desc'];
|
|
||||||
$aclselect_e = populate_acl($ph[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$edit = replace_macros($edit_tpl, array(
|
$edit = replace_macros($edit_tpl, array(
|
||||||
'$id' => $ph[0]['id'],
|
'$id' => $ph[0]['id'],
|
||||||
|
@ -1708,15 +1688,9 @@ function photos_content(App $a) {
|
||||||
'delete' => t('Delete'),
|
'delete' => t('Delete'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$name_e = $profile_name;
|
||||||
$name_e = template_escape($profile_name);
|
$title_e = $item['title'];
|
||||||
$title_e = template_escape($item['title']);
|
$body_e = bbcode($item['body']);
|
||||||
$body_e = template_escape(bbcode($item['body']));
|
|
||||||
} else {
|
|
||||||
$name_e = $profile_name;
|
|
||||||
$title_e = $item['title'];
|
|
||||||
$body_e = bbcode($item['body']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$comments .= replace_macros($template,array(
|
$comments .= replace_macros($template,array(
|
||||||
'$id' => $item['item_id'],
|
'$id' => $item['item_id'],
|
||||||
|
@ -1766,17 +1740,10 @@ function photos_content(App $a) {
|
||||||
|
|
||||||
$photo_tpl = get_markup_template('photo_view.tpl');
|
$photo_tpl = get_markup_template('photo_view.tpl');
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$album_e = array($album_link, $ph[0]['album']);
|
||||||
$album_e = array($album_link,template_escape($ph[0]['album']));
|
$tags_e = $tags;
|
||||||
$tags_e = template_escape($tags);
|
$like_e = $like;
|
||||||
$like_e = template_escape($like);
|
$dislike_e = $dislike;
|
||||||
$dislike_e = template_escape($dislike);
|
|
||||||
} else {
|
|
||||||
$album_e = array($album_link, $ph[0]['album']);
|
|
||||||
$tags_e = $tags;
|
|
||||||
$like_e = $like;
|
|
||||||
$dislike_e = $dislike;
|
|
||||||
}
|
|
||||||
|
|
||||||
$o .= replace_macros($photo_tpl, array(
|
$o .= replace_macros($photo_tpl, array(
|
||||||
'$id' => $ph[0]['id'],
|
'$id' => $ph[0]['id'],
|
||||||
|
@ -1849,13 +1816,8 @@ function photos_content(App $a) {
|
||||||
|
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['type']];
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$alt_e = $rr['filename'];
|
||||||
$alt_e = template_escape($rr['filename']);
|
$name_e = $rr['album'];
|
||||||
$name_e = template_escape($rr['album']);
|
|
||||||
} else {
|
|
||||||
$alt_e = $rr['filename'];
|
|
||||||
$name_e = $rr['album'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$photos[] = array(
|
$photos[] = array(
|
||||||
'id' => $rr['id'],
|
'id' => $rr['id'],
|
||||||
|
|
|
@ -378,14 +378,8 @@ function videos_content(App $a) {
|
||||||
$videos = array();
|
$videos = array();
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$alt_e = $rr['filename'];
|
||||||
$alt_e = template_escape($rr['filename']);
|
$name_e = $rr['album'];
|
||||||
$name_e = template_escape($rr['album']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$alt_e = $rr['filename'];
|
|
||||||
$name_e = $rr['album'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$videos[] = array(
|
$videos[] = array(
|
||||||
'id' => $rr['id'],
|
'id' => $rr['id'],
|
||||||
|
|
|
@ -311,21 +311,12 @@ class Item extends BaseObject
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
if ($a->theme['template_engine'] === 'internal') {
|
$body_e = $body;
|
||||||
$body_e = template_escape($body);
|
$text_e = strip_tags($body);
|
||||||
$text_e = strip_tags(template_escape($body));
|
$name_e = $profile_name;
|
||||||
$name_e = template_escape($profile_name);
|
$title_e = $item['title'];
|
||||||
$title_e = template_escape($item['title']);
|
$location_e = $location;
|
||||||
$location_e = template_escape($location);
|
$owner_name_e = $this->getOwnerName();
|
||||||
$owner_name_e = template_escape($this->getOwnerName());
|
|
||||||
} else {
|
|
||||||
$body_e = $body;
|
|
||||||
$text_e = strip_tags($body);
|
|
||||||
$name_e = $profile_name;
|
|
||||||
$title_e = $item['title'];
|
|
||||||
$location_e = $location;
|
|
||||||
$owner_name_e = $this->getOwnerName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable features that aren't available in several networks
|
// Disable features that aren't available in several networks
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue