Ignore:
Timestamp:
Feb 17, 2011, 5:45:45 PM (13 years ago)
Author:
patdenice
Message:

Bugs corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/admin/page_form.inc.php

    r9261 r9263  
    5959    else
    6060    {
     61      $query = 'SELECT MAX(ABS(pos)) AS pos FROM ' . ADD_PAGES_TABLE . ';';
     62      list($position) = array_from_query($query, 'pos');
     63     
    6164      $query = '
    62 INSERT INTO ' . ADD_PAGES_TABLE . ' ( lang , title , content , users , groups , permalink)
    63 VALUES ('.$language.' , "'.$_POST['title'].'" , "'.$_POST['ap_content'].'" , '.$user_access.' , '.$group_access.' , '.$permalink.');';
     65INSERT INTO ' . ADD_PAGES_TABLE . ' ( pos , lang , title , content , users , groups , permalink)
     66VALUES ('.($position+1).' , '.$language.' , "'.$_POST['title'].'" , "'.$_POST['ap_content'].'" , '.$user_access.' , '.$group_access.' , '.$permalink.');';
    6467      pwg_query($query);
    6568      $edited_page['id'] = mysql_insert_id();
Note: See TracChangeset for help on using the changeset viewer.