<?php



class pluginLinkchecker extends Plugin

{

    public $config = null;

    public function __construct()

    {

        // get the plugin config

        include_once('_plugin_config.inc.php');

        // load config into the object

        $this->config = $pluginConfig;

    }

    public function getPluginDetails()

    {

        return $this->config;

    }    

    public function install()

    {

        // setup database

        $db = Database::getDatabase();

		$pluginDetails = $this->getPluginDetails();

		// Update the plugin settings

		$db->query('UPDATE plugin SET plugin_settings = :plugin_settings WHERE folder_name = :folder_name', array('plugin_settings' => 'NULL', 'folder_name' => $pluginDetails['folder_name']));

		$db->query("DELETE FROM site_config WHERE config_key = 'link_checker_num_links_to_check';");

		$db->query("DELETE FROM site_config WHERE config_key = 'link_checker_allowed_groups';");

		$db->query("DELETE FROM site_config WHERE config_key = 'link_checker_error_message';");

		return parent::install();

    }

}

?>