You are here

function video_requirements in Video 6.4

Same name and namespace in other branches
  1. 6.5 video.install \video_requirements()
  2. 7.2 video.install \video_requirements()

Implementation of hook_requirements().

File

./video.install, line 108
Provides installation functions for video.module.

Code

function video_requirements($phase) {
  $t = get_t();
  $requirements = array();
  $fs = variable_get('vid_filesystem', 'drupal');
  $downloads = variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC);
  if ($downloads == FILE_DOWNLOADS_PRIVATE && $fs == 'drupal') {
    $requirements['video_filesystem'] = array(
      'title' => $t('Video module settings'),
      'description' => $t('Storing videos in the Drupal file system is not supported when using <a href="@filesystem">private downloads</a>.', array(
        '@filesystem' => url('admin/settings/file-system'),
      )),
      'value' => l($t('Change setting'), 'admin/settings/video/filesystem'),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}