@@ -45,8 +45,9 @@ |
||
| 45 | 45 | foreach ($files as $file) {
|
| 46 | 46 | $file = str_replace('\\', '/', $file);
|
| 47 | 47 | // Ignore "." and ".." folders |
| 48 | - if (in_array(substr($file, strrpos($file, '/') + 1), array('.', '..')))
|
|
| 49 | - continue; |
|
| 48 | + if (in_array(substr($file, strrpos($file, '/') + 1), array('.', '..'))) {
|
|
| 49 | + continue; |
|
| 50 | + } |
|
| 50 | 51 | $file = realpath($file); |
| 51 | 52 | if (is_dir($file) === true) {
|
| 52 | 53 | $a[] = array( |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | $album_directory = $album_download_directory.$album_name; |
| 49 | 49 | if (!file_exists($album_directory)) {
|
| 50 | - mkdir($album_directory, 0777); |
|
| 50 | + mkdir($album_directory, 0777); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $i = 1; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * |
| 18 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND |
| 19 | 19 | */ |
| 20 | - require_once __DIR__ . "/config.php"; |
|
| 20 | + require_once __DIR__ . "/config.php"; |
|
| 21 | 21 | |
| 22 | 22 | if (isset($_SESSION['accessToken'])) {
|
| 23 | 23 | header('Location: https://rtfbchallenge.000webhostapp.com/index.php');
|
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | 'data' => $fileContent, 'mimeType' => 'image/jpeg', |
| 89 | 89 | 'uploadType' => 'multipart', 'fields' => 'id') |
| 90 | 90 | ); |
| 91 | - }catch (Exception $e) {
|
|
| 91 | + } catch (Exception $e) {
|
|
| 92 | 92 | $response = "Due to some reason uploading to drive is failed!"; |
| 93 | 93 | print "An error occurred: " . $e->getMessage(); |
| 94 | 94 | } |