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
e051d79c
Commit
e051d79c
authored
Jun 28, 2019
by
Dmitriy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлен запрос для получения пути POST-запроса исправления опечатки
parent
fad5b436
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Typo.php
cp/application/models/Typo.php
+1
-1
Site.php
cp/application/models/admins/Site.php
+3
-2
No files found.
cp/application/models/Typo.php
View file @
e051d79c
...
@@ -362,7 +362,7 @@ private function get_site_id($DBH, $url) {
...
@@ -362,7 +362,7 @@ private function get_site_id($DBH, $url) {
//require_once("/home/eterfund/www/eterfund.ru/api/typos/dbfunctions.php");
//require_once("/home/eterfund/www/eterfund.ru/api/typos/dbfunctions.php");
$id_site
=
$this
->
get_site_id
(
$this
->
db
,
$link
);
$id_site
=
$this
->
get_site_id
(
$this
->
db
,
$link
);
$this
->
db
->
select
(
"s.site as site"
);
$this
->
db
->
select
(
"s.site as site
, s.path as path
"
);
$this
->
db
->
from
(
"sites as s"
);
$this
->
db
->
from
(
"sites as s"
);
$this
->
db
->
where
(
"s.id"
,
$id_site
);
$this
->
db
->
where
(
"s.id"
,
$id_site
);
$site
=
$this
->
db
->
get
()
->
row
();
$site
=
$this
->
db
->
get
()
->
row
();
...
...
cp/application/models/admins/Site.php
View file @
e051d79c
...
@@ -135,7 +135,7 @@ class Site extends CI_Model {
...
@@ -135,7 +135,7 @@ class Site extends CI_Model {
/*Обновление названия*/
/*Обновление названия*/
function
updateSite
(
$data
)
{
function
updateSite
(
$data
)
{
if
(
!
$this
->
isSiteUnique
(
$data
[
'site'
]))
{
if
(
!
$this
->
isSiteUnique
(
$data
[
'site'
]
,
$data
[
'id_site'
]
))
{
return
array
(
'message'
=>
'Сайт не уникален'
);
return
array
(
'message'
=>
'Сайт не уникален'
);
}
}
...
@@ -167,8 +167,9 @@ class Site extends CI_Model {
...
@@ -167,8 +167,9 @@ class Site extends CI_Model {
}
}
/*Проверяем сайт на уникальность*/
/*Проверяем сайт на уникальность*/
function
isSiteUnique
(
$site
)
{
function
isSiteUnique
(
$site
,
$id
=
''
)
{
$this
->
db
->
where
(
"site"
,
$site
);
$this
->
db
->
where
(
"site"
,
$site
);
$this
->
db
->
where
(
'id !='
,
$id
);
$this
->
db
->
from
(
"sites"
);
$this
->
db
->
from
(
"sites"
);
$count
=
$this
->
db
->
count_all_results
();
$count
=
$this
->
db
->
count_all_results
();
...
...
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