Project

General

Profile

« Previous | Next » 

Revision 999

Added by Matthias over 15 years ago

Fixed bug that parent pages didn't inherit language settings to kind pages

View differences:

add.php
117 117
// Get new order
118 118
$position = $order->get_new($parent);
119 119

  
120
// Work-out if the page parent (if selected) has a seperate template to the default
121
$query_parent = $database->query("SELECT template FROM ".TABLE_PREFIX."pages WHERE page_id = '$parent'");
120
// Work-out if the page parent (if selected) has a seperate template or language to the default
121
$query_parent = $database->query("SELECT template, language FROM ".TABLE_PREFIX."pages WHERE page_id = '$parent'");
122 122
if($query_parent->numRows() > 0) {
123 123
	$fetch_parent = $query_parent->fetchRow();
124 124
	$template = $fetch_parent['template'];
125
    $language = $fetch_parent['language'];
125 126
} else {
126 127
	$template = '';
128
    $language = DEFAULT_LANGUAGE;
127 129
}
128 130

  
129 131
// Insert page into pages table

Also available in: Unified diff