? .cvsignore
? nbproject
Index: logotool.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/logotool/logotool.install,v
retrieving revision 1.11.2.1
diff -u -p -r1.11.2.1 logotool.install
--- logotool.install	13 Feb 2010 22:40:04 -0000	1.11.2.1
+++ logotool.install	22 Mar 2010 16:23:18 -0000
@@ -112,12 +112,14 @@ function logotool_update_6200() {
         'description' => 'The locale for this logo file.',
         'not null' => TRUE,
         'length' => 12,
+        'default' => '',
       ),
       'preset' => array(
         'type' => 'varchar',
         'description' => 'The imagecache preset name (if the module is enabled).',
         'not null' => TRUE,
         'length' => 255,
+        'default' => '',
       ),
       'pages' => array(
         'type' => 'text',
@@ -181,4 +183,4 @@ function logotool_update_6200() {
   variable_del('logotool_logo'); // Old 4.7 variable, won't be present for I'm sure the majority of people...
   variable_del('logotool_pages'); // Now in db.
   return $ret;
-} // logotool_update_6200
\ No newline at end of file
+} // logotool_update_6200
Index: logotool.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/logotool/logotool.module,v
retrieving revision 1.27.2.6
diff -u -p -r1.27.2.6 logotool.module
--- logotool.module	14 Feb 2010 20:08:26 -0000	1.27.2.6
+++ logotool.module	22 Mar 2010 16:23:18 -0000
@@ -157,8 +157,8 @@ function _logotool_upload_form($form) {
   );
   $form['logos']['#theme'] = 'logotool_form_current';
   $form['logos']['#tree'] = TRUE;
-  $query = db_query("SELECT lt.*, f.* FROM {logotool} lt INNER JOIN {files} f ON f.fid = lt.fid ORDER BY lt.weight ASC");
-  $count = db_query("SELECT COUNT(fid) FROM {logotool}");
+  $query = db_query("SELECT * FROM {logotool} lt INNER JOIN {files} f ON f.fid = lt.fid ORDER BY lt.weight ASC");
+  $count = db_result(db_query("SELECT COUNT(fid) FROM {logotool}"));
   while ($fetch = db_fetch_object($query)) {
     $form['logos'][$fetch->fid]['remove'] = array(
       '#type' => 'checkbox',
@@ -377,7 +377,7 @@ function _logotool_menu_access() {
  * Check that any logos are available.
  */
 function _logotool_test_any() {
-  return db_result(db_query("SELECT TRUE from {logotool} lt INNER JOIN {files} f ON f.fid = lt.fid WHERE ignore_file <> TRUE"));
+  return db_result(db_query("SELECT 1 from {logotool} lt INNER JOIN {files} f ON f.fid = lt.fid WHERE ignore_file <> TRUE"));
 } // _logotool_test_any
 
 function _logotool_which_mode($mode = NULL) {
@@ -543,11 +543,11 @@ function logotool_preprocess_page(&$vari
   }
   switch (variable_get('logotool_display', 0)) {
     case LOGOTOOL_NORMAL:
-      $variables['logo'] = url(variable_get('logotool_path', 'misc/druplicon.png'));
+      $variables['logo'] = file_create_url(variable_get('logotool_path', 'misc/druplicon.png'));
       break;
     case LOGOTOOL_RANDOM:
     	if (!_logotool_test_any()) {
-        $variables['logo'] = url(variable_get('logotool_path', 'misc/druplicon.png'));
+        $variables['logo'] = file_create_url(variable_get('logotool_path', 'misc/druplicon.png'));
       }
       elseif ($time) {
         // Update timestamp and cache the random logo.
@@ -556,24 +556,24 @@ function logotool_preprocess_page(&$vari
         variable_set('logotool_cache_logo', $logo->filepath);
         variable_set('logotool_cache_preset', $logo->preset);
       }
-      $variables['logo'] = (module_exists('imagecache') && ($preset = variable_get('logotool_cache_preset', ''))) ? imagecache_create_url($preset, variable_get('logotool_cache_logo', '')) : url(variable_get('logotool_cache_logo', ''));
+      $variables['logo'] = (module_exists('imagecache') && ($preset = variable_get('logotool_cache_preset', ''))) ? imagecache_create_url($preset, variable_get('logotool_cache_logo', '')) : file_create_url(variable_get('logotool_cache_logo', ''));
       break;
     case LOGOTOOL_SPECIFY:
    	  $match = module_exists('locale') ? _logotool_fetch_match(TRUE) : _logotool_fetch_match();
       if ($match) {
-        $variables['logo'] = (module_exists('imagecache') && $match->preset) ? imagecache_create_url($match->preset, $match->filepath) : url($match->filepath);
+        $variables['logo'] = (module_exists('imagecache') && $match->preset) ? imagecache_create_url($match->preset, $match->filepath) : file_create_url($match->filepath);
       }
       else {
-        $variables['logo'] = url(variable_get('logotool_path', 'misc/druplicon.png'));
+        $variables['logo'] = file_create_url(variable_get('logotool_path', 'misc/druplicon.png'));
       }
       break;
     case LOGOTOOL_SPECIFY_RANDOM:
     	$match = module_exists('locale') ? _logotool_fetch_match(TRUE) : _logotool_fetch_match();
       if ($match) {
-        $variables['logo'] = (module_exists('imagecache') && $match->preset) ? imagecache_create_url($match->preset, $match->filepath) : url($match->filepath);
+        $variables['logo'] = (module_exists('imagecache') && $match->preset) ? imagecache_create_url($match->preset, $match->filepath) : file_create_url($match->filepath);
       }
       elseif (!_logotool_test_any()) {
-        $variables['logo'] = url(variable_get('logotool_path', 'misc/druplicon.png'));
+        $variables['logo'] = file_create_url(variable_get('logotool_path', 'misc/druplicon.png'));
       }
       else {
         if ($time) {
@@ -583,8 +583,8 @@ function logotool_preprocess_page(&$vari
           variable_set('logotool_cache_logo', $logo->filepath);
           variable_set('logotool_cache_preset', $logo->preset);
         }
-        $variables['logo'] = (module_exists('imagecache') && ($preset = variable_get('logotool_cache_preset', ''))) ? imagecache_create_url($preset, variable_get('logotool_cache_logo', '')) : url(variable_get('logotool_cache_logo', ''));
+        $variables['logo'] = (module_exists('imagecache') && ($preset = variable_get('logotool_cache_preset', ''))) ? imagecache_create_url($preset, variable_get('logotool_cache_logo', '')) : file_create_url(variable_get('logotool_cache_logo', ''));
       }
       break;
   }
-} // logotool_preprocess_page
\ No newline at end of file
+} // logotool_preprocess_page
