modify js validator

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2011-08-17 06:32:14 +00:00
parent f1ef739dfb
commit 3b2292a5be

View file

@ -105,9 +105,9 @@ class Validator
* Set root cache directory
* @param[in] string $cache_dir Root cache directory
*/
function setCacheDir($_cache_dir){
function setCacheDir($cache_dir){
if(is_dir($cache_dir)) {
$this->$_cache_dir = preg_replace('@/$@', '', $cache_dir);
$this->_cache_dir = preg_replace('@/$@', '', $cache_dir);
}
}
@ -324,7 +324,7 @@ class Validator
function getJsPath(){
if(!$this->_cache_dir) return false;
$dir = $this->_cache_dir.'/rulesets';
$dir = $this->_cache_dir.'/ruleset';
if(!is_dir($dir) && !mkdir($dir)) return false;
if(!$this->_xml_path) return false;