0001775: Hard coded theme path fixed
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 12 Sep 2012 12:06:35 +0000 (14:06 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 12 Sep 2012 12:06:35 +0000 (14:06 +0200)
includes/ui/ui_input.inc
reporting/includes/reports_classes.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 = "";
 
index 92e5a9eb70b34f7292689a5c56e939f4d737bf93..a789132cedb83cc07de6e669052a2f817a130050 100644 (file)
@@ -212,8 +212,12 @@ class BoxReports
                                                $date = $_POST[$name];
                                        $st = "<input type='text' name='$name' value='$date'>";
                                        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";
                                                $st .= "<a href=\"javascript:date_picker(document.forms[0].$name);\">"
-                                               . "     <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";
+                                       }       
                                        return $st;
                                        break;