ricklush
Forum Replies Created
-
Thanks Marcus, I had read your previous posts but was convinced server was running PHP 5.2.12 as that was displayed on cPanel. However when I checked the PHP Configuration panel I found that “.php” file extensions were being processed by PHP 4. And I also now have in place a backup and restore regime!!
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ‘,’ or ‘;’ in /home/shaz/public_html/wp-content/plugins/events-manager/ajax.php on line 8
Have just upgraded WordPress to 3.0.2 and then updated EM to 3.0.8
Like an idiot I didn’t back up first!
Remote host server is running PHP 5.2.12
I can FTP and I have Dreamweaver.
Please help as site is currently disabled and is in high demand!
code in ajax.php is :
<?php
//AJAX function
function em_ajax_actions() {
//TODO Clean this up…. use a uniformed way of calling EM Ajax actions
if(isset($_REQUEST[‘dbem_ajax_action’]) && $_REQUEST[‘dbem_ajax_action’] == ‘booking_data’) {
if(isset($_REQUEST[‘id’])){
$EM_Event = new EM_Event($_REQUEST[‘id’]);
echo “[{bookedSeats:”.$EM_Event->get_bookings()->get_booked_seats().”, availableSeats:”.$EM_Event->get_bookings()->get_available_seats().”}]”;
}
die();
}
if(isset($_REQUEST[’em_ajax_action’]) && $_REQUEST[’em_ajax_action’] == ‘get_location’) {
if(isset($_REQUEST[‘id’])){
$EM_Location = new EM_Location($_REQUEST[‘id’]);
$location_array = $EM_Location->to_array();
$location_array[‘location_balloon’] = $EM_Location->output(get_option(‘dbem_location_baloon_format’));
echo EM_Object::json_encode($location_array);
}
die();
}
if(isset($_REQUEST[‘query’]) && $_REQUEST[‘query’] == ‘GlobalMapData’) {
$locations = EM_Locations::get( $_REQUEST );
$json_locations = array();
foreach($locations as $location_key => $location) {
$json_locations[$location_key] = $location->to_array();
$json_locations[$location_key][‘location_balloon’] = $location->output(get_option(‘dbem_map_text_format’));
}
echo EM_Object::json_encode($json_locations);
die();
}
if(isset($_REQUEST[‘ajaxCalendar’]) && $_REQUEST[‘ajaxCalendar’]) {
//FIXME if long events enabled originally, this won’t show up on ajax call
echo EM_Calendar::output($_REQUEST);
die();
}
}
add_action(‘init’,’em_ajax_actions’);
?>