PHOTARK-67 Applying patch from Kishanthan Thangarajah


git-svn-id: https://svn.apache.org/repos/asf/incubator/photark/trunk@1072492 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/photark-ui/src/main/webapp/js/gallery.js b/photark-ui/src/main/webapp/js/gallery.js
index e98d76d..529baf2 100644
--- a/photark-ui/src/main/webapp/js/gallery.js
+++ b/photark-ui/src/main/webapp/js/gallery.js
@@ -96,8 +96,16 @@
 
 function initGallery() {
     try {
+        //following if condition is for a script error that arises in IE 7/8/9
+        if (SECURITY_TOKEN = 'undefined') {
+            dojo.require("dojo._base.xhr");
+            dojo.require("dojo.rpc.JsonService");
+            getJSONAccessList();
+            populateUserInfo();
+            initServices();
+        }
         gallery.getAlbumsToUser(SECURITY_TOKEN).addCallback(gallery_getAlbumsResponse);
-       remoteGallery.getAlbumsToUser(SECURITY_TOKEN,"remote").addCallback(remote_gallery_getAlbumsResponse);
+        remoteGallery.getAlbumsToUser(SECURITY_TOKEN, "remote").addCallback(remote_gallery_getAlbumsResponse);
 
 
     } catch(exception) {