cosmocode / contagged

ConTagged is a web-based address book for small companies written in PHP.
http://www.cosmocode.de/en/opensource/contagged
63 stars 19 forks source link

Direct url doesn't work just after browser starts #5

Open giner opened 13 years ago

giner commented 13 years ago

Problem is that if I use direct link to search or get contact (for example http://contagged/index.php?search=myname) it does't work if I didn't open address book before since I open a browser and browser redirect me to logon.php. If I use this URL again - it works without any problems. Additional info:

I've made some investigation and found workaround but, unfortunately, I'm a little bit confused with the code and I'm not sure this is a good way to fix the issue.

Index: inc/functions.php
===================================================================
--- inc/functions.php   (リビジョン 13)
+++ inc/functions.php   (作業コピー)
@@ -34,7 +34,7 @@
     $_SESSION['ldapab']['password'] = $p;
   }

-  if(empty($_SESSION['ldapab']) ||
+  if(/*empty($_SESSION['ldapab']) ||*/
      !do_ldap_bind($_SESSION['ldapab']['username'],
                    $_SESSION['ldapab']['password'],
                    $_SESSION['ldapab']['binddn'])){