Autosearch when re-using an existing SP session on subsequent init()
authorJason Skomorowski <jason@indexdata.com>
Fri, 15 Aug 2014 21:25:30 +0000 (17:25 -0400)
committerJason Skomorowski <jason@indexdata.com>
Fri, 15 Aug 2014 21:25:30 +0000 (17:25 -0400)
src/mkws-core.js

index 3632a64..6f58a92 100644 (file)
@@ -650,14 +650,12 @@ mkws.pagerNext = function(tname) {
       }
     */
 
-    if (mkws.config.use_service_proxy) {
-      if (!mkws.authenticated) {
-        authenticateSession(mkws.config.service_proxy_auth,
-                            mkws.config.service_proxy_auth_domain,
-                            mkws.config.pazpar2_url);
-      }
+    if (mkws.config.use_service_proxy && !mkws.authenticated) {
+      authenticateSession(mkws.config.service_proxy_auth,
+                          mkws.config.service_proxy_auth_domain,
+                          mkws.config.pazpar2_url);
     } else {
-      // raw pp2
+      // raw pp2 or we have a session already open
       runAutoSearches();
     }