summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-02-07 20:38:20 -0800
committerArun Persaud <apersaud@lbl.gov>2012-02-07 20:39:37 -0800
commit0488219be9cef0ce100ebf2aeb6c8d91fa9ca692 (patch)
treec5ba5f925410140f7640d5169b4dc07157548be0 /index.php
parentf67eb9ff75179fa5f2a0d712fdca918308ec17ea (diff)
downloadphoto-tags-0488219be9cef0ce100ebf2aeb6c8d91fa9ca692.tar.gz
photo-tags-0488219be9cef0ce100ebf2aeb6c8d91fa9ca692.tar.bz2
photo-tags-0488219be9cef0ce100ebf2aeb6c8d91fa9ca692.zip
fix permalink
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/index.php b/index.php
index 9e4bc15..93bc9e3 100644
--- 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>");
}