Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
2cb2fc2e
Commit
2cb2fc2e
authored
Oct 26, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 26, 2006
Browse files
Create sessions when messages are assigned and there is no session.
parent
f57ef177
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/session.php
View file @
2cb2fc2e
...
...
@@ -151,6 +151,9 @@ class Session {
* @param boolean $escape Whether to HTML escape the message
*/
public
function
add_ok_msg
(
$message
,
$escape
=
true
)
{
if
(
empty
(
$_SESSION
))
{
$this
->
create_session
();
}
if
(
$escape
)
{
$message
=
htmlspecialchars
(
$message
,
ENT_COMPAT
,
'UTF-8'
);
$message
=
str_replace
(
' '
,
' '
,
$message
);
...
...
@@ -165,6 +168,9 @@ class Session {
* @param boolean $escape Whether to HTML escape the message
*/
public
function
add_info_msg
(
$message
,
$escape
=
true
)
{
if
(
empty
(
$_SESSION
))
{
$this
->
create_session
();
}
if
(
$escape
)
{
$message
=
htmlspecialchars
(
$message
,
ENT_COMPAT
,
'UTF-8'
);
$message
=
str_replace
(
' '
,
' '
,
$message
);
...
...
@@ -179,6 +185,9 @@ class Session {
* @param boolean $escape Whether to HTML escape the message
*/
public
function
add_err_msg
(
$message
,
$escape
=
true
)
{
if
(
empty
(
$_SESSION
))
{
$this
->
create_session
();
}
if
(
$escape
)
{
$message
=
htmlspecialchars
(
$message
,
ENT_COMPAT
,
'UTF-8'
);
$message
=
str_replace
(
' '
,
' '
,
$message
);
...
...
Write
Preview
Supports
Markdown
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