Commit 3a509467 authored by Francesco Iannuzzelli's avatar Francesco Iannuzzelli

Virtual events

parent 253ba787
......@@ -95,7 +95,7 @@ class Event
$db =& Db::globaldb();
$sqlstr = "SELECT e.title,e.approved,UNIX_TIMESTAMP(start_date) AS start_date_ts,
length,place,place_details,id_geo,e.id_event_type,contact_name,email,link,phone,description,
allday,e.id_article,e.id_topic,e.id_group,e.has_image,e.is_html,e.latitude,e.longitude,
allday,e.id_article,e.id_topic,e.id_group,e.has_image,e.is_html,e.latitude,e.longitude,e.id_geo,
UNIX_TIMESTAMP(end_date) AS end_date_ts,e.portal,et.type,e.facebook_id,e.address,
$gjoin[name] AS geo_name,e.id_event,e.jump_to_article,e.id_p,e.image_ratio
FROM events e
......
......@@ -2952,6 +2952,7 @@ class Layout
$event['day_short'] = substr($event['day_name'],0,3);
$event['address'] = $item['address'];
$event['place'] = $item['place'];
$event['id_geo'] = $item['id_geo'];
$event['geo_name'] = $item['geo_name'];
$event['event_type'] = $item['type'];
$event['title'] = $item['title'];
......@@ -7704,15 +7705,23 @@ class Layout
$ld['description'] = $event['title'];
}
$location = array();
$location['@type'] = 'Place';
$location['name'] = $event['place'];
$location['address'] = array('@type'=>'PostalAddress','addressLocality'=>$event['place']);
if(isset($event['geo_name'])) {
$location['address']['addressRegion'] = $event['geo_name'];
$location['address']['addressCountry'] = 'IT';
}
if($event['place_details']['xvalue']!='') {
$location['streetAddress'] = $event['place_details']['xvalue'];
if($event['id_geo'] == '105') {
$location['@type'] = 'VirtualLocation';
if($event['link']!='') {
$location['url'] = $event['link'];
}
$ld['eventAttendanceMode'] = 'online';
} else {
$location['@type'] = 'Place';
$location['name'] = $event['place'];
$location['address'] = array('@type'=>'PostalAddress','addressLocality'=>$event['place']);
if(isset($event['geo_name'])) {
$location['address']['addressRegion'] = $event['geo_name'];
$location['address']['addressCountry'] = 'IT';
}
if($event['place_details']['xvalue']!='') {
$location['streetAddress'] = $event['place_details']['xvalue'];
}
}
$ld['location'] = $location;
} else {
......
......@@ -126,6 +126,9 @@ class PhPeaceUpdates
{
switch($version_new)
{
case "313":
$this->UpdateDB("272");
break;
case "311":
$this->UpdateDB("271");
break;
......@@ -482,6 +485,9 @@ class PhPeaceUpdates
$dbconf = $conf->Get("dbconf");
switch($db_version)
{
case "272":
$db->query("UPDATE prov SET prov='Internet / Virtual' WHERE id_prov=105");
break;
case "271":
$db->ColumnAdd("users","id_group","SMALLINT(3)","0");
break;
......
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