Jplayer Protect is using nonexistent jplayer_access_time variable for authorization process
sites/all/modules/jplayer$: grep -nr 'jplayer_access_time' *
jplayer.install:39: variable_del('jplayer_access_time');
jplayer_protect/jplayer_protect.module:43: if ($timestamp < (REQUEST_TIME + variable_get('jplayer_access_time', 30))) {
jplayer_protect/jplayer_protect.module:47: return drupal_json_encode(REQUEST_TIME + variable_get('jplayer_access_time', 30));
jplayer_protect/jplayer_protect.module:144: if (time() <= ($started + variable_get('jplayer_access_time', 30))) {
This variable is never being set, meaning it will always return default value of 30 from variable_get call.
The correct variable should be jplayer_protect_access_time, as it's being defined on modules admin settings page:
sites/all/modules/jplayer$: grep -nr 'jplayer_protect_access_time' *
jplayer_protect/jplayer_protect.admin.inc:70: $form['jplayer_protect_access_time'] = array(
jplayer_protect/jplayer_protect.admin.inc:73: '#default_value' => variable_get('jplayer_protect_access_time', 30),
jplayer_protect/jplayer_protect.admin.inc:85: $time = $form_state['values']['jplayer_protect_access_time'];
jplayer_protect/jplayer_protect.admin.inc:87: form_error($form['jplayer_protect_access_time'], t('Access time must be a value in seconds.'));
jplayer_protect/jplayer_protect.admin.inc:90: form_error($form['jplayer_protect_access_time'], t('Access time must be at least 0 seconds.'));
All references to jplayer_access_time variable must be replaced to jplayer_protect_access_time.
Comments
Comment #2
chriso commentedPatch for above.