atk4/atk4 — pull request #470 by DarkSide666 (2013-11-20 16:56:46+00:00)
Title: Model->join, table alias generating changes

Sometimes we can name our tables "_foobar" or in worst case even can use "(select id,sum from invoice)" as table name.
In such cases, $_foreign_alias was generated wrong, for example, "__" or "_(" or similar.
Now regexp finds first alpha-numeric letter in table name (if it's still string).

Pros - it's now more bullet-proof
Cons - work slightly slower than before