From fe3e6194d33d63f149f2a362adf325019278d61e Mon Sep 17 00:00:00 2001
From: cflip <36554078+cflip@users.noreply.github.com>
Date: Sat, 24 Apr 2021 19:50:59 -0600
Subject: Use Session class instead of $_SESSION
---
includes/model/Post.php | 37 -------------------------------------
1 file changed, 37 deletions(-)
(limited to 'includes/model')
diff --git a/includes/model/Post.php b/includes/model/Post.php
index 86373b6..67c7e4a 100644
--- a/includes/model/Post.php
+++ b/includes/model/Post.php
@@ -33,41 +33,4 @@ class Post
return true;
}
-
- function display_content($dbc)
- {
- echo '
';
-
- $post_content = $this->content;
- $thread_id = $this->id;
-
- $post_content = preg_replace_callback('/>#\d+/', function ($matches) use ($thread_id, $dbc) {
- return create_quote($dbc, $thread_id, $matches);
- }, $post_content);
-
- // Replace newline characters with HTML
tags
- $post_content = nl2br($post_content);
-
- // Replace YouTube URLs with embedded YouTube videos.
- $post_content = preg_replace(
- "/\s*[a-zA-Z\/\/:\.]*youtu(be.com\/watch\?v=|.be\/)([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i",
- '
', $post_content);
- // Replace Image URLs with embedded images.
- $post_content = preg_replace('@\b(http(s)?://)([^\s]*?(?:\.[a-z\d?=/_-]+)+(?:\.jpg|\.png|\.gif))(?![^<]*?(?:\w+>|/?>))@i', '
', $post_content);
- // Replace other URLs with links.
- $post_content = preg_replace('@\b(http(s)?://)([^\s]*?(?:\.[a-z\d?=/_-]+)+)(?![^<]*?(?:\w+>|/?>))@i', '$0', $post_content);
-
- echo '' . $post_content . '';
- }
}
--
cgit v1.2.3