[aur-dev] [PATCH] xhtml validation fixes for login_form.php
chi at chimeric.de
Fri Jun 6 04:36:38 EDT 2008
Angel Velásquez wrote:
> Hi Michael, first of all thanks for contributing to the AUR
> Imho, you must try to use quotes correctly, i mean simples and
> doubles, you can find a good tutorial here:
> Or you can google 'simple vs doble quotes + php', that will apply to
> you in many programming languages.
> By example that line:
> print "<span class='error'>" . $login_error . "</span><br />\n"; -->
> bad written
thanks for your advice but if you take a closer look at the patch you'll
notice that I haven't touched that part of the code other than indenting it.
And if you take a look at the bigger patch against the search_pkg_form.php I
send earlier you'll see that I quote like you recommend here :) (except that I
leave spaces for concatenating as IMHO it makes it easier on the eyes eg.
"' . $variable . '" but that's a matter of taste I guess).
> // why "? use ' for that case when you are not intending to parse some
> value is better
> $foo["var"] = "test";
> include "foo/bar.php"
> print $_SESSION["foo"];
> $bar = array("foo","bar");
Agreed again + same thing here, take a look at the search_pkg_form.php
earlier, I've fixed all that in it ;) as I prefer single quotes in PHP over
double quotes as well (on the other hand for HTML if prefer doubles quotes
over single quotes ie: class="foo").
> Just a recommendation trying to have clean code, i know that AUR isn't
> complete clean, but the patches should be, then for next releases will
> be easier to clean and write code correctly.
> Just a recommendation, again, thanks for your patches :-)
Thanks you for your feedback :).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the aur-dev