Project

General

Profile

« Previous | Next » 

Revision fce971e1

Added by Colin Smith almost 20 years ago

Do not eval() before_form when syncing.

View differences:

etc/inc/pkg-utils.inc
229 229
    	file_notice($package['name'], "The {$package['name']} package is missing its configuration file and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
230 230
    } else {
231 231
        $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
232
		if(isset($pkg_config['nosync'])) continue;                                                          
233
		if($pkg['custom_php_global_functions'] <> "")            
234
	        eval($pkg['custom_php_global_functions']);
235
	    if($pkg_config['custom_php_command_before_form'] <> "")
236
	        eval($pkg_config['custom_php_command_before_form']);
237
	    if($pkg_config['custom_php_resync_config_command'] <> "")
238
	        eval($pkg_config['custom_php_resync_config_command']);
239
	    if($sync_depends == true) {
240
	        $depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking.
241
	        if(is_array($depends)) {
242
	            foreach($depends as $item) {
232
	if(isset($pkg_config['nosync'])) continue;                                                          
233
	if($pkg['custom_php_global_functions'] <> "")            
234
	    eval($pkg['custom_php_global_functions']);
235
	if($pkg_config['custom_php_resync_config_command'] <> "")
236
	    eval($pkg_config['custom_php_resync_config_command']);
237
	if($sync_depends == true) {
238
	    $depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking.
239
	if(is_array($depends)) {
240
		foreach($depends as $item) {
243 241
					if(!file_exists("/usr/local/pkg" . $item)) {
244 242
						file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
245 243
					} else {

Also available in: Unified diff