1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 4472

Show
Ignore:
Timestamp:
06/18/12 14:19:22 (11 months ago)
Author:
oscim
Message:

coquille

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/catalog/admin/includes/classes/drivers/sqlfeatured.php

    r4418 r4472  
    6868                        $res=tep_db_perform(TABLE_FEATURED_DESCRIPTION, $sql_data_array_lg); 
    6969                } 
    70                  
     70 
    7171 
    7272 
     
    117117                        $where_lg .= "AND languages_id = '".(int)$lg['id']."' "; 
    118118 
    119                   $sql_data_array_lg = array( 
    120                                         'featured_title'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ), 
    121                         ); 
    122  
    123                         $res=tep_db_perform(TABLE_FEATURED_DESCRIPTION, $sql_data_array_lg, 'update' , substr($where_lg,3)); 
     119                                if(isset($row['title'][$lg['id']] ) { 
     120                                                $sql_data_array_lg = array( 
     121                                                                'featured_title'=> ((!empty($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ), 
     122                                                ); 
     123 
     124                                                $res=tep_db_perform(TABLE_FEATURED_DESCRIPTION, $sql_data_array_lg, 'update' , substr($where_lg,3)); 
     125                                } 
    124126                } 
    125127 
     
    179181                                $_query = $DB->query("select languages_id , fd.featured_title  from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' "); 
    180182 
    181                                 foreach($_query->fetchAllAssoc() as $row)  
     183                                foreach($_query->fetchAllAssoc() as $row) 
    182184                                        $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row)); 
    183185 
     
    198200                                $_query = $DB->query("select languages_id , fd.featured_title  from " . TABLE_FEATURED_DESCRIPTION . " fd where fd.featured_id = '" . (int)$result['row_id'] . "' "); 
    199201 
    200                                 foreach($_query->fetchAllAssoc() as $row)  
     202                                foreach($_query->fetchAllAssoc() as $row) 
    201203                                        $result['lg'][$row['languages_id']] = ((!$shortkey)? $row : self::CleanKey($row)); 
    202204 
     
    228230    $res = $DB->query("SELECT row_id as id FROM " . TABLE_FEATURED ." WHERE ". substr($where, 3 ).' LIMIT  1' ); 
    229231                $result = $res->fetchAssoc(); 
    230                  
     232 
    231233 
    232234                // childs tables 
     
    287289 
    288290        /** 
    289                 @brief Function link to for contruct link featured vs datatype  
     291                @brief Function link to for contruct link featured vs datatype 
    290292                @note normlised methode used in childs datatype 
    291293        */ 
     
    306308                                                                                                                                'datatype'=> $datatype, 
    307309                                                                                                                                'datatype_id'=> $id, 
    308                                                                                                                                 ),  
     310                                                                                                                                ), 
    309311                                                                                                                                true 
    310312                                                                                                                ); 
     
    319321 
    320322        /** 
    321                 @brief Function link to for contruct link featued vs datatype  
     323                @brief Function link to for contruct link featued vs datatype 
    322324                @note normlised methode used in childs datatype 
    323325        */