<?php

/**

 * This file contains the base class for all addons to do their work.

 * Addons must extend this class as it contains basic functionality they will require.

 *

 * @package Interspire_Addons, FEEDBACKLOOP

 */



/**

 * Addons_add_addon_installer

 * This is the base class for all addons to work off.

 * It handles:

 * - installing & uninstalling addons

 * - enabling & disabling addons

 * - running addons

 * - finding/loading addons including their language data_files and description.xml data_files

 *

 * The description.xml file is used by the calling code to work out

 * - the name of the addon

 * - a short description

 * - the current version number

 * - the author

 * - license details 

 *

 * @uses Interspire_Addons_Exception, Addons_add_addon_installer

 */



define('IEM_CRON_JOB', true);

define('IEM_NO_CONTROLLER', true);

define('IEM_CLI_MODE', true);

require_once (dirname(dirname(dirname(dirname(__FILE__)))) . '/index.php');

require_once IEM_PUBLIC_PATH . '/functions/api/settings.php';

$settings_api = new Settings_API();



if ($settings_api->NeedDatabaseUpgrade()) {    exit();	}



unset($settings_api);



if (! SENDSTUDIO_SAFE_MODE && strpos(SENDSTUDIO_DISABLED_FUNCTIONS, 'set_time_limit') === false) {    set_time_limit(0);	}



if (! defined('SENDSTUDIO_IS_SETUP') || ! SENDSTUDIO_IS_SETUP) {    exit();	}



if (SENDSTUDIO_CRON_ENABLED != 1) {    exit();	}



require_once SENDSTUDIO_FUNCTION_DIRECTORY . '/sendstudio_functions.php';

$path = IEM_ADDONS_PATH . '/feedbackloop/api/feedbackloop.php';



if (! is_file($path)) {    return false;	}



require_once $path;

$api = new Feedbackloop_API();

$api->destroy();