/** * Load plugin configuration from database * * @param string $pi_name Plugin name * @return boolean true on success, otherwise false * @see plugin_initconfig_spamx * */ function plugin_load_configuration_spamx($pi_name) { global $_CONF; $base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/'; require_once $_CONF['path_system'] . 'classes/config.class.php'; require_once $base_path . 'install_defaults.php'; return plugin_initconfig_spamx(); }
/** * Loads the configuration records for the Online Config Manager * * @return boolean true = proceed with install, false = an error occured * */ function plugin_load_configuration_spamx() { global $_CONF; require_once $_CONF['path'] . 'plugins/spamx/install_defaults.php'; return plugin_initconfig_spamx(); }
/** * Add plugin configuration * */ function plugin_load_configuration() { global $_CONF, $base_path; require_once $_CONF['path_system'] . 'classes/config.class.php'; require_once $base_path . 'install_defaults.php'; return plugin_initconfig_spamx(); }
function upgrade_SpamXPlugin() { global $_CONF, $_TABLES; require_once $_CONF['path_system'] . 'classes/config.class.php'; $plugin_path = $_CONF['path'] . 'plugins/spamx/'; require_once $plugin_path . 'install_defaults.php'; if (file_exists($plugin_path . 'config.php')) { global $_DB_table_prefix, $_SPX_CONF; require_once $plugin_path . 'config.php'; } if (!plugin_initconfig_spamx()) { echo 'There was an error upgrading the Spam-X plugin'; return false; } $sql = "UPDATE {$_TABLES['plugins']} SET pi_version = '1.1.1', pi_gl_version = '1.5.0' WHERE pi_name = 'spamx'"; $rst = DB_query($sql); if (DB_error()) { echo "There was an error upgrading the Spam-X plugin"; return false; } return true; }