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
7c281445
Commit
7c281445
authored
Jul 07, 2018
by
Jorgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic authentication
parent
545fd4d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Typo.php
cp/application/models/Typo.php
+5
-1
No files found.
cp/application/models/Typo.php
View file @
7c281445
...
@@ -325,6 +325,8 @@ class Typo extends CI_Model {
...
@@ -325,6 +325,8 @@ class Typo extends CI_Model {
*/
*/
function
correctTypo
(
int
$typoId
,
string
$corrected
)
{
function
correctTypo
(
int
$typoId
,
string
$corrected
)
{
$correctPath
=
$this
->
config
->
item
(
"correction_path"
);
$correctPath
=
$this
->
config
->
item
(
"correction_path"
);
$user
=
$this
->
config
->
item
(
"typos_user"
);
$password
=
$this
->
config
->
item
(
"typos_password"
);
/* Получаем исправление */
/* Получаем исправление */
$this
->
db
->
select
(
"m.link as link, m.text as text, m.comment as comment, m.context as context"
);
$this
->
db
->
select
(
"m.link as link, m.text as text, m.comment as comment, m.context as context"
);
...
@@ -341,7 +343,9 @@ class Typo extends CI_Model {
...
@@ -341,7 +343,9 @@ class Typo extends CI_Model {
try
{
try
{
$client
=
new
\JsonRPC\Client
(
$url
);
$client
=
new
\JsonRPC\Client
(
$url
);
$client
->
getHttpClient
()
->
withDebug
();
$client
->
getHttpClient
()
->
withDebug
()
->
withUsername
(
$user
)
->
withPassword
(
$password
);
$client
->
fixTypo
(
$correction
->
text
,
$corrected
,
$correction
->
context
,
$correction
->
link
);
$client
->
fixTypo
(
$correction
->
text
,
$corrected
,
$correction
->
context
,
$correction
->
link
);
}
catch
(
ConnectionFailureException
$e
)
{
}
catch
(
ConnectionFailureException
$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