Changeset 313


Ignore:
Timestamp:
Feb 1, 2008 1:38:06 AM (16 years ago)
Author:
quinn
Message:

Fixed bug that would cause a logging error.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r293 r313  
    847847        }
    848848
    849         // For each existing POST value, we create a hidden input to carry it through a form.
     849        // For each existing request value, we create a hidden input to carry it through a form.
    850850        if ($do_carry_queries) {
    851851            // Join the global _carry_queries and local one_time_carry_queries.
  • trunk/lib/ImageThumb.inc.php

    r278 r313  
    274274            $return_val = 0;
    275275            foreach ($files as $file_name) {
    276                 $return_val += $this->processFile($file_name, $runtime_specs);
    277             }
     276                $return_val += (false === $this->processFile($file_name, $runtime_specs) ? 1 : 0);
     277            }
     278            $this->_raiseMsg(sprintf(_("Resized %s images."), sizeof($files)), MSG_SUCCESS, __FILE__, __LINE__);
    278279            $this->_raiseMsg(sprintf(_("Resized %s images."), sizeof($files)), MSG_SUCCESS, __FILE__, __LINE__);
    279280            return 0 === $return_val;
     
    567568            $app->logMsg(sprintf('Source image type %s not supported.', $source_image_type), LOG_WARNING, __FILE__, __LINE__);
    568569            return 1;
    569             break;
    570570        }
    571571        if (!$source_image_resource) {
     
    579579        // Resample!
    580580        if (!imagecopyresampled($dest_image_resource, $source_image_resource, 0, 0, 0, 0, $dest_image_width, $dest_image_height, $source_image_width, $source_image_height)) {
    581             $app->logMsg(sprintf('Error resampling image %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
    582581            // Always cleanup images from memory.
    583582            imagedestroy($source_image_resource);
    584583            imagedestroy($dest_image_resource);
     584            $app->logMsg(sprintf('Error resampling image %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
    585585            return 1;
    586586        }
     
    625625            // Make the thumbnail writable so the user can delete it over ftp without being 'apache'.
    626626            if (!chmod($dest_file, $this->getParam('dest_file_perms'))) {
    627                 $app->logMsg(sprintf('chmod failed on file: %s', $dest_file), LOG_ERR, __FILE__, __LINE__);
     627                $app->logMsg(sprintf('chmod failed on file: %s', $dest_file), LOG_NOTICE, __FILE__, __LINE__);
    628628            }
    629629            $app->logMsg(sprintf('Successfully resized image: %s', $dest_file), LOG_DEBUG, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.