1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-23 06:33:22 +02:00

Added e107::serialize() and e107::unserialize() (static alias of e107::getArrayStorage()->read/write() functions)

This commit is contained in:
Cameron
2013-03-31 05:55:08 -07:00
parent 6becda09d4
commit 82ac19d038
6 changed files with 43 additions and 9 deletions

View File

@@ -168,7 +168,7 @@ class e107forum
$fid = intval($data['dl']);
$array = $sql->retrieve('forum_post','post_user,post_attachments','post_id='.intval($data['id']));
$attach = e107::getArrayStorage()->read($array['post_attachments']);
$attach = e107::serialize($array['post_attachments']);
$file = $this->getAttachmentPath($array['post_user']).varset($attach['file'][$fid]);
e107::getFile()->send($file);

View File

@@ -256,11 +256,11 @@ if (isset($_POST['newthread']) || isset($_POST['reply']))
// if($ur['fname']) { $_tmp .= '*'.$ur['fname']; }
$type = $ur['type'];
$newValues[$type][] = basename($ur['fname']);
$newValues[$type][] = $ur['fname'];
// $attachments[] = $_tmp;
}
// $postInfo['_FIELD_TYPES']['post_attachments'] = 'array'; //XXX Horrible "FIELD_TYPES" idea.
$postInfo['post_attachments'] = e107::getArrayStorage()->write($newValues); //FIXME
$postInfo['post_attachments'] = e107::serialize($newValues); //FIXME
}
// var_dump($uploadResult);