summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2010-09-24 08:33:00 (GMT)
committer Stella Power2010-09-24 08:33:00 (GMT)
commitf4b1e5ff52c5bcf9913048fdcdd727517d0e801e (patch)
treef548c74d47dd3f64813c338e6af11892311ae552
parent2756023aad95fc6ab1a95f68e361224c7dd6daef (diff)
now removes leading trailing slash from lightbox2_flv_player_path
-rw-r--r--lightbox2.admin.inc4
-rw-r--r--lightbox2.module2
2 files changed, 3 insertions, 3 deletions
diff --git a/lightbox2.admin.inc b/lightbox2.admin.inc
index e74644e..418bbed 100644
--- a/lightbox2.admin.inc
+++ b/lightbox2.admin.inc
@@ -223,8 +223,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.
diff --git a/lightbox2.module b/lightbox2.module
index 4b5db6e..8b3df0f 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -678,7 +678,7 @@ function lightbox2_add_files() {
'enable_video' => $enable_video,
);
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', ''));
}