Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
glpi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
GLPI
glpi
Commits
1d4c4a6c
Commit
1d4c4a6c
authored
Apr 08, 2019
by
Cédric Anne
Committed by
Johan Cwiklinski
Apr 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent tools from being executed from webserver
parent
1919764b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
5 deletions
+36
-5
tools/cachebench.php
tools/cachebench.php
+6
-0
tools/cleanhistory.php
tools/cleanhistory.php
+5
-0
tools/convert_search_options.php
tools/convert_search_options.php
+5
-0
tools/fk_generate.php
tools/fk_generate.php
+5
-0
tools/generate_bigdump.php
tools/generate_bigdump.php
+5
-5
tools/testmail.php
tools/testmail.php
+5
-0
tools/update_registered_ids.php
tools/update_registered_ids.php
+5
-0
No files found.
tools/cachebench.php
View file @
1d4c4a6c
...
...
@@ -29,6 +29,12 @@
* along with GLPI. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
define
(
'PER_LEVEL'
,
8
);
define
(
'COUNT'
,
1024
);
...
...
tools/cleanhistory.php
View file @
1d4c4a6c
...
...
@@ -34,6 +34,11 @@
*Purge history with some criteria
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
ini_set
(
"memory_limit"
,
"-1"
);
ini_set
(
"max_execution_time"
,
"0"
);
...
...
tools/convert_search_options.php
View file @
1d4c4a6c
...
...
@@ -30,6 +30,11 @@
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
/**
* An utility script to convert old getSearchOptions array to new ones,
* see https://github.com/glpi-project/glpi/issues/1396
...
...
tools/fk_generate.php
View file @
1d4c4a6c
...
...
@@ -30,6 +30,11 @@
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
include
(
'../inc/includes.php'
);
$DB
->
query
(
"SET FOREIGN_KEY_CHECKS = '0';"
);
...
...
tools/generate_bigdump.php
View file @
1d4c4a6c
...
...
@@ -30,6 +30,11 @@
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
// This script generate and populate a complete glpi DB
// A good way to test GLPI with a lot of data
...
...
@@ -38,11 +43,6 @@ define('DO_NOT_CHECK_HTTP_REFERER', 1);
include
(
__DIR__
.
'/../inc/includes.php'
);
include
(
__DIR__
.
'/generate_bigdump.function.php'
);
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
if
(
in_array
(
'--help'
,
$_SERVER
[
'argv'
]))
{
die
(
"usage: "
.
$_SERVER
[
'argv'
][
0
]
.
" [ --user=glpi ] [ --pass=glpi ]
\n
"
);
}
...
...
tools/testmail.php
View file @
1d4c4a6c
...
...
@@ -30,6 +30,11 @@
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
if
(
isset
(
$_SERVER
[
'argc'
]))
{
for
(
$i
=
1
;
$i
<
$_SERVER
[
'argc'
];
$i
++
)
{
$it
=
explode
(
"="
,
$_SERVER
[
'argv'
][
$i
],
2
);
...
...
tools/update_registered_ids.php
View file @
1d4c4a6c
...
...
@@ -30,6 +30,11 @@
* ---------------------------------------------------------------------
*/
if
(
PHP_SAPI
!=
'cli'
)
{
echo
"This script must be run from command line"
;
exit
();
}
/**
* @since 0.85
*/
...
...
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