Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-server
Commits
9594acdc
Commit
9594acdc
authored
Aug 01, 2018
by
Jorgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve typo correction status errors
parent
bdb6144b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Typo.php
cp/application/models/Typo.php
+9
-1
No files found.
cp/application/models/Typo.php
View file @
9594acdc
...
@@ -347,7 +347,15 @@ class Typo extends CI_Model {
...
@@ -347,7 +347,15 @@ class Typo extends CI_Model {
->
withUsername
(
$user
)
->
withUsername
(
$user
)
->
withPassword
(
$password
);
->
withPassword
(
$password
);
$client
->
fixTypo
(
$correction
->
text
,
$corrected
,
$correction
->
context
,
$correction
->
link
);
$result
=
$client
->
fixTypo
(
$correction
->
text
,
$corrected
,
$correction
->
context
,
$correction
->
link
);
if
(
!
isset
(
$result
[
"status"
]))
{
throw
new
Exception
(
"Неправильный ответ сервера"
);
}
if
(
$result
[
"status"
]
!=
"success"
)
{
throw
new
Exception
(
"Не удалось исправить опечатку: "
.
$result
[
"message"
]);
}
}
catch
(
ConnectionFailureException
$e
)
{
}
catch
(
ConnectionFailureException
$e
)
{
throw
new
Exception
(
"Не удалось подключиться к серверу исправления опечаток"
,
503
);
throw
new
Exception
(
"Не удалось подключиться к серверу исправления опечаток"
,
503
);
}
catch
(
AccessDeniedException
$e
)
{
}
catch
(
AccessDeniedException
$e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment