From f7456df2349c41a124edcdcb60ed2ad2919bd173 Mon Sep 17 00:00:00 2001
From: Ben Coleman <b.coleman@accelerateddesign.com>
Date: Tue, 6 Sep 2011 15:03:33 -0400
Subject: [PATCH] Check theme first for noimage

---
 uc_option_image.module |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/uc_option_image.module b/uc_option_image.module
index 6f31e82..6fd9b94 100644
--- a/uc_option_image.module
+++ b/uc_option_image.module
@@ -641,8 +641,13 @@ function theme_uc_option_image_preloaded($aid, $node, $size = '_original') {
  * Theme the no image placeholder.
  */
 function theme_uc_option_image_no_image($node, $size = '_original') {
+  global $theme_info;
+
   $attributes = array('class' => 'uc-option-image');
-  $filename = path_to_theme() . '/images/noimage.png';
+  $filename = dirname($theme_info->filename) . '/images/noimage.png';
+  if (! file_exists($filename)) {
+    $filename = drupal_get_path('module', 'uc_option_image') . '/no_image.png';
+  }
 
   if ($size != '_original') {
     return theme('imagecache', $size, $filename, t('No Image'), NULL, $attributes);
@@ -656,7 +661,7 @@ function theme_uc_option_image_no_image($node, $size = '_original') {
  * Theme the no image placeholder. Must be a valid imagepath.
  */
 function theme_uc_option_image_no_image_path($node, $size = '_original') {
-  $filename = drupal_get_path('module', 'uc_option_image') . '/noimage.png';
+  $filename = drupal_get_path('module', 'uc_option_image') . '/no_image.png';
 
   if ($size != '_original') {
     return imagecache_create_url($size, $filename);
-- 
1.7.6.msysgit.0

