@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | $params['index'] = $index; |
12 | 12 | $params['type'] = $type; |
13 | 13 | $params['id'] = $id; |
14 | - try{ |
|
14 | + try { |
|
15 | 15 | $result = $ES->delete($params); |
16 | 16 | } |
17 | - catch (Exception $e){ |
|
17 | + catch (Exception $e) { |
|
18 | 18 | /* |
19 | 19 | If you try to delete a document with an _id that does not exist, $ES->delete throws an Exception. |
20 | 20 | B/c of default behaviour of reformo/rslim, it bypasses all Exceptions and it returns Exception message. |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | } |
25 | 25 | $found = ($result['found'] === true) ? 1 : 0; |
26 | 26 | sleep(1); |
27 | - header("location:" . BASE_HREF . "/" . $index . "/" . $type . "?res=success&req=delete&f=".$found); |
|
27 | + header("location:" . BASE_HREF . "/" . $index . "/" . $type . "?res=success&req=delete&f=" . $found); |
|
28 | 28 | exit; |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -13,8 +13,7 @@ |
||
13 | 13 | $params['id'] = $id; |
14 | 14 | try{ |
15 | 15 | $result = $ES->delete($params); |
16 | - } |
|
17 | - catch (Exception $e){ |
|
16 | + } catch (Exception $e){ |
|
18 | 17 | /* |
19 | 18 | If you try to delete a document with an _id that does not exist, $ES->delete throws an Exception. |
20 | 19 | B/c of default behaviour of reformo/rslim, it bypasses all Exceptions and it returns Exception message. |