Revision: 1269
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1269&view=rev
Author:   jberanek
Date:     2009-11-24 21:21:09 +0000 (Tue, 24 Nov 2009)

Log Message:
-----------
* Fixed LDAP auth method so that $ldap_filter will work if you use
 $ldap_dn_search_attrib.

* Updated 'mysql' and 'mysqli' DB abstractions to request a UTF-8 client
 charset if $unicode_encoding is true.

* Updated version number to 1.4.3.

Modified Paths:
--------------
    mrbs/trunk/web/auth_ldap.inc
    mrbs/trunk/web/mysql.inc
    mrbs/trunk/web/mysqli.inc
    mrbs/trunk/web/version.inc

Modified: mrbs/trunk/web/auth_ldap.inc
===================================================================
--- mrbs/trunk/web/auth_ldap.inc        2009-11-14 21:35:57 UTC (rev 1268)
+++ mrbs/trunk/web/auth_ldap.inc        2009-11-24 21:21:09 UTC (rev 1269)
@@ -162,7 +162,7 @@
         {
           $res = @ldap_search($ldap,
                               $base_dn,
-                              "(&(". $all_ldap_user_attrib[$idx] 
."=$user)($ldap_filter))",
+                              "(&($dn)($ldap_filter))",
                               array()
                              );
           if (@ldap_count_entries($ldap, $res) > 0)

Modified: mrbs/trunk/web/mysql.inc
===================================================================
--- mrbs/trunk/web/mysql.inc    2009-11-14 21:35:57 UTC (rev 1268)
+++ mrbs/trunk/web/mysql.inc    2009-11-24 21:21:09 UTC (rev 1269)
@@ -328,6 +328,8 @@
 // persistent connections
 function sql_mysql_connect($host, $username, $password, $db_name, $persist = 0)
 {
+  global $unicode_encoding;
+
   // Establish a database connection.
 
   // On connection error, the message will be output without a proper HTML
@@ -349,6 +351,17 @@
     echo "\n<p>\n" . get_vocab("failed_connect_db") . "\n</p>\n";
     exit;
   }
+  if ($unicode_encoding)
+  {
+    if (function_exists('mysql_set_charset'))
+    {
+      mysql_set_charset('utf8', $db_conn);
+    }
+    else
+    {
+      mysql_query("SET NAMES 'utf8'", $db_conn);
+    }
+  }
   return $db_conn;
 }
 

Modified: mrbs/trunk/web/mysqli.inc
===================================================================
--- mrbs/trunk/web/mysqli.inc   2009-11-14 21:35:57 UTC (rev 1268)
+++ mrbs/trunk/web/mysqli.inc   2009-11-24 21:21:09 UTC (rev 1269)
@@ -358,6 +358,8 @@
 function sql_mysqli_connect($host, $username, $password,
                             $db_name, $persist = 0)
 {
+  global $unicode_encoding;
+
   // Establish a database connection.
 
   // On connection error, the message will be output without a proper HTML
@@ -383,6 +385,17 @@
     echo "\n<p>\n" . get_vocab("failed_connect_db") . " : " . 
mysqli_connect_error() . "\n</p>\n";
     exit;
   }
+  if ($unicode_encoding)
+  {
+    if (function_exists('mysqli_set_charset'))
+    {
+      $db_conn->set_charset("utf8");
+    }
+    else
+    {
+      $db_conn->query("SET NAMES 'utf8'");
+    }
+  }
   return $db_conn;
 }
 

Modified: mrbs/trunk/web/version.inc
===================================================================
--- mrbs/trunk/web/version.inc  2009-11-14 21:35:57 UTC (rev 1268)
+++ mrbs/trunk/web/version.inc  2009-11-24 21:21:09 UTC (rev 1269)
@@ -8,7 +8,7 @@
 function get_mrbs_version()
 {
   // MRBS developers, make sure to update this string before each release
-  $mrbs_version = "MRBS 1.4.2+svn";
+  $mrbs_version = "MRBS 1.4.3";
 
   return $mrbs_version;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to