mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: merged patch from rjmackay. Fixed inclusion of BBCode filters and reported error supression
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70484 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8c014c55f3
commit
833617599a
@ -45,7 +45,7 @@ Object::useCustomClass('Datetime','SSDatetime',true);
|
|||||||
* Add pear parser to include path
|
* Add pear parser to include path
|
||||||
*/
|
*/
|
||||||
$path = Director::baseFolder().'/sapphire/parsers/';
|
$path = Director::baseFolder().'/sapphire/parsers/';
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
|
set_include_path(str_replace('.' . PATH_SEPARATOR, '.' . PATH_SEPARATOR . $path . PATH_SEPARATOR, get_include_path()));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a default language different than english
|
* Define a default language different than english
|
||||||
|
@ -213,17 +213,20 @@ class SSHTMLBBCodeParser
|
|||||||
$filter = ucfirst($filter);
|
$filter = ucfirst($filter);
|
||||||
if (!array_key_exists($filter, $this->_filters)) {
|
if (!array_key_exists($filter, $this->_filters)) {
|
||||||
$class = 'SSHTMLBBCodeParser_Filter_'.$filter;
|
$class = 'SSHTMLBBCodeParser_Filter_'.$filter;
|
||||||
@include_once 'BBCodeParser/Filter/'.$filter.'.php';
|
if (fopen('BBCodeParser/Filter/'.$filter.'.php','r',true)) {
|
||||||
|
include_once 'BBCodeParser/Filter/'.$filter.'.php';
|
||||||
|
}
|
||||||
if (!class_exists($class)) {
|
if (!class_exists($class)) {
|
||||||
|
|
||||||
//PEAR::raiseError("Failed to load filter $filter", null, PEAR_ERROR_DIE);
|
//PEAR::raiseError("Failed to load filter $filter", null, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
$this->_filters[$filter] = new $class;
|
$this->_filters[$filter] = new $class;
|
||||||
$this->_definedTags = array_merge(
|
$this->_definedTags = array_merge(
|
||||||
$this->_definedTags,
|
$this->_definedTags,
|
||||||
$this->_filters[$filter]->_definedTags
|
$this->_filters[$filter]->_definedTags
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user