fix permalink
authorArun Persaud <arun@nubati.net>
Wed, 8 Feb 2012 04:38:20 +0000 (20:38 -0800)
committerArun Persaud <apersaud@lbl.gov>
Wed, 8 Feb 2012 04:39:37 +0000 (20:39 -0800)
index.php

index 9e4bc15546a3a6bc1908984faae31c1b06720afa..93bc9e32cbd82426996dc094f6dc4db92c8644f4 100644 (file)
--- a/index.php
+++ b/index.php
@@ -221,18 +221,20 @@ function load_content(a) {
      checkbutton();
     });
 
-   update_permalink()
+   update_permalink(a)
 }
 
-function update_permalink() {
+function update_permalink(page) {
   /* update permalink */
 
   permalink = webbase;
 
   if(T!="")
     permalink += '/tag/' + T;
-  if(a!=1)
-    permalink += '/page/' + a;
+  if(page!=1)
+    permalink += '/page/' + page;
+  if(ID>0)
+    permalink += '/pic/' + ID;
 
   d3.select(".permalink").html("Permalink: <a href=\""+permalink+"\">"+permalink+"</a>");
 }