aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-01 21:48:54 -0700
committerredmatrix <git@macgirvin.com>2016-06-01 21:48:54 -0700
commita9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2 (patch)
treede0ac6910e13926df60cfed458e50310c5642055 /include/text.php
parentb1259876bf398880e7b0c1b44d90f94983243e72 (diff)
downloadvolse-hubzilla-a9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2.tar.gz
volse-hubzilla-a9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2.tar.bz2
volse-hubzilla-a9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2.zip
the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php33
1 files changed, 1 insertions, 32 deletions
diff --git a/include/text.php b/include/text.php
index c57f5fce4..551cb72bc 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1458,37 +1458,6 @@ function generate_named_map($location) {
return (($arr['html']) ? $arr['html'] : $location);
}
-function format_event($jobject) {
- $event = array();
-
- $object = json_decode($jobject,true);
-
- //ensure compatibility with older items - this check can be removed at a later point
- if(array_key_exists('description', $object)) {
-
- $bd_format = t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM
-
- $event['header'] = replace_macros(get_markup_template('event_item_header.tpl'),array(
- '$title' => bbcode($object['title']),
- '$dtstart_label' => t('Starts:'),
- '$dtstart_title' => datetime_convert('UTC', 'UTC', $object['start'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
- '$dtstart_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['start'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['start'] , $bd_format))),
- '$finish' => (($object['nofinish']) ? false : true),
- '$dtend_label' => t('Finishes:'),
- '$dtend_title' => datetime_convert('UTC','UTC',$object['finish'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
- '$dtend_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['finish'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['finish'] , $bd_format )))
- ));
-
- $event['content'] = replace_macros(get_markup_template('event_item_content.tpl'),array(
- '$description' => bbcode($object['description']),
- '$location_label' => t('Location:'),
- '$location' => bbcode($object['location'])
- ));
-
- }
-
- return $event;
-}
function prepare_body(&$item,$attach = false) {
@@ -1516,7 +1485,7 @@ function prepare_body(&$item,$attach = false) {
$s .= prepare_text($item['body'],$item['mimetype'], false);
- $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event($item['object']) : false);
+ $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : false);
$prep_arr = array(
'item' => $item,