Only change "modified" counter on successful save

The modified counter in the CMS module (the red box in the sidebar)
always changes when saving, even when an error is returned.

This fix will only change the "modified" counter in the CMS module on a
successful change.