Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
amdrade committed Sep 27, 2014
1 parent 6ab40b2 commit 30a6590
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions core/controllers/admin/ETSettingsAdminController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,24 @@ public function action_index()
$form->setValue("editPostMode", "custom");
$form->setValue("editPostTimeLimit", $c);
}


// If the save button was clicked...
if ($form->validPostBack("save")) {
$forumLogo = false;
if ($form->getValue("forumHeader") == "image"){
if ($form->getValue("forumHeaderOld") != "image"){
$forumLogo = $this->uploadHeaderImage($form);
}else{
$forumLogo = !empty($_FILES["forumHeaderImage"]['tmp_name']) ? $this->uploadHeaderImage($form) : C("esoTalk.forumLogo");
}
}

// Construct an array of config options to write.
$config = array(
"esoTalk.forumTitle" => $form->getValue("forumTitle"),
"esoTalk.language" => $form->getValue("language"),
"esoTalk.forumLogo" => $form->getValue("forumHeader") == "image" ? $this->uploadHeaderImage($form) : false,
"esoTalk.forumLogo" => $forumLogo,
"esoTalk.defaultRoute" => $form->getValue("defaultRoute"),
"esoTalk.visibleToGuests" => $form->getValue("forumVisibleToGuests"),
"esoTalk.members.visibleToGuests" => $form->getValue("forumVisibleToGuests") and $form->getValue("memberListVisibleToGuests"),
Expand Down
2 changes: 1 addition & 1 deletion core/views/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div class='area' id='adminSettings'>

<?php echo $form->open(); ?>
<?php echo $form->open(); echo $form->input("forumHeaderOld", "hidden", array("value" => $form->values['forumHeader'])); ?>

<ul class='form'>

Expand Down

0 comments on commit 30a6590

Please sign in to comment.