Project

General

Profile

« Previous | Next » 

Revision 1008

Added by Matthias almost 15 years ago

fixed wrong position id when adding a new page

View differences:

add.php
151 151
// Create a new file in the /pages dir
152 152
create_access_file($filename, $page_id, $level);
153 153

  
154
// Get new order for section
155
$order = new order(TABLE_PREFIX.'sections', 'position', 'section_id', 'page_id');
156
$position = $order->get_new($parent);
154
// add position 1 to new page
155
$position = 1;
157 156

  
158 157
// Add new record into the sections table
159 158
$database->query("INSERT INTO ".TABLE_PREFIX."sections (page_id,position,module,block) VALUES ('$page_id','$position', '$module','1')");

Also available in: Unified diff