aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2011-01-08 08:44:45 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2011-01-08 08:44:45 +0000
commit65e4e46dbbdd0b2e25977e0365ac215f8f6f399e (patch)
tree51312c2a88a154c4ece81d2be28efd7ad3692685 /plugins
parentd1ef125d9d6b772922411187baaaf3402316c431 (diff)
downloadvideo-65e4e46dbbdd0b2e25977e0365ac215f8f6f399e.tar.gz
video-65e4e46dbbdd0b2e25977e0365ac215f8f6f399e.tar.bz2
Updating module for drupal7 file system API
Diffstat (limited to 'plugins')
-rw-r--r--plugins/video_zencoder/includes/zencoder.inc4
-rw-r--r--plugins/video_zencoder/transcoders/video_zencoder.inc4
-rw-r--r--plugins/video_zencoder/video_zencoder.module2
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/video_zencoder/includes/zencoder.inc b/plugins/video_zencoder/includes/zencoder.inc
index 3b9f305..61023a0 100644
--- a/plugins/video_zencoder/includes/zencoder.inc
+++ b/plugins/video_zencoder/includes/zencoder.inc
@@ -55,7 +55,7 @@ class video_zencoder_api {
// thumbnails
// Setup our thmbnail path.
$video_thumb_path = variable_get('video_thumb_path', 'video_thumbs');
- $final_thumb_path = file_directory_path() . '/' . $video_thumb_path . '/' . $file->fid;
+ $final_thumb_path = file_default_scheme() . ':/' . $video_thumb_path . '/' . $file->fid;
// Notifications
// if(!empty($notify_url))
@@ -240,7 +240,7 @@ class video_zencoder_api {
} else {
$errors = '';
foreach ($request->errors as $error) {
- if($error == 'Email has already been taken'){
+ if ($error == 'Email has already been taken') {
drupal_set_message(t('Your account already exists on Zencoder. So !login to here and enter API key below', array('!login' => l(t('login'), 'https://app.zencoder.com/session/new'))));
variable_set('video_zencoder_api_key', 'Please enter your API Key');
return TRUE;
diff --git a/plugins/video_zencoder/transcoders/video_zencoder.inc b/plugins/video_zencoder/transcoders/video_zencoder.inc
index db447ec..3a11c87 100644
--- a/plugins/video_zencoder/transcoders/video_zencoder.inc
+++ b/plugins/video_zencoder/transcoders/video_zencoder.inc
@@ -21,12 +21,12 @@ class video_zencoder implements transcoder_interface {
global $user;
// Setup our thmbnail path.
$video_thumb_path = variable_get('video_thumb_path', 'video_thumbs');
- $final_thumb_path = file_directory_path() . '/' . $video_thumb_path . '/' . $video['fid'];
+ $final_thumb_path = file_default_scheme() . ':/' . $video_thumb_path . '/' . $video['fid'];
// Ensure the destination directory exists and is writable.
$directories = explode('/', $final_thumb_path);
// Get the file system directory.
- $file_system = file_directory_path();
+ $file_system = file_default_scheme() . ':/';
foreach ($directories as $directory) {
$full_path = isset($full_path) ? $full_path . '/' . $directory : $directory;
// Don't check directories outside the file system path.
diff --git a/plugins/video_zencoder/video_zencoder.module b/plugins/video_zencoder/video_zencoder.module
index f8a779b..16e9ab1 100644
--- a/plugins/video_zencoder/video_zencoder.module
+++ b/plugins/video_zencoder/video_zencoder.module
@@ -90,7 +90,7 @@ function _video_zencoder_postback_jobs() {
// this will update the default thumbnails, if user want to select another one then they wil need to edit the node
// Setup our thmbnail path.
$video_thumb_path = variable_get('video_thumb_path', 'video_thumbs');
- $final_thumb_path = file_directory_path() . '/' . $video_thumb_path . '/' . $fid;
+ $final_thumb_path = file_default_scheme() . ':/' . $video_thumb_path . '/' . $fid;
// $i = rand(0, (variable_get('no_of_video_thumbs', 5) - 1));
$filename = $fid . '_' . sprintf("%04d", 1) . '.png';
$thumbfile = $final_thumb_path . '/' . $filename;