X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/e6d26c20628195fde6f3edfb31e5db8d31551adf..ead24d57321f965db99178336e9a72c03c966bd1:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index 5485315..35ae092 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -19,7 +19,7 @@ class ArchiveArticle function __construct($path) { $this->page = $path; - $this->link = preg_replace('/\.html$/', '', $path); + $this->link = preg_replace('{(?:/index)?\.html$}', '', $path); } function __get($col) @@ -40,7 +40,12 @@ class ArchiveArticle function safetitle() { - return strip_tags($this->title); + return trim(strip_tags($this->title)); + } + + function name() + { + return $this->safetitle ?: $this->link; } function last()