summaryrefslogtreecommitdiff
path: root/src/web/_controller
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-07-08 17:22:30 -0400
committerFreya Murphy <freya@freyacat.org>2024-07-08 17:22:30 -0400
commit8a2c577823b69117af8eda9b1a46bfbcae8153c6 (patch)
treee89dee0f77377a665c78d8a3cea6012888d9af73 /src/web/_controller
parentfix2 (diff)
downloadwebsite-8a2c577823b69117af8eda9b1a46bfbcae8153c6.tar.gz
website-8a2c577823b69117af8eda9b1a46bfbcae8153c6.tar.bz2
website-8a2c577823b69117af8eda9b1a46bfbcae8153c6.zip
a few fixes, just a few....
Diffstat (limited to 'src/web/_controller')
-rw-r--r--src/web/_controller/_comments.php2
-rw-r--r--src/web/_controller/_meta.php8
-rw-r--r--src/web/_controller/blog.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/web/_controller/_comments.php b/src/web/_controller/_comments.php
index 4b87a94..059b926 100644
--- a/src/web/_controller/_comments.php
+++ b/src/web/_controller/_comments.php
@@ -9,7 +9,7 @@ class _comments_controller extends Controller {
}
- public function comments($page, $ref): void {
+ public function comments(string $page, string $ref): void {
$data = $this->comments_model->get_comments($page);
$this->view('comments', array(
'comments' => $data,
diff --git a/src/web/_controller/_meta.php b/src/web/_controller/_meta.php
index 801d254..e78f8b3 100644
--- a/src/web/_controller/_meta.php
+++ b/src/web/_controller/_meta.php
@@ -5,7 +5,7 @@ class _meta_controller extends Controller {
parent::__construct($load);
}
- public function robots() {
+ public function robots(): void {
header("Content-Type: text/plain");
$sitemap = $this->main->get_url_full('sitemap.xml');
@@ -18,14 +18,14 @@ class _meta_controller extends Controller {
echo "Sitemap: {$sitemap}\n";
}
- private function sitemap_page($url, $priority) {
+ private function sitemap_page(string $url, string $priority): void {
echo "<url>\n";
echo "<loc>{$this->main->get_url_full($url)}</loc>\n";
echo "<priority>{$priority}</priority>\n";
echo "</url>";
}
- public function sitemap() {
+ public function sitemap(): void {
header("Content-Type: application/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@@ -46,7 +46,7 @@ class _meta_controller extends Controller {
echo "</urlset>\n";
}
- public function manifest() {
+ public function manifest(): void {
$json = array(
'short_name' => lang('domain'),
'name' => lang('domain'),
diff --git a/src/web/_controller/blog.php b/src/web/_controller/blog.php
index f13ffd1..4a961e1 100644
--- a/src/web/_controller/blog.php
+++ b/src/web/_controller/blog.php
@@ -18,7 +18,7 @@ class Blog_controller extends Controller {
$this->view('footer', $data);
}
- private function protect($folder) {
+ private function protect(string $folder): void {
if (!array_key_exists('name', $_GET)) {
$this->error(400);
}
@@ -62,7 +62,7 @@ class Blog_controller extends Controller {
$this->view('footer', $data);
}
- public function rss() {
+ public function rss(): void {
$data = $this->blog_model->get_data();
header('Content-Type: application/xml');
$this->view('apps/blog_rss', $data);