Hi Alex: On 2/11/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> A clean_int() function would allow $showhosts to be 2, 3, 4, etc. > which are also bad values. Not likely to be harmful, but still bogus. > > Since $showhosts has only 2 legitimate values, what about filtering it > as a boolean, and casting it to int when needed, like in > cluster_view.php? Sure, please submit a patch. BTW, I am going to check in the patches for trunk, however, I will rename clean_float() to clean_number() since the function name and the comment seems a bit misleading based on its call to is_numeric (i.e. it is not really checking whether it is a valid float, just a valid number). Cheers, Bernard ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers