Project

General

Profile

« Previous | Next » 

Revision 59

Added by stefan about 19 years ago

Fixed missing parent option 'none' - ticket #12 - and a minor scope bug.

View differences:

settings.php
249 249
			// Title -'s prefix
250 250
			$title_prefix = '';
251 251
			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; }
252
				$template->set_var(array(
253
												'ID' => $page['page_id'],
254
												'TITLE' => $admin->strip_slashes_dummy($title_prefix.$page['page_title'])
255
												)
256
										);
257
				if($results_array['parent'] == $page['page_id']) {
258
					$template->set_var('SELECTED', ' selected');
259
				} elseif($results_array['page_id'] == $page['page_id']) {
260
					$template->set_var('SELECTED', ' disabled');
261
					$list_next_level=false;
262
				} elseif($can_modify != true) {
263
					$template->set_var('SELECTED', ' disabled');
264
				} else {
265
					$template->set_var('SELECTED', '');
266
				}
267
				$template->parse('page_list2', 'page_list_block2', true);
252
			$template->set_var(array(
253
											'ID' => $page['page_id'],
254
											'TITLE' => $admin->strip_slashes_dummy($title_prefix.$page['page_title'])
255
											)
256
									);
257
			if($results_array['parent'] == $page['page_id']) {
258
				$template->set_var('SELECTED', ' selected');
259
			} elseif($results_array['page_id'] == $page['page_id']) {
260
				$template->set_var('SELECTED', ' disabled');
261
				$list_next_level=false;
262
			} elseif($can_modify != true) {
263
				$template->set_var('SELECTED', ' disabled');
264
			} else {
265
				$template->set_var('SELECTED', '');
268 266
			}
267
			$template->parse('page_list2', 'page_list_block2', true);
268
		}
269 269
		if ($list_next_level)
270 270
			parent_list($page['page_id']);
271 271
	}
272 272
}
273 273
$template->set_block('main_block', 'page_list_block2', 'page_list2');
274
if($admin->get_permission('pages_add_l0') == true) {
274
if($admin->get_permission('pages_add_l0') == true OR $results_array['level'] == 0) {
275 275
	if($results_array['parent'] == 0) { $selected = ' selected'; } else { $selected = ''; }
276 276
	$template->set_var(array(
277 277
									'ID' => '0',

Also available in: Unified diff