Revision 70a4c29b
Added by Assos Assos over 9 years ago
drupal7/sites/all/modules/media_youtube/includes/MediaYouTubeBrowser.inc | ||
---|---|---|
14 | 14 |
* Implements MediaBrowserPluginInterface::access(). |
15 | 15 |
*/ |
16 | 16 |
public function access($account = NULL) { |
17 |
// @TODO: media_access() is a wrapper for file_entity_access(). Switch to the |
|
18 |
// new function when Media 1.x is deprecated. |
|
19 |
return media_access('create', $account); |
|
17 |
return media_internet_access($account); |
|
20 | 18 |
} |
21 | 19 |
|
22 | 20 |
/** |
23 | 21 |
* Implements MediaBrowserPlugin::view(). |
24 | 22 |
*/ |
25 | 23 |
public function view() { |
26 |
// Check if the user is able to add remote media.
|
|
27 |
if (user_access('add media from remote sources')) {
|
|
28 |
$build['form'] = drupal_get_form('media_youtube_add', $this->params['types'], $this->params['multiselect']);
|
|
29 |
return $build; |
|
30 |
}
|
|
24 |
$build = array();
|
|
25 |
$params = $this->params;
|
|
26 |
$build['form'] = drupal_get_form('media_youtube_add', $params);
|
|
27 |
|
|
28 |
return $build;
|
|
31 | 29 |
} |
32 | 30 |
} |
Also available in: Unified diff
Weekly update of contrib modules