From c0dc531ebefd8912819f3b6c8bda1fed3c7e750c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 31 Jan 2024 06:11:00 +0300 Subject: make it simple, but not simpler --- model/Page.php | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 model/Page.php (limited to 'model/Page.php') diff --git a/model/Page.php b/model/Page.php deleted file mode 100644 index f516836..0000000 --- a/model/Page.php +++ /dev/null @@ -1,43 +0,0 @@ -md) - $data['html'] = markup::markdownToHtml($data['md']); - parent::edit($data); - } - - public function isUpdated(): bool { - return $this->updateTs && $this->updateTs != $this->ts; - } - - public function getHtml(bool $is_retina, string $user_theme): string { - $html = $this->html; - $html = markup::htmlImagesFix($html, $is_retina, $user_theme); - return $html; - } - - public function getUrl(): string { - return "/{$this->shortName}/"; - } - - public function updateHtml() { - $html = markup::markdownToHtml($this->md); - $this->html = $html; - getDb()->query("UPDATE pages SET html=? WHERE short_name=?", $html, $this->shortName); - } - -} -- cgit v1.2.3