Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-wiki
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-wiki
Commits
1da45e9a
Commit
1da45e9a
authored
Oct 31, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added wiki permissions
parent
8c10323b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
50 deletions
+13
-50
intranet-wiki-procs.tcl
tcl/intranet-wiki-procs.tcl
+12
-14
index.tcl
www/index.tcl
+1
-36
No files found.
tcl/intranet-wiki-procs.tcl
View file @
1da45e9a
...
...
@@ -44,6 +44,7 @@ ad_proc im_wiki_base_component { object_type object_id } {
Wiki component to be shown at the system home page
}
{
set folder_id
[
wiki::get_folder_id
]
set user_id
[
ad_get_user_id
]
set colspan 1
# Get the list of currently existing Wiki installations
...
...
@@ -51,21 +52,17 @@ ad_proc im_wiki_base_component { object_type object_id } {
select
ap.package_id,
cf.folder_id,
cr.titl
e as wiki_title,
ap.instance_nam
e as wiki_title,
sn.name as wiki_mount
from
apm_packages ap,
cr_folders cf,
cr_items ci,
cr_revisions cr,
site_nodes sn
where
ap.package_key = 'wiki'
and cf.package_id = ap.package_id
and ci.parent_id = cf.folder_id
and ci.name = 'index'
and cr.revision_id = ci.live_revision
and sn.object_id = ap.package_id
and 't' = acs_permission__permission_p(ap.package_id, :user_id, 'read')
"
set object_name
[
db_string object_name_for_one_object_id
""
-default
""
]
...
...
@@ -76,16 +73,16 @@ ad_proc im_wiki_base_component { object_type object_id } {
db_foreach wikis
$wikis
_sql
{
incr ctr
append wikis_html
"<b>
$wiki
_title
Wiki
</b><br>
\n
"
append wikis_html
"<b>
$wiki
_title</b><br>
\n
"
if
{
0 !=
$object
_id
}
{
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/
$object
_name_mangled
\"
>
$object
_name</A>
\n
"
}
append wikis_html
"
<li><A href=
\"
/
$wiki
_mount/index
\"
>Main Index</A>
<li><A href=
\"
/
$wiki
_mount/Category
\"
>Categories</A>
"
<li><A href=
\"
/
$wiki
_mount/index
\"
>Main Index</A>
<li><A href=
\"
/
$wiki
_mount/Category
\"
>Categories</A>
"
set admin_p
[
permission::permission_p
\
-object_id
$package
_id
\
...
...
@@ -94,11 +91,12 @@ ad_proc im_wiki_base_component { object_type object_id } {
]
if
{
$admin
_p
}
{
append wikis_html
"<li><A href=
\"
/intranet/admin/permissions/one?object_id=
$package
_id
\"
>Admin Wiki Permissions</A>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id&modified_only=1
\"
>Admin Wiki Changes</A>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id
\"
>Admin All Pages</A>
\n
"
append wikis_html
"
<li><A href=
\"
/intranet/admin/permissions/one?object_id=
$package
_id
\"
>Admin Wiki Permissions</A>
<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id&modified_only=1
\"
>Admin Wiki Changes</A>
<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id
\"
>Admin All Pages</A>
"
}
append wikis_html
"<p>
\n
"
}
...
...
www/index.tcl
View file @
1da45e9a
...
...
@@ -20,42 +20,6 @@ set return_url "[ad_conn url]?[ad_conn query]"
set
parent_var :folder_id
set
page_title
"Active Wikis"
# ----------------------------------------------------
# Redirect to admin if there is exactly one wiki...
set
wikis_sql
"
select
ap.package_id,
cf.folder_id,
cr.title as wiki_title,
sn.name as wiki_mount
from
apm_packages ap,
cr_folders cf,
cr_items ci,
cr_revisions cr,
site_nodes sn
where
ap.package_key = 'wiki'
and cf.package_id = ap.package_id
and ci.parent_id = cf.folder_id
and ci.name = 'index'
and cr.revision_id = ci.live_revision
and sn.object_id = ap.package_id
and 't' = acs_permission__permission_p(ap.package_id, :user_id, 'read')
"
set
ctr 0
db_foreach wikis
$wikis
_sql
{
incr ctr
}
# if {1 == $ctr
}
{
# ad_returnredirect [export_vars -base "/$wiki_mount/admin/index?" {folder_id
}
]
# ad_script_abort
#
}
# ----------------------------------------------------
# Show pages
...
...
@@ -80,6 +44,7 @@ set wikis_sql "
and ci.parent_id = cf.folder_id
and cr.revision_id = ci.live_revision
and sn.object_id = ap.package_id
and 't' = acs_permission__permission_p(ap.package_id, :user_id, 'read')
order by lower(ci.name)
"
...
...
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