Changeset 16673

Show
Ignore:
Timestamp:
06/23/08 14:38:24 (5 months ago)
Author:
bergie
Message:

Forward-porting [16671]: Minor changes to CSV export

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/org.openpsa.products/handler/product/csv.php

    r16155 r16673  
    2525        if(isset($args[0])) 
    2626        { 
    27             $data['filename'] = $args[0] . '_' . date('Y-m-d') . '.csv'
    28             $this->_request_data['schemadb_to_use'] = $args[0]
     27            $data['schemadb_to_use'] = str_replace('.csv', '', $args[0])
     28            $data['filename'] = $data['schemadb_to_use'] . '_' . date('Y-m-d') . '.csv'
    2929        } 
    3030        elseif(    isset($_POST) 
     
    6666         
    6767        $products = array(); 
     68         
     69        $root_group_guid = $this->_config->get('root_group'); 
     70        if ($root_group_guid) 
     71        { 
     72            $root_group = new org_openpsa_products_product_group_dba($root_group_guid); 
     73            $qb->add_constraint('productGroup', 'INTREE', $root_group->id); 
     74        } 
    6875 
    6976        $all_products = $qb->execute();