X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/234326791b1e8177eb475bffc5956d7086cfac4e..022d44c8ddf33f855e6ed33cae6ad9ae103e074d:/article.inc.php diff --git a/article.inc.php b/article.inc.php index c6f3be9..5de1492 100644 --- a/article.inc.php +++ b/article.inc.php @@ -75,13 +75,14 @@ class ArchiveArticle return showdate($this->dateparts); } - function body() + function story() { $this->title; $rest = fread($this->file, filesize($this->page)); if ( preg_match('{ \n (?: < (?: p | figure [^>]* ) >\s* )+ (]*>) | \n }x', $rest, $img, PREG_OFFSET_CAPTURE) ) { + # strip part after matching divider (image) if (isset($img[1])) { $this->img = $img[1][0]; } @@ -92,7 +93,7 @@ class ArchiveArticle function teaser() { - if (preg_match('{

(.*?)

}s', $this->body, $bodyp)) { + if (preg_match('{

(.*?)

}s', $this->story, $bodyp)) { return $bodyp[1]; } } @@ -100,7 +101,7 @@ class ArchiveArticle function img() { $this->img = NULL; - $this->body; + $this->story; return $this->img; }