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
402e9466
Commit
402e9466
authored
Oct 15, 2014
by
Son Nguyen
Committed by
Gerrit Code Review
Oct 15, 2014
Browse files
Merge "Allowing for correctly saving the gallery width setting (Bug #1366622)" into 1.9_STABLE
parents
c2e24f39
6011b537
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/gallery/lib.php
View file @
402e9466
...
...
@@ -51,19 +51,17 @@ class PluginBlocktypeGallery extends PluginBlocktype {
$configdata
[
'viewid'
]
=
$instance
->
get
(
'view'
);
$style
=
isset
(
$configdata
[
'style'
])
?
intval
(
$configdata
[
'style'
])
:
2
;
$copyright
=
null
;
// Needed to set Panoramio copyright later...
$width
=
!
empty
(
$configdata
[
'width'
])
?
$configdata
[
'width'
]
:
75
;
switch
(
$style
)
{
case
0
:
// thumbnails
$template
=
'thumbnails'
;
$width
=
isset
(
$configdata
[
'width'
])
?
$configdata
[
'width'
]
:
75
;
break
;
case
1
:
// slideshow
$template
=
'slideshow'
;
$width
=
isset
(
$configdata
[
'width'
])
?
$configdata
[
'width'
]
:
400
;
$width
=
!
empty
(
$configdata
[
'width'
])
?
$configdata
[
'width'
]
:
400
;
break
;
case
2
:
// square thumbnails
$template
=
'squarethumbs'
;
$width
=
isset
(
$configdata
[
'width'
])
?
$configdata
[
'width'
]
:
75
;
break
;
}
...
...
@@ -615,6 +613,15 @@ class PluginBlocktypeGallery extends PluginBlocktype {
}
unset
(
$values
[
'folder'
]);
unset
(
$values
[
'images'
]);
switch
(
$values
[
'style'
])
{
case
0
:
// thumbnails
case
2
:
// square thumbnails
$values
[
'width'
]
=
!
empty
(
$values
[
'width'
])
?
$values
[
'width'
]
:
75
;
break
;
case
1
:
// slideshow
$values
[
'width'
]
=
!
empty
(
$values
[
'width'
])
?
$values
[
'width'
]
:
400
;
break
;
}
return
$values
;
}
...
...
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