From c63fb1715a62d05e22114a08d69df432a8cd23a4 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 6 Dec 2005 10:52:56 +0000 Subject: [PATCH] * Media uploader remembers last used upload directory (garvinhicking) * Add "Precedence: Bulk" headers to sent mails (garvinhicking) --- docs/NEWS | 4 ++++ include/admin/images.inc.php | 13 +++++++++++-- include/functions.inc.php | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 1f64794..4d30475 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -42,6 +42,10 @@ Version 1.0 () Version 0.9.2 () ------------------------------------------------------------------------ + * Media uploader remembers last used upload directory (garvinhicking) + + * Add "Precedence: Bulk" headers to sent mails (garvinhicking) + * Fix bug #1371893: Category write permissions are not properly evaluated when writing into a category that a user has no access to. Thanks to cydvicious! (garvinhicking) diff --git a/include/admin/images.inc.php b/include/admin/images.inc.php index a32badb..77fcbbf 100644 --- a/include/admin/images.inc.php +++ b/include/admin/images.inc.php @@ -381,6 +381,7 @@ switch ($serendipity['GET']['adminAction']) { return; } + serendipity_restoreVar($serendipity['COOKIE']['addmedia_directory'], $serendipity['GET']['only_path']); ?> @@ -493,6 +494,8 @@ switch ($serendipity['GET']['adminAction']) { iNode = document.getElementById('upload_form'); iNode.parentNode.insertBefore(fields, iNode); + + document.getElementById(targetdir.id).selectedIndex = document.getElementById('target_directory_' + (fieldcount - 1)).selectedIndex; } var inputStorage = new Array(); @@ -514,6 +517,12 @@ switch ($serendipity['GET']['adminAction']) { } } + function rememberOptions() { + td = document.getElementById('target_directory_2'); + td_val = td.options[td.selectedIndex].value; + SetCookie("addmedia_directory", td_val); + } + function debugField(id) { alert(id + ': ' + document.getElementById(id).value); } @@ -546,7 +555,7 @@ switch ($serendipity['GET']['adminAction']) { } -
+
@@ -554,7 +563,7 @@ switch ($serendipity['GET']['adminAction']) { $imgsel_val) { echo ' ' . "\n"; } diff --git a/include/functions.inc.php b/include/functions.inc.php index 6c37e28..a432a6b 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -397,6 +397,7 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL $headers[] = 'X-Engine: PHP/'. phpversion(); $headers[] = 'Message-ID: <'. md5(microtime() . uniqid(time())) .'@'. $_SERVER['HTTP_HOST'] .'>'; $headers[] = 'MIME-Version: 1.0'; + $headers[] = 'Precedence: bulk'; $headers[] = 'Content-Type: text/plain; charset="' . LANG_CHARSET .'"'; return mail($to, $subject, $message, implode("\n", $headers)); -- 2.39.5