Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
customerror
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
customerror
Commits
c0256aff
Commit
c0256aff
authored
10 years ago
by
Gisle Hannemyr
Browse files
Options
Downloads
Patches
Plain Diff
by gisle: Fixed disabled themes showing up as eligible.
parent
cb3a4895
Branches
Branches containing commit
Tags
6.x-1.4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.txt
+12
-0
12 additions, 0 deletions
README.txt
customerror.module
+9
-6
9 additions, 6 deletions
customerror.module
with
21 additions
and
6 deletions
README.txt
+
12
−
0
View file @
c0256aff
...
...
@@ -86,6 +86,18 @@ Note that customerror keeps track of what page the user is trying to
access, so after logging in, the user will be redirected to that page.
Theme to be used on the error page
----------------------------------
If you've set an administration theme, the default is to use this on
all pages where the path is "admin", including 403 and 404 error
pages. You can overide this by specifying a theme for custom error
different from "System default".
This setting has no effect if the administration theme is set to
"<System default>".
Custom redirects for 404 errors
-------------------------------
...
...
This diff is collapsed.
Click to expand it.
customerror.module
+
9
−
6
View file @
c0256aff
...
...
@@ -74,7 +74,9 @@ function customerror_admin_settings() {
ksort
(
$themes
);
$theme_options
[
0
]
=
t
(
'System default'
);
foreach
(
$themes
as
$theme
)
{
$theme_options
[
$theme
->
name
]
=
$theme
->
name
;
if
(
$theme
->
status
)
{
$theme_options
[
$theme
->
name
]
=
$theme
->
name
;
}
}
$errors
=
_customerror_enum_errors
();
...
...
@@ -116,8 +118,8 @@ function customerror_admin_settings() {
'#type'
=>
'select'
,
'#options'
=>
$theme_options
,
'#title'
=>
t
(
'Theme'
),
'#description'
=>
t
(
'Theme to be used on the error page.'
),
'#default_value'
=>
customerror_get_theme
(
$code
),
'#description'
=>
t
(
'Theme to be used on the error page
below the admin path
.'
),
'#default_value'
=>
variable_get
(
'customerror_'
.
$code
.
'_theme'
,
0
),
);
$form
[
$group
][
'customerror_'
.
$code
.
'_php'
]
=
array
(
'#type'
=>
'checkbox'
,
...
...
@@ -129,7 +131,7 @@ function customerror_admin_settings() {
$form
[
'redirects'
]
=
array
(
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Redirects'
),
'#title'
=>
t
(
'
404
Redirects'
),
'#collapsed'
=>
TRUE
,
'#collapsible'
=>
TRUE
,
);
...
...
@@ -279,10 +281,11 @@ function customerror_check_redirect() {
return
;
}
$redirect
_list
=
explode
(
"
\n
"
,
variable_get
(
'customerror_redirect'
,
''
));
if
(
empty
(
$redirect
_list
))
{
$redirect
s
=
trim
(
variable_get
(
'customerror_redirect'
,
''
));
if
(
empty
(
$redirect
s
))
{
return
;
}
$redirect_list
=
explode
(
"
\n
"
,
$redirects
);
foreach
(
$redirect_list
as
$item
)
{
list
(
$src
,
$dst
)
=
explode
(
' '
,
$item
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment