mirror of
https://github.com/friendica/friendica
synced 2025-04-25 03:10:11 +00:00
Replace existing autoloader with Composer-supplied
- Move Friendica namespace to `src` - Move required `ezyang/htmlpurifier` to vendor - Remove existing static autoloader - Change boot.php reference to the autoloader
This commit is contained in:
parent
cae0543629
commit
799e60aa62
419 changed files with 618 additions and 542 deletions
30
vendor/ezyang/htmlpurifier/plugins/phorum/init-config.php
vendored
Normal file
30
vendor/ezyang/htmlpurifier/plugins/phorum/init-config.php
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Initializes the appropriate configuration from either a PHP file
|
||||
* or a module configuration value
|
||||
* @return Instance of HTMLPurifier_Config
|
||||
*/
|
||||
function phorum_htmlpurifier_get_config($default = false)
|
||||
{
|
||||
global $PHORUM;
|
||||
$config_exists = phorum_htmlpurifier_config_file_exists();
|
||||
if ($default || $config_exists || !isset($PHORUM['mod_htmlpurifier']['config'])) {
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
include(dirname(__FILE__) . '/config.default.php');
|
||||
if ($config_exists) {
|
||||
include(dirname(__FILE__) . '/config.php');
|
||||
}
|
||||
unset($PHORUM['mod_htmlpurifier']['config']); // unnecessary
|
||||
} else {
|
||||
$config = HTMLPurifier_Config::create($PHORUM['mod_htmlpurifier']['config']);
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
||||
function phorum_htmlpurifier_config_file_exists()
|
||||
{
|
||||
return file_exists(dirname(__FILE__) . '/config.php');
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
Loading…
Add table
Add a link
Reference in a new issue