X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fplugin.php;h=6e66aa60a1885aea62035c41fd9a7e9334e57c0b;hb=c3806a9dc07e4bf45491e7120a1c931332f2e555;hp=ab8d518464a03a31ca42146c1bdc21c6d977cc9d;hpb=78153530d3c8e63abbc5c193b89323de8b315117;p=squirrelmail.git diff --git a/functions/plugin.php b/functions/plugin.php index ab8d5184..6e66aa60 100644 --- a/functions/plugin.php +++ b/functions/plugin.php @@ -13,14 +13,6 @@ * @package squirrelmail */ -/** Everything needs global.. */ -require_once(SM_PATH . 'functions/global.php'); -require_once(SM_PATH . 'config/config.php'); -require_once(SM_PATH . 'functions/prefs.php'); - -global $squirrelmail_plugin_hooks; -$squirrelmail_plugin_hooks = array(); - /** * This function adds a plugin. * @param string $name Internal plugin name (ie. delete_move_next) @@ -200,7 +192,7 @@ function is_plugin_enabled($plugin_name) { global $plugins; /** - * check if variable is empty. if var is not set, php empty + * check if variable is empty. if var is not set, php empty * returns true without error notice. * * then check if it is an array @@ -214,25 +206,4 @@ function is_plugin_enabled($plugin_name) { return false; } } - -/*************************************/ -/*** MAIN PLUGIN LOADING CODE HERE ***/ -/*************************************/ - -/* On startup, register all plugins configured for use. */ -if (isset($plugins) && is_array($plugins)) { - // turn on output buffering in order to prevent output of new lines - ob_start(); - foreach ($plugins as $name) { - use_plugin($name); - } - // get output and remove whitespace - $output = trim(ob_get_contents()); - ob_end_clean(); - // if plugins output more than newlines and spacing, stop script execution. - if (!empty($output)) { - die($output); - } -} - ?>