Project

General

Profile

« Previous | Next » 

Revision 452

Added by Matthias about 17 years ago

again copied all changes for WB 2.6.6 from trunk to branches

View differences:

modify.php
60 60
$template->set_block('page', 'main_block', 'main');
61 61
$template->set_var(array(
62 62
								'PAGE_ID' => $results_array['page_id'],
63
								'PAGE_TITLE' => (htmlentities($results_array['page_title'])),
63
								'PAGE_TITLE' => ($results_array['page_title']),
64 64
								'MODIFIED_BY' => $user['display_name'],
65 65
								'MODIFIED_BY_USERNAME' => $user['username'],
66 66
								'MODIFIED_WHEN' => $modified_ts,
......
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