From: Eloi G. <ada...@us...> - 2004-09-30 05:15:22
|
Update of /cvsroot/phpwebsite-comm/modules/article/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25805/boost Modified Files: install.sql update.php Log Message: Release version 2.7 files. Index: install.sql =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/install.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** install.sql 21 Aug 2004 17:02:05 -0000 1.8 --- install.sql 30 Sep 2004 05:14:19 -0000 1.9 *************** *** 27,35 **** meta_keywords varchar(100) NOT NULL DEFAULT '', meta_robots char(2) NOT NULL DEFAULT '', key (hits), key (expiration_date), key (updated_date), ! key (publication_date) ); --- 27,39 ---- meta_keywords varchar(100) NOT NULL DEFAULT '', meta_robots char(2) NOT NULL DEFAULT '', + language char(2) NOT NULL DEFAULT '', + translation_group int NOT NULL, key (hits), key (expiration_date), key (updated_date), ! key (publication_date), ! key (language), ! key (translation_group) ); *************** *** 122,124 **** key (version) ); - 1 lines were added, 1 lines were deleted, 2 lines were changed --- 126,127 ---- Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/update.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** update.php 21 Aug 2004 17:37:46 -0000 1.9 --- update.php 30 Sep 2004 05:14:19 -0000 1.10 *************** *** 300,303 **** --- 300,335 ---- $content .= 'Re-registering with the Search Module....Done.<br />'; require_once(PHPWS_SOURCE_DIR.'mod/search/class/Search.php'); + PHPWS_Search::register('article'); + $content .= 'Update Complete!'; + } + + if(false) //($currentVersion < '3.0') + { + $prefix = $GLOBALS['core']->getTablePrefix(); + $content .= 'Updating Article Manager to version 3.0<br />'; + + if(!$GLOBALS['core']->sqlColumnExists('mod_article', 'language')) { + $content .= 'Adding new language columns to table mod_article...'; + $GLOBALS['core']->sqlAddColumn('mod_article', array('language'=>'char(2) NOT NULL DEFAULT ""','translation_group'=>'int NOT NULL')); + $content .= 'Creating new indexes...'; + $GLOBALS['core']->sqlCreateIndex('mod_article', array('language','translation_group')); + $content .= 'Done<br />'; + } + else + $content .= 'Language columns already in place<br />'; + + if(!empty($_SESSION['translate']->default_language)) { + $content .= 'Setting all articles to current language...'; + if($GLOBALS['core']->query('UPDATE mod_article SET language="'.$_SESSION['translate']->default_language.'"', true)) + $content .= 'Done<br />'; + else + $content .= 'Operation Failed.<br />'; + } + $content .= 'Setting all translation group ids...'; + if($GLOBALS['core']->query('UPDATE mod_article SET translation_group=id', true)) + $content .= 'Done<br />'; + else + $content .= 'Operation Failed.<br />'; + $content .= 'Update Complete!'; } |