Dotclear

Changeset 3565:7b120898d2bd


Ignore:
Timestamp:
07/27/17 17:24:16 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add MySQL UTF8-MB4 support

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • admin/install/check.php

    r3137 r3565  
    4949     } 
    5050 
    51      if ($con->driver() == 'mysql' || $con->driver() == 'mysqli') 
     51     if ($con->driver() == 'mysql' || $con->driver() == 'mysqli' || $con->driver() == 'mysqlimb4') 
    5252     { 
    5353          if (version_compare($con->version(),'4.1','<')) 
  • admin/install/wizard.php

    r3404 r3565  
    201201'<form action="wizard.php" method="post">'. 
    202202'<p><label class="required" for="DBDRIVER"><abbr title="'.__('Required field').'">*</abbr> '.__('Database type:').'</label> '. 
    203     form::combo('DBDRIVER',array(__('MySQL (deprecated)')=>'mysql',__('MySQLi')=>'mysqli',__('PostgreSQL')=>'pgsql',__('SQLite')=>'sqlite'),$DBDRIVER).'</p>'. 
     203    form::combo('DBDRIVER',array(__('MySQL (deprecated)')=>'mysql',__('MySQLi')=>'mysqli',__('MySQLi (full UTF-8)')=>'mysqlimb4',__('PostgreSQL')=>'pgsql',__('SQLite')=>'sqlite'),$DBDRIVER).'</p>'. 
    204204'<p><label for="DBHOST">'.__('Database Host Name:').'</label> '. 
    205205form::field('DBHOST',30,255,html::escapeHTML($DBHOST)).'</p>'. 
  • inc/config.php.in

    r3533 r3565  
    1212if (!defined('DC_RC_PATH')) { return; } 
    1313 
    14 // Database driver (mysql (deprecated, disabled in PHP7), mysqli, pgsql, sqlite) 
     14// Database driver (mysql (deprecated, disabled in PHP7), mysqli, mysqlimb4 (full UTF-8), pgsql, sqlite) 
    1515define('DC_DBDRIVER',''); 
    1616 
  • inc/core/class.dc.blog.php

    r3423 r3565  
    694694          if (!$rs->isEmpty()) 
    695695          { 
    696                if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
     696               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') { 
    697697                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
    698698               } elseif ($this->con->driver() == 'pgsql') { 
     
    19391939          if (!$rs->isEmpty()) 
    19401940          { 
    1941                if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') { 
     1941               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') { 
    19421942                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
    19431943               } elseif ($this->con->driver() == 'pgsql') { 
  • inc/core/class.dc.core.php

    r3402 r3565  
    7272          } elseif ($this->con instanceof mysqliConnection) { 
    7373               mysqliConnection::$weak_locks = true; 
     74          } elseif ($this->con instanceof mysqlimb4Connection) { 
     75               mysqlimb4Connection::$weak_locks = true; 
    7476          } 
    7577 
  • plugins/importExport/inc/flat/class.flat.import.php

    r3323 r3565  
    164164                         if (in_array($last_line_name,$constrained)) { 
    165165                              # UNDEFER 
    166                               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 1'); 
     166                              if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') $this->con->execute('SET foreign_key_checks = 1'); 
    167167                              if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL DEFERRED'); 
    168168                         } 
     
    170170                         if (in_array($line->__name,$constrained)) { 
    171171                              # DEFER 
    172                               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 0'); 
     172                              if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') $this->con->execute('SET foreign_key_checks = 0'); 
    173173                              if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL IMMEDIATE'); 
    174174                         } 
     
    209209               } 
    210210 
    211                if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 1'); 
     211               if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') $this->con->execute('SET foreign_key_checks = 1'); 
    212212               if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL DEFERRED'); 
    213213          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map