From: garvinhicking Date: Thu, 18 Jan 2007 16:07:34 +0000 (+0000) Subject: TB X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5a4b78bf3db7cf05cba98d1e70ff20234f9633c2;p=s9y.git TB --- diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index 69d7ce6..ecdbb20 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -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'; } } diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php index cbd491a..a553bfa 100644 --- a/include/functions_trackbacks.inc.php +++ b/include/functions_trackbacks.inc.php @@ -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); } } }