Commit Graph

136 Commits

Author SHA1 Message Date
Matt Pass
18d66850fa New dirs/files use perms defined in config 2014-11-10 07:20:21 +00:00
Matt Pass
94512c31dd Don't clear selectedFiles on chmod
This is unnecessary and we need this to also have a target to replace
perms on
2014-11-07 21:02:43 +00:00
Matt Pass
dff76a439d On load, focus on files after a 0ms tickover 2014-10-30 17:34:19 +00:00
Matt Pass
4f47e717e6 On load don't focus on editor pane
Want to retain focus on file manager incase we are using shortcuts to
open files etc
2014-10-30 11:42:19 +00:00
Matt Pass
bc552d2d2f true param added to always get from server
This param forces it to get content from server, without this could
potentially get cached content
2014-10-29 10:23:17 +00:00
Matt Pass
5ac87ffbf7 Check on interval for load state, then add plugins 2014-10-29 10:11:05 +00:00
Matt Pass
9b7d987d0b On save trigger doStatsJS after
Window content will reload, then append plugin afterwards
2014-10-28 09:19:34 +00:00
Matt Pass
4edbf8d79d Now running custom processes for all actions 2014-10-18 22:17:17 +01:00
Matt Pass
414e814de2 Establish paths & call github.php with read action 2014-10-11 15:20:15 +01:00
Matt Pass
fbd8475b6e Handling split panes on file control
If GitHub diff mode, load the 2 JS files needed
Ask message shown needed escaped slashes so they appear OK in dialog
No longer open a new file for older version, we display now in diff pane
Temp code added in comment block re getting content from GitHub for file
to show in diff pane. This isn't working at present and probably just
needs a tweak to make work
Slightly renamed vars for active lines to handle 2 panes
2014-10-11 13:01:44 +01:00
Matt Pass
46c1bdce02 Fixes to allow new items to be created
Store original $file value in $fileOrig
rtrim [NEW] from the $file path as that is messing with realpath
checking
Move debugging alert and console.log line into the for loop and use
allFiles[$i]
If a local path and not the doc root or parent dir starts with the doc
root
Check on $fileOrig when saving as
2014-09-23 16:49:47 +01:00
Matt Pass
e47b21ce80 Don't check paths if we're uploading 2014-09-18 16:07:39 +01:00
Matt Pass
1276e894b5 File/folder message instead and go back 2014-09-18 15:40:03 +01:00
Matt Pass
cf8a214a24 Make all paths abs and check realpath on each 2014-09-18 13:02:40 +01:00
Matt Pass
3b0a00af02 Need to establish full $file path first
Otherwise we won't have a valid fullpath to find $docRoot in
2014-09-18 10:47:57 +01:00
Matt Pass
15fe43098f Cover local and remote files, but avoid LFI 2014-09-16 18:30:34 +01:00
Matt Pass
05de070294 Die if we have a realpath file vs doc root mismatch
Stops LFI attacks such as:

lib/file-control.php?action=load&file=/..././/..././/..././/..././/..././/..././etc|passwd&csrf=4c43835566ee4e2x4a455df75a66c47f
2014-09-16 18:12:06 +01:00
Matt Pass
8da637c650 Remove new line at EOF 2014-09-03 06:12:38 +01:00
Matt Pass
744cfbad16 Fix to language ref array item 2014-08-31 07:01:23 +01:00
Matt Pass
115169b16b alert & console.log the action and $file
Commented out, but useful for people to uncomment to see what's
happening if path issues etc
2014-08-21 14:22:44 +01:00
Matt Pass
d201e85d86 Placeholder vars added for lang pieces 2014-08-08 09:30:56 +01:00
Matt Pass
69aec81200 indicateChanges() on 4ms delay after a save
To update the character in the browser tab
2014-07-01 12:56:57 +01:00
Matt Pass
5f051baeca Process file added to be run on file save 2014-06-18 07:06:34 +01:00
Matt Pass
bada48ae76 Do pesticide plugin on save if not MD 2014-06-12 16:55:29 +01:00
Matt Pass
fa97918684 Use doFold now, pass string instead of object 2014-05-22 07:07:39 +01:00
Matt Pass
fa48d0d2f0 Strip ../ so we don't have dir traversal vuln 2014-04-26 12:24:01 +01:00
Matt Pass
6e7612d3ec Inform user they can't delete the root
Stops the root accidentally being deleted
2014-04-23 08:22:44 +01:00
Matt Pass
b45817ec65 headers.php included and csrf POST added 2014-04-18 18:10:50 +01:00
Matt Pass
83f6c5cf53 Only move to different folder and 3 x bug fixes
Global iceRoot so it can be used
Escape apostrophe's in $fileName on upload
Establish $srcDir and $tgtDir and only consider moving if $srcDir !=
$tgtDir and $fileLoc != ""
$fileOrFolder now established on moving and passed as param to
updateFileManagerList
2014-04-15 08:39:46 +01:00
Matt Pass
68e5e0b5a5 Specify if it's a file or folder on updating FM
folder on new folder
set $fileOrFolder on pasting, that is used then on updating
file on uploading
file on saving
2014-04-14 08:35:26 +01:00
Matt Pass
02565fa3b8 Getting rid of rightClickedFile
Now using last item on selectedFiles array
2014-02-21 09:04:57 +00:00
Matt Pass
4124d64a58 Also need iceRoot in $dest path 2014-02-17 08:09:30 +00:00
Matt Pass
7df2a8c0ac Default type is text, 2nd array defines 'other'
Changed the default type to 'text' so ICEcoder will want to open any
file in the editor to begin with.
This is overridden by the images array and the newly purposed 2nd array
which defines types to instead pop open in a window (doc, docx, ppt,
rtf, pdf ...etc).
2014-02-17 07:47:51 +00:00
Matt Pass
0da9371c4d Move event added
If we're due to move a file and it's writable, rename it to new location
Call move event once done to update file list
Show message if we failed or clear server message if all is OK
2013-12-11 06:20:20 +00:00
Matt Pass
77b7a88651 Use FILEINFO_MIME instead to get mime type
FILEINFO_MIME_TYPE is only available on PHP 5.3+ and on some servers
it'll use finfo_open but then get nothing back using this newer param
option.
2013-10-13 13:22:44 +01:00
Matt Pass
ee917776f0 Set savedPoints on reverting, load or save
On reverting set back to the changeGeneration integer
On loading set to the new changeGeneration integer
On saving set to the current changeGeneration integer
2013-09-25 09:52:16 +01:00
Matt Pass
f4e2f24f65 JSON added as a supported filetype
Need to only add to array and a CSS classname
2013-09-16 08:30:52 +01:00
Matt Pass
fd2197eace SQL mode added
Chose MySQL as the default dialect, others possible so added a comment
on that
2013-08-11 17:07:50 +01:00
Matt Pass
60cbfd486c Call switchMode after saving
So it colors code after saving new files, renames to a different file
type etc.
2013-08-07 20:09:43 +01:00
Matt Pass
90a531d2a8 focus method added and only actions if not iThing
CodeMirror focus method was causing no keyboard issues on
iPad/iPhone/iPod
All focus() calls nowrunning through new focus method, which acts as a
single point to do this
Will not do this if iPhone|iPad|iPod test is true
2013-07-25 07:17:09 +01:00
Matt Pass
b366e47197 Condensing code, only need $renamed once 2013-07-07 15:25:32 +01:00
Matt Pass
9bbc41d7b7 Remove all the script tags
This not only saves bytes but I suspect opening & closing so many in
succession is causing a problem.
About 1 in 50 times it wouldn't get all the way through the file, it
would stop somewhere near the end
2013-07-06 19:45:27 +01:00
Matt Pass
46c0ec9c63 No need to unset selectedFiles on new paste 2013-06-29 22:26:38 +01:00
Matt Pass
5b32c96f1d Determin fold type by { char existence
Don't assume if it's a certain file type it will be folding on braces,
instead fold on braces if there's a brace char on that line
2013-06-29 17:25:50 +01:00
Matt Pass
31bbbe098a Remove line class on CM instance not selected tab
We were trying to remove a line class based on tab number and not CM
instance, this ended up causing an error after 2nd open. Because of the
error, CM instance numbers were not being set correctly, so we ended up
with the same number and so when switching tabs it would show the same
editor instance.
2013-06-29 15:00:37 +01:00
Matt Pass
24d68efd4b Get 1st array value seperately
Some older versions of PHP don't seem to like calling [0] on the same
line as explode
Now getting value on seperate line of code
2013-06-04 14:14:49 +01:00
Matt Pass
7255ea4805 Consider extensions up to a space char
This enables ICEcoder to understand that image.jpg (2) is a jpeg and can
be opened as an image
2013-05-31 21:16:18 +01:00
Matt Pass
5576c9e2e9 If we have no fileLoc, show /
This covers saving new files/save as in the root
2013-05-31 14:35:08 +01:00
Matt Pass
c2e92fa355 Brace folding on applicable filetypes
On both load and change we need to use braceRangeFinder or
tagRangeFinder depending on filetype
Also get rid of old, commented foldStyle marker CSS historical reference
as we're now using that
2013-05-29 08:57:37 +01:00
Matt Pass
6a3e15aabf On load also set the gutter marks
Using tagRangeFinder for now, need to also handle braceRangeFinder and
put into a function within ICEcoder
2013-05-25 18:26:24 +01:00