| @@ 312-326 (lines=15) @@ | ||
| 309 | $path = $args; |
|
| 310 | ftp_TranslatePath($path, $listMode); |
|
| 311 | switch ($listMode) { |
|
| 312 | case 'templates': |
|
| 313 | ftp_TranslateTemplate($path, $template); |
|
| 314 | ||
| 315 | $result = current( |
|
| 316 | $FTP->store->call("ftp.template.exists.phtml", |
|
| 317 | array("arRequestedTemplate" => $template), |
|
| 318 | $FTP->store->get($path))); |
|
| 319 | $file_date = $result["date"]; |
|
| 320 | ||
| 321 | if ($file_date) { |
|
| 322 | ftp_Tell(213, date("YmdHis", $file_date)); |
|
| 323 | } else { |
|
| 324 | ftp_Tell(550, "No such file or directory"); |
|
| 325 | } |
|
| 326 | break; |
|
| 327 | default: |
|
| 328 | if ($FTP->store->exists($path)) { |
|
| 329 | $file_date = time(); // TODO fix |
|
| @@ 433-447 (lines=15) @@ | ||
| 430 | $path = $args; |
|
| 431 | ftp_TranslatePath($path, $listMode); |
|
| 432 | switch ($listMode) { |
|
| 433 | case 'templates': |
|
| 434 | ftp_TranslateTemplate($path, $template); |
|
| 435 | ||
| 436 | $result = current( |
|
| 437 | $FTP->store->call("ftp.template.exists.phtml", |
|
| 438 | array("arRequestedTemplate" => $template), |
|
| 439 | $FTP->store->get($path))); |
|
| 440 | if (is_array($result)) { |
|
| 441 | $file_size = $result["size"]; |
|
| 442 | ftp_Tell(213, (int)$file_size); |
|
| 443 | } else { |
|
| 444 | ftp_Tell(550, "No such file or directory"); |
|
| 445 | } |
|
| 446 | ||
| 447 | break; |
|
| 448 | default: |
|
| 449 | if ($FTP->store->exists($path)) { |
|
| 450 | $size = $FTP->store->call( |
|