X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Finfo%2Ffunctions.php;h=3a20afb8220bc5b31696dcf7f1b172e9fe9df2ef;hp=d41fd5b42665717ca0aa1783f67e12378d808663;hb=01c372f1c182a45c71fdaa1dfc205641a0870025;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe diff --git a/plugins/info/functions.php b/plugins/info/functions.php index d41fd5b4..3a20afb8 100644 --- a/plugins/info/functions.php +++ b/plugins/info/functions.php @@ -1,53 +1,76 @@ -".$query.""; - fputs ($imap_stream, $query); - $response = sqimap_read_data_list($imap_stream, $sid, false, $responses, $message); - array_push($response, $message); + print "".htmlspecialchars($string).""; + $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false); + array_push($response, $responses . ' ' .$message); return $response; } +/** + * Print the IMAP response to options.php + * + * @param array $response results of imap command + * @access private + */ function print_response($response) { foreach($response as $index=>$value) { if (is_array($value)) { print_response($value); } else { - $value = preg_replace("//", ">", $value); - print $value."
\n"; + print htmlspecialchars($value)."
\n"; } } } - -?> + +/** + * Check if plugin is enabled + * @param string $plugin_name plugin name + * @return boolean + */ +function is_plugin_enabled($plugin_name) { + global $plugins; + if ( in_array($plugin_name,$plugins) ) { + return true; + } else { + return false; + } +} +?> \ No newline at end of file