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
60064d58
Commit
60064d58
authored
Dec 03, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Disabled wiki
parent
08c79dbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
78 deletions
+9
-78
intranet-wiki-procs.tcl
tcl/intranet-wiki-procs.tcl
+9
-78
No files found.
tcl/intranet-wiki-procs.tcl
View file @
60064d58
...
...
@@ -10,6 +10,9 @@ ad_library {
ad_proc im_wiki_home_component
{
}
{
Wiki component to be shown at the system home page
}
{
# Wiki home component does't make any sense anymore
return
""
return
[
im_wiki_base_component
""
0
]
}
...
...
@@ -66,89 +69,17 @@ ad_proc im_wiki_conf_item_component { conf_item_id } {
ad_proc im_wiki_office_component
{
office_id
}
{
Wiki component to be shown at the system home page
}
{
# XoWiki component for offices not implemented yet
return
""
return
[
im_wiki_base_component im_office
$office
_id
]
}
ad_proc im_wiki_user_component
{
user_id
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component user
$user
_id
]
# XoWiki component for users not implemented yet
return
""
}
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_conn user_id
]
set colspan 1
# Get the list of currently existing Wiki installations
set wikis_sql
"
select
ap.package_id,
cf.folder_id,
ap.instance_name as wiki_title,
sn.name as wiki_mount
from
apm_packages ap,
cr_folders cf,
site_nodes sn
where
ap.package_key = 'wiki'
and cf.package_id = ap.package_id
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
""
]
set object_name_mangled
[
ns_urlencode
$object
_name
]
set ctr 0
set wikis_html
"<ul>"
db_foreach wikis
$wikis
_sql
{
incr ctr
append wikis_html
"<b>Old
$wiki
_title</b><br>
\n
"
append wikis_html
"<p>There is still a 'wiki' package installed in your system.<br>"
append wikis_html
"This old wiki has been replaced by the 'XoWiki' package.<br>"
append wikis_html
"Please copy your files to /xowiki/ and uninstall the old wiki.</p>"
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
\"
>
[
lang::message::lookup
""
intranet-wiki.Main_Index
"Main Index"
]
</A></li>
<li><A href=
\"
/
$wiki
_mount/Category
\"
>
[
lang::message::lookup
""
intranet-wiki.Categories Categories
]
</A></li>
"
set admin_p
[
permission::permission_p
\
-object_id
$package
_id
\
-party_id
[
ad_conn user_id
]
\
-privilege
"admin"
]
if
{
$admin
_p
}
{
append wikis_html
"<li><A href=
\"
/intranet/admin/permissions/one?object_id=
$package
_id
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_Wiki_Permissions
"Admin Wiki Permissions"
]
</A></li>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id&modified_only=1
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_Wiki_Changes
"Admin Wiki Changes"
]
</A></li>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_All_Pages
"Admin All Pages"
]
</A></li>
\n
"
}
append wikis_html
"<p></p>
\n
"
}
append wikis_html
"</ul>"
# Skip the component if there is no Wiki
if
{
0 ==
$ctr
}
{
return
""
}
return
$wikis
_html
}
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