OSDN Git Service

merged from v3.31sp1
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / libs / backup.php
index bbdc981..5968f06 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -15,9 +15,9 @@
  * Based on code in phpBB (http://phpBB.sourceforge.net)
  *
  * @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: backup.php,v 1.6 2006-12-11 22:23:49 kmorimatsu Exp $
- * $NucleusJP: backup.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: backup.php,v 1.9 2008-02-08 09:31:22 kimitake Exp $
+ * $NucleusJP: backup.php,v 1.8.2.1 2007/08/08 05:23:31 kimitake Exp $
  */
 
 
@@ -188,7 +188,7 @@ function _backup_dump_structure($tablename) {
                if(!is_array($index[$kname]))
                        $index[$kname] = array();
 
-               $index[$kname][] = $row['Column_name'];
+               $index[$kname][] = $row['Column_name'] . ( ($row['Sub_part']) ? ' (' . $row['Sub_part'] . ')' : '');
        }
 
        while(list($x, $columns) = @each($index)) {
@@ -217,20 +217,20 @@ function _backup_dump_structure($tablename) {
  */
 function _backup_get_field_names($result, $num_fields) {
 
-       if (function_exists('mysqli_fetch_fields') ) {
+/*     if (function_exists('mysqli_fetch_fields') ) {
                
                $fields = mysqli_fetch_fields($result);
                for ($j = 0; $j < $num_fields; $j++)
                        $fields[$j] = $fields[$j]->name;
 
-       } else {
+       } else {*/
 
                $fields = array();
                for ($j = 0; $j < $num_fields; $j++) {
                        $fields[] = mysql_field_name($result, $j);
                }
 
-       }
+/*     }*/
        
        return '(' . implode(', ', $fields) . ')';      
 }