Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b127ac61
Commit
b127ac61
authored
Dec 01, 2006
by
Richard Mansfield
Browse files
and subdirectory names with quotes
parent
0a5db944
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/index.php
View file @
b127ac61
...
...
@@ -55,7 +55,7 @@ function formatname(r) {
if (r.artefacttype == 'folder') {
var dir = cwd + r.name + '/';
pathids[dir] = r.id;
var link = A({'href':'', 'onclick':"return changedir('" + dir.replace(
"'"
,"\\\'") + "')"},r.name);
var link = A({'href':'', 'onclick':"return changedir('" + dir.replace(
escre
,"\\\'") + "')"},r.name);
var cell = link;
}
return TD(null, cell);
...
...
@@ -78,7 +78,7 @@ function linked_path() {
for (i=0; i<dirs.length; i++) {
if (dirs[i] != '') {
sofar = sofar + dirs[i] + '/';
var dir = A({'href':'', 'onclick':"return changedir('" + sofar.replace(
"'"
,"\\\'") + "')"}, dirs[i]);
var dir = A({'href':'', 'onclick':"return changedir('" + sofar.replace(
escre
,"\\\'") + "')"}, dirs[i]);
folders.push(' / ');
folders.push(dir);
}
...
...
@@ -92,6 +92,7 @@ filelist.statevars.push('folder');
pathids = {'/':null};
cwd = '/';
escre = /\'/g;
var uploader = new FileUploader('uploader', 'upload.json.php', filelist.doupdate);
addLoadEvent(function () { changedir(cwd); });
...
...
htdocs/artefact/file/myfiles.json.php
View file @
b127ac61
...
...
@@ -44,7 +44,8 @@ $filedata = get_records_sql_array('SELECT a.id, a.artefacttype, a.mtime, f.name,
FROM '
.
$prefix
.
'artefact_file_files f
INNER JOIN '
.
$prefix
.
'artefact a ON f.artefact = a.id
WHERE a.owner = '
.
$userid
.
'
AND a.parent'
.
$infolder
,
''
);
AND a.parent'
.
$infolder
.
'
ORDER BY a.artefacttype DESC, f.name ASC'
,
''
);
if
(
!
$filedata
)
{
$filedata
=
array
();
...
...
@@ -64,7 +65,7 @@ $result = array(
'message'
=>
get_string
(
'filelistloaded'
),
);
//
log_debug($result);
log_debug
(
$result
);
json_headers
();
print
json_encode
(
$result
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment