Commit Graph

63 Commits

Author SHA1 Message Date
Matt Pass
31d96eca3b Using getData now and fix to issue #652 2016-08-25 14:45:33 +01:00
Matt Pass
af318dd703 Don't set $origContent 2016-05-05 15:55:05 +01:00
Matt Pass
f83929584f Revert "No need to set $origContent"
This reverts commit c967325b7d.
2016-05-05 15:54:17 +01:00
Matt Pass
c967325b7d No need to set $origContent 2016-05-05 15:53:29 +01:00
Matt Pass
e8ef9e5195 Don't log info anymore 2016-05-05 15:32:04 +01:00
Matt Pass
eabae9bed4 Supress saving error log info and showing message
Temp measure till we know UTF8 BOM issue is fixed
2016-04-26 09:15:38 +01:00
Matt Pass
5d23115c95 +1 not +2 2016-04-25 09:50:25 +01:00
Matt Pass
55692d3c49 Error handling improvements
Replace \r in content, only do extra JS if could FTP write OK
Get original content and check charCount and if finding different sizes,
log into to file
2016-04-25 09:50:09 +01:00
Matt Pass
2727bcb3e8 Replace * when analysing bannedFiles list 2016-04-24 11:14:18 +01:00
Matt Pass
f388545412 Check if file/dir requested is on banned list first 2016-04-14 08:28:47 +01:00
Matt Pass
a406abd610 No longer using PHP LZ Compressor
Was too problematic one some characters so dropping use of this idea.
Too little benefit and many issues arising.
2016-04-02 11:46:15 +01:00
Matt Pass
587132d81b LZCompress now including UTF16 2016-03-28 22:26:40 +01:00
Matt Pass
2cd2aaa916 String escaping needed 2016-03-18 22:06:22 +00:00
Matt Pass
fd73e42df3 Improvements and fixes, esp to FTP saving
No need to replace \r\n also in stitchChanges (\n and then \r will do
that).

If FTP based file, get from fixed filepath, explode on new lines and add
lineEnding to end of each but last, to match what the local file($file)
process will do.

Establish number of Unix and Windows lines in 'changes' update process
only (no need to do on new file) and also str_replace based on their
counts under FTP usage also (to match what local file processes are
doing).
2016-03-18 19:42:18 +00:00
Matt Pass
e127a9eee1 strClean 2 x input points 2016-03-18 15:46:38 +00:00
Matt Pass
0617f294cd No newlines at EOF and remove file_exists
Existence of a dir is done on is_dir
2016-03-18 14:00:18 +00:00
Matt Pass
ff9db44537 Merge pull request #615 from microvb/master
Corrects some issues that caused the interface to hang
2016-03-18 13:50:54 +00:00
MicroVB INC
4307dc1ae6 Added check tor stat results
When `$file` is a folder, the commands `filesize` and `filemtime` would result in the following warnings :

PHP Warning:  filemtime(): stat failed for /var/www/html/css in /var/www/html/ice/lib/file-control-xhr.php on line 921
PHP Warning:  filesize(): stat failed for /var/www/html/css in /var/www/html/ice/lib/file-control-xhr.php on line 940

This patch corrects this.
2016-03-18 08:28:40 -04:00
MicroVB INC
76010bb5cf Corrected php notice in XHR file manager
Wrapped `$ftpSite` in `isset()` where $ftpSite was a part of a condition for existence testing and was using the simplified mode for the check.  The simplified mode resulted in the following notice being produced when no data was present in the `$ftpSite` variable.

> PHP Notice:  Undefined variable: ftpSite in /var/www/html/ice/lib/file-control-xhr.php on line 518

While the error pertains specifically to line 518, this adjustment was applied to all condition checks on this variable.
2016-03-18 07:57:22 -04:00
Matt Pass
d8eb2b72db Load LZ PHP lib, convert posted content, set on XHR 2016-03-16 19:51:17 +00:00
Matt Pass
5e04e79354 New function and system to handle saving via update
stitchContents added to stitch content changes together into version the
user is seeing in the browser.
Can action save on having changes or full content now
2016-03-11 18:36:51 +00:00
Matt Pass
0bcf7a1d72 Replace + in filename with %2B to avoid converts 2016-02-05 09:32:47 +00:00
Matt Pass
815578eb34 Now getting count info & as 2nd part use arrray val 2015-10-08 09:26:09 +01:00
Matt Pass
7f8e052a26 Handle newly saved files to avoid NaN 2015-10-03 18:31:53 +01:00
Matt Pass
6ccf0fb135 Working with file versions now
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
2015-09-18 11:04:42 +01:00
Matt Pass
0592459666 Backup system working with params now
Only run backup process if user has this turned on. Some code
simplification added. Removes old backups past X days as per user
setting.
2015-09-08 08:03:53 +01:00
Matt Pass
4f7ea84754 Use yyyy-mm-dd structure instead 2015-09-07 10:27:41 +01:00
Matt Pass
b46e2f324a Redone backup dir struc for subdirs & efficiency
Now establishes path from base and if full path doesn't exist, it fills
in the blanks, including sub-dir structure to file from base.
2015-09-07 09:49:18 +01:00
Matt Pass
0c3390929b Store a backup of our file each time we save
Saves into a host > year > month-day dir, with in incremental backup
names, number in parens
2015-09-05 19:02:45 +01:00
Matt Pass
40e699828b FTP check file/dir & use string, FTP delete added 2015-09-05 16:28:17 +01:00
Matt Pass
e1a2a8da71 FTP enhancements
FTP items: ongoing connection, save finished, improved/multiple doNext
messages, check dir/file, JSON details output
2015-09-01 20:05:47 +01:00
Matt Pass
fa5b549081 Tweaks to save and move
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
2015-08-20 10:30:33 +01:00
Matt Pass
491edf256e Can now move a file/dir over FTP 2015-08-20 09:21:00 +01:00
Matt Pass
f38e984b31 Rename now working for FTP 2015-08-19 07:07:31 +01:00
Matt Pass
b1df1e8403 Use ftpStart and ftpEnd functions 2015-08-19 06:36:04 +01:00
Matt Pass
78ddfe61ba FTP processes added to handle mkdir and chmod 2015-08-18 07:06:04 +01:00
Matt Pass
0606025a46 Can now save content 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
2015-08-13 09:12:41 +01:00
Matt Pass
9d661e454e Responsive helper plugin ready plus 500x500px PW 2015-07-09 12:08:19 +01:00
Matt Pass
0f29baf504 Tweaks and comments
Need a semi colon for inline JS, improved and added comments
2015-06-30 17:17:55 +01:00
Matt Pass
f39093c78f Better way of handling file existence checking
Vars to determine if we have overwrite OK permission from user or
there's no conflict with filenames, so it's a new one and we can save
Don't check for DOM node to decide if we can save or not anymore,
instead run an XHR that ends up setting lastFileDirCheckStatusObj from
false to something
On spotting that, clear the interval and continue by asking user if they
want to overwrite, or if there's no conflict, set that value instead
If we have no newFileName or we have one but no permission to overwrite
yet, set the content for use in a moment under saveAsContent and we loop
back around
2015-06-30 16:45:51 +01:00
Matt Pass
05996618d7 Use a value of 0 if timeStart not available 2015-05-22 19:41:13 +01:00
Matt Pass
48c42f0523 Set error info on bad filename
Also only do the next parts with a filename if no error by that point
2015-05-22 18:29:53 +01:00
Matt Pass
2521dafde1 Break into more if/elseif/else so can handle error 2015-05-09 09:42:21 +01:00
Matt Pass
0c86f5718e Now establishing line number and goto on open 2015-05-03 18:30:22 +01:00
Matt Pass
85a9cfaecd Set $filemtime if not set, need to use in JSON 2015-04-27 16:12:44 +01:00
Matt Pass
04fa37a358 Retain existing perms on upload or set newFilePerms 2015-04-25 13:31:07 +01:00
Matt Pass
c7c984f66a Use top.ICEcoder.filesFrame in instances
IE has trouble selecting DOM node otherwise
2015-04-25 11:52:26 +01:00
Andrey Grinenko
ae37460e92 Preserve line endings when editing existing file. 2015-02-16 13:18:32 +03:00
Matt Pass
b5566c8382 Perms now handled by XHR 2015-02-08 14:19:49 +00:00
Matt Pass
385d4e0efd Escaping added 2015-01-30 20:56:34 +00:00