Fix detectBlockCode and add an attribute block to the model .
Authored by: doaasalehazab 2012-09-01
Parent: [r1099]
Child: [r1101]