phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] sitemgr/setup tables_current.inc.php, 1.11.2.1.4.1 ta


From: skwashd
Subject: [Phpgroupware-cvs] sitemgr/setup tables_current.inc.php, 1.11.2.1.4.1 tables_update.inc.php, 1.11.2.4.4.1 setup.inc.php, 1.12.2.2.4.1
Date: Sat, 12 Nov 2005 14:15:00 +0100

Update of sitemgr/setup

Modified Files:
     Branch: skwashd-16-compat
            tables_current.inc.php lines: +54 -61
            tables_update.inc.php lines: +17 -1
            setup.inc.php lines: +3 -8

Log Message:
added default page per cat

====================================================
Index: sitemgr/setup/tables_current.inc.php
diff -u sitemgr/setup/tables_current.inc.php:1.11 
sitemgr/setup/tables_current.inc.php:1.11.2.1.4.1
--- sitemgr/setup/tables_current.inc.php:1.11   Tue Mar  4 17:26:43 2003
+++ sitemgr/setup/tables_current.inc.php        Sat Nov 12 13:15:38 2005
@@ -14,11 +14,12 @@
        $phpgw_baseline = array(
                'phpgw_sitemgr_pages' => array(
                        'fd' => array(
-                               'page_id' => array('type' => 'auto', 'nullable' 
=> false),
-                               'cat_id' => array('type' => 'int', 'precision' 
=> 4),
-                               'sort_order' => array('type' => 'int', 
'precision' => 4),
-                               'hide_page' => array('type' => 'int', 
'precision' => 4),
-                               'name' => array('type' => 'varchar', 
'precision' => 100),
+                               'page_id' => array('type' => 'auto','nullable' 
=> False),
+                               'cat_id' => array('type' => 'int','precision' 
=> '4'),
+                               'sort_order' => array('type' => 
'int','precision' => '4'),
+                               'hide_page' => array('type' => 
'int','precision' => '4'),
+                               'name' => array('type' => 'varchar','precision' 
=> '100'),
+                               'state' => array('type' => 'int','precision' => 
'2')
                        ),
                        'pk' => array('page_id'),
                        'fk' => array(),
@@ -27,87 +28,104 @@
                ),
                'phpgw_sitemgr_pages_lang' => array(
                        'fd' => array(
-                               'page_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
-                               'lang' => array('type' => 'varchar', 
'precision' => 2, 'nullable' => false),
-                               'title' => array('type' => 'varchar', 
'precision' => 255),
-                               'subtitle' => array('type' => 'varchar', 
'precision' => 255)
+                               'page_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'lang' => array('type' => 'varchar','precision' 
=> '2','nullable' => False),
+                               'title' => array('type' => 
'varchar','precision' => '255'),
+                               'subtitle' => array('type' => 
'varchar','precision' => '255')
                        ),
                        'pk' => array('page_id','lang'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
-               'phpgw_sitemgr_categories_lang' => array(
+               'phpgw_sitemgr_categories_state' => array(
                        'fd' => array(
-                               'cat_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
-                               'lang' => array('type' => 'varchar', 
'precision' => 2, 'nullable' => false),
-                               'name' => array('type' => 'varchar', 
'precision' => 100),
-                               'description' => array('type' => 'varchar', 
'precision' => 255)
+                               'cat_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'state' => array('type' => 'int','precision' => 
'2','nullable' => False),
+                               'def_page' => array('type' => 'int','precision' 
=> '4','nullable' => False,'default' => '0')
                        ),
-                       'pk' => array('cat_id','lang'),
+                       'pk' => array('cat_id'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
-               'phpgw_sitemgr_preferences' => array(
+               'phpgw_sitemgr_categories_lang' => array(
                        'fd' => array(
-                               'pref_id' => array('type' => 'auto', 'nullable' 
=> false),
-                               'name' => array('type' => 'varchar', 
'precision' => 255),
-                               'value' => array('type' => 'text')
+                               'cat_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'lang' => array('type' => 'varchar','precision' 
=> '2','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '100'),
+                               'description' => array('type' => 
'varchar','precision' => '255')
                        ),
-                       'pk' => array('pref_id'),
+                       'pk' => array('cat_id','lang'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
                'phpgw_sitemgr_modules' => array(
                        'fd' => array(
-                               'module_id' => array('type' => 'auto', 
'precision' => 4, 'nullable' => false),
-                               'module_name' => array('type' => 'varchar', 
'precision' => 25),
-                               'description' => array('type' => 'varchar', 
'precision' => 255)
+                               'module_id' => array('type' => 
'auto','precision' => '4','nullable' => False),
+                               'module_name' => array('type' => 
'varchar','precision' => '25'),
+                               'description' => array('type' => 
'varchar','precision' => '255')
                        ),
                        'pk' => array('module_id'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
+               'phpgw_sitemgr_blocks' => array(
+                       'fd' => array(
+                               'block_id' => array('type' => 'auto','nullable' 
=> False),
+                               'area' => array('type' => 'varchar','precision' 
=> '50'),
+                               'cat_id' => array('type' => 'int','precision' 
=> '4'),
+                               'page_id' => array('type' => 'int','precision' 
=> '4'),
+                               'module_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'sort_order' => array('type' => 
'int','precision' => '4'),
+                               'viewable' => array('type' => 'int','precision' 
=> '4')
+                       ),
+                       'pk' => array('block_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
+               'phpgw_sitemgr_blocks_lang' => array(
+                       'fd' => array(
+                               'block_id' => array('type' => 'auto','nullable' 
=> False),
+                               'lang' => array('type' => 'varchar','precision' 
=> '2','nullable' => False),
+                               'title' => array('type' => 
'varchar','precision' => '255')
+                       ),
+                       'pk' => array('block_id','lang'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
                'phpgw_sitemgr_content' => array(
                        'fd' => array(
-                               'block_id' => array('type' => 'auto', 
'nullable' => false),
-                               'area' => array('type' => 'varchar', 
'precision' => 50),
-                               //if page_id != NULL scope=page, elseif cat_id 
!= NULL scope=category, else scope=site
-                               'cat_id' => array('type' => 'int', 'precision' 
=> 4),
-                               'page_id' => array('type' => 'int', 'precision' 
=> 4),
-                               'module_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'version_id' => array('type' => 
'auto','nullable' => False),
+                               'block_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
                                'arguments' => array('type' => 'text'),
-                               'sort_order' => array('type' => 'int', 
'precision' => 4),
-                               'viewable' => array('type' => 'int', 
'precision' => 4),
-                               'actif' => array('type' => 'int', 'precision' 
=> 2)
+                               'state' => array('type' => 'int','precision' => 
'2')
                        ),
-                       'pk' => array('block_id'),
+                       'pk' => array('version_id'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
                'phpgw_sitemgr_content_lang' => array(
                        'fd' => array(
-                               'block_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
-                               'lang' => array('type' => 'varchar', 
'precision' => 2, 'nullable' => false),
-                               'arguments_lang' => array('type' => 'text'),
-                               'title' => array('type' => 'varchar', 
'precision' => 255),
+                               'version_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                               'lang' => array('type' => 'varchar','precision' 
=> '2','nullable' => False),
+                               'arguments_lang' => array('type' => 'text')
                        ),
-                       'pk' => array('block_id','lang'),
+                       'pk' => array('version_id','lang'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ),
                'phpgw_sitemgr_active_modules' => array(
                        'fd' => array(
-                               // area __PAGE__ stands for master list
-                               'area' => array('type' => 'varchar', 
'precision' => 50, 'nullable' => false),
-                               // cat_id 0 stands for site wide
-                               'cat_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
-                               'module_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false)
+                               'area' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'cat_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'module_id' => array('type' => 
'int','precision' => '4','nullable' => False)
                        ),
                        'pk' => array('area','cat_id','module_id'),
                        'fk' => array(),
@@ -116,11 +134,9 @@
                ),
                'phpgw_sitemgr_properties' => array(
                        'fd' => array(
-                               // area __PAGE__ stands for all areas
-                               'area' => array('type' => 'varchar', 
'precision' => 50, 'nullable' => false),
-                               // cat_id 0 stands for site wide
-                               'cat_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
-                               'module_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'area' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'cat_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'module_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'properties' => array('type' => 'text')
                        ),
                        'pk' => array('area','cat_id','module_id'),
@@ -128,4 +144,21 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-       );
\ No newline at end of file
+               'phpgw_sitemgr_sites' => array(
+                       'fd' => array(
+                               'site_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'site_name' => array('type' => 
'varchar','precision' => '255'),
+                               'site_url' => array('type' => 
'varchar','precision' => '255'),
+                               'site_dir' => array('type' => 
'varchar','precision' => '255'),
+                               'themesel' => array('type' => 
'varchar','precision' => '50'),
+                               'site_languages' => array('type' => 
'varchar','precision' => '50'),
+                               'home_page_id' => array('type' => 
'int','precision' => '4'),
+                               'anonymous_user' => array('type' => 
'varchar','precision' => '50'),
+                               'anonymous_passwd' => array('type' => 
'varchar','precision' => '50')
+                       ),
+                       'pk' => array('site_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               )
+       );

====================================================
Index: sitemgr/setup/tables_update.inc.php
diff -u sitemgr/setup/tables_update.inc.php:1.11 
sitemgr/setup/tables_update.inc.php:1.11.2.4.4.1
--- sitemgr/setup/tables_update.inc.php:1.11    Tue Mar  4 17:26:43 2003
+++ sitemgr/setup/tables_update.inc.php Sat Nov 12 13:15:38 2005
@@ -406,4 +406,253 @@
                return $setup_info['sitemgr']['currentver'];
        }

+       $test[] = '0.9.15.003';
+       function sitemgr_upgrade0_9_15_003()
+       {
+               global $setup_info,$phpgw_setup;
+               $setup_info['sitemgr']['currentver'] = '0.9.15.004';
+
+               $phpgw_setup->oProc->createtable('phpgw_sitemgr_sites',array(
+                       'fd' => array(
+                               'site_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
+                               'site_name' => array('type' => 'varchar', 
'precision' => 255),
+                               'site_url' => array('type' => 'varchar', 
'precision' => 255),
+                               'site_dir' => array('type' => 'varchar', 
'precision' => 255),
+                               'themesel' => array('type' => 'varchar', 
'precision' => 50),
+                               'site_languages' => array('type' => 'varchar', 
'precision' => 50),
+                               'home_page_id' => array('type' => 'int', 
'precision' => 4),
+                               'anonymous_user' => array('type' => 'varchar', 
'precision' => 50),
+                               'anonymous_passwd' => array('type' => 
'varchar', 'precision' => 50),
+                       ),
+                       'pk' => array('site_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $db2 = $phpgw_setup->db;
+
+               //Create default site and hang all existing categories into it
+               $phpgw_setup->oProc->query("INSERT INTO phpgw_categories 
(cat_parent,cat_owner,cat_access,cat_appname,cat_name,cat_description,last_mod) 
VALUES (0,-1,'public','sitemgr','Default Website','This website has been added 
by setup',0)");
+
+               $phpgw_setup->oProc->query("SELECT cat_id FROM phpgw_categories 
WHERE cat_name='Default Website' AND cat_appname='sitemgr'");
+               if ($phpgw_setup->oProc->next_record())
+               {
+                       $site_id = $phpgw_setup->oProc->f('cat_id');
+                       $db2->query("UPDATE phpgw_categories SET cat_main = 
$site_id WHERE cat_appname = 'sitemgr'",__LINE__,__FILE__);
+                       $db2->query("UPDATE phpgw_categories SET cat_parent = 
$site_id WHERE cat_appname = 'sitemgr' AND cat_parent = 0 AND cat_id != 
$site_id",__LINE__,__FILE__);
+                       $db2->query("UPDATE phpgw_categories SET cat_level = 
cat_level +1 WHERE cat_appname = 'sitemgr' AND cat_id != 
$site_id",__LINE__,__FILE__);
+                       $db2->query("INSERT INTO phpgw_sitemgr_sites 
(site_id,site_name)  VALUES ($site_id,'Default Website')");
+               }
+
+               //insert values from old preferences table into new sites table
+               $oldtonew = array(
+                       'sitemgr-site-url' => 'site_url',
+                       'sitemgr-site-dir' => 'site_dir',
+                       'themesel' => 'themesel',
+                       'sitelanguages' => 'site_languages',
+                       'home-page-id' => 'home_page_id',
+                       'anonymous-user' => 'anonymous_user',
+                       'anonymous-passwd' => 'anonymous_passwd'
+               );
+               foreach ($oldtonew as $old => $new)
+               {
+                       $phpgw_setup->oProc->query("SELECT value from 
phpgw_sitemgr_preferences WHERE name = '$old'");
+                       if ($phpgw_setup->oProc->next_record())
+                       {
+                               $value = $phpgw_setup->oProc->f('value');
+                               $db2->query("UPDATE phpgw_sitemgr_sites SET 
$new = '$value' WHERE site_id = $site_id");
+                       }
+               }
+
+               //site names and headers
+               $phpgw_setup->oProc->query("SELECT site_languages from 
phpgw_sitemgr_sites");
+               if ($phpgw_setup->oProc->next_record())
+               {
+                       $sitelanguages = $db2->f('site_languages');
+                       $sitelanguages = explode(',',$sitelanguages);
+                       $db2->query("SELECT module_id from 
phpgw_sitemgr_modules WHERE module_name='html'");
+                       $db2->next_record();
+                       $html_module = $db2->f('module_id');
+                       $emptyarray = serialize(array());
+                       $db2->query("INSERT INTO phpgw_sitemgr_content 
(area,cat_id,page_id,module_id,arguments,sort_order,viewable,actif) VALUES 
('HEADER',$site_id,0,$html_module,'$emptyarray',0,0,1)",__LINE__,__FILE__);
+                       $headerblock = 
$db2->get_last_insert_id('phpgw_sitemgr_content','block_id');
+                       $db2->query("INSERT INTO phpgw_sitemgr_content 
(area,cat_id,page_id,module_id,arguments,sort_order,viewable,actif) VALUES 
('FOOTER',$site_id,0,$html_module,'$emptyarray',0,0,1)",__LINE__,__FILE__);
+                       $footerblock = 
$db2->get_last_insert_id('phpgw_sitemgr_content','block_id');
+
+                       foreach ($sitelanguages as $lang)
+                       {
+                               $db2->query("SELECT value from 
phpgw_sitemgr_preferences WHERE name = 'sitemgr-site-name-$lang'");
+                               if ($db2->next_record())
+                               {
+                                       $name_lang = $db2->f('value');
+                                       $db2->query("INSERT INTO 
phpgw_sitemgr_categories_lang (cat_id,lang,name) VALUES 
($site_id,'$lang','$name_lang')");
+                               }
+                               $db2->query("SELECT value from 
phpgw_sitemgr_preferences WHERE name = 'siteheader-$lang'");
+                               if ($db2->next_record())
+                               {
+                                       $header_lang = $db2->f('value');
+                                       $content = 
$db2->db_addslashes(serialize(array('htmlcontent' => 
stripslashes($header_lang))));
+
+                                       $db2->query("INSERT INTO 
phpgw_sitemgr_content_lang (block_id,lang,arguments_lang,title) VALUES 
($headerblock,'$lang','$content','Site header')",__LINE__,__FILE__);
+                               }
+                               $db2->query("SELECT value from 
phpgw_sitemgr_preferences WHERE name = 'sitefooter-$lang'");
+                               if ($db2->next_record())
+                               {
+                                       $footer_lang = $db2->f('value');
+                                       $content = 
$db2->db_addslashes(serialize(array('htmlcontent' => 
stripslashes($footer_lang))));
+
+                                       $db2->query("INSERT INTO 
phpgw_sitemgr_content_lang (block_id,lang,arguments_lang,title) VALUES 
($footerblock,'$lang','$content','Site footer')",__LINE__,__FILE__);
+                               }
+                       }
+               }
+               $phpgw_setup->oProc->DropTable('phpgw_sitemgr_preferences');
+
+               return $setup_info['sitemgr']['currentver'];
+       }
+
+       $test[] = '0.9.15.004';
+       function sitemgr_upgrade0_9_15_004()
+       {
+               global $setup_info,$phpgw_setup;
+               $setup_info['sitemgr']['currentver'] = '0.9.15.005';
+               $db2 = $phpgw_setup->db;
+               $db3 = $phpgw_setup->db;
+
+               //Create the field state for pages and categories and give all 
existing pages and categories published state (2)
+               $phpgw_setup->oProc->AddColumn('phpgw_sitemgr_pages',
+                       'state',array('type'=>int, 'precision'=>2));
+
+               $phpgw_setup->oProc->query("UPDATE phpgw_sitemgr_pages SET 
state = 2");
+
+               
$phpgw_setup->oProc->CreateTable('phpgw_sitemgr_categories_state',array(
+                       'fd' => array(
+                               'cat_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => false),
+                               'state' => array('type' => 'int', 'precision' 
=> 2)
+                       ),
+                       'pk' => array('cat_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $GLOBALS['phpgw_setup']->oProc->query("select cat_id from 
phpgw_categories where cat_appname='sitemgr' AND cat_level > 0");
+               while($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       $cat_id = $GLOBALS['phpgw_setup']->oProc->f('cat_id');
+                       $db2->query("INSERT INTO phpgw_sitemgr_categories_state 
(cat_id,state) VALUES ($cat_id,2)");
+               }
+
+               //rename table content blocks and table content_lang blocks_lang
+               //and add the new tables content and content_lang
+               
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_sitemgr_content','phpgw_sitemgr_blocks');
+               
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_sitemgr_content_lang','phpgw_sitemgr_blocks_lang');
+               
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_sitemgr_content',array(
+                       'fd' => array(
+                               'version_id' => array('type' => 'auto', 
'nullable' => false),
+                               'block_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'arguments' => array('type' => 'text'),
+                               'state' => array('type' => 'int', 'precision' 
=> 2)
+                       ),
+                       'pk' => array('version_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_sitemgr_content_lang',array(
+                       'fd' => array(
+                               'version_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'lang' => array('type' => 'varchar', 
'precision' => 2, 'nullable' => false),
+                               'arguments_lang' => array('type' => 'text'),
+                       ),
+                       'pk' => array('version_id','lang'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               //create rows in the new content tables from old content tables 
(where state=0(Draft) when inactive, state=2(Published) when active)
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT 
block_id,arguments,actif FROM phpgw_sitemgr_blocks");
+               while ($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       $block_id = 
$GLOBALS['phpgw_setup']->oProc->f('block_id');
+                       $arguments = 
$GLOBALS['phpgw_setup']->oProc->f('arguments');
+                       $state = $GLOBALS['phpgw_setup']->oProc->f('actif') ? 0 
: 2;
+                       $db2->query("INSERT INTO phpgw_sitemgr_content 
(block_id,arguments,state) VALUES ($block_id,'$arguments',$state)");
+                       $version_id = 
$db2->get_last_insert_id('phpgw_sitemgr_content','version_id');
+                       $db2->query("SELECT lang,arguments_lang  FROM 
phpgw_sitemgr_blocks_lang WHERE block_id = $block_id");
+                       while ($db2->next_record())
+                       {
+                               $lang = $db2->f('lang');
+                               $arguments_lang = $db2->f('arguments_lang');
+                               $title = $db2->f('title');
+                               $db3->query("INSERT INTO 
phpgw_sitemgr_content_lang (version_id,lang,arguments_lang) VALUES 
($version_id,'$lang','$arguments_lang')");
+                       }
+               }
+
+               //drop columns in tables blocks and blocks_lang
+               $newtbldef = array(
+                       'fd' => array(
+                               'block_id' => array('type' => 'auto', 
'nullable' => false),
+                               'area' => array('type' => 'varchar', 
'precision' => 50),
+                               'cat_id' => array('type' => 'int', 'precision' 
=> 4),
+                               'page_id' => array('type' => 'int', 'precision' 
=> 4),
+                               'module_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'sort_order' => array('type' => 'int', 
'precision' => 4),
+                               'viewable' => array('type' => 'int', 
'precision' => 4),
+                               'actif' => array('type' => 'int', 'precision' 
=> 2)
+                       ),
+                       'pk' => array('block_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               );
+               
$phpgw_setup->oProc->DropColumn('phpgw_sitemgr_blocks',$newtbldef,'arguments');
+               $newtbldef = array(
+                       'fd' => array(
+                               'block_id' => array('type' => 'auto', 
'nullable' => false),
+                               'area' => array('type' => 'varchar', 
'precision' => 50),
+                               'cat_id' => array('type' => 'int', 'precision' 
=> 4),
+                               'page_id' => array('type' => 'int', 'precision' 
=> 4),
+                               'module_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
+                               'sort_order' => array('type' => 'int', 
'precision' => 4),
+                               'viewable' => array('type' => 'int', 
'precision' => 4),
+                       ),
+                       'pk' => array('block_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               );
+               
$phpgw_setup->oProc->DropColumn('phpgw_sitemgr_blocks',$newtbldef,'actif');
+               $newtbldef = array(
+                       'fd' => array(
+                               'block_id' => array('type' => 'auto', 
'nullable' => false),
+                               'lang' => array('type' => 'varchar', 
'precision' => 2, 'nullable' => false),
+                               'title' => array('type' => 'varchar', 
'precision' => 255),
+                       ),
+                       'pk' => array('block_id','lang'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               );
+               
$phpgw_setup->oProc->DropColumn('phpgw_sitemgr_blocks_lang',$newtbldef,'arguments_lang');
+               return $setup_info['sitemgr']['currentver'];
+       }
+
+
+
+       $test[] = '0.9.15.005';
+       function sitemgr_upgrade0_9_15_005()
+       {
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_sitemgr_categories_state','def_page',array(
+                       'type' => 'int',
+                       'precision' => '4',
+                       'nullable' => False,
+                       'default' => '0'
+               ));
+
+
+               $GLOBALS['setup_info']['sitemgr']['currentver'] = '0.9.16.000';
+               return $GLOBALS['setup_info']['sitemgr']['currentver'];
+       }
 ?>

====================================================
Index: sitemgr/setup/setup.inc.php
diff -u sitemgr/setup/setup.inc.php:1.12 
sitemgr/setup/setup.inc.php:1.12.2.2.4.1
--- sitemgr/setup/setup.inc.php:1.12    Tue Mar  4 17:26:43 2003
+++ sitemgr/setup/setup.inc.php Sat Nov 12 13:15:37 2005
@@ -13,19 +13,20 @@

        $setup_info['sitemgr']['name']      = 'sitemgr';
        $setup_info['sitemgr']['title']     = 'SiteMgr Web Content Manager';
-       $setup_info['sitemgr']['version']   = '0.9.15.003';
+       $setup_info['sitemgr']['version']   = '0.9.16.000';
        $setup_info['sitemgr']['app_order'] = 8;
-       $setup_info['sitemgr']['tables']    = 
array('phpgw_sitemgr_pages','phpgw_sitemgr_pages_lang','phpgw_sitemgr_categories_lang','phpgw_sitemgr_preferences','phpgw_sitemgr_modules','phpgw_sitemgr_content','phpgw_sitemgr_content_lang','phpgw_sitemgr_active_modules','phpgw_sitemgr_properties');
+       $setup_info['sitemgr']['tables']    = 
array('phpgw_sitemgr_pages','phpgw_sitemgr_pages_lang','phpgw_sitemgr_categories_state','phpgw_sitemgr_categories_lang','phpgw_sitemgr_modules','phpgw_sitemgr_blocks','phpgw_sitemgr_blocks_lang','phpgw_sitemgr_content','phpgw_sitemgr_content_lang','phpgw_sitemgr_active_modules','phpgw_sitemgr_properties','phpgw_sitemgr_sites');
        $setup_info['sitemgr']['enable']    = 1;

        /* The hooks this app includes, needed for hooks registration */
        $setup_info['sitemgr']['hooks'][] = 'preferences';
        $setup_info['sitemgr']['hooks'][] = 'about';
        $setup_info['sitemgr']['hooks'][] = 'admin';
+       $setup_info['sitemgr']['hooks'][] = 'sidebox_menu';

        /* Dependacies for this app to work */
        $setup_info['sitemgr']['depends'][] = array(
                'appname'  => 'phpgwapi',
-               'versions' => 
Array('0.9.11','0.9.12','0.9.13','0.9.14','0.9.15')
+               'versions' => Array('0.9.14','0.9.15', '0.9.16')
        );
 ?>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]