codes****@googl*****
codes****@googl*****
2008年 9月 21日 (日) 06:57:07 JST
Author: mystralkk Date: Sat Sep 20 14:56:23 2008 New Revision: 654 Added: trunk/geeklog-1-jp/public_html/admin/install/disable_userconfig.php (contents, props changed) Modified: trunk/geeklog-1-jp/public_html/admin/install/index.php Log: Issue #24への対策を試験的に実装しました。 Added: trunk/geeklog-1-jp/public_html/admin/install/disable_userconfig.php ============================================================================== --- (empty file) +++ trunk/geeklog-1-jp/public_html/admin/install/disable_userconfig.php Sat Sep 20 14:56:23 2008 @@ -0,0 +1,14 @@ +<?php + +/** +* Disable userconfig plugin to prevent an error which will occur during +* the upgrade process +*/ +function disableUserconfigPlugin() { + global $_TABLES; + + $sql = "UPDATE {$_TABLES['plugins']} " + . "SET is_enabled = '0' " + . "WHERE (pi_name = 'userconfig') "; + DB_query($sql); +} Modified: trunk/geeklog-1-jp/public_html/admin/install/index.php ============================================================================== --- trunk/geeklog-1-jp/public_html/admin/install/index.php (original) +++ trunk/geeklog-1-jp/public_html/admin/install/index.php Sat Sep 20 14:56:23 2008 @@ -1243,7 +1243,11 @@ $dbconfig_path, $siteconfig_path, $html_path; $_DB->setDisplayError (true); - + + // Disable userconfig plugin beforehand to prevent an error + require_once 'disable-userconfig.php'; + disableUserconfigPlugin(); + // Because the upgrade sql syntax can vary from dbms-to-dbms we are // leaving that up to each Geeklog database driver