Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
Delete all method implemented in HothReporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Hediard authored and aliaspooryorik committed May 6, 2011
1 parent 24baef2 commit d5309f2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions HothReporter.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ output="false"
public array function delete (required string exception)
{

if (arguments.exception=='all')
local.response = [];
if (arguments.exception == 'all')
{
// hahah - not yet.
} else {
local.exceptionPath = variables.paths.Exceptions & '/' & arguments.exception;
lock name=VARIABLES._NAME timeout=variables.Config.getTimeToLock() type="exclusive" {
directoryDelete(variables.paths.Exceptions, true);
directoryDelete(variables.paths.Incidents, true);
directoryCreate(variables.paths.Exceptions);
directoryCreate(variables.paths.Incidents);
}
} else { local.exceptionPath = variables.paths.Exceptions & '/' & arguments.exception;
local.incidentPath = variables.paths.Incidents & '/' & arguments.exception;

local.response = [];
Expand Down

0 comments on commit d5309f2

Please sign in to comment.