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

Changeset 4523

Show
Ignore:
Timestamp:
07/17/12 13:02:54 (21 months ago)
Author:
oscim
Message:

correction update content

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/2.1.1/catalog/admin/includes/classes/drivers/sqlcontent.php

    r4495 r4523  
    157157      $language_id = $list_languages[$i]['id']; 
    158158 
    159       $sql_data_array = array('content_text' => tep_db_prepare_input($post['content_text'][$language_id])  /*tep_db_prepare_input($content_text[$language_id])*/, 
    160                               'content_title' => tep_db_prepare_input($post['content_title'][$language_id]) /*str_replace('&','&',tep_db_prepare_input($content_title[$language_id]))*/); 
     159      if(isset($post['content_text'][$language_id])) $sql_data_array['content_text'] = tep_db_prepare_input($post['content_text'][$language_id]); 
     160                        if(isset($post['content_title'][$language_id])) $sql_data_array['content_title'] =tep_db_prepare_input($post['content_title'][$language_id]); 
    161161 
    162162 
    163163                                $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content_description ($language_id)); 
    164164 
     165                        if(count($sql_data_array) > 0) 
    165166                                tep_db_perform(TABLE_CONTENT_DESCRIPTION, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "' and language_id = '" . (int)$language_id . "'"); 
    166167    }