mirror of https://github.com/ShaYmez/xlxd.git
Merge pull request #182 from yo3cat/master
XLX Alphanumeric names for reflector ...
This commit is contained in:
commit
bed3cf164b
|
@ -41,12 +41,19 @@ class xReflector {
|
|||
$handle = fopen($this->XMLFile, 'r');
|
||||
$this->XMLContent = fread($handle, filesize($this->XMLFile));
|
||||
fclose($handle);
|
||||
|
||||
|
||||
# XLX alphanumeric naming...
|
||||
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
|
||||
if (!is_numeric($this->ServiceName)) {
|
||||
if (preg_match('/[^a-zA-Z0-9]/', $this->ServiceName) == 1) {
|
||||
$this->ServiceName = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
# $this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
|
||||
# if (!is_numeric($this->ServiceName)) {
|
||||
# $this->ServiceName = null;
|
||||
# return false;
|
||||
# }
|
||||
|
||||
$this->ReflectorName = "XLX".$this->ServiceName;
|
||||
|
||||
|
|
|
@ -41,13 +41,20 @@ class xReflector {
|
|||
$handle = fopen($this->XMLFile, 'r');
|
||||
$this->XMLContent = fread($handle, filesize($this->XMLFile));
|
||||
fclose($handle);
|
||||
|
||||
|
||||
# XLX alphanumeric naming...
|
||||
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
|
||||
if (!is_numeric($this->ServiceName)) {
|
||||
if (preg_match('/[^a-zA-Z0-9]/', $this->ServiceName) == 1) {
|
||||
$this->ServiceName = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
# $this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
|
||||
# if (!is_numeric($this->ServiceName)) {
|
||||
# $this->ServiceName = null;
|
||||
# return false;
|
||||
# }
|
||||
#
|
||||
$this->ReflectorName = "XLX".$this->ServiceName;
|
||||
|
||||
$LinkedPeersName = "XLX".$this->ServiceName." linked peers";
|
||||
|
|
Loading…
Reference in New Issue