[Bins] patch for bins when there is no background image

Corporate Gadfly corporate_gadfly at hotmail.com
Tue May 18 14:30:52 BST 2004


Hi,

My sincere congratulations on a very useful piece of software.

Please find enclosed a patch for bins when there is no background image
specified anywhere. Otherwise, bins continues to write background attributes
in <body> tags which are broken and end up showing in the web server's 
error_log.
With this patch, if the backgroundImage is not specified the background 
attributes
would be skipped.

===================================================================
RCS file: RCS/bins,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bins        2004/03/06 23:51:49     1.3
+++ bins        2004/05/05 17:29:53     1.4
@@ -1204,7 +1204,8 @@
     #beVerboseN("Generate tree Table html:\n $tableHTML ", 3);
     $subsHash{STATIC_PATH} = "static.".$configHash->{templateStyle};
     $subsHash{BG_IMAGE} =
-      $subsHash{STATIC_PATH}."/".$configHash->{backgroundImage};
+      $subsHash{STATIC_PATH}."/".$configHash->{backgroundImage}
+        unless $configHash->{backgroundImage} eq '';
     $subsHash{CUSTOM_CSS} = $configHash->{customStyleSheet};
     $subsHash{HOME_LINK} = $configHash->{homeURL};
     $subsHash{ALBUM_THUMB} = $configHash->{treePreview};
@@ -1906,7 +1907,8 @@
     $finalsubs{STATIC_PATH} =
       getRootDir($album)."static.".$configHash->{templateStyle};
     $finalsubs{BG_IMAGE} =
-      $finalsubs{STATIC_PATH}."/".$configHash->{backgroundImage};
+      $finalsubs{STATIC_PATH}."/".$configHash->{backgroundImage}
+        unless $configHash->{backgroundImage} eq '';
     $finalsubs{CUSTOM_CSS} = $configHash->{customStyleSheet};
     $finalsubs{ROOT_PATH} = getRootDir($album);

@@ -2109,7 +2111,8 @@
     $templateParameters{STATIC_PATH} =
       getRootDir($album)."static.".$configHash->{templateStyle};
     $templateParameters{BG_IMAGE} =
-      $templateParameters{STATIC_PATH}."/".$configHash->{backgroundImage};
+      $templateParameters{STATIC_PATH}."/".$configHash->{backgroundImage}
+        unless $configHash->{backgroundImage} eq '';
     $templateParameters{CUSTOM_CSS} = $configHash->{customStyleSheet};

     $templateParameters{HOME_LINK} = $configHash->{homeURL};
@@ -2405,7 +2408,8 @@
   $subsHash{STATIC_PATH} =
     getRootDir($album)."static.".$configHash->{templateStyle};
   $subsHash{BG_IMAGE} =
-    $subsHash{STATIC_PATH}."/".$configHash->{backgroundImage};
+    $subsHash{STATIC_PATH}."/".$configHash->{backgroundImage}
+        unless $configHash->{backgroundImage} eq '';
   $subsHash{CUSTOM_CSS} = $configHash->{customStyleSheet};
   $subsHash{HOME_LINK} = $configHash->{homeURL};
   $subsHash{FEEDBACK_LINK} = $configHash->{feedbackMail};
@@ -3125,7 +3129,8 @@
   $subs_hash{HOME_LINK} = $configHash->{homeURL};
   $subs_hash{FEEDBACK_LINK} = $configHash->{feedbackMail};
   $subs_hash{BG_IMAGE} =
-    $subs_hash{STATIC_PATH}."/".$configHash->{backgroundImage};
+    $subs_hash{STATIC_PATH}."/".$configHash->{backgroundImage}
+        unless $configHash->{backgroundImage} eq '';
   $subs_hash{CUSTOM_CSS} = $configHash->{customStyleSheet};
   $subs_hash{PATH_IMG_NUM} = $configHash->{pathImgNum};
   $subs_hash{PATH_SHOW_ICON} = $configHash->{pathShowIcon};

Thanks

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



More information about the Bins mailing list