function jplayer_update_6002 in jPlayer 6
Transition to the jplayer_protect module if jplayer content protection is enabled.
File
- ./
jplayer.install, line 103 - Installation file for jPlayer module.
Code
function jplayer_update_6002() {
$ret = array();
if (variable_get('jplayer_protected', FALSE)) {
variable_set('jplayer_protect', TRUE);
if (!module_exists('jplayer_protect')) {
drupal_install_modules(array(
'jplayer_protect',
));
if (db_table_exists('jplayer_protect_denied')) {
db_drop_table($ret, 'jplayer_protect_denied');
db_rename_table($ret, 'jplayer_denied', 'jplayer_protect_denied');
}
}
else {
return t('It appears that the jplayer_protect module has been manually enabled. Please move any data from the {jplayer_protect} table to the {jplayer_protect_denied} table and drop the {jplayer_protect} table.');
}
}
else {
db_drop_table($ret, 'jplayer_denied');
}
variable_del('jplayer_protected');
return $ret;
}