Ignore:
Timestamp:
Mar 8, 2013, 11:34:26 PM (12 years ago)
Author:
julien1311
Message:

[file_uploader] bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/File_Uploader/admin/admin_upload.php

    r21393 r21394  
    196196        //Database registration
    197197        $file_path = pwg_db_real_escape_string($file_uploader_file['destination']);
    198         $physical_category_id = pwg_db_fetch_assoc(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_file['folder'].'";'));
     198        $physical_category = pwg_db_fetch_assoc(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_file['folder'].'";'));
     199        $physical_category_id = $physical_category['id'];
    199200        $insert = array(
    200201                'file' => substr(strrchr($file_path, '/'), 1),
     
    223224       
    224225        if(isset($file_uploader_file_properties['category']) and count($file_uploader_file_properties['category']) > 0) {
    225                 associate_images_to_categories(
     226                @associate_images_to_categories(
    226227                        $image_id,
    227228                        array($file_uploader_file_properties['category'], $physical_category_id['id'])
Note: See TracChangeset for help on using the changeset viewer.