- πΈπ°Slovakia poker10
Thanks for reporting this. This was updated in D8 here: #2109065: Remove variable_get and variable_set calls from API documentation β . The next step should be to create a merge request with proposed changes. Thanks!
The example for https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
Should be something like:
function hook_file_download($uri) {
// Check if the file is controlled by the current module.
$files = file_load_multiple(array(), array('uri' => $uri));
$file = reset($files);
if ($file) {
$usage = file_usage_list($file);
if (isset($usage['user'])) {
if (user_access('access user profiles')) {
$info = image_get_info($uri);
return array('Content-Type' => $info['mime_type']);
}
else {
// Access to the file is denied.
return -1;
}
}
else {
// File is not controlled by the current module
return NULL;
}
}
}
Active
7.0 β°οΈ
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Thanks for reporting this. This was updated in D8 here: #2109065: Remove variable_get and variable_set calls from API documentation β . The next step should be to create a merge request with proposed changes. Thanks!