1<?php 2 3// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 4// 5// All Rights Reserved. See copyright.txt for details and a complete list of authors. 6// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 7// $Id$ 8 9if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { 10 header("location: index.php"); 11 exit; 12} 13 14/** 15 * default for feature_wiki_paragraph_formatting changed between tiki 11 and 12 - this maintains previous default setting 16 * 17 * @param $installer 18 */ 19function upgrade_20130730_wiki_para_format_default_change_tiki($installer) 20{ 21 $value = $installer->getOne("SELECT `value` FROM `tiki_preferences` WHERE `name` = 'feature_wiki_paragraph_formatting'"); 22 23 if ($value !== 'y') { // default values can be empty 24 $preferences = $installer->table('tiki_preferences'); 25 $preferences->insertOrUpdate(['value' => 'n'], ['name' => 'feature_wiki_paragraph_formatting']); 26 } 27} 28