Fix incorrect stristr() parameter order
[squirrelmail.git] / plugins / info / functions.php
index 412a2d894b9a5ac5e8dd880e1402d1b0559cf33f..c2eec3b532fad767ec9d87e2536c9f80f4af3e1c 100644 (file)
@@ -1,25 +1,28 @@
-<?PHP
+<?php
 
 /**
  * functions for info plugin
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Here are two functions for the info plugin
  * The first gets the CAPABILITY response from your IMAP server.
- * The second runs the passed IMAP test and returns the results 
+ * The second runs the passed IMAP test and returns the results
  * The third prints the results of the IMAP command
  * to options.php.
- * by: Jason Munro jason@stdbev.com
  *
- * $Id$ 
+ * @author Jason Munro <jason at stdbev.com>
+ * @copyright &copy; 1999-2009 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
  * @package plugins
  * @subpackage info
  */
 
 /**
  * Get the IMAP capabilities
+ *
+ * @param mixed $imap_stream
  * @return array
+ * @access private
  */
 function get_caps($imap_stream) {
     return sqimap_run_command_list($imap_stream, 'CAPABILITY',false, $responses, $message,false);
@@ -27,10 +30,13 @@ function get_caps($imap_stream) {
 
 /**
  * Run an IMAP test and return the results
+ *
+ * @param mixed $imap_stream
+ * @param string $string imap command
  * @return array Response from the IMAP server
+ * @access private
  */
 function imap_test($imap_stream, $string) {
-    global $default_charset;
     print "<tr><td>".htmlspecialchars($string)."</td></tr>";
     $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
     array_push($response, $responses . ' ' .$message);
@@ -39,9 +45,12 @@ function imap_test($imap_stream, $string) {
 
 /**
  * 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) {
+    foreach($response as $value) {
         if (is_array($value)) {
             print_response($value);
         }
@@ -50,5 +59,3 @@ function print_response($response) {
         }
     }
 }
-                                                                                        
-?>