Revision 1055
Added by Matthias over 15 years ago
upgrade-script.php | ||
---|---|---|
283 | 283 |
$query_dates = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings where section_id != 0 and page_id != 0"); |
284 | 284 |
while($result = $query_dates->fetchRow()) { |
285 | 285 |
|
286 |
echo "<b>Add default settings data to database for news section_id= ".$result['section_id']."</b><br />";
|
|
286 |
echo "<br /><u>Add default settings to database for news section_id= ".$result['section_id']."</u><br />";
|
|
287 | 287 |
$section_id = $result['section_id']; |
288 | 288 |
|
289 | 289 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_loop` = '$post_loop' WHERE `section_id` = $section_id")) { |
290 |
echo 'Database data post_loop added successfully<br />';
|
|
290 |
echo 'Database data post_loop added successfully'; |
|
291 | 291 |
} |
292 | 292 |
echo mysql_error().'<br />'; |
293 | 293 |
|
294 | 294 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_header` = '$post_header' WHERE `section_id` = $section_id")) { |
295 |
echo 'Database data post_header added successfully<br />';
|
|
295 |
echo 'Database data post_header added successfully'; |
|
296 | 296 |
} |
297 | 297 |
echo mysql_error().'<br />'; |
298 | 298 |
|
299 | 299 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_footer` = '$post_footer' WHERE `section_id` = $section_id")) { |
300 |
echo 'Database data post_footer added successfully<br />';
|
|
300 |
echo 'Database data post_footer added successfully'; |
|
301 | 301 |
} |
302 | 302 |
echo mysql_error().'<br />'; |
303 | 303 |
|
304 | 304 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_header` = '$comments_header' WHERE `section_id` = $section_id")) { |
305 |
echo 'Database data comments_header added successfully<br />';
|
|
305 |
echo 'Database data comments_header added successfully'; |
|
306 | 306 |
} |
307 | 307 |
echo mysql_error().'<br />'; |
308 | 308 |
|
309 | 309 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_loop` = '$comments_loop' WHERE `section_id` = $section_id")) { |
310 |
echo 'Database data comments_loop added successfully<br />';
|
|
310 |
echo 'Database data comments_loop added successfully'; |
|
311 | 311 |
} |
312 | 312 |
echo mysql_error().'<br />'; |
313 | 313 |
|
314 | 314 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_footer` = '$comments_footer' WHERE `section_id` = $section_id")) { |
315 |
echo 'Database data comments_footer added successfully<br />';
|
|
315 |
echo 'Database data comments_footer added successfully'; |
|
316 | 316 |
} |
317 | 317 |
echo mysql_error().'<br />'; |
318 | 318 |
|
319 | 319 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_page` = '$comments_page' WHERE `section_id` = $section_id")) { |
320 |
echo 'Database data comments_page added successfully<br />';
|
|
320 |
echo 'Database data comments_page added successfully'; |
|
321 | 321 |
} |
322 | 322 |
echo mysql_error().'<br />'; |
323 | 323 |
|
Also available in: Unified diff
some minor cosmetic changes to upgrade-script.php