roundcube/roundcubemail — pull request #75 by rodrigo-castillo (2013-05-28 19:12:52+00:00)
Title: Prevent 501 error caused by missing skin

This fixes the following situation:
Site deploys with 'larry' as skin.
User logs in, has preferences written, with 'larry' as skin.
Admin replaces 'larry' with 'myskin', both the folder and the 'skin' setting in the config
User gets 501 error.

The problem comes from a few angles, and this is a little bit bandaid-ish.

The config gets overwritten (rather than supplemented by) user preferences, so pulling out the original skin setting can't happen. The new 'default_skin' setting allows access to an admin-set config.

'larry' is a constant hard-coded into the html output class, so if it's ever replaced, the fallback as defined in rcmail_output_html->set_skin() falls apart.

This adds a check for the admin-defined default skin before defaulting to 'larry'.