OSDN Git Service

MERGE: リビジョン1714のマージ。SQL文からバッククオート(`)を取り除いた。
[nucleus-jp/nucleus-next.git] / nucleus / upgrades / upgrade3.5.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: upgrade3.5.php 1665 2012-02-13 16:50:35Z ftruscot $
16  */
17
18 function upgrade_do350() {
19
20         if (upgrade_checkinstall(350))
21                 return 'already installed';
22         
23         // Give user warning if they are running old version of PHP
24         if (phpversion() < '5') {
25                 echo 'WARNING: You are running NucleusCMS on a older version of PHP that is no longer supported by NucleusCMS. Please upgrade to PHP5!';
26         }
27         
28         // changing the member table to lengthen display name (mname)
29     $query = "  ALTER TABLE " . sql_table('member') . "
30                                         MODIFY mname varchar(32) NOT NULL default '' ;";
31
32         upgrade_query('Altering ' . sql_table('member') . ' table', $query);
33
34         // changing the blog table to remove bsendping flag
35     if (upgrade_checkIfColumnExists('blog', 'bsendping')) {
36                 $query = "      ALTER TABLE " . sql_table('blog') . "
37                                         DROP bsendping;";
38         
39                 upgrade_query('Altering ' . sql_table('blog') . ' table', $query);
40         }
41
42         // 3.4 -> 3.5
43         // update database version
44         update_version('350');
45
46         // Remind user to re-install NP_Ping 
47         echo '<p>Note: There are new changes to NP_Ping in v3.50. If it is already installed, please go to Admin Panel uninstall and re-install the plugin</p>';
48         
49 }
50 ?>