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