foreach ($cfg['more_fields'] as $i => $v) { $article[$i] = htmlspecialchars($_POST[$i]); } } else { $article = options_extract($item_db[NEW_MF]); } // Extract more fields foreach ($cfg['more_fields'] as $i => $v) { $af = isset($article[$i]) ? htmlspecialchars($article[$i]) : false; if ($v[0] == '&') { $xfields[] = array($i, substr($v, 1), '<span style="color: red;">*</span> ' . lang('required', 'news'), $af); } else { $xfields[] = array($i, $v, '', $af); } } $options = options_extract($item_db[NEW_OPT]); if ($source == 'postponed') { $postpone_date = $id; } // show template ------------------------------------------------------------------- if ($use_wysiwyg) { $tpl = 'index_cke'; } else { $tpl = 'index'; } list($_dateD, $_dateM, $_dateY, $_dateH, $_dateI) = make_postponed_date($postpone_date); // Add hooks for modify ckeditor $CKEDITOR_Settings = hook('CKEDITOR_Settings', false); $CKEDITOR_SetsName = hook('CKEDITOR_SetsName', 'settings'); $Using_HTML = $options['use_html']; $Using_Avat = $config_use_avatar == 'yes' ? 1 : 0;
function edit_option($data, $name, $value) { $options = options_extract($data); // Modify option if ($value !== false) { $options[spack($name)] = spack($value); } elseif (isset($options[spack($name)])) { unset($options[spack($name)]); } $data = array(); foreach ($options as $i => $v) { $i = trim($i); $v = trim($v); if ($i && $v) { $data[] = "{$i}={$v}"; } } return join(';', $data); }