On Mon 14 Sep 2009 22:46 +0800, Gergely Imreh wrote:
The following patch adds the Orphan field to the aurjson output. For username we would need to hit the database once more (maybe, have to think more SQL for that), but the Orphan-ness is quite straightforward to evaluate. So let's just do that first.
This patch, however, might clash with one patch I sent in a few days ago [1], since that one hasn't been applied to the repo, yet. Anyway, neither of those are hard to see where they should go...
Any comments?
@@ -139,6 +140,8 @@ class AurJSON { if ( $result && (mysql_num_rows($result) > 0) ) { $row = mysql_fetch_assoc($result); mysql_free_result($result); + $row['Orphan'] = ($row['MaintainerUID'] == "0" ? "1" : "0"); + unset($row['MaintainerUID']);
Just leaving MaintainerUID as-is here should be good enough I think. I'll push that if you want to resubmit. Thanks.