- // Erotic?
- switch (getConfig('yoomedia_erotic_allowed')) {
- case 0: // No erotic at all
- define('__CFG_YOOMEDIA_EROTIC_NONE' , " selected=\"selected\"");
- define('__CFG_YOOMEDIA_EROTIC_INCLUDE', '');
- define('__CFG_YOOMEDIA_EROTIC_ONLY' , '');
- break;
-
- case 1: // Include erotic
- define('__CFG_YOOMEDIA_EROTIC_NONE' , '');
- define('__CFG_YOOMEDIA_EROTIC_INCLUDE', " selected=\"selected\"");
- define('__CFG_YOOMEDIA_EROTIC_ONLY' , '');
- break;
-
- case 2: // Erotic only
- define('__CFG_YOOMEDIA_EROTIC_NONE' , '');
- define('__CFG_YOOMEDIA_EROTIC_INCLUDE', '');
- define('__CFG_YOOMEDIA_EROTIC_ONLY' , " selected=\"selected\"");
- break;
- }
+ // Set default selection
+ foreach (array('yoomedia_erotic_allowed') as $entry) {
+ $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
+ } // END - foreach