Skip to content

Commit

Permalink
paths are off target
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Putman committed Aug 14, 2009
1 parent 019f945 commit 1ad5ba3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/AMP/Form/Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ function _addImageDisplay( $fieldname ){
function &_addImageSelect( $name, $field_def ) {
$valuefield_name = $name;
$display_name = $this->_addImageDisplay( $name );
$picker = &$this->form->addElement( 'select', $valuefield_name, $field_def['label'], AMPSystem_Lookup::instance( 'images') );
$picker = &$this->form->addElement( 'select', $valuefield_name, $field_def['label'], AMP_lookup( 'images') );

$srcpath = AMP_CONTENT_URL_IMAGES . AMP_IMAGE_CLASS_OPTIMIZED . DIRECTORY_SEPARATOR;
$linkpath = AMP_SITE_URL . AMP_CONTENT_URL_IMAGES . AMP_IMAGE_CLASS_ORIGINAL. DIRECTORY_SEPARATOR;
Expand Down
3 changes: 2 additions & 1 deletion include/AMP/System/File/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ function delete( ){
}

$image_classes = AMP_lookup( 'image_classes');
foreach( $image_classes as $class ) {
foreach( $image_classes as $class => $class_desc ) {
$path = AMP_image_path( $this->getName( ), $class );
# delete of current copy handled by parent class below
if ( $path == $this->getPath( )) continue;
if( file_exists( $path )) unlink( $path );
}
Expand Down

0 comments on commit 1ad5ba3

Please sign in to comment.