OSDN Git Service

FIX: super-admin disallowed from uploading files if not on any teamlists.
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / upgrades / upgrade3.31.php
1 <?php
2 /*
3  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4  * Copyright (C) 2002-2009 The Nucleus Group
5  *
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)
11  */
12 /**
13  * @license http://nucleuscms.org/license.txt GNU General Public License
14  * @copyright Copyright (C) 2002-2009 The Nucleus Group
15  * @version $Id$
16  * $NucleusJP: upgrade3.31.php,v 1.1.2.4 2008/02/04 07:05:36 kimitake Exp $
17  *
18  */
19
20 function upgrade_do331() {
21
22     if (upgrade_checkinstall(331))
23         return 'already installed';
24
25     if (!upgrade_checkIfColumnExists('item','iposted')) {
26         $query = "  ALTER TABLE `" . sql_table('item') . "`
27                                 ADD `iposted` TINYINT(2) DEFAULT 1 NOT NULL ;";
28
29         upgrade_query('Altering ' . sql_table('item') . ' table', $query);
30     }
31
32     if (!upgrade_checkIfColumnExists('blog','bfuturepost')) {
33         $query = "  ALTER TABLE `" . sql_table('blog') . "`
34                                 ADD `bfuturepost` TINYINT(2) DEFAULT 0 NOT NULL ;";
35
36         upgrade_query('Altering ' . sql_table('blog') . ' table', $query);
37     }
38
39     // 3.3 -> 3.31
40     // update database version
41     update_version('331');
42
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>";
48     }
49 }
50
51 ?>