afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-10-03 01:52 pm

[dw-nonfree] Create S2 function to parse image properties

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/5e8b455b9796]

http://bugs.dwscoalition.org/show_bug.cgi?id=1922

Refactor the image url generation (for relative paths) to be a function. Any
background image passed to generate_backround_css() is automatically
checked, and any others can be manually checked with:

var string image_url = generate_image_url( $*image_property );



Patch by [personal profile] wyntarvox.

Files modified:
  • bin/upgrading/s2layers/sundaymorning/layout.s2
--------------------------------------------------------------------------------
diff -r 8d97cc0a1f04 -r 5e8b455b9796 bin/upgrading/s2layers/sundaymorning/layout.s2
--- a/bin/upgrading/s2layers/sundaymorning/layout.s2	Fri Oct 02 08:16:48 2009 -0500
+++ b/bin/upgrading/s2layers/sundaymorning/layout.s2	Sat Oct 03 13:51:57 2009 +0000
@@ -173,12 +173,6 @@ set module_credit_section = "two";
 set module_credit_section = "two";
 set module_poweredby_section = "two";
 set module_poweredby_order = 20;
-
-function prop_init {
-    if ( $*image_background_page_url != "" and not $*image_background_page_url->starts_with("http")  ) {
-        $*image_background_page_url = "$*STATDIR/$*image_background_page_url";
-    }
-}
 
 function Page::print()
 {
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org