From b56d4753a7a2556ce8aecdba1c374bc69b5d17b2 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 11 Mar 2023 20:52:46 -0500 Subject: [PATCH] Update Embedfiles.php eliminates a database call --- Code/Module/Embedfiles.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Code/Module/Embedfiles.php b/Code/Module/Embedfiles.php index 23c577b89..caf404a47 100644 --- a/Code/Module/Embedfiles.php +++ b/Code/Module/Embedfiles.php @@ -170,22 +170,6 @@ class Embedfiles extends Controller $ext = EMPTY_STR; } - // $alt = $r[0]['title']; - //$alt = $_POST["filename"]; - /* - if (!$alt) { - $a = q( - "select filename from attach where hash = '%s' and uid = %d limit 1", - dbesc($resource), - intval($channel['channel_id']) - ); - if ($a) { - $alt = $a[0]['filename']; - } else { - $alt = t('Image/photo'); - } - } - */ $alt = ' alt="' . $_POST["filename"] . '"'; $output = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $resource . ']'