aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Last <lukelast@30151.no-reply.drupal.org>2005-09-19 21:41:29 +0000
committerLuke Last <lukelast@30151.no-reply.drupal.org>2005-09-19 21:41:29 +0000
commit58333e92b6df6c20fe3dbf7c2042f2713250c170 (patch)
treee84b8276e3e3512ca70561cdafdd0a48f61c2eaf
parente0882747f757a8e0d1f1516ee115614fdffe34c6 (diff)
downloadvideo-58333e92b6df6c20fe3dbf7c2042f2713250c170.tar.gz
video-58333e92b6df6c20fe3dbf7c2042f2713250c170.tar.bz2
Deleted some unneeded lines.
-rw-r--r--video.module22
1 files changed, 5 insertions, 17 deletions
diff --git a/video.module b/video.module
index 44f9f5d..4727573 100644
--- a/video.module
+++ b/video.module
@@ -724,7 +724,6 @@ function video_play() {
break;
default:
drupal_set_message('Video type not supported', 'error');
- global $base_url;
drupal_goto("node/$node->nid");
break;
}
@@ -1026,15 +1025,6 @@ function theme_video_download(&$node) {
drupal_set_message(t('There are no files to download for this video.'), 'error');
drupal_goto("node/$node->nid"); //Redirect back to view page.
}
- /*
- $dev .= "<font color=\"white\"><br/><br/><b>Temporary Developement stuff.</b>";
- $dev .= "<br/>Video File = " . $node->vidfile;
- $dev .= "<br/>CWD= " . getcwd();
- $dev .= "<br/>Download Folder: " . $node->download_folder;
- $dev .= "<br/>Play Directory Stub: " . $node->play_dir_stub;
- $dev .= "<br/> Base URL: " . $base_url . "</font>";
- $output .= $dev;
- */
//Adds a breadcrumb back to view on the download page. This may not be needed but some better breadcrumbs are.
$breadcrumb = drupal_get_breadcrumb();
@@ -1177,24 +1167,22 @@ function _video_size2bytes(&$node) {
* @link
* http://www.laughing-buddha.net/jon/php/sec2hms/
*
+ * @param $sec
+ * integer value of seconds.
+ *
* @return
- * array of hours, minutes, and seconds, or boolean FALSE on error
+ * array associative with key values of hours, minutes, and seconds.
*/
function _video_sec2hms($sec = 0) {
$hms = array();
-
// 3600 seconds in an hour and trash remainder
$hms['hours'] = intval(intval($sec) / 3600);
-
// dividing the total seconds by 60 will give us
// the number of minutes, but we're interested in
// minutes past the hour: to get that, we need to
// divide by 60 again and keep the remainder
$hms['minutes'] = intval(($sec / 60) % 60);
-
- // keep the remainder
- $hms['seconds'] = intval($sec % 60);
-
+ $hms['seconds'] = intval($sec % 60); //keep the remainder.
return $hms;
}