Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
X-ray is being featured in Definitive Guide to Drupal 7 so wonderfully harsh vetting ahead of publication would be very much appreciated.
Comments
Comment #1
lorinpda CreditAttribution: lorinpda commentedHi,
I reviewed the 7.x-1.0-beta1 version located here: http://drupal.org/node/1006172
A few issues:
theme_xray_people_summary()
you are assuming that$data = $variables['data'];
produces an array with 2 elements. When there are no blocked users, your code raises an exception because further on in the method you are trying to use a undefined element (i.e, undefined index).xray_people_summary()
. I believe you require a 2 row result, one for blocked users, one for un-blocked users. Your current query does not produce that result. You are relying on a logical "group by". If the group value (I.E. user.status == 0)) doesn't exist, no record is for the blocked group is produced.Here is one option that will produce the 2 record result:
I a am sure there are other ways to obtain the same result. This was just my first thought (i.e. use an SQL union).
Please consider replacing the use of the method debug().
In many shops, triggering an exception for expected functionality (I.E. rendering report data) is deemed unacceptable. Thus, why not avoid the controversy and implement a simple method which reports the data, yet avoids triggering an exception.
For example a simple replacement functin:
Usage:
Hope that helps.
Lorin
Comment #3
mlncn CreditAttribution: mlncn commentedThank you Lorin!! (Also fixing the tag, no idea how peer-review - which is how you found this, right? - became a spam tag...).
Thank, you, fixed (i'd actually left a few fixes on gitorious accidentally after the move to git.drupal.org).
Also changed all of the quoted db_select() based code because, i now know, we're supposed to use db_query() and more normal SQL for straightforward (non-dynamic) selects.
Finally, yes! The debug()s have to go. Was planning to create tables or something for everything, but as my 'temporary' use of debug() has stretched on far too long, thank you very much for a good medium-term solution.
Comment #4
mlncn CreditAttribution: mlncn commented(adding back code-review tag... really wondering why the tag was shown to me as "BurberryHandbag"... and not showing up in search)