Ignore:
Timestamp:
07/02/08 18:27:06 (4 years ago)
Author:
hverton
Message:

Merged trunk revisions 1408:1508 into the PLi-Fusion branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PLi-Fusion/administration/site_links.php

    r1335 r1509  
    128128+----------------------------------------------------*/ 
    129129 
     130// display a status panel 
     131if (isset($status)) { 
     132    if ($status == "del") { 
     133        $variables['message'] = $locale['401']; 
     134    } else { 
     135        $variables['message'] = "UNKNOWN STATUS PASSED!"; 
     136    } 
     137    // define the message panel variables 
     138    $variables['bold'] = true; 
     139    $template_panels[] = array('type' => 'body', 'name' => 'admin.site_links.status', 'title' => $locale['400'], 'template' => '_message_table_panel.tpl'); 
     140    $template_variables['admin.site_links.status'] = $variables; 
     141    $variables = array(); 
     142} 
     143 
    130144// generate the list of installed menu panels 
    131145$variables['panel_list'] = array(); 
     
    137151} 
    138152sort($variables['panel_list']); 
    139  
    140 // display a status panel 
    141 if (isset($status)) { 
    142     if ($status == "del") { 
    143         $variables['message'] = $locale['401']; 
    144     } else { 
    145         $variables['message'] = "UNKNOWN STATUS PASSED!"; 
    146     } 
    147     // define the message panel variables 
    148     $variables['bold'] = true; 
    149     $template_panels[] = array('type' => 'body', 'name' => 'admin.site_links.status', 'title' => $locale['400'], 'template' => '_message_table_panel.tpl'); 
    150     $template_variables['admin.site_links.status'] = $variables; 
    151     $variables = array(); 
    152 } 
    153153 
    154154// default panel title 
     
    209209            // if the parent has changed, calculate a new link order 
    210210            if ($data['link_parent'] != $link_parent) { 
    211                 $link_order = dbresult(dbquery("SELECT MAX(link_order) FROM ".$db_prefix."site_links WHERE panel_name = '$panel_filename' AND link_parent='$link_parent'".($where==""?"":(" AND ".$where)).""),0)+1; 
     211                $link_order = dbfunction("MAX(link_order)", "site_links", "panel_name = '$panel_filename' AND link_parent='$link_parent'".($where==""?"":(" AND ".$where))."")+1; 
    212212            } else { 
    213213                // link changed? 
     
    222222            // get a linkorder if none given 
    223223            if (!$link_order) { 
    224                 $link_order = dbresult(dbquery("SELECT MAX(link_order) FROM ".$db_prefix."site_links WHERE panel_name = '$panel_filename' AND link_parent='$link_parent'".($where==""?"":(" AND ".$where)).""),0)+1; 
     224                $link_order = dbfunction("MAX(link_order)","site_links","panel_name = '$panel_filename' AND link_parent='$link_parent'".($where==""?"":(" AND ".$where))."")+1; 
    225225            } 
    226226            $result = dbquery("UPDATE ".$db_prefix."site_links SET link_order=link_order+1 WHERE panel_name = '$panel_filename' AND link_parent='$link_parent' AND link_order >= '$link_order'".($where==""?"":(" AND ".$where))."");    
Note: See TracChangeset for help on using the changeset viewer.