Skip to content

Commit

Permalink
Merge branch 'development' into group
Browse files Browse the repository at this point in the history
  • Loading branch information
jmathai committed Sep 24, 2013
2 parents f4e89f2 + a2fba52 commit 4ae7fe6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libraries/external/epi/EpiRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class EpiRoute
const httpGet = 'GET';
const httpOptions = 'OPTIONS';
const httpPost= 'POST';
const httpHead= 'HEAD';

/**
* get('/', 'function');
Expand All @@ -35,6 +36,7 @@ class EpiRoute
public function get($route, $callback, $isApi = false)
{
$this->addRoute($route, $callback, self::httpGet, $isApi);
$this->addRoute($route, array($this, 'void'), self::httpHead, $isApi);
}

/**
Expand Down Expand Up @@ -99,6 +101,14 @@ public function load($file)
}
}

/**
* EpiRoute::void
* Used for HEAD requests as the route handler
* @name void
* @author Jaisen Mathai <jaisen@jmathai.com>
*/
public function void() { }

/**
* EpiRoute::run($_GET['__route__'], $_['routes']);
* @name run
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/models/Photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,12 @@ public function replace($id, $localFile, $name, $attributes = array())
$this->logger->info('Could not purge photo versions from the database');
return false;
}

// delete all photos from the original photo object (includes paths to existing photos)
// check if skipDeleteOriginal is passed in and remove from $photo and $attributes to preserve
if($skipOriginal === '1')
unset($photo['pathOriginal']);

$delFilesResp = $this->fs->deletePhoto($photo);
if(!$delFilesResp)
{
Expand Down

0 comments on commit 4ae7fe6

Please sign in to comment.