From c9cd38f6accdb6d2f379471306fcf29dc893a581 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 4 Apr 2023 01:38:32 +0300 Subject: [PATCH] update variable names #2 --- library/robots.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/library/robots.php b/library/robots.php index 4f321c9..49beb10 100644 --- a/library/robots.php +++ b/library/robots.php @@ -1,8 +1,10 @@ _index[$this->_regex(trim($part[1]))] = true; + $this->_rule[$this->_regex(trim($part[1]))] = true; } if (false !== strpos($part[0], 'disallow')) { - $this->_index[$this->_regex(trim($part[1]))] = false; + $this->_rule[$this->_regex(trim($part[1]))] = false; } } } @@ -55,11 +57,11 @@ class Robots { $result = true; // Begin index rules by ASC priority - foreach ($this->_index as $rule => $index) { + foreach ($this->_rule as $rule => $value) { if (preg_match('!^' . $rule . '!', $url)) { - $result = $index; + $result = $value; } }