1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { 9 header("location: index.php"); 10 exit; 11} 12 13/** 14 * @param $installer 15 */ 16function upgrade_20091019_last_articles_modules_merge_tiki($installer) 17{ 18 $result = $installer->query("select moduleId, params from tiki_modules where name='last_articles'; "); 19 while ($row = $result->fetchRow()) { 20 $params = $row['params']; 21 $params = str_ireplace('showImg', 'img', $params); 22 $params = str_ireplace('lang=', 'langfilter=', $params); 23 $params = str_ireplace('showDate', 'showpubl', $params); 24 $installer->query("update tiki_modules set params='" . $params . "', name='articles' where moduleId=" . $row['moduleId'] . "; "); 25 } 26} 27