phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.schema_proc_mssql.inc.php, 1.7 cla


From: fipsfuchs
Subject: [Phpgroupware-cvs] phpgwapi/inc class.schema_proc_mssql.inc.php, 1.7 class.log.inc.php, 1.9 class.schema_proc.inc.php, 1.12 class.setup.inc.php, 1.22
Date: Thu, 28 Apr 2005 20:20:00 +0200

Update of phpgwapi/inc

Modified Files:
     Branch: MAIN
            class.schema_proc_mssql.inc.php lines: +12 -2
            class.log.inc.php lines: +3 -3
            class.schema_proc.inc.php lines: +5 -1
            class.setup.inc.php lines: +5 -41

Log Message:
patch 3927
msql support for adodb

====================================================
Index: phpgwapi/inc/class.schema_proc_mssql.inc.php
diff -u phpgwapi/inc/class.schema_proc_mssql.inc.php:1.6 
phpgwapi/inc/class.schema_proc_mssql.inc.php:1.7
--- phpgwapi/inc/class.schema_proc_mssql.inc.php:1.6    Thu Dec 30 06:47:31 2004
+++ phpgwapi/inc/class.schema_proc_mssql.inc.php        Thu Apr 28 18:20:15 2005
@@ -326,7 +326,7 @@
                function GetSequenceSQL($sTableName, &$sSequenceSQL)
                {
                        $sSequenceSQL = '';
-                       return true;
+                       return false;
                }

                function GetTriggerSQL($sTableName, $sColumnNames, 
&$sTriggerSQL)
@@ -351,5 +351,15 @@

                        return false;
                }
+        function GetFKSQL($sFields)
+        {
+           if (ereg("\((.*)\)", $sFields, $regs))
+            {
+              $ret = "FOREIGN KEY (".$regs[1].")\n" .
+                "  REFERENCES ".$sFields;
+              return $ret;
+            } else
+              return ""; // incorrect FK declaration found
+        }
        }
 ?>

====================================================
Index: phpgwapi/inc/class.log.inc.php
diff -u phpgwapi/inc/class.log.inc.php:1.8 phpgwapi/inc/class.log.inc.php:1.9
--- phpgwapi/inc/class.log.inc.php:1.8  Thu Dec 30 06:47:30 2004
+++ phpgwapi/inc/class.log.inc.php      Thu Apr 28 18:20:15 2005
@@ -78,13 +78,13 @@
                        }

                        if (    ( 
isset($GLOBALS['phpgw_info']['flags']['currentapp']) )
-                            && ( array_key_exists( 
$GLOBALS['phpgw_info']['flags']['currentapp'] , 
$GLOBALS['phpgw_info']['server']['log_levels']['module']) )
+                            && ( @array_key_exists( 
$GLOBALS['phpgw_info']['flags']['currentapp'] , 
$GLOBALS['phpgw_info']['server']['log_levels']['module']) )
                             && ( 
$this->log_level_table[$GLOBALS['phpgw_info']['server']['log_levels']['module'][$GLOBALS['phpgw_info']['flags']['currentapp']]]
 >= $this->log_level_table[$level] ) ) {
                                        return true;
                        }

                        if (    ( 
isset($GLOBALS['phpgw_info']['user']['account_lid']) )
-                                && ( 
array_key_exists($GLOBALS['phpgw_info']['user']['account_lid'], 
$GLOBALS['phpgw_info']['server']['log_levels']['user']) )
+                                && ( 
@array_key_exists($GLOBALS['phpgw_info']['user']['account_lid'], 
$GLOBALS['phpgw_info']['server']['log_levels']['user']) )
                             && ( 
$this->log_level_table[$GLOBALS['phpgw_info']['server']['log_levels']['user'][$GLOBALS['phpgw_info']['user']['account_lid']]]
 >= $this->log_level_table[$level] ) ) {
                                return true;
                        }

====================================================
Index: phpgwapi/inc/class.schema_proc.inc.php
diff -u phpgwapi/inc/class.schema_proc.inc.php:1.11 
phpgwapi/inc/class.schema_proc.inc.php:1.12
--- phpgwapi/inc/class.schema_proc.inc.php:1.11 Thu Mar  3 17:14:26 2005
+++ phpgwapi/inc/class.schema_proc.inc.php      Thu Apr 28 18:20:15 2005
@@ -469,6 +469,10 @@
                                        //$sBufNullable = ' NOT NULL';
                                        $sFieldSQL .= ' NOT NULL';
                                }
+                               else
+                               {
+                                       $sFieldSQL .= ' NULL';
+                               }

                                if($sDefault == '0')
                                {

====================================================
Index: phpgwapi/inc/class.setup.inc.php
diff -u phpgwapi/inc/class.setup.inc.php:1.21 
phpgwapi/inc/class.setup.inc.php:1.22
--- phpgwapi/inc/class.setup.inc.php:1.21       Sun Jan  9 01:46:39 2005
+++ phpgwapi/inc/class.setup.inc.php    Thu Apr 28 18:20:15 2005
@@ -320,28 +320,9 @@
                        }
                        $enable = intval($enable);

-                       /*
-                       Use old applications table if the currentver is less 
than 0.9.10pre8,
-                       but not if the currentver = '', which probably means 
new install.
-                       */
-                       $use_appid = false;
-                       
if($this->alessthanb($setup_info['phpgwapi']['currentver'],'0.9.10pre8') && 
($setup_info['phpgwapi']['currentver'] != ''))
-                       {
-                               $appstbl = 'applications';
-                       }
-                       else
-                       {
-                               $appstbl = 'phpgw_applications';
-                               
if($this->amorethanb($setup_info['phpgwapi']['currentver'],'0.9.13.014'))
-                               {
-                                       $use_appid = True;
-                               }
-                       }
-
                        if($GLOBALS['DEBUG'])
                        {
-                               echo '<br>register_app(): ' . $appname . ', 
version: ' . $setup_info[$appname]['version'] . ', table: ' . $appstbl . '<br>';
-                               // _debug_array($setup_info[$appname]);
+                               echo '<br>register_app(): ' . $appname . ', 
version: ' . $setup_info[$appname]['version'] . ', table: 
phpgw_applications<br>';
                        }

                        if($setup_info[$appname]['version'])
@@ -361,26 +342,9 @@
                                                
.$appname."_tables_prefix','".$setup_info[$appname]['tables_prefix']."')";
                                        
$this->db->query($sql,__LINE__,__FILE__);
                                }
-                               if($use_appid)
-                               {
-                                       $this->db->query("SELECT MAX(app_id) 
FROM $appstbl",__LINE__,__FILE__);
-                                       $this->db->next_record();
-                                       if($this->db->f(0))
-                                       {
-                                               $app_id = ($this->db->f(0) + 1) 
. ',';
-                                               $app_idstr = 'app_id,';
-                                       }
-                                       else
-                                       {
-                                               srand(100000);
-                                               $app_id = rand(1,100000) . ',';
-                                               $app_idstr = 'app_id,';
-                                       }
-                               }
-                               $this->db->query("INSERT INTO $appstbl "
-                                       . "($app_idstr 
app_name,app_enabled,app_order,app_tables,app_version) "
-                                       . "VALUES ("
-                                       . $app_id
+                               $this->db->query('INSERT INTO 
phpgw_applications '
+                                       . 
'(app_name,app_enabled,app_order,app_tables,app_version) '
+                                       . 'VALUES ('
                                        . "'" . $setup_info[$appname]['name'] . 
"',"
                                        . $enable . ","
                                        . 
intval($setup_info[$appname]['app_order']) . ","






reply via email to

[Prev in Thread] Current Thread [Next in Thread]