Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
2cb2fc2e
Commit
2cb2fc2e
authored
Oct 26, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create sessions when messages are assigned and there is no session.
parent
f57ef177
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
htdocs/lib/session.php
htdocs/lib/session.php
+9
-0
No files found.
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
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