Restrict Path logic does not work correctly
-
Your code starting from line 1418 has wrong logic in it. In the Plugin’s options you give an example: “Eg: /wiki/, /corporate/annual-reports/”
Original code:
if ( strpos($_SERVER[‘REQUEST_URI’], $this->options[‘restrict_path’]) === 0 )
return true;
else
return false;My fix:
if ( strpos($this->options[‘restrict_path’], $_SERVER[‘REQUEST_URI’]) !== FALSE )
return false;
else
return true;Let me know if you think this works, but in any case I think your logic for handling restrict_path is wrong.
Thanks
- The topic ‘Restrict Path logic does not work correctly’ is closed to new replies.