Project

General

Profile

« Previous | Next » 

Revision 347

Added by stefan about 18 years ago

Removed use of variable module_function in sections_save.php

View differences:

sections_save.php
76 76
if($query_sections->numRows() > 0) {
77 77
	$num_sections = $query_sections->numRows();
78 78
	while($section = $query_sections->fetchRow()) {
79
		// Get the modules real name
80
		$module_path = WB_PATH.'/modules/'.$section['module'].'/info.php';
81
		if(file_exists($module_path)) {
82
			require($module_path);
83
			if(!isset($module_function)) { $module_function = 'unknown'; }
84
			if(!is_numeric(array_search($section['module'], $module_permissions)) AND $module_function == 'page') {
85
				// Update the section record with properties
86
				$section_id = $section['section_id'];
87
				$sql = '';
88
				if(isset($_POST['block'.$section_id]) AND $_POST['block'.$section_id] != '') {
89
					$sql = "block = '".$admin->add_slashes($_POST['block'.$section_id])."'";
90
					$query = "UPDATE ".TABLE_PREFIX."sections SET $sql WHERE section_id = '$section_id' LIMIT 1";
91
					if($sql != '') {
92
						$database->query($query);
93
					}
79
		if(!is_numeric(array_search($section['module'], $module_permissions))) {
80
			// Update the section record with properties
81
			$section_id = $section['section_id'];
82
			$sql = '';
83
			if(isset($_POST['block'.$section_id]) AND $_POST['block'.$section_id] != '') {
84
				$sql = "block = '".$admin->add_slashes($_POST['block'.$section_id])."'";
85
				$query = "UPDATE ".TABLE_PREFIX."sections SET $sql WHERE section_id = '$section_id' LIMIT 1";
86
				if($sql != '') {
87
					$database->query($query);
94 88
				}
95 89
			}
96
			if(isset($module_function)) { unset($module_function); } // Unset module type
97 90
		}
98 91
	}
99 92
}
......
107 100
// Print admin footer
108 101
$admin->print_footer();
109 102

  
110
?>
103
?>

Also available in: Unified diff