Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #126 from davidyell/develop
Browse files Browse the repository at this point in the history
Implements webme's fixes
  • Loading branch information
davidyell committed Jul 27, 2015
2 parents 517ae27 + 301d558 commit 8604cac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Lib/ProfferPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use Cake\ORM\Entity;
use Cake\ORM\Table;
use Cake\Utility\String;
use Cake\Utility\Text;

class ProfferPath implements ProfferPathInterface
{
Expand Down Expand Up @@ -199,7 +199,7 @@ public function generateSeed($seed = null)
return $seed;
}

return String::uuid();
return Text::uuid();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/ProfferBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function beforeSave(Event $event, Entity $entity, ArrayObject $options, P
$path->createPathFolder();

if ($this->moveUploadedFile($entity->get($field)['tmp_name'], $path->fullPath())) {
$entity->set($field, $entity->get($field)['name']);
$entity->set($field, $path->getFilename());
$entity->set($settings['dir'], $path->getSeed());

// Only generate thumbnails for image uploads
Expand Down Expand Up @@ -119,7 +119,7 @@ public function afterDelete(Event $event, Entity $entity, ArrayObject $options,
$path->deleteFiles($path->getFolder(), true);
}

unset($path);
$path = null;
}

return true;
Expand Down

0 comments on commit 8604cac

Please # to comment.