OSDN Git Service

d6a8e53876001d422faafe6bcd9055a0c692b03a
[nucleus-jp/nucleus-next.git] / nucleus / upgrades / upgrade0.95.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: upgrade0.95.php 1388 2009-07-18 06:31:28Z shizuki $
16  */
17
18 function upgrade_do95() {
19
20         if (upgrade_checkinstall(95))
21                 return "already installed";
22
23         if(!upgrade_checkIfColumnExists('blog', 'bconvertbreaks')){
24                 $query =  'ALTER TABLE '.sql_table('blog')
25                            . " ADD bsendping tinyint(2) NOT NULL default '0',"
26                            . " ADD bconvertbreaks tinyint(2) NOT NULL default '1'";
27                 upgrade_query("Adding 'send ping' and convert linebreaks options",$query);
28         }else{
29                 echo "<li>Adding 'send ping' and convert linebreaks options ... <span class=\"warning\">NOT EXECUTED</span>\n<blockquote>Errors occurred during upgrade process.</blockquote>";
30         }
31 }
32
33 ?>