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
c6afd633
Commit
c6afd633
authored
Feb 14, 2022
by
Soldatoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил строгую проверку на стоп-слова
parent
2de5c58f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
643 additions
and
0 deletions
+643
-0
server.php
server.php
+14
-0
stopwords.txt
stopwords.txt
+629
-0
No files found.
server.php
View file @
c6afd633
...
@@ -77,6 +77,20 @@ if (!isset($mas_url['host'])) {
...
@@ -77,6 +77,20 @@ if (!isset($mas_url['host'])) {
return
;
return
;
}
}
/* Проверка на стоп слова */
$i
=
0
;
$stopwords
=
explode
(
"
\r\n
"
,
(
file_get_contents
(
"stopwords.txt"
)));
foreach
(
$stopwords
as
$word
){
$pos
=
in_array
(
$word
,
$userdata
,
true
);
if
(
$pos
!==
false
){
$i
++
;
}
}
if
(
$i
>
0
){
$error
=
"«Никакое гнилое слово да не исходит из уст ваших, а только доброе для назидания в вере, дабы оно доставляло благодать слушающим.» (Еф.4:29)"
;
echoJsonData
(
array
(
'success'
=>
'false'
,
'message'
=>
$error
));
return
false
;
}
/* * ********************************
/* * ********************************
* Основная часть работы:
* Основная часть работы:
...
...
stopwords.txt
0 → 100644
View file @
c6afd633
This diff is collapsed.
Click to expand it.
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