コード例 #1
0
function ikit_menu_control_panel_process_request()
{
    // Handle form submission
    $action = null;
    if (isset($_POST['action'])) {
        $action = $_POST['action'];
    }
    // Pull etouches events
    if ($action == 'force_pull_etouches_events') {
        ikit_event_etouches_remote_fetch();
    }
    // Pull Eventbrite events
    if ($action == 'force_pull_eventbrite_events') {
        try {
            ikit_event_eventbrite_remote_fetch();
        } catch (Exception $e) {
            // Display admin error if problem fetching
            global $g_admin_notices;
            array_push($g_admin_notices, '<div class="error">Error during force pull Eventbrite events: ' . $e->getMessage() . '</div>');
        }
    }
    // Delete etouches events
    if ($action == 'force_purge_etouches_events') {
        ikit_delete_ikit_events(IKIT_EVENT_SERVICE_ETOUCHES);
    }
    // Delete Eventbrite events
    if ($action == 'force_purge_eventbrite_events') {
        ikit_delete_ikit_events(IKIT_EVENT_SERVICE_EVENTBRITE);
    }
    // Delete all jobs
    if ($action == 'force_purge_jobs') {
        ikit_delete_ikit_jobs();
    }
    // Delete all portfolios
    if ($action == 'force_purge_portfolios') {
        ikit_delete_ikit_portfolios();
    }
}
コード例 #2
0
function ikit_task_twicedaily_event_run()
{
    ikit_event_eventbrite_remote_fetch();
    # Events can only be pulled twice daily from etouches due to usage limitations
}