$file->Delete($article['logo']); } //$short = iconv('UTF-8', 'CP1251', $short); //$msgtext = iconv('UTF-8', 'CP1251', $msgtext); $title = antispam($title); $short = antispam($short); $msgtext = antispam($msgtext); $res = articles::updateArticle($uid, $article['id'], $title, $short, $msgtext, $image); $_POST['kword'] = iconv('UTF-8', 'CP1251', $_POST['kword']); if (trim($_POST['kword']) != '') { $kwords = explode(',', $_POST['kword']); $kwords = array_map('trim', $kwords); $kwords = array_map('antispam', $kwords); } if (count($kwords) > 0) { articles::addArticleTags($article['id'], $kwords); } else { articles::clearArticleTags($article['id']); } if (!$res) { $alert['alert'] = 'Ошибка при обновлении статьи'; } } if (isset($alert)) { foreach ($alert as $k => $msg) { $alert[$k] = iconv('CP1251', 'UTF-8', $msg); } $result['errorMessages'] = $alert; } else { $result['success'] = true; $article = articles::getArticle($id, $uid);