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

Changeset 13149


Ignore:
Timestamp:
Nov 16, 2009, 8:30:31 PM (13 years ago)
Author:
ogawa
Message:

#3176:一時画像DBからの保存時に二重エンコードされていた問題を修正

Location:
OpenPNE/branches/stable-2.12.x/webapp/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.12.x/webapp/lib/db/image.php

    r10815 r13149  
    5858/*** write ***/
    5959
    60 function db_image_insert_c_image($filename, $bin, $type = '')
     60function db_image_insert_c_image($filename, $bin, $type = '', $is_encoded = false)
    6161{
    6262    $db =& db_get_instance('image');
    6363
     64    if (!$is_encoded) {
     65        $bin = base64_encode($bin);
     66    }
     67
    6468    $data = array(
    6569        'filename'   => $filename,
    66         'bin'        => base64_encode($bin),
     70        'bin'        => $bin,
    6771        'type'       => $type,
    6872        'r_datetime' => db_now(),
  • OpenPNE/branches/stable-2.12.x/webapp/lib/util/image.php

    r13032 r13149  
    263263        $c_tmp_image = db_image_c_tmp_image4filename($tmpfile);
    264264
    265         if (db_image_insert_c_image($filename, $c_tmp_image['bin'])) {
     265        if (db_image_insert_c_image($filename, $c_tmp_image['bin'], '', true)) {
    266266            return $filename;
    267267        }
Note: See TracChangeset for help on using the changeset viewer.