Commit 3f9c9318 authored by gdd's avatar gdd

Cleaning up whitespace

parent 803af709
......@@ -1011,11 +1011,11 @@ function install_settings_form_submit($form, &$form_state) {
if (!file_prepare_directory($config_path, FILE_CREATE_DIRECTORY)) {
// How best to handle errors here?
};
// Write out a .htaccess file that will protect the config directory from
// prying eyes.
file_save_htaccess($config_path, TRUE);
// Indicate that the settings file has been verified, and check the database
// for the last completed task, now that we have a valid connection. This
// last step is important since we want to trigger an error if the new
......
......@@ -146,7 +146,7 @@ function image_style_form_add_submit($form, &$form_state) {
$style = $form_state['image_style'];
// Check if this field has any configuration options.
$effect = image_effect_definition_load($form_state['values']['new']);
// Load the configuration form for this option.
if (isset($effect['form callback'])) {
$path = 'admin/config/media/image-styles/edit/' . $form_state['image_style']['name'] . '/add/' . $form_state['values']['new'];
......
......@@ -477,7 +477,7 @@ function image_styles() {
*/
function image_style_load($name) {
$style = config('image.styles.' . $name)->get();
// @todo Requires a more reliable + generic method to check for whether the
// configuration object exists.
if (!isset($style['name'])) {
......@@ -987,7 +987,7 @@ function image_effect_load($ieid, $style_name) {
function image_effect_save($style_name, $effect) {
$config = config('image.styles.' . $style_name);
if (empty($effect['ieid'])) {
if (!isset($effect['ieid']) || empty($effect['ieid'])) {
// We need to generate the ieid and save the new effect.
// The machine name is all the elements of the data array concatenated
// together, delimited by underscores.
......
......@@ -414,7 +414,7 @@ class ImageAdminStylesUnitTest extends ImageFieldTestCase {
// Revisit each form to make sure the effect was saved.
drupal_static_reset('image_styles');
$style = image_style_load($style_name);
foreach ($style['effects'] as $ieid => $effect) {
$this->drupalGet($style_path . '/effects/' . $ieid);
foreach ($effect_edits[$effect['name']] as $field => $value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment