Changeset 9263


Ignore:
Timestamp:
02/17/11 17:45:45 (9 years ago)
Author:
patdenice
Message:

Bugs corrected

Location:
extensions/AdditionalPages
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/additional_page.php

    r9261 r9263  
    8181  { 
    8282    $template->assign('PLUGIN_INDEX_ACTIONS' , ' 
    83       <li><a href="'.make_index_url().'" title="' . l10n('return to homepage') . '"> 
     83      <li><a href="'.make_index_url().'/categories" title="' . l10n('return to homepage') . '"> 
    8484        <img src="' . $template->get_themeconf('icon_dir') . '/home.png" class="button" alt="' . l10n('home') . '"/></a> 
    8585      </li>'); 
  • extensions/AdditionalPages/admin/config.inc.php

    r9262 r9263  
    2020      $new_conf['languages'][$language_code] = $name; 
    2121        } 
     22 
     23  $new_conf['homepage'] = $conf['additional_pages']['homepage']; 
    2224 
    2325    $query = ' 
  • extensions/AdditionalPages/admin/manage.inc.php

    r9261 r9263  
    4949 
    5050$template->assign(array( 
    51   'F_ACTION', $my_base_url.'&amp;tab=manage', 
     51  'F_ACTION' => $my_base_url.'&amp;tab=manage', 
    5252  'HOMEPAGE' => $conf['additional_pages']['homepage'], 
    5353  ) 
  • 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(); 
  • extensions/AdditionalPages/maintain.inc.php

    r9262 r9263  
    1010  { 
    1111    $query = 'CREATE TABLE ' . $prefixeTable . 'additionalpages ( 
    12 id SMALLINT( 5 ) UNSIGNED NOT NULL , 
     12id SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT, 
    1313pos SMALLINT( 5 ) NULL default NULL , 
    1414lang VARCHAR( 255 ) NULL default NULL , 
    1515title VARCHAR( 255 ) NOT NULL , 
    1616content LONGTEXT NOT NULL , 
     17users VARCHAR( 255 ) NULL DEFAULT NULL , 
     18groups VARCHAR( 255 ) NULL DEFAULT NULL , 
    1719permalink VARCHAR( 64 ) NULL DEFAULT NULL , 
    1820PRIMARY KEY (id) , 
Note: See TracChangeset for help on using the changeset viewer.