Project

General

Profile

« Previous | Next » 

Revision 1963

Added by darkviper about 11 years ago

adding SERVER_TIMEZONE to table settings
insert date_default_timezone_set( SERVER_TIMEZONE ) into /framework/initialize.php
some little optimations in update-script.php

View differences:

upgrade-script.php
83 83
$DEFAULT_THEME = 'wb_theme';
84 84

  
85 85
$stepID = 0;
86
$filesRemove = array();
87
$aFilesToRemove = array();
88 86
$dirRemove = array(
89 87
/*
90 88
			'[TEMPLATE]/allcss/',
......
95 93
			'[ADMIN]/themes/',
96 94
		 );
97 95
//
98
	$filesRemove['0'] = array(
99

  
96
$aRemoveSingleFiles = array(
100 97
			'[ADMIN]/preferences/details.php',
101 98
			'[ADMIN]/preferences/email.php',
102 99
			'[ADMIN]/preferences/password.php',
......
112 109
			'[FRAMEWORK]/PasswordHash.php',
113 110
			'[MODULES]/droplets/js/mdcr.js',
114 111

  
115
		 );
116
	$aFilesToRemove = array_merge($filesRemove['0']);
112
);
117 113

  
118 114
// deleting files below only from less 2.8.4 stable
119 115
if(version_compare(WB_VERSION, '2.8.4', '<'))
120 116
{
121
	$filesRemove['1'] = array(
117
	$aRemoveOldTemplates = array(
122 118

  
123 119
			'[TEMPLATE]/argos_theme/templates/access.htt',
124 120
			'[TEMPLATE]/argos_theme/templates/addons.htt',
......
177 173
			'[TEMPLATE]/wb_theme/templates/templates_details.htt',
178 174
			'[TEMPLATE]/wb_theme/templates/users.htt',
179 175
			'[TEMPLATE]/wb_theme/templates/users_form.htt'
180
		 );
181

  
182
	$aFilesToRemove = array_merge($aFilesToRemove,$filesRemove['1']);
183

  
176
	);
177
}else {
178
	$aRemoveOldTemplates = array();
184 179
}
180
$aFilesToRemove = array_merge($aRemoveSingleFiles, $aRemoveOldTemplates);
181
unset($aRemoveSingleFiles);
182
unset($aRemoveOldTemplates);
185 183
/* display a status message on the screen **************************************
186 184
 * @param string $message: the message to show
187 185
 * @param string $class:   kind of message as a css-class
......
579 577
    $aDebugMessage[] = (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
580 578

  
581 579
	/**********************************************************
580
	 *  - Adding server_timezone to settings table
581
	 */
582
	$aDebugMessage[] = "<span>Adding/updating server_timezone to settings table</span>";
583
	$cfg = array(
584
		'server_timezone' => (defined('SERVER_TIMEZONE') ? SERVER_TIMEZONE : 'UTC')
585
	);
586

  
587
    $aDebugMessage[] = (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
588

  
589
	/**********************************************************
582 590
	 *  - Adding password settings to settings table
583 591
	 */
584 592
	$aDebugMessage[] = "<span>Adding/updating password settings to settings table</span>";
......
633 641

  
634 642
	/**********************************************************
635 643
	 *  - Add field "page_code" to table "pages"
644
	 *
645
	 *  will be done in upgrade.php of the module MultiLingual
646
	 *  until the module is integrated completely
636 647
	 */
637
	$table_name = TABLE_PREFIX.'pages';
638
	$field_name = 'page_code';
639
	$description = "INT NOT NULL DEFAULT '0' AFTER `language`";
640
	add_modify_field_in_database($table_name,$field_name,$description);
648
//	$table_name = TABLE_PREFIX.'pages';
649
//	$field_name = 'page_code';
650
//	$description = "INT NOT NULL DEFAULT '0' AFTER `language`";
651
//	add_modify_field_in_database($table_name,$field_name,$description);
641 652

  
642 653
	/**********************************************************
643 654
	 *  - Add field "menu_icon_0" to table "pages"

Also available in: Unified diff