pike.git / lib / modules / Protocols.pmod / LDAP.pmod / client.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1:   #pike __REAL_VERSION__      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.27 2001/11/05 11:53:20 hop Exp $ + // $Id: client.pike,v 1.28 2001/11/21 16:22:42 anders Exp $   //   // Honza Petrous, hop@unibase.cz   //   // ----------------------------------------------------------------------   //   // History:   //   // v0.0 1998-05-25 Starting up!   // v1.0 1998-06-21 Core functions (open, bind, unbind, delete, add,   // compare, search), only V2 operations,
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:342:    //! @tt{"ldap://hostname/basedn?attrlist?scope?ext"@}    //!    //! @param context    //! TLS context of connection    //!    //! @seealso    //! @[LDAP.client.bind], @[LDAP.client.search]    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.27 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.28 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap") && (lauth->scheme != "ldaps"))) {    THROW(({"Unknown scheme in server URL.\n",backtrace()}));    }
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:782:          /*private*/ object|int make_filter(string filter) {    // filter expression parser       object ohlp;    array(object) oarr = ({});    int op ;       DWRITE("client.make_filter: filter=["+filter+"]\n"); +  +  if (!sizeof(filter)) return make_simple_filter(filter); +     // strip leading and trailing spaces -  while(filter[0] == ' ') -  filter = filter[1..]; -  while(filter[-1] == ' ') -  filter = reverse(reverse(filter)[1..]); +  filter = String.trim_all_whites(filter);       // strip leading and trailing brackets   #if 1    if(filter[0] == '(') {    int ix;    string f2 = reverse(filter[1..]);    if((ix = predef::search(f2, ")")) > -1) {    filter = reverse(f2[ix+1..]);    return(make_filter(filter));    }