OSDN Git Service

Update project date from '2002 - 2009' to '2002 - 2010'.
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / libs / backup.php
index b788d3f..50fd091 100755 (executable)
@@ -1,7 +1,7 @@
 <?php\r
 /*\r
  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2009 The Nucleus Group\r
+ * Copyright (C) 2002-2010 The Nucleus Group\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -15,7 +15,7 @@
  * Based on code in phpBB (http://phpBB.sourceforge.net)\r
  *\r
  * @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2010 The Nucleus Group\r
  * @version $Id$\r
  * $NucleusJP: backup.php,v 1.8.2.1 2007/08/08 05:23:31 kimitake Exp $\r
  */\r
@@ -73,7 +73,7 @@ class Backup
                // catch all output generated by plugins\r
                ob_start();\r
                $res = sql_query('SELECT pfile FROM '.sql_table('plugin'));\r
-               while ($plugName = mysql_fetch_object($res)) {\r
+               while ($plugName = sql_fetch_object($res)) {\r
                        $plug =& $manager->getPlugin($plugName->pfile);\r
                        if ($plug) $tables = array_merge($tables, (array) $plug->getTableList());\r
                }\r
@@ -160,7 +160,7 @@ class Backup
                // add command to drop table on restore\r
                echo "DROP TABLE IF EXISTS $tablename;\n";\r
                $result = sql_query("SHOW CREATE TABLE $tablename");\r
-               $create = mysql_fetch_assoc($result);\r
+               $create = sql_fetch_assoc($result);\r
                echo $create['Create Table'];\r
                echo ";\n\n";\r
        }\r
@@ -255,7 +255,7 @@ class Backup
        \r
                        $fields = array();\r
                        for ($j = 0; $j < $num_fields; $j++) {\r
-                               $fields[] = mysql_field_name($result, $j);\r
+                               $fields[] = sql_field_name($result, $j);\r
                        }\r
        \r
        /*      }*/\r
@@ -270,12 +270,12 @@ class Backup
                //\r
                // Grab the data from the table.\r
                //\r
-               $result = mysql_query("SELECT * FROM $tablename");\r
+               $result = sql_query("SELECT * FROM $tablename");\r
        \r
-               if(mysql_num_rows($result) > 0)\r
+               if(sql_num_rows($result) > 0)\r
                        echo "\n#\n# " . sprintf(_BACKUP_BACKUPFILE_TABLEDATAFOR, $tablename) . "\n#\n";\r
                        \r
-               $num_fields = mysql_num_fields($result);\r
+               $num_fields = sql_num_fields($result);\r
                \r
                //\r
                // Compose fieldname list\r
@@ -285,7 +285,7 @@ class Backup
                //\r
                // Loop through the resulting rows and build the sql statement.\r
                //\r
-               while ($row = mysql_fetch_array($result))\r
+               while ($row = sql_fetch_array($result))\r
                {\r
                        // Start building the SQL statement.\r
        \r
@@ -404,8 +404,8 @@ class Backup
                                // DEBUG\r
        //                      debug("Executing: " . htmlspecialchars($sql) . "\n");\r
        \r
-                               $result = mysql_query($sql);\r
-                               if (!$result) debug(_BACKUP_RESTOR_SQL_ERROR . mysql_error());\r
+                               $result = sql_query($sql);\r
+                               if (!$result) debug(_BACKUP_RESTOR_SQL_ERROR . sql_error());\r
        \r
                        }\r
                }\r