mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-10 04:03:01 +09:00
Add auto ruleset function
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9982 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
983516dbac
commit
8db1be04bf
7 changed files with 77 additions and 6 deletions
|
|
@ -1509,12 +1509,21 @@
|
|||
* @brief Return ruleset cache file path
|
||||
* @param module, act
|
||||
**/
|
||||
function getValidatorFilePath($module, $ruleset) {
|
||||
function getValidatorFilePath($module, $ruleset, $mid=null) {
|
||||
// load dynamic ruleset xml file
|
||||
if (strpos($ruleset, '@') !== false){
|
||||
$rulsetFile = str_replace('@', '', $ruleset);
|
||||
$xml_file = sprintf('./files/ruleset/%s.xml', $rulsetFile);
|
||||
return FileHandler::getRealPath($xml_file);
|
||||
}else if (strpos($ruleset, '#') !== false){
|
||||
$rulsetFile = str_replace('#', '', $ruleset).'.'.$mid;
|
||||
$xml_file = sprintf('./files/ruleset/%s.xml', $rulsetFile);
|
||||
if (is_readable($xml_file))
|
||||
return FileHandler::getRealPath($xml_file);
|
||||
else{
|
||||
$ruleset = str_replace('#', '', $ruleset);
|
||||
}
|
||||
|
||||
}
|
||||
// Get a path of the requested module. Return if not exists.
|
||||
$class_path = ModuleHandler::getModulePath($module);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue