From 0b72a89e152b632f77e083d54816faced9291a78 Mon Sep 17 00:00:00 2001 From: danpros Date: Tue, 30 Mar 2021 22:00:42 +0700 Subject: [PATCH] Revert "Format the image tag" This reverts commit 9d25d5e49d7c7805942e1747c5cb794fb3a2f7d9. --- system/admin/admin.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/system/admin/admin.php b/system/admin/admin.php index f2a6757..3ab4a56 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -115,14 +115,7 @@ function add_content($title, $tag, $url, $content, $user, $description = null, $ $post_tag = safe_tag(implode(',', $tag)); $post_tagmd = safe_html(implode(',', $tag)); } - - $media = explode(',', preg_replace("/\s*,\s*/", ",", rtrim($media, ','))); - $med = array(); - foreach ($media as $m) { - $med[] = $m; - } - $media = implode(',', $med); - + $post_date = date('Y-m-d-H-i-s'); $post_title = safe_html($title); $post_media = preg_replace('/\s\s+/', ' ', strip_tags($media)); @@ -256,13 +249,6 @@ function edit_content($title, $tag, $url, $content, $oldfile, $destination = nul $post_tagmd = safe_html(implode(',', $tag)); } - $media = explode(',', preg_replace("/\s*,\s*/", ",", rtrim($media, ','))); - $med = array(); - foreach ($media as $m) { - $med[] = $m; - } - $media = implode(',', $med); - $oldurl = explode('_', $oldfile); $dir = explode('/', $oldurl[0]); $olddate = date('Y-m-d-H-i-s', strtotime($date));