0001775: Hard coded theme path fixed
[fa-stable.git] / includes / ui / ui_input.inc
index 0ffa0247a1cb688da9c5fa42a1f0c8516e314f1e..7929d07169ad8c2b7e06b197af6e9d5634204a9b 100644 (file)
@@ -624,8 +624,12 @@ function date_cells($label, $name, $title = null, $check=null, $inc_days=0,
                }
        }
        if ($use_date_picker)
+       {
+               $calc_image = (file_exists("$path_to_root/themes/".user_theme()."/images/cal.gif")) ? 
+                       "$path_to_root/themes/".user_theme()."/images/cal.gif" : "$path_to_root/themes/default/images/cal.gif";
                $post_label = "<a tabindex='-1' href=\"javascript:date_picker(document.getElementsByName('$name')[0]);\">"
-               . "     <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
+               . "     <img src='$calc_image' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
+       }       
        else
                $post_label = "";