alecpl
2010-01-26 2273d4117fd50ee44dcdaa28fd6444383dc403a0
program/lib/MDB2/Driver/Reverse/mssql.php
@@ -43,7 +43,7 @@
// |          Lorenzo Alberton <l.alberton@quipo.it>                      |
// +----------------------------------------------------------------------+
//
// $Id: mssql.php,v 1.49 2008/02/17 15:30:57 quipo Exp $
// $Id: mssql.php 292715 2009-12-28 14:06:34Z quipo $
//
require_once 'MDB2/Driver/Reverse/Common.php';
@@ -134,7 +134,7 @@
        $default = false;
        if (array_key_exists('column_default', $column)) {
            $default = $column['column_default'];
            if (is_null($default) && $notnull) {
            if ((null === $default) && $notnull) {
                $default = '';
            } elseif (strlen($default) > 4
                   && substr($default, 0, 1) == '('
@@ -151,16 +151,16 @@
            'notnull' => $notnull,
            'nativetype' => preg_replace('/^([a-z]+)[^a-z].*/i', '\\1', $column['type'])
        );
        if (!is_null($length)) {
        if (null !== $length) {
            $definition[0]['length'] = $length;
        }
        if (!is_null($unsigned)) {
        if (null !== $unsigned) {
            $definition[0]['unsigned'] = $unsigned;
        }
        if (!is_null($fixed)) {
        if (null !== $fixed) {
            $definition[0]['fixed'] = $fixed;
        }
        if ($default !== false) {
        if (false !== $default) {
            $definition[0]['default'] = $default;
        }
        foreach ($types as $key => $type) {
@@ -222,7 +222,7 @@
        $index_name_mdb2 = $db->getIndexName($index_name);
        $result = $db->queryRow(sprintf($query, $index_name_mdb2));
        if (!PEAR::isError($result) && !is_null($result)) {
        if (!PEAR::isError($result) && (null !== $result)) {
            // apply 'idxname_format' only if the query succeeded, otherwise
            // fallback to the given $index_name, without transformation
            $index_name = $index_name_mdb2;
@@ -320,7 +320,7 @@
        $constraint_name_mdb2 = $db->getIndexName($constraint_name);
        $result = $db->queryRow(sprintf($query, $constraint_name_mdb2));
        if (!PEAR::isError($result) && !is_null($result)) {
        if (!PEAR::isError($result) && (null !== $result)) {
            // apply 'idxname_format' only if the query succeeded, otherwise
            // fallback to the given $index_name, without transformation
            $constraint_name = $constraint_name_mdb2;