]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Only show "tile background" setting once an img has been uploaded
authorZach Copley <zach@controlyourself.ca>
Wed, 24 Jun 2009 07:43:48 +0000 (00:43 -0700)
committerZach Copley <zach@controlyourself.ca>
Wed, 24 Jun 2009 07:43:48 +0000 (00:43 -0700)
lib/designsettings.php

index 6aa6bb2f193cef4fe345e363f0b94e2e790ea24b..9650679ac5b620c51f356c1d57d07e3235abfbac 100644 (file)
@@ -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) {