tonydspaniard / Yii-extensions

My small contribution to the Yii framework community
124 stars 50 forks source link

Update EClientScriptBoost.php #21

Closed mdeweerd closed 10 years ago

mdeweerd commented 10 years ago

Caching some scripts results in 'clashes' with caching accross users, for example when CRSF is used. When this is inside the application, this can be fixed, but before fixing, the issue must be identified. When this is inside the framework, fixing is "not possible".

My changes allow the developer to identify the caching issues with the script when YII_DEBUG is set. The caching is done 'as usual' but the script is compressed every time in debug mode and compared with the cached version. In case there is a difference, this is reported.

Further, 'CButtonColumn' registers JavaScript including the 'delete' button function which uses CSRF when enabled. Therefore, it can not be cached as the key only depends on the grid id and not on the CSRF.

tonydspaniard commented 10 years ago

Great work... Thanks