[aur-dev] [PATCH] xhtml validation fixes for login_form.php

Angel Velásquez angvp at archlinux.com.ve
Thu Jun 5 20:00:30 EDT 2008


Hi Michael, first of all thanks for contributing to the AUR Development.

Imho, you must try to use quotes correctly, i mean simples and doubles, you
can find a good tutorial here:

http://ve2.php.net/types.string

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

Will work, and that should be enough, but no, why doble quotes " then ' and
then you concatenate the string, imho that should be something like:

print '<span class="error">'.$login_error."</span><br />\n"; // I use double
quotes for the \n

Or just something like:

print "<span class='error'>$login_error</span><br />\n";

and that applies in many senses by examples:
// 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");

etc

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 :-)






-- 
Angel Velásquez
angvp @ irc.freenode.net
Linux Counter: #359909
Arch Linux Trusted User
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://archlinux.org/pipermail/aur-dev/attachments/20080606/c1401fca/attachment.htm>


More information about the aur-dev mailing list