Establish and use version URL part
Add 1 to count on saving local or FTP and update version display after
doing this
All backed up files now have incremental numbers in parens postfixed on
filename
.versions-index file written to with new file line or if line exists
update count on it
On re-getting file due to save conflict, get the count and set in JS
array
Match scroll pos on going split pane.
Only sync both panes if we're in split pane mode
Action the scrollTo after a 0ms tickover to give priority to browser
controls over syncing. This means on manic scrolling there may be very
slight judder, but it avoids 99% and appears smooth for reasonable
scrolling
Only use docRoot if not FTP (ie, local)
srcDir and tgtDir need prefixed slashes removed
Use JS isFileFolder function to establish dir/file type as short term
measure, to be replaced with FTP call to establish type so can all be
handled server side
When "default_charset" was not set in php.ini,and the file contents chinese char,it may show incorrectly.
Because the function htmlentities() takes "ISO-8859-1" as default value of "default_charset" if PHP version is lower than 5.4.
So I think it's better to check the "default_charset" before function htmlentities().
What's your opinion?
Renamed var to distinguish from ftpSite, which is checked for existance
with isset and if available jumps into FTP mode. Having it previously
set to false, it's available, so erroneously goes into FTP mode with no
creds. This is a standalone var name now just to establish connection
channel.
Function added to get a raw list from the FTP connection and work with
this string to return simple and detailed lists as arrays to use
Get contents function added to get content from file over FTP and stream
it back as the return
Finally, function added to save over FTP
Include FTP control lib and include/exclude items if we have ftpSite
If ftpSite, establish connection and if no errors, write the content to
the filepath before closing connection
Include new FTP control lib, no need for saveType here and
exclude/include doing certain things if we have an ftpSite
Getting file over FTP creates connection and establishes any errors plus
loads conent
Image display uses ftpSite and also remove stray end script tag