sql/updates/mysql_1.6.0_to_1.6.1.php
author Dirk Haun <dirk@haun-online.de>
Sun, 20 Sep 2009 11:00:03 +0200
branchHEAD
changeset 7428 df55886043f2
parent 7254 6230420fef6d
child 7434 aa322b3c4d3d
permissions -rw-r--r--
Modernized the "timezone hack", made the config option a dropdown, and moved all timezone-related code into a new TimeZoneConfig class
     1 <?php
     2 
     3 // Add meta tag columns to story table 
     4 $_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD meta_description TEXT NULL AFTER frontpage, ADD meta_keywords TEXT NULL AFTER meta_description";
     5 
     6 
     7 // Add meta tag columns to topics table 
     8 $_SQL[] = "ALTER TABLE {$_TABLES['topics']} ADD meta_description TEXT NULL AFTER imageurl, ADD meta_keywords TEXT NULL AFTER meta_description";
     9 
    10 /**
    11  * Add new config options
    12  *
    13  */
    14 function update_ConfValuesFor161()
    15 {
    16     global $_CONF, $_TABLES;
    17 
    18     require_once $_CONF['path_system'] . 'classes/config.class.php';
    19 
    20     $c = config::get_instance();
    21 
    22     // meta tag config options.
    23     $c->add('meta_tags',0,'select',0,0,23,2000,TRUE);
    24     $c->add('meta_description','Geeklog, the open source content management system designed with security in mind.','text',0,0,NULL,2010,TRUE);
    25     $c->add('meta_keywords','Geeklog, Blog, Content Management System, CMS, Open Source, Security','text',0,0,NULL,2020,TRUE);
    26 
    27     // the timezone config option is a dropdown now
    28     $utc = addslashes(serialize('UTC')); // change default timezone to UTC
    29     DB_query("UPDATE {$_TABLES['conf_values']} SET type = 'select', selectionArray = -1, default_value = '$utc' WHERE name = 'timezone' AND group_name = 'Core'");
    30 
    31     return true;
    32 }
    33 
    34 ?>