Commit Graph

26 Commits

Author SHA1 Message Date
Brion Vibber af1cbc6fe3 Fix ticket #2181: Can't save #000000 (black) in color fields on design page
It seems to have actually been saving correctly, but the update of the colors on the form success page wasn't working properly.
When a design object is pulled out of the database, the numeric fields are read in as strings, so black comes back as "0".
But, when we populate the new object and then stick it live, we've populated it with actual integers; with memcache on these might live for a while in the cache...

The fallback code in Design::toWebColor() did a check ($color == null) which would be false for the string "0", but counts as true for the *integer* 0.
Thus, the display code would initially interpret the correctly-saved black color as "use default".

Changing the check to === against null and "" empty string avoids the false positive on integers, and lets us see our nice black text immediately after save.
2011-01-04 13:09:44 -08:00
Evan Prodromou 97a7fb246c correctly use sslserver if it is set 2010-10-14 01:35:11 -04:00
Evan Prodromou aafd95dc0c Design::url() will use HTTPS if page is HTTPS 2010-10-14 01:18:19 -04:00
Evan Prodromou 3018683718 let backgrounds be put under SSL 2010-02-11 17:03:31 -05:00
Craig Andrews d31b1d774e use the new htmloutputter->style() function 2009-12-04 20:20:44 -05:00
Evan Prodromou df86aa7214 define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
Evan Prodromou 865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Evan Prodromou c8b8f07af1 change Laconica and Control Yourself to StatusNet in PHP files 2009-08-25 18:12:20 -04:00
Adrian Lang bbf10e5bdf common_config returns false if the config value is not set. Design::toWebColor checks with is_null. Hence the common_config value should be adjusted. 2009-08-10 16:35:09 -04:00
Adrian Lang 44b2b64247 Argh, first commit for ages and such a stupid error. Sorry. 2009-08-05 10:58:09 -05:00
Eric Helgeson 36e5d2b45f Added correct null check. Created noisey errors on fresh install.
$id is not defined, should be $this->id
2009-08-04 22:11:20 -05:00
Evan Prodromou ae81d36137 Site-wide design configuration
I added some code so that the site-wide design can be set, using the
configuration interface.

I also moved the configuration option from
$config['site']['design']['background'] to just
$config['design']['background'], but the old syntax will still work.
2009-07-30 16:24:04 -04:00
Sarven Capadisli 60b47d8797 Added background-attachment:fixed for userdesigns 2009-06-26 15:20:22 +00:00
Sarven Capadisli 00736bddd1 Fix for background image repetition for various page heights 2009-06-18 01:39:37 +00:00
Zach Copley 76cbeff33c Update background image settings to use bitflags 2009-06-17 02:35:51 -07:00
Zach Copley d1ae3176b6 Enable tiling of background imgs for Designs 2009-06-16 22:18:25 -07:00
Zach Copley 7b7f119428 Added background image tile flag to Design 2009-06-16 21:36:15 -07:00
Zach Copley bc1f877f6e Design settings now save and displays backgrounds 2009-06-16 19:17:37 -07:00
Zach Copley 37cafad2e0 Another minor tweak to showCSS() CSS output 2009-06-15 22:43:06 -07:00
Zach Copley f3199c1369 Some fixups to the CSS output of showCSS() 2009-06-15 22:39:53 -07:00
Zach Copley 4652f316cf Design class now uses WebColor class for outputting hex colors 2009-06-15 22:27:59 -07:00
Zach Copley ef99f83963 Output custom stylesheets on design sub-Actions 2009-06-15 22:13:35 -07:00
Evan Prodromou d7e3bab0b8 fix require_once in Design.php 2009-05-23 23:34:05 -04:00
Evan Prodromou 748c744a02 add a method to Design to show custom CSS 2009-05-22 23:13:09 -04:00
Evan Prodromou 21aad16b58 fix x bit on Design.php 2009-05-22 21:10:27 -04:00
Evan Prodromou c63622f05e add design classes 2009-05-22 21:10:00 -04:00