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()
8181 */
8282 private function earlyReturn ()
8383 {
84+ if ($ this ->request ->input ('f ' )) {
85+ $ this ->log_viewer ->setFolder (Crypt::decrypt ($ this ->request ->input ('f ' )));
86+ }
87+
8488 if ($ this ->request ->input ('dl ' )) {
8589 return $ this ->download ($ this ->pathFromInput ('dl ' ));
8690 } elseif ($ this ->request ->has ('clean ' )) {
@@ -90,7 +94,10 @@ private function earlyReturn()
9094 app ('files ' )->delete ($ this ->pathFromInput ('del ' ));
9195 return $ this ->redirect ($ this ->request ->url ());
9296 } 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 ) {
94101 app ('files ' )->delete ($ this ->log_viewer ->pathToLogFile ($ file ));
95102 }
96103 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"
147147 @endif
148148 <div class =" p-3" >
149149 @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 ) : ' ' } } " >
151151 <span class =" fa fa-download" ></span > Download file
152152 </a >
153153 -
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 ) : ' ' } } " >
155155 <span class =" fa fa-sync" ></span > Clean file
156156 </a >
157157 -
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 ) : ' ' } } " >
159159 <span class =" fa fa-trash" ></span > Delete file
160160 </a >
161161 @if (count ($files ) > 1 )
162162 -
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 ) : ' ' } } " >
164164 <span class =" fa fa-trash-alt" ></span > Delete all files
165165 </a >
166166 @endif
You can’t perform that action at this time.
0 commit comments