| @@ 299-303 (lines=5) @@ | ||
| 296 | $options_count = count($options); |
|
| 297 | if ($options_count > 0) { |
|
| 298 | //Convert array values to comma-separated |
|
| 299 | for ($i = 0; $i < $options_count; ++$i) { |
|
| 300 | if (is_array($options[$i])) { |
|
| 301 | $options[$i] = implode(',', $options[$i]); |
|
| 302 | } |
|
| 303 | } |
|
| 304 | $options = implode('|', $options); |
|
| 305 | $block->setVar('options', $options); |
|
| 306 | } |
|
| @@ 419-423 (lines=5) @@ | ||
| 416 | } |
|
| 417 | $count = count($options); |
|
| 418 | //Convert array values to comma-separated |
|
| 419 | for ($i = 0; $i < $count; ++$i) { |
|
| 420 | if (is_array($options[$i])) { |
|
| 421 | $options[$i] = implode(',', $options[$i]); |
|
| 422 | } |
|
| 423 | } |
|
| 424 | $options = implode('|', $options); |
|
| 425 | $sql = 'UPDATE `' . $xoopsDB->prefix('newblocks') . '` SET options = ' . $xoopsDB->quote($options) . " WHERE bid = {$bid}"; |
|
| 426 | $xoopsDB->queryF($sql); |
|