}
public function importIcalFeed( $feed_id )
{
+ $start_timer = time();
$debug = false;
$clear_data = false;
$number_events = 0;
if ( !$debug ) {
$out = $number_events . ' events imported';
}
+ $end_timer = time();
+ $this->wpdb->update(
+ GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'feed_import',
+ array(
+ 'events' => $number_events,
+ 'duration' => $end_timer - $start_timer
+ ),
+ array( 'id' => $feed_id ),
+ '%d',
+ '%d'
+ );
+
return $out;
}
public function fetchIcalFile( $url )
<th>Created Date</th>
<th>Updated Date</th>
<th>Next Run</th>
+ <th>Events</th>
+ <th>Duration</th>
<th> </th>
</tr>
{if $import_feeds}
{foreach $import_feeds as $key => $feed}
<tr>
- <td><a href="{$thisUrl}?page={$thisPage}&glm_action=events&option=icalfeed&option2=refresh&id={$feed.id}" class="button">Refresh</a></td>
+ <td>
+ <a href="{$thisUrl}?page={$thisPage}&glm_action=events&option=icalfeed&option2=refresh&id={$feed.id}" class="button">Refresh</a>
+ <a href="{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=icalFeedImport&id={$feed.id}">Bump the cron</a>
+ </td>
<td>{$feed.feed_url}</td>
<td>{$feed.created}</td>
<td>{$feed.updated}</td>
<td>{$feed.next_runtime|date_format:"%F %T"}</td>
+ <td>{$feed.events}</td>
+ <td>{if $feed.duration}{$feed.duration} Seconds{/if}</td>
<td><a href="{$thisUrl}?page={$thisPage}&glm_action=events&option=icalfeed&option2=delete&id={$feed.id}"
onClick="return confirm('This cannot be undone!\nAre you sure?')" class="button">Delete</a></td>
</tr>