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

Changeset 13151 for OpenPNE


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

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

Location:
OpenPNE/trunk/webapp/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/image.php

    r12608 r13151  
    5858/*** write ***/
    5959
    60 function db_image_insert_c_image($filename, $bin, $filesize, $c_member_id, $category ='', $type = '')
    61 {
    62     $db =& db_get_instance('image');
     60function db_image_insert_c_image($filename, $bin, $filesize, $c_member_id, $category ='', $type = '', $is_encoded = false)
     61{
     62    $db =& db_get_instance('image');
     63
     64    if (!$is_encoded) {
     65        $bin = base64_encode($bin);
     66    }
    6367
    6468    $data = array(
    6569        'filename'   => $filename,
    66         'bin'        => base64_encode($bin),
     70        'bin'        => $bin,
    6771        'type'       => $type,
    6872        'r_datetime' => db_now(),
  • OpenPNE/trunk/webapp/lib/util/image.php

    r13036 r13151  
    264264        $filesize = $c_tmp_image['filesize'];
    265265
    266         if (db_image_insert_c_image($filename, $c_tmp_image['bin'], $filesize, $category)) {
     266        if (db_image_insert_c_image($filename, $c_tmp_image['bin'], $filesize, $category, '', true)) {
    267267            return $filename;
    268268        }
Note: See TracChangeset for help on using the changeset viewer.