Project

General

Profile

« Previous | Next » 

Revision 410

Added by Matthias almost 18 years ago

Fixed issue with Permissions for pages sections

View differences:

modify.php
97 97
$template->pparse('output', 'page');
98 98

  
99 99
// Get sections for this page
100
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
100 101
$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
101 102
if($query_sections->numRows() > 0) {
102 103
	while($section = $query_sections->fetchRow()) {
103 104
		$section_id = $section['section_id'];
104 105
		$module = $section['module'];
105
		// Include the modules editing script if it exists
106
		if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php')) {
107
			echo '<a name="'.$section_id.'"></a>';
108
			require(WB_PATH.'/modules/'.$module.'/modify.php');
106
		//Have permission?
107
		if(!is_numeric(array_search($module, $module_permissions))) {
108
			// Include the modules editing script if it exists
109
			if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php')) {
110
				echo '<a name="'.$section_id.'"></a>';
111
				require(WB_PATH.'/modules/'.$module.'/modify.php');
112
			}
109 113
		}
110 114
	}
111 115
}

Also available in: Unified diff