jordanlev/concrete5 — comment on commit e7ac0c1d982a0fd211a227f06ce802a4be89c490
File:  line 0
By jordanlev:

The checks work. The reason it's confusing is because there are so many different permutations that `BlockController::install()` can return.

If you don't have a db.xml file (*and* you don't declare the `$btTable` variable in your block controller), then the install method returns object `$r` having `$r->result == true`, which passes validation just fine.

If you don't have a db.xml file but you *do* declare `$btTable` in your block controller, then the system will look for the db.xml file but it will be missing, in which case `BlockController::install()` returns FALSE (not the object with ->result and ->message), and that triggers the first branch of my validation check (the one that shows "Error: Block Type cannot be installed because no db.xml file can be found. Either create a db.xml file for this block type, or remove the $btTable variable from its controller."

I think the comments of the `BlockController::install()` method need to be updated to explain all the permutations, because right now it just says it returns a boolean, which is very wrong.