return $this->$col = $this->$col(); # run method and cache
}
+ 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;
+ }
+
function safetitle()
{
return trim($this->meta['og:title'] ?? strip_tags($this->title));
function story()
{
if ( preg_match('{
- \n (?: < (?: p | figure [^>]* ) >\s* )+ (<img\ [^>]*>) | \n <hr\ />
+ (?: < (?: p | figure [^>]* ) >\s* )+ (<img\ [^>]*>) | \n <hr\ />
}x', $this->body, $img, PREG_OFFSET_CAPTURE) ) {
# strip part after matching divider (image)
if (isset($img[1])) {