Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
225
Merge Requests
225
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
ca921c57
Commit
ca921c57
authored
Mar 15, 2012
by
jhodgdon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert of
#1479652
commit
b287d6ee
- there were files missing from the commit
parent
b287d6ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
7 deletions
+55
-7
core/modules/image/config/image.styles.large.xml
core/modules/image/config/image.styles.large.xml
+16
-0
core/modules/image/config/image.styles.medium.xml
core/modules/image/config/image.styles.medium.xml
+16
-0
core/modules/image/config/image.styles.thumbnail.xml
core/modules/image/config/image.styles.thumbnail.xml
+16
-0
core/modules/image/image.module
core/modules/image/image.module
+7
-7
No files found.
core/modules/image/config/image.styles.large.xml
0 → 100644
View file @
ca921c57
<?xml version="1.0"?>
<config>
<name>
large
</name>
<effects>
<image_scale_480_480_1>
<name>
image_scale
</name>
<ieid>
image_scale_480_480_1
</ieid>
<data>
<width>
480
</width>
<height>
480
</height>
<upscale>
1
</upscale>
</data>
<weight>
0
</weight>
</image_scale_480_480_1>
</effects>
</config>
core/modules/image/config/image.styles.medium.xml
0 → 100644
View file @
ca921c57
<?xml version="1.0"?>
<config>
<name>
medium
</name>
<effects>
<image_scale_220_220_1>
<name>
image_scale
</name>
<ieid>
image_scale_220_220_1
</ieid>
<data>
<width>
220
</width>
<height>
220
</height>
<upscale>
1
</upscale>
</data>
<weight>
0
</weight>
</image_scale_220_220_1>
</effects>
</config>
core/modules/image/config/image.styles.thumbnail.xml
0 → 100644
View file @
ca921c57
<?xml version="1.0"?>
<config>
<name>
thumbnail
</name>
<effects>
<image_scale_100_100_1>
<name>
image_scale
</name>
<ieid>
image_scale_100_100_1
</ieid>
<data>
<width>
100
</width>
<height>
100
</height>
<upscale>
1
</upscale>
</data>
<weight>
0
</weight>
</image_scale_100_100_1>
</effects>
</config>
core/modules/image/image.module
View file @
ca921c57
...
...
@@ -449,10 +449,10 @@ function image_styles() {
$styles
=
array
();
// Select the styles we have configured.
$configured_styles
=
config_get_verified_storage_names_with_prefix
(
'image.style'
);
$configured_styles
=
config_get_verified_storage_names_with_prefix
(
'image.style
s
'
);
foreach
(
$configured_styles
as
$config_name
)
{
// @todo Allow to retrieve the name without prefix only.
$style
=
image_style_load
(
str_replace
(
'image.style.'
,
''
,
$config_name
));
$style
=
image_style_load
(
str_replace
(
'image.style
s
.'
,
''
,
$config_name
));
$styles
[
$style
[
'name'
]]
=
$style
;
}
drupal_alter
(
'image_styles'
,
$styles
);
...
...
@@ -476,7 +476,7 @@ function image_styles() {
* @see image_effect_load()
*/
function
image_style_load
(
$name
)
{
$style
=
config
(
'image.style.'
.
$name
)
->
get
();
$style
=
config
(
'image.style
s
.'
.
$name
)
->
get
();
// @todo Requires a more reliable + generic method to check for whether the
// configuration object exists.
...
...
@@ -504,7 +504,7 @@ function image_style_load($name) {
* An image style array.
*/
function
image_style_save
(
$style
)
{
$config
=
config
(
'image.style.'
.
$style
[
'name'
]);
$config
=
config
(
'image.style
s
.'
.
$style
[
'name'
]);
$config
->
set
(
'name'
,
$style
[
'name'
]);
if
(
isset
(
$style
[
'effects'
]))
{
$config
->
set
(
'effects'
,
$style
[
'effects'
]);
...
...
@@ -540,7 +540,7 @@ function image_style_save($style) {
function
image_style_delete
(
$style
,
$replacement_style_name
=
''
)
{
image_style_flush
(
$style
);
$config
=
config
(
'image.style.'
.
$style
[
'name'
]);
$config
=
config
(
'image.style
s
.'
.
$style
[
'name'
]);
$config
->
delete
();
// Let other modules update as necessary on save.
...
...
@@ -985,7 +985,7 @@ function image_effect_load($ieid, $style_name) {
* An image effect array. In the case of a new effect, 'ieid' will be set.
*/
function
image_effect_save
(
$style_name
,
$effect
)
{
$config
=
config
(
'image.style.'
.
$style_name
);
$config
=
config
(
'image.style
s
.'
.
$style_name
);
if
(
!
isset
(
$effect
[
'ieid'
])
||
empty
(
$effect
[
'ieid'
]))
{
// We need to generate the ieid and save the new effect.
...
...
@@ -1016,7 +1016,7 @@ function image_effect_save($style_name, $effect) {
* An image effect array.
*/
function
image_effect_delete
(
$style_name
,
$effect
)
{
$config
=
config
(
'image.style.'
.
$style_name
);
$config
=
config
(
'image.style
s
.'
.
$style_name
);
$config
->
clear
(
'effects.'
.
$effect
[
'ieid'
]);
$config
->
save
();
$style
=
image_style_load
(
$style_name
);
...
...
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