|
153 | 153 |
|
154 | 154 |
|
155 | 155 | // Moves all previous images to the new path |
156 | | -if (File::isDirectory(base_path('assets/img'))) { |
| 156 | +if (is_dir(base_path('assets/img'))) { |
157 | 157 | $files = File::files(base_path('img')); |
158 | 158 | foreach ($files as $file) { |
159 | 159 | $filename = $file->getFilename(); |
160 | 160 | $destination = base_path('assets/img/' . $filename); |
161 | 161 | if (!File::exists($destination)) { |
162 | 162 | if (!$file->isDir()) { |
163 | 163 | File::move($file, $destination);}}}} |
164 | | -if (File::isDirectory(base_path('assets/img/background-img'))) { |
| 164 | +if (is_dir(base_path('assets/img/background-img'))) { |
165 | 165 | $files = File::files(base_path('img/background-img')); |
166 | 166 | foreach ($files as $file) { |
167 | 167 | $filename = $file->getFilename(); |
168 | 168 | $destination = base_path('assets/img/background-img/' . $filename); |
169 | 169 | if (!File::exists($destination)) { |
170 | 170 | if (!$file->isDir()) { |
171 | 171 | File::move($file, $destination);}}}} |
172 | | -if (File::isDirectory(base_path('littlelink/images'))) { |
| 172 | +if (is_dir(base_path('littlelink/images'))) { |
173 | 173 | $files = File::files(base_path('littlelink/images')); |
174 | 174 | foreach ($files as $file) { |
175 | 175 | $filename = $file->getFilename(); |
176 | 176 | $destination = base_path('assets/linkstack/images/' . $filename); |
177 | 177 | if (!File::exists($destination)) { |
178 | 178 | if (!$file->isDir()) { |
179 | 179 | File::move($file, $destination);}}}} |
180 | | -if (File::isDirectory(base_path('littlelink/images'))) { |
| 180 | +if (is_dir(base_path('littlelink/images'))) { |
181 | 181 | $files = File::files(base_path('littlelink/images')); |
182 | 182 | foreach ($files as $file) { |
183 | 183 | $filename = $file->getFilename(); |
184 | 184 | $destination = base_path('assets/linkstack/images/' . $filename); |
185 | 185 | if (!File::exists($destination)) { |
186 | 186 | if (!$file->isDir()) { |
187 | 187 | File::move($file, $destination);}}}} |
188 | | -if (File::isDirectory(base_path('studio/favicon/icons'))) { |
| 188 | +if (is_dir(base_path('studio/favicon/icons'))) { |
189 | 189 | $files = File::files(base_path('studio/favicon/icons')); |
190 | 190 | foreach ($files as $file) { |
191 | 191 | $filename = $file->getFilename(); |
|
204 | 204 | foreach ($users as $user) { |
205 | 205 | $oldName = $user->littlelink_name . '.png'; |
206 | 206 | $newName = $user->id . '.png'; |
207 | | - $oldPath = base_path('img/' . $oldName); |
208 | | - $newPath = base_path('img/' . $newName); |
| 207 | + $oldPath = base_path('assets/img/' . $oldName); |
| 208 | + $newPath = base_path('assets/img/' . $newName); |
209 | 209 | |
210 | 210 | if (File::exists($oldPath)) { |
211 | 211 | File::move($oldPath, $newPath); |
|
0 commit comments