Lines Matching refs:this

652 …$this->errors[] = _pfc("'%s' parameter is mandatory by default use '%s' value", "serverid", "md5(_…
653 $this->serverid = $params["serverid"];
657 $this->data_private_path = dirname(__FILE__)."/../data/private";
659 $this->data_private_path = $params["data_private_path"];
663 $cachefile = $this->_GetCacheFile();
667 $this->_saveParamsTypes();
670 $this->data_public_path = dirname(__FILE__)."/../data/public";
672 $this->data_public_path = $params["data_public_path"];
677 $this->_query_string = isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '' ?
683 $this->container_type = $params["container_type"];
686 $ct =& pfcContainer::Instance($this->container_type, true);
691 if (!isset($this->$attr))
692 $this->$attr = $v;
698 if (!isset($this->$k))
699 …$this->errors[] = _pfc("Error: undefined or obsolete parameter '%s', please correct or remove this…
701 …$this->errors[] = _pfc("Error: '%s' is a private parameter, you are not allowed to change it", $k);
710 $this->proxies_cfg[$k2][$k3] = $v3;
712 $this->proxies_cfg[$k2] = $v2;
716 $this->$k = $v;
722 $this->_dyn_params = array_merge($this->_dyn_params,$params['dyn_params']);
723 foreach ( $this->_dyn_params as $dp )
725 $this->$dp = $params[$dp];
728 if (is_array($this->channels) &&
729 count($this->channels) == 0 &&
731 $this->channels = array(_pfc("My room"));
734 $this->synchronizeWithCache();
737 $ct =& pfcContainer::Instance($this->container_type, true);
742 $this->nick = $this->filterNickname($this->nick);
761 $vars = get_object_vars($this);
764 if (is_string($v)) $this->_params_type["string"][] = $k;
765 else if (is_bool($v)) $this->_params_type["bool"][] = $k;
766 else if (is_array($v)) $this->_params_type["array"][] = $k;
767 else if (is_int($v) && $v>0) $this->_params_type["positivenumeric"][] = $k;
768 else $this->_params_type["misc"][] = $k;
781 $array_params = $this->_params_type["array"];
784 if (!is_array($this->$ap))
785 $this->errors[] = _pfc("'%s' parameter must be an array", $ap);
787 $numerical_positive_params = $this->_params_type["positivenumeric"];
790 if (!is_int($this->$npp) || $this->$npp < 0)
791 $this->errors[] = _pfc("'%s' parameter must be a positive number", $npp);
793 $boolean_params = $this->_params_type["bool"];
796 if (!is_bool($this->$bp))
797 $this->errors[] = _pfc("'%s' parameter must be a boolean", $bp);
799 $string_params = $this->_params_type["string"];
802 if (!is_string($this->$sp))
803 $this->errors[] = _pfc("'%s' parameter must be a charatere string", $sp);
806 if ($this->title == "") $this->title = _pfc("My Chat");
824 $this->errors = array_merge($this->errors, check_functions_exist($f_list));
827 …$this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path, "data_priv…
828 …$this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path."/cache", "…
837 $f_dst = $this->data_public_path.'/js/'.$file;
842 mkdir_r($this->data_public_path.'/js/');
845 …if (!file_exists($f_dst)) $this->errors[] = _pfc("%s doesn't exist, data_public_path cannot be ins…
853 if ($this->client_script_path == '')
854 $this->client_script_path = pfc_GetScriptFilename();
856 if ($this->server_script_url == '' && $this->server_script_path == '')
858 $filetotest = $this->client_script_path;
863 $this->errors[] = _pfc("%s doesn't exist", $filetotest);
864 $this->server_script_url = './'.basename($filetotest).$this->_query_string;
868 if ($this->data_public_url == "")
869 $this->data_public_url = pfc_RelativePath($this->client_script_path, $this->data_public_path);
871 if ($this->server_script_path == '')
872 $this->server_script_path = $this->client_script_path;
876 if ($this->server_script_url == '')
878 $filetotest = $this->server_script_path;
880 if (preg_match("/(.*)\?(.*)/",$this->server_script_path, $res))
883 $this->errors[] = _pfc("%s doesn't exist", $filetotest);
884 …$this->server_script_url = pfc_RelativePath($this->client_script_path, $this->server_script_path).…
888 if ($this->theme_default_path == '' || !is_dir($this->theme_default_path))
889 $this->theme_default_path = dirname(__FILE__).'/../themes';
890 if ($this->theme_path == '' || !is_dir($this->theme_path))
891 $this->theme_path = $this->theme_default_path;
895 if ($this->theme_default_url == '')
897 mkdir_r($this->data_public_path.'/themes/default');
898 if (!is_dir($this->data_public_path.'/themes/default'))
899 $this->errors[] = _pfc("cannot create %s", $this->data_public_path.'/themes/default');
903 $this->data_public_path.'/themes/default' );
905 $this->errors[] = _pfc("cannot copy %s in %s",
907 $this->data_public_path.'/themes/default');
909 $this->theme_default_url = $this->data_public_url.'/themes';
911 if ($this->theme_url == '')
913 mkdir_r($this->data_public_path.'/themes/'.$this->theme);
914 if (!is_dir($this->data_public_path.'/themes/'.$this->theme))
915 $this->errors[] = _pfc("cannot create %s", $this->data_public_path.'/themes/'.$this->theme);
918 $ret = copy_r( $this->theme_path.'/'.$this->theme,
919 $this->data_public_path.'/themes/'.$this->theme );
921 $this->errors[] = _pfc("cannot copy %s in %s",
922 $this->theme_path.'/'.$this->theme,
923 $this->data_public_path.'/themes/'.$this->theme);
925 $this->theme_url = $this->data_public_url.'/themes';
929 …if ($this->prototypejs_url == '') $this->prototypejs_url = $this->data_public_url.'/js/prototype.j…
934 $ct_errors = $ct->init($this);
935 $this->errors = array_merge($this->errors, $ct_errors);
939 if ( $this->language != "" && !in_array($this->language, $lg_list) )
940 …$this->errors[] = _pfc("'%s' parameter is not valid. Available values are : '%s'", "language", imp…
943 $this->proxies = array();
944 foreach($this->pre_proxies as $px)
946 if (!in_array($px,$this->skip_proxies) && !in_array($px,$this->proxies))
947 $this->proxies[] = $px;
950 foreach($this->_sys_proxies as $px)
952 if (!in_array($px,$this->skip_proxies) && !in_array($px,$this->proxies))
953 $this->proxies[] = $px;
956 foreach($this->post_proxies as $px)
958 if (!in_array($px,$this->skip_proxies) && !in_array($px,$this->proxies))
959 $this->proxies[] = $px;
963 if (in_array('log',$this->proxies)) {
965 $filename = $this->data_private_path.'/filemtime2.test';
972 unset($this->proxies[array_search('log',$this->proxies)]);
978 $this->proxies_path_default = dirname(__FILE__).'/proxies';
980 if ($this->proxies_path != '' && !is_dir($this->proxies_path))
981 $this->errors[] = _pfc("'%s' directory doesn't exist", $this->proxies_path);
982 if ($this->proxies_path == '') $this->proxies_path = $this->proxies_path_default;
985 $this->cmd_path_default = dirname(__FILE__).'/commands';
986 if ($this->cmd_path == '') $this->cmd_path = $this->cmd_path_default;
989 $this->loadSmileyTheme();
992 $this->version = trim(file_get_contents(dirname(__FILE__)."/../version.txt"));
994 $this->is_init = (count($this->errors) == 0);
999 return $this->is_init;
1004 return $this->errors;
1009 $theme = file($this->getFilePathFromTheme("smileys/theme.txt"));
1027 $this->smileys =& $result;
1032 return $this->serverid;
1037 if ($serverid == '') $serverid = $this->getId();
1038 if ($data_private_path == '') $data_private_path = $this->data_private_path;
1044 $cachefile = $this->_GetCacheFile();
1047 $this->is_init = false;
1061 $cachefile = $this->_GetCacheFile();
1072 if (!in_array($key,$this->_dyn_params))
1073 $this->$key = $val;
1091 if (!$this->isInit())
1092 $this->init();
1093 $errors =& $this->getErrors();
1097 $this->saveInCache();
1106 $cachefile = $this->_GetCacheFile();
1109 $conf = get_object_vars($this);
1116 foreach($this->_dyn_params as $k)
1127 $fexists1 = file_exists($this->theme_path."/default/".$file);
1128 $fexists2 = file_exists($this->theme_path."/".$this->theme."/".$file);
1129 return ($this->theme == "default" ? $fexists1 : !$fexists2);
1134 if (file_exists($this->theme_path."/".$this->theme."/".$file))
1135 return $this->theme_path."/".$this->theme."/".$file;
1137 if (file_exists($this->theme_default_path."/default/".$file))
1138 return $this->theme_default_path."/default/".$file;
1141 $this->destroyCache();
1142 …eck your themepath '%s' and your theme '%s' are correct", $file, $this->theme_path, $this->theme));
1148 if (file_exists($this->theme_path.'/'.$this->theme.'/'.$file))
1149 return $this->theme_url.'/'.$this->theme.'/'.$file;
1151 if (file_exists($this->theme_default_path.'/default/'.$file))
1152 return $this->theme_default_url.'/default/'.$file;
1162 $nickname = (string)utf8_substr($nickname, 0, $this->max_nick_len);