ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
init-config.php File Reference

Go to the source code of this file.

Functions

 phorum_htmlpurifier_get_config ($default=false)
 Initializes the appropriate configuration from either a PHP file or a module configuration value. More...
 
 phorum_htmlpurifier_config_file_exists ()
 

Function Documentation

◆ phorum_htmlpurifier_config_file_exists()

phorum_htmlpurifier_config_file_exists ( )

Definition at line 25 of file init-config.php.

Referenced by phorum_htmlpurifier_get_config(), phorum_htmlpurifier_save_settings(), and phorum_htmlpurifier_show_form().

26 {
27  return file_exists(dirname(__FILE__) . '/config.php');
28 }
+ Here is the caller graph for this function:

◆ phorum_htmlpurifier_get_config()

phorum_htmlpurifier_get_config (   $default = false)

Initializes the appropriate configuration from either a PHP file or a module configuration value.

Returns
Instance of HTMLPurifier_Config

Definition at line 8 of file init-config.php.

References $config, $PHORUM, HTMLPurifier_Config\create(), HTMLPurifier_Config\createDefault(), and phorum_htmlpurifier_config_file_exists().

Referenced by phorum_htmlpurifier_common(), phorum_htmlpurifier_save_settings(), and phorum_htmlpurifier_show_form().

9 {
10  global $PHORUM;
11  $config_exists = phorum_htmlpurifier_config_file_exists();
12  if ($default || $config_exists || !isset($PHORUM['mod_htmlpurifier']['config'])) {
14  include(dirname(__FILE__) . '/config.default.php');
15  if ($config_exists) {
16  include(dirname(__FILE__) . '/config.php');
17  }
18  unset($PHORUM['mod_htmlpurifier']['config']); // unnecessary
19  } else {
20  $config = HTMLPurifier_Config::create($PHORUM['mod_htmlpurifier']['config']);
21  }
22  return $config;
23 }
$PHORUM['mod_htmlpurifier']['directives']
Definition: settings.php:28
static create($config, $schema=null)
Convenience constructor that creates a config object based on a mixed var.
Definition: Config.php:123
static createDefault()
Convenience constructor that creates a default configuration object.
Definition: Config.php:154
phorum_htmlpurifier_config_file_exists()
Definition: init-config.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function: