On Mon, Apr 25, 2011 at 10:03:02PM -0700, elij wrote:
On Mon, Apr 25, 2011 at 9:31 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Mon, Apr 25, 2011 at 11:17 PM, elij <elij.mx@gmail.com> wrote:
--- web/html/rss.php | 2 +- web/html/tu.php | 2 +- web/lib/acctfuncs.inc | 2 +- web/lib/pkgfuncs.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
Haha, patch war!
:P
We have nearly identical patches here; the only thing different is string concatenation/variable replacement. It appears we went opposite directions. I did concatenation rather than replacement as it seemed to be the standard in the codebase, and looking at
+ $q_limit = "LIMIT {$_GET["PP"]} OFFSET {$_GET["O"]}"; made me puke a little in my mouth first before I went the way I did.
Ha! I feel like that looking at php code in general!
I saw a mess of . " ' . and did a bit of a lolwut myself. I don't think either mechanism looks good honestly. Too bad php doesn't have decent string formatting. :/ I am tempted to use sprintf!
Note that I failboated a bit and used double-quote inside the substitution elements. I just used what existed, but single quote would have been better.
That said, using string catenation is probably better for code uniformity sake (since everything else does it _most of the time_.
+1. It should be generally known that the AUR codebase is "a bit" messy. I will apply Dan's patch, mostly for the reasons you already mentioned above.