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 / Register
Toggle navigation
Open sidebar
domainepublic
alternc
Commits
de54a15c
Commit
de54a15c
authored
Jan 22, 2008
by
Antoine Beaupré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more factorization in error messages: make errstr() work with our new messaging system
parent
d63da16f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
bureau/class/m_err.php
bureau/class/m_err.php
+7
-7
No files found.
bureau/class/m_err.php
View file @
de54a15c
...
...
@@ -87,7 +87,12 @@ class m_err {
*
*/
function
errstr
()
{
return
sprintf
(
_
(
"err_"
.
$this
->
clsid
.
"_"
.
$this
->
error
),
$this
->
param
);
if
(
is_string
(
$this
->
error
))
{
$msg
=
sprintf
(
_
(
"err_"
.
$this
->
clsid
.
"_generic: "
)
.
_
(
$this
->
error
)
.
"
\n
"
,
$this
->
param
);
}
else
{
$msg
=
sprintf
(
_
(
"err_"
.
$this
->
clsid
.
"_"
.
$this
->
error
)
.
"
\n
"
,
$this
->
param
);
}
return
$msg
;
}
/**
...
...
@@ -104,12 +109,7 @@ class m_err {
if
(
$f
)
{
fputs
(
$f
,
date
(
"d/m/Y H:i:s"
)
.
" - ERROR - "
);
fputs
(
$f
,
$mem
->
user
[
"login"
]
.
" - "
);
if
(
is_string
(
$this
->
error
))
{
$msg
=
sprintf
(
_
(
"err_"
.
$this
->
clsid
.
"_generic: "
)
.
_
(
$this
->
error
)
.
"
\n
"
,
$this
->
param
);
}
else
{
$msg
=
sprintf
(
_
(
"err_"
.
$this
->
clsid
.
"_"
.
$this
->
error
)
.
"
\n
"
,
$this
->
param
);
}
fputs
(
$f
,
$msg
);
fputs
(
$f
,
$this
->
errstr
());
fclose
(
$f
);
}
}
...
...
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