OSDN Git Service

FIX:アップグレードスクリプトがNucleus3.6上で動作するように修正
[nucleus-jp/nucleus-next.git] / nucleus / upgrades / upgrade3.6.php
1 <?php
2 /*
3  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4  * Copyright (C) 2002-2012 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-2012 The Nucleus Group
15  * @version $Id: upgrade3.6.php 1714 2012-03-31 06:32:09Z sakamocchi $
16  */
17
18 function upgrade_do360() {
19
20         if (upgrade_checkinstall(360))
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 blog table to lengthen bnotify field 
29         $query = "      ALTER TABLE " . sql_table('blog') . "
30                                         MODIFY bnotify varchar(128) default NULL ;";
31
32         upgrade_query('Altering ' . sql_table('blog') . ' table', $query);
33
34         // 3.4 -> 3.5
35         // update database version
36         update_version('360');
37
38         // Remind user to re-install NP_Ping 
39         echo '<p></p>';
40         
41 }
42 ?>