File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ public function index()
81
81
*/
82
82
private function earlyReturn ()
83
83
{
84
+ if ($ this ->request ->input ('f ' )) {
85
+ $ this ->log_viewer ->setFolder (Crypt::decrypt ($ this ->request ->input ('f ' )));
86
+ }
87
+
84
88
if ($ this ->request ->input ('dl ' )) {
85
89
return $ this ->download ($ this ->pathFromInput ('dl ' ));
86
90
} elseif ($ this ->request ->has ('clean ' )) {
@@ -90,7 +94,10 @@ private function earlyReturn()
90
94
app ('files ' )->delete ($ this ->pathFromInput ('del ' ));
91
95
return $ this ->redirect ($ this ->request ->url ());
92
96
} elseif ($ this ->request ->has ('delall ' )) {
93
- foreach ($ this ->log_viewer ->getFiles (true ) as $ file ) {
97
+ $ files = ($ this ->log_viewer ->getFolderName ())
98
+ ? $ this ->log_viewer ->getFolderFiles (true )
99
+ : $ this ->log_viewer ->getFiles (true );
100
+ foreach ($ files as $ file ) {
94
101
app ('files ' )->delete ($ this ->log_viewer ->pathToLogFile ($ file ));
95
102
}
96
103
return $ this ->redirect ($ this ->request ->url ());
Original file line number Diff line number Diff line change @@ -147,20 +147,20 @@ class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2"
147
147
@endif
148
148
<div class =" p-3" >
149
149
@if ($current_file )
150
- <a href =" ?dl={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }" >
150
+ <a href =" ?dl={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }{{ ( $current_folder ) ? ' &f= ' . \ Illuminate \ Support \ Facades \Crypt :: encrypt ( $current_folder ) : ' ' } } " >
151
151
<span class =" fa fa-download" ></span > Download file
152
152
</a >
153
153
-
154
- <a id =" clean-log" href =" ?clean={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }" >
154
+ <a id =" clean-log" href =" ?clean={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }{{ ( $current_folder ) ? ' &f= ' . \ Illuminate \ Support \ Facades \Crypt :: encrypt ( $current_folder ) : ' ' } } " >
155
155
<span class =" fa fa-sync" ></span > Clean file
156
156
</a >
157
157
-
158
- <a id =" delete-log" href =" ?del={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }" >
158
+ <a id =" delete-log" href =" ?del={{ \Illuminate \Support \Facades \Crypt:: encrypt ($current_file ) } }{{ ( $current_folder ) ? ' &f= ' . \ Illuminate \ Support \ Facades \Crypt :: encrypt ( $current_folder ) : ' ' } } " >
159
159
<span class =" fa fa-trash" ></span > Delete file
160
160
</a >
161
161
@if (count ($files ) > 1 )
162
162
-
163
- <a id =" delete-all-log" href =" ?delall=true" >
163
+ <a id =" delete-all-log" href =" ?delall=true{{ ( $current_folder ) ? ' &f= ' . \ Illuminate \ Support \ Facades \Crypt :: encrypt ( $current_folder ) : ' ' } } " >
164
164
<span class =" fa fa-trash-alt" ></span > Delete all files
165
165
</a >
166
166
@endif
You can’t perform that action at this time.
0 commit comments