Project

General

Profile

« Previous | Next » 

Revision 117

Added by stefan about 19 years ago

Deleted pages cannot be chosen as parents anymore. Pages that have only deleted children do not get the plus sign if page trash is separate.

View differences:

trunk/wb/admin/pages/index.php
123 123
			}
124 124
						
125 125
			// Work out if we should show a plus or not
126
			$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."'");
126
			if(PAGE_TRASH != 'inline') {
127
				$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."' AND visibility!='deleted'");
128
			} else {
129
				$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."'");
130
			}
127 131
			if($get_page_subs->numRows() > 0) {
128 132
				$display_plus = true;
129 133
			} else {
......
428 432
$database = new database();
429 433
function parent_list($parent) {
430 434
	global $admin, $database, $template;
431
	$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' ORDER BY position ASC";
435
	$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC";
432 436
	$get_pages = $database->query($query);
433 437
	while($page = $get_pages->fetchRow()) {
434 438
		// Stop users from adding pages with a level of more than the set page level limit

Also available in: Unified diff