Project

General

Profile

« Previous | Next » 

Revision 346

Added by stefan over 18 years ago

Fixed problem with pre-2.6.0 modules not appearing in section list

View differences:

sections.php
163 163
	$num_sections = $query_sections->numRows();
164 164
	while($section = $query_sections->fetchRow()) {
165 165
		// Get the modules real name
166
		$module_path = WB_PATH.'/modules/'.$section['module'].'/info.php';
167
		if(file_exists($module_path)) {
168
			require($module_path);
169
			if(!isset($module_function)) { $module_function = 'unknown'; }
170
			if(!is_numeric(array_search($section['module'], $module_permissions)) AND $module_function == 'page') {
166
		$module_name=$database->get_one("SELECT name FROM ".TABLE_PREFIX."addons WHERE directory='".$section['module']."'");
167
		if(!is_numeric(array_search($section['module'], $module_permissions))) {
171 168
			?>
172 169
			<tr>
173 170
				<td style="width: 250px;"><a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>#<?php echo $section['section_id']; ?>"><?php echo $module_name; ?></a></td>
......
206 203
			</tr>
207 204
			<?php
208 205
			}
209
			if(isset($module_function)) { unset($module_function); } // Unset module type
210
		}
211 206
	}
212 207
	?>
213 208
	<tr>
......
265 260
// Print admin footer
266 261
$admin->print_footer();
267 262

  
268
?>
263
?>

Also available in: Unified diff