]> git.mjollnir.org Git - s9y.git/commitdiff
* Media uploader remembers last used upload directory (garvinhicking) * Add...
authorgarvinhicking <garvinhicking>
Tue, 6 Dec 2005 10:53:24 +0000 (10:53 +0000)
committergarvinhicking <garvinhicking>
Tue, 6 Dec 2005 10:53:24 +0000 (10:53 +0000)
docs/NEWS
include/admin/images.inc.php
include/functions.inc.php

index 004e0aab92679bc873a8506177efbfd552acde34..2c6da8b5b0eb97a40de30add4aac2154d017b0da 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 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)
index a32badba4c0b8a15b412fa3cae7cae8e88ce242c..77fcbbf7e3450871cce877111bc1ec10ccf5ae1d 100644 (file)
@@ -381,6 +381,7 @@ switch ($serendipity['GET']['adminAction']) {
             return;
         }
 
+        serendipity_restoreVar($serendipity['COOKIE']['addmedia_directory'], $serendipity['GET']['only_path']);
 ?>
     <?php echo ADD_MEDIA_BLAHBLAH; ?>
 
@@ -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']) {
     }
     </script>
 
-    <form action="?" method="POST" id="uploadform" enctype="multipart/form-data">
+    <form action="?" method="POST" id="uploadform" enctype="multipart/form-data" onsubmit="rememberOptions()">
         <div>
             <?php echo serendipity_setFormToken(); ?> 
             <input type="hidden" name="serendipity[action]"      value="admin" />
@@ -554,7 +563,7 @@ switch ($serendipity['GET']['adminAction']) {
             <input type="hidden" name="serendipity[adminAction]" value="add" />
 <?php
         if (isset($image_selector_addvars) && is_array($image_selector_addvars)) {
-            // These variables may come frmo serendipity_admin_image_selector.php to show embedded upload form
+            // These variables may come from serendipity_admin_image_selector.php to show embedded upload form
             foreach($image_selector_addvars AS $imgsel_key => $imgsel_val) {
                 echo '          <input type="hidden" name="serendipity[' . htmlspecialchars($imgsel_key) . ']" value="' . htmlspecialchars($imgsel_val) . '" />' . "\n";
             }
index 654ee55590632ff4cfa5d6d4c88bb7bb78685ca0..e739a4eccd5c9f9a10c8d59b68cd6e59c5e201ec 100644 (file)
@@ -296,6 +296,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));