예제 #1
0
파일: filestore.php 프로젝트: ibou77/elgg
/**
 * Initialize the file library.
 * Listens to system init and configures the default filestore
 *
 * @return void
 * @access private
 */
function _elgg_filestore_init()
{
    global $CONFIG;
    // Now register a default filestore
    if (isset($CONFIG->dataroot)) {
        set_default_filestore(new \ElggDiskFilestore($CONFIG->dataroot));
    }
    // Fix MIME type detection for Microsoft zipped formats
    elgg_register_plugin_hook_handler('mime_type', 'file', '_elgg_filestore_detect_mimetype');
    // Parse category of file from MIME type
    elgg_register_plugin_hook_handler('simple_type', 'file', '_elgg_filestore_parse_simpletype');
    // Unit testing
    elgg_register_plugin_hook_handler('unit_test', 'system', '_elgg_filestore_test');
}
예제 #2
0
/**
 * Initialise the file modules.
 * Listens to system init and configures the default filestore
 *
 * @return void
 * @access private
 */
function filestore_init()
{
    global $CONFIG;
    // Now register a default filestore
    if (isset($CONFIG->dataroot)) {
        set_default_filestore(new ElggDiskFilestore($CONFIG->dataroot));
    }
    // Now run this stuff, but only once
    run_function_once("filestore_run_once");
}
예제 #3
0
/**
 * Initialize the file library.
 * Listens to system init and configures the default filestore
 *
 * @return void
 * @access private
 */
function _elgg_filestore_init()
{
    global $CONFIG;
    // Now register a default filestore
    if (isset($CONFIG->dataroot)) {
        set_default_filestore(new ElggDiskFilestore($CONFIG->dataroot));
    }
    // Unit testing
    elgg_register_plugin_hook_handler('unit_test', 'system', '_elgg_filestore_test');
}