[bknr-cvs] hans changed trunk/projects/quickhoney/

BKNR Commits bknr at bknr.net
Tue Sep 16 19:02:57 UTC 2008


Revision: 3909
Author: hans
URL: http://bknr.net/trac/changeset/3909

Fix handling of pictures with ampersand in names.
Handle invalid paths better (a little).
import.lisp latest additions.

U   trunk/projects/quickhoney/upgrade-stuff/import.lisp
U   trunk/projects/quickhoney/website/static/javascript.js

Modified: trunk/projects/quickhoney/upgrade-stuff/import.lisp
===================================================================
--- trunk/projects/quickhoney/upgrade-stuff/import.lisp	2008-09-16 19:00:31 UTC (rev 3908)
+++ trunk/projects/quickhoney/upgrade-stuff/import.lisp	2008-09-16 19:02:57 UTC (rev 3909)
@@ -71,6 +71,11 @@
   (dolist (image (images-in-category '(:shop)))
     (setf (slot-value image 'cat-sub) '(:shop :shop))))
 
+(with-transaction (:make-explicit)
+  (dolist (image (union (images-in-category '(:vector :nudes))
+                        (images-in-category '(:pen :nudes))))
+    (pushnew :explicit (store-image-keywords image))))
+
 (with-transaction (:initialize-news)
   (setf (slot-value (find-rss-channel "quickhoney") 'bknr.rss::items)
         (sort (remove-if (lambda (image)
@@ -79,6 +84,10 @@
               #'>
               :key #'blob-timestamp)))
 
+(with-transaction (:delete-pixel-buttons)
+  (dolist (keyword '(:parts :icons :editorial :birdview))
+    (mapc #'delete-object (get-keywords-intersection-store-images (list :pixel :button keyword)))))
+
 (with-transaction (:initialize-animation-mime-types)
   (dolist (animation (mapcar #'quickhoney-animation-image-animation
                              (class-instances 'quickhoney-animation-image)))

Modified: trunk/projects/quickhoney/website/static/javascript.js
===================================================================
--- trunk/projects/quickhoney/website/static/javascript.js	2008-09-16 19:00:31 UTC (rev 3908)
+++ trunk/projects/quickhoney/website/static/javascript.js	2008-09-16 19:02:57 UTC (rev 3909)
@@ -418,10 +418,15 @@
 	for (var i = 0; i < query_result.length; i++) {
 	    if (query_result[i].name == document.show_picture) {
 		display_image(i);
+                document.show_picture = null;
 		break;
 	    }
 	}
-	document.show_picture = null;
+        if (document.show_picture) {
+            /* not found */
+            document.show_picture = null;
+            document.location.href = '#' + current_directory + '/' + current_subdirectory;
+        }
     } else {
         if (document.show_page) {
             goto_results_page(document.show_page);
@@ -730,7 +735,7 @@
 
 function directory(directory_name, subpath) {
 
-    log('directory: ', directory_name, ' subpath: ', subpath, ' current_directory: ', current_directory);
+    log('directory: ' + directory_name + ' subpath: ' + subpath + ' current_directory: ' + current_directory);
 
     replaceChildNodes("thumbnails", " ");
 
@@ -1187,7 +1192,7 @@
 
     log('jump_to - path is ', path);
 
-    path = decodeURI(path.replace(/[&#].*/, ""));
+    path = decodeURI(path.replace(/[?#].*/, ""));
     var components = path.split("/");
     show_page(components[0], path.replace(/.*?($|\/(.*))/, "$2"));
 }




More information about the Bknr-cvs mailing list