Project

General

Profile

« Previous | Next » 

Revision 1477

Added by Dietmar over 13 years ago

! update DA language (Tks to Achrist)
! update some languages variables (Tks to Rübenwurzel, Testör)
! move function url_encode from admin/pages to framework/functions.php
! add missing svn properties in some headerinfos
! font-size correction in wb_theme (Tks to Rübenwurzel)

View differences:

upgrade-script.php
182 182
<h1>WebsiteBaker Upgrade</h1>
183 183
<?php
184 184
	if( version_compare( WB_VERSION, '2.7.0', '<' )) {
185
		status_msg('<strong>Warning:</strong><br />It is not possible to upgrade from WebsiteBaker Versions bevor 2.7.0.<br />For upgrading to version '.VERSION.' you must upgrade first to v.2.7.0 at least!!!', 'warning', 'div');
185
		status_msg('<strong>Warning:</strong><br />It is not possible to upgrade from WebsiteBaker Versions before 2.7.0.<br />For upgrading to version '.VERSION.' you must upgrade first to v.2.7.0 at least!!!', 'warning', 'div');
186 186
		echo '<br /><br />';
187 187
		echo "</div>
188 188
		</body>
......
326 326
/**********************************************************
327 327
 *  - Adding field sec_anchor to settings table
328 328
 */
329

  
330 329
echo "<br />Adding sec_anchor to settings table<br />";
331 330
$cfg = array(
332 331
	'sec_anchor' => 'wb_'
......
376 375
echo "<br />Adding field redirect_type to mod_menu_link table<br />";
377 376
db_add_field('redirect_type', 'mod_menu_link', "INT NOT NULL DEFAULT '302' AFTER `target_page_id`");
378 377

  
379

  
380

  
381 378
if (version_compare(WB_VERSION, '2.8.0') < 0)
382 379
{
383 380
    /**********************************************************
......
443 440
<h2>[POST_TITLE]</h2>
444 441
<br />';
445 442

  
446
if(in_array('mod_news_settings', $all_tables))
447
{
448
   // Insert default settings into database
449
   $query_dates = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings where section_id != 0 and page_id != 0");
450
   if($query_dates->numRows() > 1)
451
   {
452
        while($result = $query_dates->fetchRow())
453
        {
443
	if(in_array('mod_news_settings', $all_tables))
444
	{
445
	   // Insert default settings into database
446
	   $query_dates = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings where section_id != 0 and page_id != 0");
447
	   if($query_dates->numRows() > 1)
448
	   {
449
	        while($result = $query_dates->fetchRow())
450
	        {
454 451

  
455
        	echo "<br /><u>Add default settings to database for news section_id= ".$result['section_id']."</u><br />";
456
        	$section_id = $result['section_id'];
452
	        	echo "<br /><u>Add default settings to database for news section_id= ".$result['section_id']."</u><br />";
453
	        	$section_id = $result['section_id'];
457 454

  
458
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `header` = '$header' WHERE `section_id` = $section_id")) {
459
        		echo 'Database data header added successfully';
460
        	}
461
        	echo mysql_error().'<br />';
455
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `header` = '$header' WHERE `section_id` = $section_id")) {
456
	        		echo 'Database data header added successfully';
457
	        	}
458
	        	echo mysql_error().'<br />';
462 459

  
463
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_loop` = '$post_loop' WHERE `section_id` = $section_id")) {
464
        		echo 'Database data post_loop added successfully';
465
        	}
466
        	echo mysql_error().'<br />';
460
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_loop` = '$post_loop' WHERE `section_id` = $section_id")) {
461
	        		echo 'Database data post_loop added successfully';
462
	        	}
463
	        	echo mysql_error().'<br />';
467 464

  
468
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `footer` = '$footer' WHERE `section_id` = $section_id")) {
469
        		echo 'Database data footer added successfully';
470
        	}
471
        	echo mysql_error().'<br />';
465
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `footer` = '$footer' WHERE `section_id` = $section_id")) {
466
	        		echo 'Database data footer added successfully';
467
	        	}
468
	        	echo mysql_error().'<br />';
472 469

  
473
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_header` = '$post_header' WHERE `section_id` = $section_id")) {
474
        		echo 'Database data post_header added successfully';
475
        	}
476
        	echo mysql_error().'<br />';
470
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_header` = '$post_header' WHERE `section_id` = $section_id")) {
471
	        		echo 'Database data post_header added successfully';
472
	        	}
473
	        	echo mysql_error().'<br />';
477 474

  
478
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_footer` = '$post_footer' WHERE `section_id` = $section_id")) {
479
        		echo 'Database data post_footer added successfully';
480
        	}
481
        	echo mysql_error().'<br />';
475
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_footer` = '$post_footer' WHERE `section_id` = $section_id")) {
476
	        		echo 'Database data post_footer added successfully';
477
	        	}
478
	        	echo mysql_error().'<br />';
482 479

  
483
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_header` = '$comments_header' WHERE `section_id` = $section_id")) {
484
        		echo 'Database data comments_header added successfully';
485
        	}
486
        	echo mysql_error().'<br />';
480
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_header` = '$comments_header' WHERE `section_id` = $section_id")) {
481
	        		echo 'Database data comments_header added successfully';
482
	        	}
483
	        	echo mysql_error().'<br />';
487 484

  
488
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_loop` = '$comments_loop' WHERE `section_id` = $section_id")) {
489
        		echo 'Database data comments_loop added successfully';
490
        	}
491
        	echo mysql_error().'<br />';
485
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_loop` = '$comments_loop' WHERE `section_id` = $section_id")) {
486
	        		echo 'Database data comments_loop added successfully';
487
	        	}
488
	        	echo mysql_error().'<br />';
492 489

  
493
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_footer` = '$comments_footer' WHERE `section_id` = $section_id")) {
494
        		echo 'Database data comments_footer added successfully';
495
        	}
496
        	echo mysql_error().'<br />';
490
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_footer` = '$comments_footer' WHERE `section_id` = $section_id")) {
491
	        		echo 'Database data comments_footer added successfully';
492
	        	}
493
	        	echo mysql_error().'<br />';
497 494

  
498
        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_page` = '$comments_page' WHERE `section_id` = $section_id")) {
499
        		echo 'Database data comments_page added successfully';
500
        	}
501
        	echo mysql_error().'<br />';
495
	        	if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `comments_page` = '$comments_page' WHERE `section_id` = $section_id")) {
496
	        		echo 'Database data comments_page added successfully';
497
	        	}
498
	        	echo mysql_error().'<br />';
502 499

  
503
        }
504
     }
505
   }
500
	        }
501
	     }
502
	   }
506 503
}
507 504
/**********************************************************
508 505
 * upgrade media folder index protect files
......
546 543
if( ($handle = opendir(WB_PATH.'/modules/')) ) {
547 544
	while(false !== ($file = readdir($handle))) {
548 545
		if($file != '' AND substr($file, 0, 1) != '.' AND $file != 'admin.php' AND $file != 'index.php') {
549
			load_module(WB_PATH.'/modules/'.$file);
546
			load_module(WB_PATH.'/modules/'.$file );
547
			upgrade_module($file, true);
550 548
		}
551 549
	}
552 550
	closedir($handle);

Also available in: Unified diff