summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2010-09-24 08:32:53 (GMT)
committerStella Power2010-09-24 08:32:53 (GMT)
commit9df76196d21c7a71d21eb49885139b182e09e215 (patch)
tree8ff78245bd31a867a14e1b2229583690b2b00d2d
parentf6f1c28c46c2da0819be89348b94c42bc51f6085 (diff)
now removes leading trailing slash from lightbox2_flv_player_path5.x-2.11
-rw-r--r--lightbox2.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/lightbox2.module b/lightbox2.module
index 3799ebf..63906a9 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -514,8 +514,8 @@ function lightbox2_general_settings_form() {
$form['video_fieldset']['lightbox2_flv_player_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to FLV Player'),
- '#description' => t('The path to the FLV player, relative to Drupal root directory.'),
- '#default_value' => variable_get('lightbox2_flv_player_path', '/flvplayer.swf'),
+ '#description' => t('The path to the FLV player, relative to Drupal root directory. No leading slashes.'),
+ '#default_value' => variable_get('lightbox2_flv_player_path', 'flvplayer.swf'),
);
// Add textfield for FLV Player flashvars.
@@ -1633,7 +1633,7 @@ function lightbox2_add_files() {
'enable_video' => variable_get('lightbox2_enable_video', FALSE),
);
if ($enable_video) {
- $js_settings['flvPlayer'] = url(check_plain(variable_get('lightbox2_flv_player_path', '/flvplayer.swf')));
+ $js_settings['flvPlayer'] = url(check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/')));
$js_settings['flvFlashvars'] = check_plain(variable_get('lightbox2_flv_player_flashvars', ''));
}
drupal_add_js(array('lightbox2' => $js_settings), 'setting');