@@ -4,7 +4,7 @@ |
||
4 | 4 | interface CBHook { |
5 | 5 | |
6 | 6 | public function hookGetLogin(); |
7 | - public function hookPostLogin(); |
|
8 | - public function beforeBackendMiddleware($request); |
|
7 | + public function hookPostLogin(); |
|
8 | + public function beforeBackendMiddleware($request); |
|
9 | 9 | public function afterBackendMiddleware($request, $response); |
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -220,20 +220,20 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | if(!function_exists('extract_unit')) { |
223 | - /* |
|
223 | + /* |
|
224 | 224 | Credits: Bit Repository |
225 | 225 | URL: http://www.bitrepository.com/extract-content-between-two-delimiters-with-php.html |
226 | 226 | */ |
227 | - function extract_unit($string, $start, $end) |
|
228 | - { |
|
229 | - $pos = stripos($string, $start); |
|
230 | - $str = substr($string, $pos); |
|
231 | - $str_two = substr($str, strlen($start)); |
|
232 | - $second_pos = stripos($str_two, $end); |
|
233 | - $str_three = substr($str_two, 0, $second_pos); |
|
234 | - $unit = trim($str_three); // remove whitespaces |
|
235 | - return $unit; |
|
236 | - } |
|
227 | + function extract_unit($string, $start, $end) |
|
228 | + { |
|
229 | + $pos = stripos($string, $start); |
|
230 | + $str = substr($string, $pos); |
|
231 | + $str_two = substr($str, strlen($start)); |
|
232 | + $second_pos = stripos($str_two, $end); |
|
233 | + $str_three = substr($str_two, 0, $second_pos); |
|
234 | + $unit = trim($str_three); // remove whitespaces |
|
235 | + return $unit; |
|
236 | + } |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /* |
@@ -407,22 +407,22 @@ discard block |
||
407 | 407 | } |
408 | 408 | |
409 | 409 | if(!function_exists('rrmdir')) { |
410 | - /* |
|
410 | + /* |
|
411 | 411 | * http://stackoverflow.com/questions/3338123/how-do-i-recursively-delete-a-directory-and-its-entire-contents-files-sub-dir |
412 | 412 | */ |
413 | - function rrmdir($dir) { |
|
414 | - if (is_dir($dir)) { |
|
415 | - $objects = scandir($dir); |
|
416 | - foreach ($objects as $object) { |
|
417 | - if ($object != "." && $object != "..") { |
|
418 | - if (is_dir($dir."/".$object)) |
|
419 | - rrmdir($dir."/".$object); |
|
420 | - else |
|
421 | - unlink($dir."/".$object); |
|
422 | - } |
|
423 | - } |
|
424 | - rmdir($dir); |
|
425 | - } |
|
426 | - } |
|
413 | + function rrmdir($dir) { |
|
414 | + if (is_dir($dir)) { |
|
415 | + $objects = scandir($dir); |
|
416 | + foreach ($objects as $object) { |
|
417 | + if ($object != "." && $object != "..") { |
|
418 | + if (is_dir($dir."/".$object)) |
|
419 | + rrmdir($dir."/".$object); |
|
420 | + else |
|
421 | + unlink($dir."/".$object); |
|
422 | + } |
|
423 | + } |
|
424 | + rmdir($dir); |
|
425 | + } |
|
426 | + } |
|
427 | 427 | } |
428 | 428 |