Project

General

Profile

« Previous | Next » 

Revision 1361

Added by Dietmar over 13 years ago

sync languages files with 2.9.0.dev
unzip addons now overwrite newer files

View differences:

install.php
113 113
make_dir($module_dir);
114 114

  
115 115
// Unzip module to the module dir
116
$list = $archive->extract(PCLZIP_OPT_PATH, $module_dir);
116
if(isset($POST['overwrite']) && intval($POST['overwrite'])==1){
117
	$list = $archive->extract(PCLZIP_OPT_PATH, $module_dir, PCLZIP_OPT_REPLACE_NEWER );
118
} else {
119
	$list = $archive->extract(PCLZIP_OPT_PATH, $module_dir );
120
}
117 121

  
118 122
if(!$list)
119 123
{
120 124
	$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNZIP']);
121 125
}
126
/*
122 127

  
128
if ($list == 0) {
129
  $admin->print_error("ERROR : ".$archive->errorInfo(true));
130
}
131
*/
123 132
// Delete the temp zip file
124 133
if(file_exists($temp_file)) { unlink($temp_file); }
125 134

  
......
134 143
		change_mode($module_dir.'/'.$entry, 'file');
135 144
	}
136 145
}
137
/*
146
/* */
138 147
// Run the modules install // upgrade script if there is one
139 148
if(file_exists($module_dir.'/'.$action.'.php'))
140 149
{
141 150
	require($module_dir.'/'.$action.'.php');
142 151
}
143
*/
152

  
144 153
// Print success message
145 154
if ($action=="install")
146 155
{
......
149 158
	$admin->print_success($MESSAGE['GENERIC']['INSTALLED']);
150 159
} elseif ($action=="upgrade")
151 160
{
152

  
153
	upgrade_module($module_directory, true);
161
	upgrade_module($module_directory, false);
154 162
	$admin->print_success($MESSAGE['GENERIC']['UPGRADED']);
155
}	
163
}
156 164

  
157 165
// Print admin footer
158 166
$admin->print_footer();

Also available in: Unified diff