# HG changeset patch # User Dan # Date 1195922500 18000 # Node ID e47e4be549adbce4e01d13300824c833bf5f69ee # Parent 3893b99cd4439883f8cf435a7ea2b7f41a129f36# Parent f6ca7cead82cf2c217af2d288bd93fe659469233 Merging in some breadcrumb crap from Nighthawk with the search engine updates from Scribus diff -r f6ca7cead82c -r e47e4be549ad plugins/gallery/browser.php --- a/plugins/gallery/browser.php Wed Nov 21 15:22:13 2007 -0500 +++ b/plugins/gallery/browser.php Sat Nov 24 11:41:40 2007 -0500 @@ -361,16 +361,16 @@ } // From here, this breadcrumb stuff is a piece of... sourdough French bread :-) *smacks lips* - echo '
'; + echo ''; // "Edit all" link diff -r f6ca7cead82c -r e47e4be549ad plugins/gallery/upload.php --- a/plugins/gallery/upload.php Wed Nov 21 15:22:13 2007 -0500 +++ b/plugins/gallery/upload.php Sat Nov 24 11:41:40 2007 -0500 @@ -139,12 +139,8 @@ $errors[] = "Could not delete $thumb_filename"; break 2; } - $magick = getConfig('imagemagick_path'); - $command = "$magick '{$filename}' -resize ".'"'."80x80>".'"'." -quality 85 $thumb_filename"; - @system($command, $stat); - - if ( !file_exists($thumb_filename) ) + if ( !scale_image($filename, $thumb_filename, 80, 80) ) { $errors[] = 'Couldn\'t scale image '.$i.': ImageMagick failed us'; break 2; @@ -157,16 +153,13 @@ $errors[] = "Could not delete $preview_filename"; break 2; } - $magick = getConfig('imagemagick_path'); - $command = "$magick '{$filename}' -resize ".'"'."640x640>".'"'." -quality 85 $preview_filename"; - @system($command, $stat); - - if ( !file_exists($preview_filename) ) + if ( !scale_image($filename, $preview_filename, 640, 480) ) { $errors[] = 'Couldn\'t scale image '.$i.': ImageMagick failed us'; break 2; } + $to_update['img_time_mod'] = strval(time()); } } @@ -737,9 +730,6 @@ // Time for some unzipping fun. // - // for debugging only - system('rm -fr ' . ENANO_ROOT . '/cache/temp'); - error_reporting(E_ALL); mkdir(ENANO_ROOT . '/cache/temp') or $errors[] = 'Could not create temporary directory for extraction.'; @@ -837,14 +827,19 @@ $idlist[] = $db->insert_id(); + // + // Create scaled images + // + // Create thumbnail image $thumb_filename = ENANO_ROOT . '/cache/' . $stored_name . '-thumb.jpg'; - $magick = getConfig('imagemagick_path'); - $command = "$magick '{$store}' -resize ".'"'."80x80>".'"'." -quality 85 $thumb_filename"; + if ( !unlink($thumb_filename) ) + { + $errors[] = "Could not delete $thumb_filename"; + break 2; + } - @system($command, $stat); - - if ( !file_exists($thumb_filename) ) + if ( !scale_image($store, $thumb_filename, 80, 80) ) { $errors[] = 'Couldn\'t scale image '.$i.': ImageMagick failed us'; break 2; @@ -852,12 +847,13 @@ // Create preview image $preview_filename = ENANO_ROOT . '/cache/' . $stored_name . '-preview.jpg'; - $magick = getConfig('imagemagick_path'); - $command = "$magick '{$store}' -resize ".'"'."640x640>".'"'." -quality 85 $preview_filename"; + if ( !unlink($preview_filename) ) + { + $errors[] = "Could not delete $preview_filename"; + break 2; + } - @system($command, $stat); - - if ( !file_exists($preview_filename) ) + if ( !scale_image($store, $preview_filename, 640, 640) ) { $errors[] = 'Couldn\'t scale image '.$i.': ImageMagick failed us'; break 2; diff -r f6ca7cead82c -r e47e4be549ad plugins/gallery/viewimage.php --- a/plugins/gallery/viewimage.php Wed Nov 21 15:22:13 2007 -0500 +++ b/plugins/gallery/viewimage.php Sat Nov 24 11:41:40 2007 -0500 @@ -189,9 +189,9 @@ $breadcrumbs[] = htmlspecialchars($row['img_title']); // From here, this breadcrumb stuff is a piece of... sourdough French bread :-) *smacks lips* - echo '
'; + echo ''; echo '
';