summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/groupdesignsettings.php2
-rw-r--r--actions/userdesignsettings.php2
-rw-r--r--lib/designsettings.php16
-rw-r--r--lib/imagefile.php3
4 files changed, 12 insertions, 11 deletions
diff --git a/actions/groupdesignsettings.php b/actions/groupdesignsettings.php
index 7270bc8f7..79c192ac4 100644
--- a/actions/groupdesignsettings.php
+++ b/actions/groupdesignsettings.php
@@ -238,7 +238,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
$design->sidebarcolor = $sbcolor->intValue();
$design->textcolor = $tcolor->intValue();
$design->linkcolor = $lcolor->intValue();
- $design->backgroundimage = $filepath;
$design->setDisposition($on, $off, $tile);
@@ -263,7 +262,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
$design->sidebarcolor = $sbcolor->intValue();
$design->textcolor = $tcolor->intValue();
$design->linkcolor = $lcolor->intValue();
- $design->backgroundimage = $filepath;
$design->setDisposition($on, $off, $tile);
diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php
index d6088aa9d..6e745e96f 100644
--- a/actions/userdesignsettings.php
+++ b/actions/userdesignsettings.php
@@ -149,7 +149,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
$design->sidebarcolor = $sbcolor->intValue();
$design->textcolor = $tcolor->intValue();
$design->linkcolor = $lcolor->intValue();
- $design->backgroundimage = $filepath;
$design->setDisposition($on, $off, $tile);
@@ -174,7 +173,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
$design->sidebarcolor = $sbcolor->intValue();
$design->textcolor = $tcolor->intValue();
$design->linkcolor = $lcolor->intValue();
- $design->backgroundimage = $filepath;
$design->setDisposition($on, $off, $tile);
diff --git a/lib/designsettings.php b/lib/designsettings.php
index 6aa6bb2f1..9650679ac 100644
--- a/lib/designsettings.php
+++ b/lib/designsettings.php
@@ -132,13 +132,13 @@ class DesignSettingsAction extends AccountSettingsAction
_('Off'));
$this->element('p', 'form_guide', _('Turn background image on or off.'));
$this->elementEnd('li');
- }
- $this->elementStart('li');
- $this->checkbox('design_background-image_repeat',
- _('Tile background image'),
- ($design->disposition & BACKGROUND_TILE) ? true : false );
- $this->elementEnd('li');
+ $this->elementStart('li');
+ $this->checkbox('design_background-image_repeat',
+ _('Tile background image'),
+ ($design->disposition & BACKGROUND_TILE) ? true : false );
+ $this->elementEnd('li');
+ }
$this->elementEnd('ul');
$this->elementEnd('fieldset');
@@ -388,7 +388,11 @@ class DesignSettingsAction extends AccountSettingsAction
$original = clone($design);
$design->backgroundimage = $filename;
+
+ // default to on, no tile
+
$design->setDisposition(true, false, false);
+
$result = $design->update($original);
if ($result === false) {
diff --git a/lib/imagefile.php b/lib/imagefile.php
index 0c93b257e..52e4c4b22 100644
--- a/lib/imagefile.php
+++ b/lib/imagefile.php
@@ -72,7 +72,8 @@ class ImageFile
break;
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
- throw new Exception(sprintf(_('That file is too big. The maximum file size is %d.'), $this->maxFileSize()));
+ throw new Exception(sprintf(_('That file is too big. The maximum file size is %d.'),
+ ImageFile::maxFileSize()));
return;
case UPLOAD_ERR_PARTIAL:
@unlink($_FILES[$param]['tmp_name']);