Fix typo correction server to work with new database structure

parent 11c1bf61
......@@ -6,3 +6,4 @@ configuration.php
#-------------------------
/nbproject/
.idea/*
.vscode/
......@@ -193,7 +193,7 @@ class Typo extends CI_Model {
* @return array Список опечаток
*/
function getSiteTypos($siteId) {
$this->db->select("id, link, text as originalText, context, comment as correctedText, date, status as isCorrected");
$this->db->select("id, link, text as originalText, context, corrected as correctedText, comment, date, status as isCorrected");
$this->db->from("messages");
$this->db->where("site_id", $siteId);
$this->db->where("status", 0);
......@@ -339,6 +339,8 @@ class Typo extends CI_Model {
// Адрес на который шлем запрос исправления
$url = $parsed_url["scheme"] . "://" . $parsed_url["host"] . "/" . $correctPath;
$url = "http://ambulance.pubsandbox.eterhost.ru/typosClientTest/index.php";
try {
$client = new \JsonRPC\Client($url);
$client->getHttpClient()->withDebug();
......
......@@ -64,6 +64,7 @@ export default class Typo extends Component {
_highlightTypoInContext() {
const original = this._escapeHtml(this.typo.originalText);
const corrected = this._escapeHtml(this.typo.correctedText);
const comment = this._escapeHtml(this.typo.comment);
const context = this._escapeHtml(this.typo.context);
// Экранируем символы, которые мешают использовать регулярные выражения
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment