2022-12-04 15:32:11 +00:00
|
|
|
<?php
|
2022-12-04 18:25:33 +00:00
|
|
|
/**
|
|
|
|
* @brief filesAlias, a plugin for Dotclear 2
|
|
|
|
*
|
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
|
|
|
*
|
|
|
|
* @author Osku and contributors
|
|
|
|
*
|
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
|
|
|
if (!defined('DC_RC_PATH')) {
|
|
|
|
return null;
|
|
|
|
}
|
2022-12-04 15:32:11 +00:00
|
|
|
|
2022-12-04 18:25:33 +00:00
|
|
|
Clearbricks::lib()->autoload([
|
|
|
|
'filesAliases' => __DIR__ . '/inc/class.files.alias.php',
|
|
|
|
'aliasMedia' => __DIR__ . '/inc/class.files.alias.php',
|
|
|
|
'PallazzoTools' => __DIR__ . '/inc/lib.files.alias.tools.php',
|
|
|
|
]);
|
2022-12-04 15:32:11 +00:00
|
|
|
|
2022-12-04 18:25:33 +00:00
|
|
|
dcCore::app()->filealias = new filesAliases();
|
2022-12-04 15:32:11 +00:00
|
|
|
|
2022-12-04 18:25:33 +00:00
|
|
|
dcCore::app()->url->register(
|
|
|
|
'filesalias',
|
|
|
|
'pub',
|
|
|
|
'^pub/(.+)$',
|
|
|
|
['urlFilesAlias','alias']
|
|
|
|
);
|