Commit ea15c4ab authored by Francesco Iannuzzelli's avatar Francesco Iannuzzelli

Fix event item

parent 398c1708
......@@ -339,7 +339,7 @@ class Event
}
if(count($this->errors)==0) {
$address = (isset($json->venue) && $json->venue!='')? $db->SqlQuote($json->venue) : '';
$address = (isset($json->venue) && $json->venue!='')? $db->SqlQuote(str_replace(', Italy', '', $json->venue)) : '';
$description = (isset($json->description) && $json->description!='')? $db->SqlQuote($json->description) : '';
$event_type = $json->id_type;
$fb_link = "https://www.facebook.com/events/{$json->facebook_id}/";
......
......@@ -272,7 +272,7 @@ class Events
$join = $this->geo->GeoJoin("e.id_geo");
$rows = array();
$sqlstr = "SELECT UNIX_TIMESTAMP(start_date) AS start_date_ts,
id_event,e.title,place,type,{$join['name']} AS geo_name,
id_event,e.title,place,type,{$join['name']} AS geo_name,e.address,e.description,
e.id_topic,e.jump_to_article,e.id_article,e.has_image,e.image_ratio
FROM events e
INNER JOIN event_types et ON e.id_event_type=et.id_event_type ";
......
......@@ -2838,10 +2838,14 @@ class Layout
$event['day'] = date("j",$item['start_date_ts']);
$event['day_name'] = $this->dt->DayNameByTs($item['start_date_ts']);
$event['day_short'] = substr($event['day_name'],0,3);
$event['address'] = $item['address'];
$event['place'] = $item['place'];
$event['geo_name'] = $item['geo_name'];
$event['event_type'] = $item['type'];
$event['title'] = $item['title'];
$event['desc'] = $item['description'];
$this->th->Html2Text($item['description']);
$event['desc'] = $this->th->StringChunk($item['description'], 150)[0] . ' ...';
if($item['hdate_ts']>0)
$event['hdate'] = $this->FormatDate($item['hdate_ts']);
$this->TopicInit($item['id_topic']);
......
......@@ -379,12 +379,12 @@ class TextHelper
'/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with
'/<style[^>]*>.*?<\/style>/i', // <style>s -- which strip_tags supposedly has problems with
//'/<!-- .* -->/', // Comments -- which strip_tags might have problem a with
'/<h[123][^>]*>(.*?)<\/h[123]>/ie', // H1 - H3
'/<h[456][^>]*>(.*?)<\/h[456]>/ie', // H4 - H6
'/<h[123][^>]*>(.*?)<\/h[123]>/i', // H1 - H3
'/<h[456][^>]*>(.*?)<\/h[456]>/i', // H4 - H6
'/<p[^>]*>/i', // <P>
'/<br[^>]*>/i', // <br>
'/<b[^>]*>(.*?)<\/b>/ie', // <b>
'/<strong[^>]*>(.*?)<\/strong>/ie', // <strong>
'/<b[^>]*>(.*?)<\/b>/i', // <b>
'/<strong[^>]*>(.*?)<\/strong>/i', // <strong>
'/<i[^>]*>(.*?)<\/i>/i', // <i>
'/<em[^>]*>(.*?)<\/em>/i', // <em>
'/(<ul[^>]*>|<\/ul>)/i', // <ul> and </ul>
......@@ -397,7 +397,7 @@ class TextHelper
'/(<table[^>]*>|<\/table>)/i', // <table> and </table>
'/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr>
'/<td[^>]*>(.*?)<\/td>/i', // <td> and </td>
'/<th[^>]*>(.*?)<\/th>/ie', // <th> and </th>
'/<th[^>]*>(.*?)<\/th>/i', // <th> and </th>
'/&(nbsp|#160);/i', // Non-breaking space
'/&(quot|rdquo|ldquo|#8220|#8221|#147|#148);/i',
// Double quotes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment