1 file.module | file_needs_type_classification($rebuild = NULL) |
Toggles or reads the value of a flag for classifying the file types.
When the flag is set, a message is displayed to users with 'access administration pages' permission, pointing to the 'classify' confirm form. That form will trigger the type classification of managed files that do not currently have a type. This is often the case after upgrading from Drupal 7.
Parameters
bool|NULL $rebuild: (optional) The boolean value to be written.
Return value
bool|NULL: The current value of the flag if no value was provided for $rebuild.
See also
File
- core/
modules/ file/ file.module, line 3366 - Defines a "managed_file" Form API field and a "file" field for Field module.
Code
function file_needs_type_classification($rebuild = NULL) {
if (!isset($rebuild)) {
return state_get('file_needs_classification', FALSE);
}
elseif ($rebuild) {
state_set('file_needs_classification', TRUE);
}
else {
state_del('file_needs_classification');
}
}