Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions includes/event-organiser-event-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,12 @@ function eo_get_the_occurrence( $event_id, $occurrence_id ) {
* @param int $occurrence_id The occurrence ID
* @return string the start date formated to given format, as accepted by PHP date
*/
function eo_get_the_occurrence_start($format='d-m-Y',$occurrence_id){
function eo_get_the_occurrence_start($format = 'd-m-Y', $occurrence_id = 0){
global $wpdb;

if( empty( $occurrence_id ) ) {
return false;
}

$querystr = $wpdb->prepare("
SELECT StartDate,StartTime FROM {$wpdb->eo_events}
Expand All @@ -320,13 +324,15 @@ function eo_get_the_occurrence_start($format='d-m-Y',$occurrence_id){

$occurrence = $wpdb->get_row($querystr);

if( !$occurrence )
if( !$occurrence ) {
return false;
}

$date = trim($occurrence->StartDate).' '.trim($occurrence->StartTime);

if(empty($date)||$date==" ")
if(empty($date)||$date==" ") {
return false;
}

return eo_format_date($date,$format);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/event-organiser-venue-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ function _eventorganiser_get_venue_address_fields(){
*@ignore
*@access private
*/
function eventorganiser_venue_dropdown($post_id=0,$args){
function eventorganiser_venue_dropdown($post_id = 0, $args = array() ){
$venues = get_terms('event-venue', array('hide_empty'=>false));
$current = (int) eo_get_venue($post_id);

Expand Down