Added whiteOutForm support to uploader (beta)
authorDan
Thu, 29 Jan 2009 02:04:37 -0500
changeset 32 9803dde5df5f
parent 31 3e8d2acd7388
child 33 6dc190e2158b
Added whiteOutForm support to uploader (beta)
plugins/gallery/upload.php
--- a/plugins/gallery/upload.php	Thu Jan 29 02:04:15 2009 -0500
+++ b/plugins/gallery/upload.php	Thu Jan 29 02:04:37 2009 -0500
@@ -819,8 +819,8 @@
             $local_d = $desc->run();
             $local_d = RenderMan::preprocess_text($local_d, true, false);
             
-            $subq = '(\'' . $stored_name . '\', \'' . $db->escape($local_t) . '\', \'' . $db->escape($local_d) . '\',\'a:0:{}\', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), ' . $folder . ')';
-            $sql = "INSERT INTO ".table_prefix."gallery(img_filename,img_title,img_desc,print_sizes,img_time_upload,img_time_mod,folder_parent) VALUES{$subq};";
+            $subq = '(\'' . $stored_name . '\', \'' . $db->escape($local_t) . '\', \'' . $db->escape($local_d) . '\',\'a:0:{}\', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), ' . $folder . ', \'[]\')';
+            $sql = "INSERT INTO ".table_prefix."gallery(img_filename,img_title,img_desc,print_sizes,img_time_upload,img_time_mod,folder_parent,img_tags) VALUES{$subq};";
             
             if ( !$db->sql_query($sql) )
               $db->_die();
@@ -907,8 +907,8 @@
         $local_d = $desc->run();
         $local_d = RenderMan::preprocess_text($local_d, true, false);
         
-        $subq = '(\'' . $file['stored_name'] . '\', \'' . $db->escape($local_t) . '\', \'' . $db->escape($local_d) . '\',\'a:0:{}\', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), ' . $folder . ')';
-        $sql = "INSERT INTO ".table_prefix."gallery(img_filename,img_title,img_desc,print_sizes,img_time_upload,img_time_mod,folder_parent) VALUES{$subq};";
+        $subq = '(\'' . $file['stored_name'] . '\', \'' . $db->escape($local_t) . '\', \'' . $db->escape($local_d) . '\',\'a:0:{}\', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), ' . $folder . ', \'[]\')';
+        $sql = "INSERT INTO ".table_prefix."gallery(img_filename,img_title,img_desc,print_sizes,img_time_upload,img_time_mod,folder_parent,img_tags) VALUES{$subq};";
         
         if ( !$db->sql_query($sql) )
           $db->_die();
@@ -987,7 +987,7 @@
   </script>
   <?php
   
-  echo '<form action="' . makeUrlNS('Special', 'GalleryUpload') . '" enctype="multipart/form-data" method="post">';
+  echo '<form action="' . makeUrlNS('Special', 'GalleryUpload') . '" enctype="multipart/form-data" method="post" onsubmit="if ( window.whiteOutForm ) window.whiteOutForm(this);">';
   echo $max_size_field;
   if ( count($errors) > 0 )
   {