TB
This commit is contained in:
@ -237,11 +237,11 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
|
|||||||
$path[] = '/usr/local/bin';
|
$path[] = '/usr/local/bin';
|
||||||
|
|
||||||
foreach ($path as $dir) {
|
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';
|
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';
|
return $dir . '/convert.exe';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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');
|
$old_references = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}references WHERE type = '' AND entry_id = " . (int)$id, false, 'assoc');
|
||||||
} else {
|
} else {
|
||||||
// A dry-run was called previously and restorable references are found. Restore them now.
|
// 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) {
|
if (is_array($old_references) && count($old_references) > 0) {
|
||||||
foreach($old_references AS $idx => $old_reference) {
|
foreach($old_references AS $idx => $old_reference) {
|
||||||
$q = serendipity_db_insert('references', $old_reference, 'show');
|
$q = serendipity_db_insert('references', $old_reference, 'show');
|
||||||
echo serendipity_db_query($q);
|
serendipity_db_query($q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user