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
70cb6e2d
Commit
70cb6e2d
authored
Mar 06, 2019
by
Johan Cwiklinski
Committed by
Johan Cwiklinski
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flash messages from old method
parent
971dbe61
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
20 deletions
+23
-20
.circleci/config.yml
.circleci/config.yml
+1
-1
inc/mailcollector.class.php
inc/mailcollector.class.php
+8
-2
inc/session.class.php
inc/session.class.php
+13
-15
public/index.php
public/index.php
+0
-1
src/Glpi/Controller/Main.php
src/Glpi/Controller/Main.php
+1
-1
No files found.
.circleci/config.yml
View file @
70cb6e2d
...
...
@@ -154,7 +154,7 @@ jobs:
-
run
:
name
:
PHP CS
command
:
|
vendor/bin/phpcs -d memory_limit=512M -p -n --extensions=php --standard=PSR2 ./src ./public/index.php && vendor/bin/phpcs -d memory_limit=512M -p --extensions=php --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore=/.git,/config,/files,/lib,/node_modules,/plugins,/src,/tests/config,/vendor ./
vendor/bin/phpcs -d memory_limit=512M -p -n --extensions=php --standard=PSR2 ./src ./public/index.php && vendor/bin/phpcs -d memory_limit=512M -p --extensions=php --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore=/.git,/config,/files,/lib,/node_modules,/plugins,/src,/tests/config,/vendor
,/public/index.php
./
-
run
:
name
:
ESLint
command
:
|
...
...
inc/mailcollector.class.php
View file @
70cb6e2d
...
...
@@ -618,8 +618,14 @@ class MailCollector extends CommonDBTM {
$this
->
close_mailbox
();
//Close Mail Box
//TRANS: %1$d, %2$d, %3$d, %4$d and %5$d are number of messages
$msg
=
sprintf
(
__
(
'Number of messages: available=%1$d, retrieved=%2$d, refused=%3$d, errors=%4$d, blacklisted=%5$d'
),
$tot
,
$this
->
fetch_emails
,
$refused
,
$error
,
$blacklisted
);
$msg
=
sprintf
(
__
(
'Number of messages: available=%1$d, retrieved=%2$d, refused=%3$d, errors=%4$d, blacklisted=%5$d'
),
$tot
,
$this
->
fetch_emails
,
$refused
,
$error
,
$blacklisted
);
if
(
$display
)
{
Session
::
addMessageAfterRedirect
(
$msg
,
false
,
(
$error
?
ERROR
:
INFO
));
}
else
{
...
...
inc/session.class.php
View file @
70cb6e2d
...
...
@@ -1082,22 +1082,20 @@ class Session {
||
!
isset
(
$array
[
$message_type
])
||
in_array
(
$msg
,
$array
[
$message_type
])
===
false
)
{
array_push
(
$array
[
$message_type
],
$msg
);
global
$IS_TWIG
,
$container
;
if
(
$IS_TWIG
)
{
switch
(
$message_type
)
{
case
ERROR
:
$flashtype
=
'error'
;
break
;
case
WARNING
:
$flashtype
=
'warniing'
;
break
;
case
INFO
:
default
:
$flashtype
=
'info'
;
break
;
}
$container
->
get
(
Slim\Flash\Messages
::
class
)
->
addMessage
(
$flashtype
,
$msg
);
global
$CONTAINER
;
switch
(
$message_type
)
{
case
ERROR
:
$flashtype
=
'error'
;
break
;
case
WARNING
:
$flashtype
=
'warning'
;
break
;
case
INFO
:
default
:
$flashtype
=
'info'
;
break
;
}
$CONTAINER
->
get
(
Slim\Flash\Messages
::
class
)
->
addMessage
(
$flashtype
,
$msg
);
}
}
}
...
...
public/index.php
View file @
70cb6e2d
...
...
@@ -69,7 +69,6 @@ if (!file_exists(GLPI_CONFIG_DIR . "/db.yaml") && !file_exists(GLPI_CONFIG_DIR .
//handle redirections from old ui
if
(
isset
(
$_GET
[
'uiredirect'
]))
{
var_dump
(
$_GET
);
$params
=
[];
$route
=
null
;
foreach
(
$_GET
as
$key
=>
$param
)
{
...
...
src/Glpi/Controller/Main.php
View file @
70cb6e2d
...
...
@@ -985,7 +985,7 @@ class Main extends AbstractController implements ControllerInterface
return
$response
->
withRedirect
(
$redirect_uri
,
302
);
}
$this
->
flash
->
addMessage
(
__
(
'Unable to load requested saved search!'
));
$this
->
flash
->
addMessage
(
'error'
,
__
(
'Unable to load requested saved search!'
));
return
$response
->
withRedirect
(
$this
->
router
->
getBasePath
(),
500
);
}
...
...
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