logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: squirrelmail/config conf.pl,1.237,1.238: msg#00005

Subject: CVS: squirrelmail/config conf.pl,1.237,1.238
Update of /cvsroot/squirrelmail/squirrelmail/config
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20072/config

Modified Files:
        conf.pl 
Log Message:
Adding write support to address book ldap backend. Patch by David Hardeman
(#1495763).


Index: conf.pl
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/config/conf.pl,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -w -r1.237 -r1.238
--- conf.pl     13 May 2006 19:11:08 -0000      1.237
+++ conf.pl     3 Jun 2006 17:14:49 -0000       1.238
@@ -286,6 +286,11 @@
                     $tmp =~ s/[\'\"]?,?\s*$//;
                     $tmp =~ s/[\'\"]?\);\s*$//;
                     $listing = $tmp;
+                } elsif ( $tmp =~ /^\s*[\'\"]writeable[\'\"]/i ) {
+                    $tmp =~ s/^\s*[\'\"]writeable[\'\"]\s*=>\s*[\'\"]?//i;
+                    $tmp =~ s/[\'\"]?,?\s*$//;
+                    $tmp =~ s/[\'\"]?\);\s*$//;
+                    $writeable = $tmp;
                 } elsif ( $tmp =~ /^\s*[\'\"]search_tree[\'\"]/i ) {
                     $tmp =~ s/^\s*[\'\"]search_tree[\'\"]\s*=>\s*[\'\"]?//i;
                     $tmp =~ s/[\'\"]?,?\s*$//;
@@ -310,6 +315,7 @@
             $ldap_protocol[$sub] = $protocol;
             $ldap_limit_scope[$sub] = $limit_scope;
             $ldap_listing[$sub] = $listing;
+            $ldap_writeable[$sub] = $writeable;
             $ldap_search_tree[$sub] = $search_tree;
             $ldap_starttls[$sub] = $starttls;
         } elsif ( $options[0] =~ 
/^(data_dir|attachment_dir|theme_css|org_logo|signout_page)$/ ) {
@@ -2929,6 +2935,9 @@
                 if ( $ldap_listing[$count] ) {
                     print "     listing: $ldap_listing[$count]\n";
                 }
+                if ( $ldap_writeable[$count] ) {
+                    print "   writeable: $ldap_writeable[$count]\n";
+                }
                 if ( $ldap_search_tree[$count] ) {
                     print " search_tree: $ldap_search_tree[$count]\n";
                 }
@@ -3048,7 +3057,6 @@
               print "Number of displayed entries is limited by maxrows 
setting.\n";
               print "\n";
               print "Don't enable this option for public LDAP directories.\n";
-              print "This feature is experimental.\n";
               print "\n";
               print "Allow listing of LDAP directory? (y/N):";
               $name = <STDIN>;
@@ -3061,6 +3069,23 @@
 
               print "\n";
 
+              print "You can control write access to LDAP address book here. 
This option can\n";
+              print "be useful if you run small LDAP server and want to 
provide writable\n";
+              print "shared address book stored in LDAP to users of webmail 
interface.\n";
+              print "\n";
+              print "Don't enable this option for public LDAP directories.\n";
+              print "\n";
+              print "Allow writing to LDAP directory? (y/N):";
+              $name = <STDIN>;
+              if ( $name =~ /^y\n/i ) {
+                $name = 'true';
+              } else {
+                $name = 'false';
+              }
+              $ldap_writeable[$sub] = $name;
+
+              print "\n";
+
               print "You can specify an additional search filter.\n";
               print "This could be something like 
\"(objectclass=posixAccount)\".\n";
               print "No filtering is performed by default. Press ENTER for 
default.\n";
@@ -3137,6 +3162,7 @@
             @new_ldap_protocol = ();
             @new_ldap_limit_scope = ();
             @new_ldap_listing = ();
+            @new_ldap_writeable = ();
             @new_ldap_search_tree = ();
             @new_ldap_starttls = ();
 
@@ -3154,6 +3180,7 @@
                     @new_ldap_protocol  = ( @new_ldap_protocol,  
$ldap_protocol[$count] );
                     @new_ldap_limit_scope = ( @new_ldap_limit_scope,  
$ldap_limit_scope[$count] );
                     @new_ldap_listing = ( @new_ldap_listing, 
$ldap_listing[$count] );
+                    @new_ldap_writeable = ( @new_ldap_writeable, 
$ldap_writeable[$count] );
                     @new_ldap_search_tree = ( @new_ldap_search_tree, 
$ldap_search_tree[$count] );
                     @new_ldap_starttls = ( @new_ldap_starttls, 
$ldap_starttls[$count] );
                 }
@@ -3171,6 +3198,7 @@
             @ldap_protocol = @new_ldap_protocol;
             @ldap_limit_scope = @new_ldap_limit_scope;
             @ldap_listing = @new_ldap_listing;
+            @ldap_writeable = @new_ldap_writeable;
             @ldap_search_tree = @new_ldap_search_tree;
             @ldap_starttls = @new_ldap_starttls;
 
@@ -3992,6 +4020,11 @@
                 # boolean
                 print CF "    'listing' => $ldap_listing[$count]";
             }
+           if ( $ldap_writeable[$count] ) {
+                print CF ",\n";
+                # boolean
+                print CF "    'writeable' => $ldap_writeable[$count]";
+            }
             if ( $ldap_search_tree[$count] ) {
                 print CF ",\n";
                 # integer





<Prev in Thread] Current Thread [Next in Thread>