Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
98a9d5ee
Commit
98a9d5ee
authored
Aug 22, 2004
by
Steven Wittens
Browse files
-
#9576
: Patch by TDobes, only allow the user to choose between enabled themes.
parent
05714da2
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/theme.inc
View file @
98a9d5ee
...
...
@@ -43,7 +43,7 @@ function init_theme() {
// Allow modules to override the present theme... only select custom theme
// if it is available in the list of enabled themes.
$theme
=
$custom_theme
&&
$themes
[
$custom_theme
]
->
status
?
$custom_theme
:
$theme
;
$theme
=
$custom_theme
&&
$themes
[
$custom_theme
]
?
$custom_theme
:
$theme
;
// Store the identifier for retrieving theme settings with.
$theme_key
=
$theme
;
...
...
modules/system.module
View file @
98a9d5ee
...
...
@@ -113,7 +113,16 @@ function system_menu() {
*/
function
system_user
(
$type
,
$edit
,
&
$user
,
$category
=
NULL
)
{
if
(
$type
==
'form'
&&
$category
==
'account'
)
{
if
(
count
(
$themes
=
list_themes
())
>
1
)
{
$allthemes
=
list_themes
();
// list only active themes
foreach
(
$allthemes
as
$key
=>
$theme
)
{
if
(
$theme
->
status
)
{
$themes
[
$key
]
=
$theme
;
}
}
if
(
count
(
$themes
)
>
1
)
{
$rows
=
array
();
foreach
(
$themes
as
$key
=>
$value
)
{
$row
=
array
();
...
...
modules/system/system.module
View file @
98a9d5ee
...
...
@@ -113,7 +113,16 @@ function system_menu() {
*/
function
system_user
(
$type
,
$edit
,
&
$user
,
$category
=
NULL
)
{
if
(
$type
==
'form'
&&
$category
==
'account'
)
{
if
(
count
(
$themes
=
list_themes
())
>
1
)
{
$allthemes
=
list_themes
();
// list only active themes
foreach
(
$allthemes
as
$key
=>
$theme
)
{
if
(
$theme
->
status
)
{
$themes
[
$key
]
=
$theme
;
}
}
if
(
count
(
$themes
)
>
1
)
{
$rows
=
array
();
foreach
(
$themes
as
$key
=>
$value
)
{
$row
=
array
();
...
...
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