3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4 * Copyright (C) 2002-2011 The Nucleus Group
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 * (see nucleus/documentation/index.html#license for more info)
13 * @license http://nucleuscms.org/license.txt GNU General Public License
14 * @copyright Copyright (C) 2002-2011 The Nucleus Group
16 * $NucleusJP: upgrade3.31.php,v 1.1.2.4 2008/02/04 07:05:36 kimitake Exp $
20 function upgrade_do331() {
22 if (upgrade_checkinstall(331))
25 if (!upgrade_checkIfColumnExists('item','iposted')) {
26 $query = " ALTER TABLE `" . sql_table('item') . "`
27 ADD `iposted` TINYINT(2) DEFAULT 1 NOT NULL ;";
29 upgrade_query('Altering ' . sql_table('item') . ' table', $query);
32 if (!upgrade_checkIfColumnExists('blog','bfuturepost')) {
33 $query = " ALTER TABLE `" . sql_table('blog') . "`
34 ADD `bfuturepost` TINYINT(2) DEFAULT 0 NOT NULL ;";
36 upgrade_query('Altering ' . sql_table('blog') . ' table', $query);
40 // update database version
41 update_version('331');
43 // check to see if user turn on Weblogs.com ping, if so, suggest to install the plugin
44 $query = "SELECT bsendping FROM " . sql_table('blog') . " WHERE bsendping='1'";
45 $res = mysql_query($query);
46 if (mysql_num_rows($res) > 0) {
47 echo "<li>メモ: weblogs.com ping 機能が向上しプラグイン化されました。この機能を有効化するには、プラグインの管理メニューを開き、NP_Ping プラグインをインストールしてください。また NP_Ping は NP_PingPong を置き換えるものです。もしすでに NP_PingPong をインストール済みであれば削除してください。</li>";