[PC-BSD Commits] r18422 - pcbsd/current/src-qt4/pc-adsldap

svn at pcbsd.org svn at pcbsd.org
Mon Aug 13 07:36:19 PDT 2012


Author: kris
Date: 2012-08-13 14:36:19 +0000 (Mon, 13 Aug 2012)
New Revision: 18422

Modified:
   pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp
Log:

Fix bugs saving LDAP extra options in correct format



Modified: pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp	2012-08-13 14:22:42 UTC (rev 18421)
+++ pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp	2012-08-13 14:36:19 UTC (rev 18422)
@@ -160,16 +160,19 @@
   Utils::setConfFileValue(LDCONF, "opt_", "", -1);
   for ( int i = 0; i < textLDAux->document()->lineCount(); ++i)
   { 
+
      // Make sure we have a value and key
      if ( textLDAux->document()->findBlockByLineNumber(i).text().section('=', 0, 0).isEmpty() )
        continue;
      if ( textLDAux->document()->findBlockByLineNumber(i).text().section('=', 1).isEmpty() ) 
        continue;
 
-     optName = "opt_" + textLDAux->document()->findBlockByLineNumber(i).text().section('=', 0, 0).isEmpty();
+     optName = "opt_" + textLDAux->document()->findBlockByLineNumber(i).text().section('=', 0, 0).simplified();
 
-     optVal = textLDAux->document()->findBlockByLineNumber(i).text().section('=', 1);
+     optVal = textLDAux->document()->findBlockByLineNumber(i).text().section('=', 1).simplified();
 
+     qDebug() << textLDAux->document()->findBlockByLineNumber(i).text() << optName << optVal;
+
      // Save the config
      Utils::setConfFileValue(LDCONF, optName + " =", optName + " = " + optVal, -1);
   }



More information about the Commits mailing list