@@ 99-101 (lines=3) @@ | ||
96 | public function saveAttachment() |
|
97 | { |
|
98 | $attachment_save = ''; |
|
99 | if (is_array($this->attachment_array) && count($this->attachment_array) > 0) { |
|
100 | $attachment_save = base64_encode(serialize($this->attachment_array)); |
|
101 | } |
|
102 | $this->setVar('attachment', $attachment_save); |
|
103 | $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smartfaq_answers') . ' SET attachment=' . $GLOBALS['xoopsDB']->quoteString($attachment_save) . ' WHERE post_id = ' . $this->getVar('answerid'); |
|
104 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
|
@@ 142-144 (lines=3) @@ | ||
139 | $this->attachment_array[$key] = $attach; |
|
140 | } |
|
141 | $attachment_save = ''; |
|
142 | if (is_array($this->attachment_array) && count($this->attachment_array) > 0) { |
|
143 | $attachment_save = base64_encode(serialize($this->attachment_array)); |
|
144 | } |
|
145 | $this->setVar('attachment', $attachment_save); |
|
146 | ||
147 | return true; |