file_entity.info | 1 + file_entity.variable.inc | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/file_entity.info b/file_entity.info index d739b7e..b6c56ae 100644 --- a/file_entity.info +++ b/file_entity.info @@ -17,6 +17,7 @@ files[] = views/views_handler_field_file_link_download.inc files[] = views/views_handler_field_file_link_usage.inc files[] = views/views_plugin_row_file_view.inc files[] = tests/file_entity.test +files[] = file_entity.variable.inc configure = admin/structure/file-types ; We have to add a fake version so Git checkouts do not fail Media dependencies diff --git a/file_entity.variable.inc b/file_entity.variable.inc new file mode 100644 index 0000000..eaadebe --- /dev/null +++ b/file_entity.variable.inc @@ -0,0 +1,48 @@ + t('Allowed file extensions', array(), $options), + 'type' => 'string', + 'default' => 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp', + 'description' => t('Allowed file extensions.', array(), $options), + 'token' => TRUE, + 'group' => 'file_entity', + 'localize' => FALSE, + ); + + $variables['file_entity_admin_files_limit'] = array( + 'title' => t('Maximum number of files on Administration page', array(), $options), + 'type' => 'number', + 'default' => 50, + 'description' => t('Limits the number of files shown on admin/content/file page.', array(), $options), + 'group' => 'file_entity', + 'localize' => FALSE, + ); + $variables['file_entity_cron_last'] = array( + 'title' => t('Timestamp of last indexed file', array(), $options), + 'type' => 'number', + 'default' => 0, + 'description' => t('The creation time of the most recent indexed file, used in the search results half-life calculation.', array(), $options), + 'group' => 'file_entity', + 'localize' => FALSE, + ); + + return $variables; +} + +/** + * Implements hook_variable_group_info(). + */ +function file_entity_variable_group_info() { + $groups['file_entity'] = array( + 'title' => t('File entity'), + 'description' => t('File entity'), + 'access' => 'administer site configuration', + ); + return $groups; +} +