]> git.mjollnir.org Git - s9y.git/commitdiff
TB
authorgarvinhicking <garvinhicking>
Thu, 18 Jan 2007 16:07:34 +0000 (16:07 +0000)
committergarvinhicking <garvinhicking>
Thu, 18 Jan 2007 16:07:34 +0000 (16:07 +0000)
include/functions_installer.inc.php
include/functions_trackbacks.inc.php

index 69d7ce6a1da1a97ddf38b834bebdb4184f7c5593..ecdbb2074549f4b10ecbf5340e06d492094f760f 100644 (file)
@@ -237,11 +237,11 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
             $path[] = '/usr/local/bin';
 
             foreach ($path as $dir) {
-                if (!empty($dir) && (function_exists('is_executable') && @is_executable($dir . '/convert')) || @is_file($dir . '/convert')) {
+                if (!empty($dir) && (function_exists('is_executable') && is_readable($dir) && @is_executable($dir . '/convert')) || @is_file($dir . '/convert')) {
                     return $dir . '/convert';
                 }
 
-                if (!empty($dir) && (function_exists('is_executable') && @is_executable($dir . '/convert.exe')) || @is_file($dir . '/convert.exe')) {
+                if (!empty($dir) && (function_exists('is_executable') && is_readable($dir . '/convert') && @is_executable($dir . '/convert.exe')) || @is_file($dir . '/convert.exe')) {
                     return $dir . '/convert.exe';
                 }
             }
index cbd491aec70ef789987c66949d23e63adab90b21..a553bfa0b5c41b9cb20dedb40a7d9c45d8a3768d 100644 (file)
@@ -427,12 +427,12 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
         $old_references = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}references WHERE type = '' AND entry_id = " . (int)$id, false, 'assoc');
     } else {
         // A dry-run was called previously and restorable references are found. Restore them now.
-        serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE type = '' AND entry_id = " . (int)$entry['id']);
+        serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE type = '' AND entry_id = " . (int)$id);
 
         if (is_array($old_references) && count($old_references) > 0) {
             foreach($old_references AS $idx => $old_reference) {
                 $q = serendipity_db_insert('references', $old_reference, 'show');
-                echo serendipity_db_query($q);
+                serendipity_db_query($q);
             }
         }
     }