OSDN Git Service

Avoid showing SQL error when changing plugin option by the symultaneous connections...
authorkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 19 Feb 2007 22:29:31 +0000 (22:29 +0000)
committerkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 19 Feb 2007 22:29:31 +0000 (22:29 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@208 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/PLUGIN.php

index b3d064a..8eaf4d0 100755 (executable)
@@ -17,8 +17,8 @@
         *
         * @license http://nucleuscms.org/license.txt GNU General Public License
         * @copyright Copyright (C) 2002-2007 The Nucleus Group
         *
         * @license http://nucleuscms.org/license.txt GNU General Public License
         * @copyright Copyright (C) 2002-2007 The Nucleus Group
-        * @version $Id: PLUGIN.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
-        * $NucleusJP: PLUGIN.php,v 1.6 2006/12/07 03:18:33 kmorimatsu Exp $
+        * @version $Id: PLUGIN.php,v 1.8 2007-02-19 22:29:31 kmorimatsu Exp $
+        * $NucleusJP: PLUGIN.php,v 1.7 2007/02/04 06:28:46 kimitake Exp $
         */
        class NucleusPlugin {
 
         */
        class NucleusPlugin {
 
 
                        // update plugin_option
                        sql_query('DELETE FROM ' . sql_table('plugin_option') . ' WHERE oid='.intval($oid) . ' and ocontextid='. intval($contextid));
 
                        // update plugin_option
                        sql_query('DELETE FROM ' . sql_table('plugin_option') . ' WHERE oid='.intval($oid) . ' and ocontextid='. intval($contextid));
-                       sql_query('INSERT INTO ' . sql_table('plugin_option') . ' (ovalue, oid, ocontextid) VALUES (\''.addslashes($value).'\', '. intval($oid) . ', ' . intval($contextid) . ')');
+                       @mysql_query('INSERT INTO ' . sql_table('plugin_option') . ' (ovalue, oid, ocontextid) VALUES (\''.addslashes($value).'\', '. intval($oid) . ', ' . intval($contextid) . ')');
 
                        // update cache
                        $this->_aOptionValues[$oid . '_' . $contextid] = $value;
 
                        // update cache
                        $this->_aOptionValues[$oid . '_' . $contextid] = $value;
 
                                                        // delete the old value for the option
                                                        sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($contextid));
 
                                                        // delete the old value for the option
                                                        sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($contextid));
-                                                       sql_query('INSERT INTO '.sql_table('plugin_option')." (oid, ocontextid, ovalue) VALUES (".intval($oid).",".intval($contextid).",'" . addslashes($value) . "')");
+                                                       @mysql_query('INSERT INTO '.sql_table('plugin_option')." (oid, ocontextid, ovalue) VALUES (".intval($oid).",".intval($contextid).",'" . addslashes($value) . "')");
                                                }
                                        }
                                }
                                                }
                                        }
                                }