Intended Drupal Version: 7.x
Audience: Developers
Project Page: http://drupal.org/sandbox/tenken/1931774
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/tenken/1931774.git dbinfo
cd dbinfoWhat DBinfo does from sandbox page (screenshots there):
What this Module does for you:
DBinfo adds a small status report item to the /admin/status/reports page of your Drupal website.
DBinfo tells you the database connection information for any configured databases Drupal has connection info for. Optionally, it can test the connection on status report page load.
Why this module was created
Websites I'm deploying use Drpual as a frontend for various database sources. Additionally my development workflow has various servers such as Staging, Development and Production servers. By default Drupal does not output database information anywhere in the administration area. To assure that servers are configured properly this report shows site administrators what databases the Drupal installation can connect to.
Requirements
This module requires Ctools in order to generate the collapsible report(s) divs. If your not using Ctools already you're probably not doing anything much advanced with Drupal to begin with and likely would not need this module.
As a security precaution the db password always displays as omitted from the report page. All other database information is considered administrative knowledge.
Reviews of Other Projects
http://drupal.org/node/1865018#comment-7143472
http://drupal.org/node/1914740#comment-7143922
http://drupal.org/node/1740956#comment-7144312
Comments
Comment #1
klausiWelcome,
please get a review bonus first. Then try to fix issues raised by automated review tools: http://ventral.org/pareview/httpgitdrupalorgsandboxtenken1931774git
Comment #2
bkonetzny commentedHi tenken,
thanks for this useful module. Here are my suggestions:
Comment #3
tenken commentedok. good idea thanks.
The report is showing essentially all the config info passed to
$db = new PDO(<config info>);. Showing that you supplied a valid password to PDO is important if the connection doesnt work, you clearly had a key (its in the report as omitted) vs not supplying a key. This will help to correlate any MySQL error message shown in a connection test.I'm sorry what? PHP.ini and Drupals settings.php are essentially in English (please correct me if I'm wrong). By providing translated keys you now cannot grep settings.php for a given key shown on the page (translated). I dont see the benefit to showing misleading information.
Oops your right, I'll clean up the css.
Comment #4
tenken commentedUpdated code to amend 2 issues comment #2.
I'm currently not translating db config keys because they array keys are not translatable. You cannot write PHP code for FAPI such as:
Array keys are array keys and not translatable strings. Drupal FAPI would choke on the above, and it's meaningless.
I am leaving the password as omitted. Would people like asterisks instead of omitted if a password is provided?
I have re-tested against Parview:
I have an html 5 compatible
<br>tag .... as I feel HTML 5 is the way to go, I have no love for XHTML.Comment #5
bkonetzny commentedInstead of "omitted", would a Yes/No make more sense?
Of course you are right, translating the keys in the array doesn't make sense and was not my intention. I thought about translating the output of your report. So instead of outputting the $key and it's value (driver: mysql), you could pass $key to t(), so "t($key): $value" would become "driver: mysql" and (if translations exist) "Treiber: mysql" in german. But I'm fine with your current implementation, this was just a suggestion for a "more translated" report :)
Comment #6
tenken commentedA fellow module maintainer whom I showed the project to offlist recommended the string text [omitted] as the password so that the password appears similar to a token text description and developers would better understand it was a replaced value not being shown.
I was debating asterisks exactly strelen($password) long as a second option.
Ah, I see what you're saying I think ... hmm ... for now I'll leave it as-is. The report(s) table headers, and the status row title are translatable. Thanks for the input.
Comment #6.0
tenken commentedadded review of 1 project dx_cache
Comment #6.1
tenken commentedreviewed github_pages module
Comment #7
tenken commentedreviewed 3 modules in needs review listing.
Changes
Comment #8
klausimanual review:
But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to jthorson as he might have time to take a final look at this.
Comment #9
tenken commentedcommitted fixes requested by klausi.
Comment #10
jthorson commentedMy only question would be whether you're certain that $vars['handle'] and $vars['content'] is sanitized output, within your dbinfo_ctools_collapsible() function. Other than that, it looks good.
Thanks for your contribution, tenken!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #11.0
(not verified) commentedreviewed csscrush module