| @@ 599-620 (lines=22) @@ | ||
| 596 | debug("ftp: listing ($path) ($listMode)"); |
|
| 597 | ||
| 598 | if ($FTP->symlinkListModes) { |
|
| 599 | if ($listMode!=="files") { |
|
| 600 | $mode["filename"]=SPCHL."files".SPCHR; |
|
| 601 | $mode["date"]=time(); |
|
| 602 | if ($FTP->cwd!=="/") { |
|
| 603 | $mode["type"]="shortcut"; |
|
| 604 | $mode["target"]=$FTP->cwd; |
|
| 605 | if ($FTP->defaultListMode!="files") { |
|
| 606 | $mode["target"]="/".SPCHL."files".SPCHR.$mode["target"]; |
|
| 607 | } |
|
| 608 | } else { |
|
| 609 | $mode["type"]="dir"; |
|
| 610 | } |
|
| 611 | $mode["size"]=0; |
|
| 612 | $mode["grants"]["read"]=true; |
|
| 613 | ||
| 614 | if ($cmd!=="NLST") { |
|
| 615 | $data=ftp_GenListEntry($mode); |
|
| 616 | echo "$data"; |
|
| 617 | } else { |
|
| 618 | echo $mode["filename"]."\n"; |
|
| 619 | } |
|
| 620 | } |
|
| 621 | ||
| 622 | if ($listMode!=="templates") { |
|
| 623 | $mode["filename"]=SPCHL."templates".SPCHR; |
|
| @@ 622-642 (lines=21) @@ | ||
| 619 | } |
|
| 620 | } |
|
| 621 | ||
| 622 | if ($listMode!=="templates") { |
|
| 623 | $mode["filename"]=SPCHL."templates".SPCHR; |
|
| 624 | $mode["date"]=time(); |
|
| 625 | if ($FTP->cwd!=="/") { |
|
| 626 | $mode["type"]="shortcut"; |
|
| 627 | $mode["target"]=$FTP->cwd; |
|
| 628 | if ($FTP->defaultListMode!="templates") { |
|
| 629 | $mode["target"]="/".SPCHL."templates".SPCHR.$mode["target"]; |
|
| 630 | } |
|
| 631 | } else { |
|
| 632 | $mode["type"]="dir"; |
|
| 633 | } |
|
| 634 | $mode["size"]=0; |
|
| 635 | $mode["grants"]["read"]=true; |
|
| 636 | if ($cmd!=="NLST") { |
|
| 637 | $data=ftp_GenListEntry($mode); |
|
| 638 | echo "$data"; |
|
| 639 | } else { |
|
| 640 | echo $mode["filename"]."\n"; |
|
| 641 | } |
|
| 642 | } |
|
| 643 | ||
| 644 | if ($listMode!=="objects") { |
|
| 645 | $mode["filename"]=SPCHL."objects".SPCHR; |
|
| @@ 644-664 (lines=21) @@ | ||
| 641 | } |
|
| 642 | } |
|
| 643 | ||
| 644 | if ($listMode!=="objects") { |
|
| 645 | $mode["filename"]=SPCHL."objects".SPCHR; |
|
| 646 | $mode["date"]=time(); |
|
| 647 | $mode["size"]=0; |
|
| 648 | $mode["grants"]["read"]=true; |
|
| 649 | if ($FTP->cwd!=="/") { |
|
| 650 | $mode["type"]="shortcut"; |
|
| 651 | $mode["target"]=$FTP->cwd; |
|
| 652 | if ($FTP->defaultListMode!="objects") { |
|
| 653 | $mode["target"]="/".SPCHL."objects".SPCHR.$mode["target"]; |
|
| 654 | } |
|
| 655 | } else { |
|
| 656 | $mode["type"]="dir"; |
|
| 657 | } |
|
| 658 | if ($cmd!=="NLST") { |
|
| 659 | $data=ftp_GenListEntry($mode); |
|
| 660 | echo "$data"; |
|
| 661 | } else { |
|
| 662 | echo $mode["filename"]."\n"; |
|
| 663 | } |
|
| 664 | } |
|
| 665 | } |
|
| 666 | $template="ftp.".$listMode.".list.phtml"; |
|
| 667 | $result=current($FTP->store->call($template, "", |
|