ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 2970


Ignore:
Timestamp:
May 17, 2007, 11:35:39 PM (12 years ago)
Author:
ogawa
Message:

#774:コミュニティトピック削除時にアップロードファイルを削除できていない

Location:
OpenPNE/branches/2.8.x/webapp/lib/db
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.8.x/webapp/lib/db/commu.php

    r2957 r2970  
    22902290        image_data_delete($topic_comment['image_filename2']);
    22912291        image_data_delete($topic_comment['image_filename3']);
    2292     }
    2293 
    2294     $sql = 'SELECT filename FROM c_commu_topic WHERE c_commu_topic_id = ?';
    2295     db_file_delete_c_file(db_get_one($sql, $params));
     2292        db_file_delete_c_file($topic_comment['filename']);
     2293    }
    22962294
    22972295    $sql = 'DELETE FROM c_commu_topic_comment WHERE c_commu_topic_id = ?';
  • OpenPNE/branches/2.8.x/webapp/lib/db/etc.php

    r2927 r2970  
    542542    foreach ($topic_list as $topic) {
    543543        // c_commu_topic_comment(画像)
    544         $sql = 'SELECT image_filename1, image_filename2, image_filename3' .
     544        $sql = 'SELECT image_filename1, image_filename2, image_filename3, filename' .
    545545            ' FROM c_commu_topic_comment WHERE c_commu_topic_id = ?';
    546546        $params = array(intval($topic['c_commu_topic_id']));
     
    550550            image_data_delete($topic_comment['image_filename2']);
    551551            image_data_delete($topic_comment['image_filename3']);
     552            db_file_delete_c_file($topic_comment['filename']);
    552553        }
    553         db_file_delete_c_file($topic['filename']);
     554
    554555        $sql = 'DELETE FROM c_commu_topic_comment WHERE c_commu_topic_id = ?';
    555556        db_query($sql, $params);
Note: See TracChangeset for help on using the changeset viewer.