Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-rest-fs-openacs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-rest-fs-openacs
Commits
1e862189
Commit
1e862189
authored
May 02, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added path + name option for mkdir operation
parent
324a1c71
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
intranet-rest-fs-openacs-procs.tcl
tcl/intranet-rest-fs-openacs-procs.tcl
+5
-0
mkdir.tcl
www/mkdir.tcl
+3
-1
No files found.
tcl/intranet-rest-fs-openacs-procs.tcl
View file @
1e862189
...
...
@@ -17,12 +17,17 @@ ad_library {
# Constants
# ----------------------------------------------------------------------
# File
ad_proc -public im_file_status_active
{}
{
return 91000
}
ad_proc -public im_file_status_deleted
{}
{
return 91002
}
ad_proc -public im_file_type_default
{}
{
return 91100
}
# File Version
ad_proc -public im_file_version_status_active
{}
{
return 91200
}
ad_proc -public im_file_version_status_deleted
{}
{
return 91202
}
ad_proc -public im_file_version_type_default
{}
{
return 91300
}
# ----------------------------------------------------------------------
...
...
www/mkdir.tcl
View file @
1e862189
...
...
@@ -7,12 +7,13 @@ ad_page_contract {
}
{
{
project_id:integer
""
}
{
path
""
}
{
name
""
}
}
set
user_id
[
ad_conn user_id
]
set
package_id
[
ad_conn package_id
]
set
package_id
[
db_string package
"select min(package_id) from apm_packages where package_key = 'file-storage'"
-default
$package
_id
]
ns_log Notice
"mkdir: path=
$path
, project_id=
$project
_id"
ns_log Notice
"mkdir: path=
$path
,
name=
$name
,
project_id=
$project
_id"
if
{
""
ne
$project
_id
}
{
set folder_id
[
im_rest_fs_folder_for_object -object_id
$project
_id
]
...
...
@@ -21,6 +22,7 @@ if {"" ne $project_id} {
set
file_id
[
db_nextval
"acs_object_id_seq"
]
if
{
""
ne
$name
}
{
set path
"
$path
/
$name
"
}
set
path_pieces
[
split
$path
"/"
]
set
parent_pieces
[
lrange
$path
_pieces 0 end-1
]
set
folder_name
[
lindex
$path
_pieces end
]
...
...
Write
Preview
Markdown
is supported
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