/**
* @license http://nucleuscms.org/license.txt GNU General Public License
* @copyright Copyright (C) 2002-2012 The Nucleus Group
- * @version $Id: upgrade1.5.php 1546 2011-06-30 15:36:25Z ftruscot $
+ * @version $Id: upgrade1.5.php 1889 2012-06-17 08:46:45Z sakamocchi $
*/
function upgrade_do150() {
// in templates: add 'comments'-templatevar to all non-empty ITEM templates
$res = DB::getResult('SELECT * FROM '.sql_table('template').' WHERE tpartname=\'ITEM\'');
- foreach ( $res as $row ) {
- if ( i18n::strpos($o->tcontent,'<%comments%>') === FALSE ) {
- $newval = $row['tcontent'] . '<%comments%>';
+ foreach ( $res as $row )
+ {
+ if ( i18n::strpos($o->tcontent,'<%comments%>') === FALSE )
+ {
+ $newval = $row['tcontent'] . '<%comments%>';
$query = 'UPDATE '.sql_table('template').' SET tcontent=\''. addslashes($newval).'\' WHERE tdesc=' . $row['tdesc'] . ' AND tpartname=\'ITEM\'';
upgrade_query('Updating ITEM part in template ' . $row['tdesc'], $query);
}