+ function handler()
+ {
+ $path = $this->link;
+ $this->path = '';
+ $this->restricted = FALSE;
+ while (TRUE) {
+ if (file_exists("$path/.private")) {
+ $this->restricted = $path;
+ }
+
+ if (file_exists("$path/index.php")) {
+ return $path;
+ }
+
+ $up = strrpos($path, '/');
+ $this->path = substr($path, $up) . $this->path;
+ $path = substr($path, 0, $up);
+ if ($up === FALSE) {
+ break;
+ }
+ }
+ return;
+ }
+