fix regression with org selector when specifying ?ol= and the org unit hiding setting...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 11 Jan 2011 21:45:53 +0000 (21:45 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 11 Jan 2011 21:45:53 +0000 (21:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19155 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/opac_utils.js

index 9c10e2a..e585137 100644 (file)
@@ -854,7 +854,11 @@ function checkOrgHiding() {
     if ( findOrgDepth( context_org ) < depth ) {
         return false; // disable org hiding if Original Location doesn't make sense with setting depth (avoids disjointed org selectors)
     }
-    return { 'org' : findOrgUnit(context_org), 'depth' : depth };
+    if (depth) {
+        return { 'org' : findOrgUnit(context_org), 'depth' : depth };
+    } else {
+        return false;
+    }
 }
 
 var orgTreeSelector;