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
88330ea7
Commit
88330ea7
authored
Feb 20, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added wiki_mount
parent
35b6a94c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
index.tcl
www/index.tcl
+35
-12
No files found.
www/index.tcl
View file @
88330ea7
...
@@ -20,24 +20,46 @@ set return_url "[ad_conn url]?[ad_conn query]"
...
@@ -20,24 +20,46 @@ set return_url "[ad_conn url]?[ad_conn query]"
set
parent_var :folder_id
set
parent_var :folder_id
set
page_title
"Active Wikis"
set
page_title
"Active Wikis"
# Redirect to wiki if there is exactly one..
set
folder_ids
[
db_list folder_ids
"
# ----------------------------------------------------
select f.folder_id
# Redirect to admin if there is exactly one wiki...
from apm_packages p, cr_folders f
set
wikis_sql
"
where p.package_id = f.package_id
select
and p.package_key = 'wiki'
ap.package_id,
"
]
cf.folder_id,
cr.title as wiki_title,
if
{[
llength
$folder
_ids
]
== 1
}
{
sn.name as wiki_mount
set folder_id
[
lindex
$folder
_ids 0
]
from
ad_returnredirect
[
export_vars -base
"/wiki/admin/index?"
{
folder_id
}]
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
"
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
ad_script_abort
}
}
# ----------------------------------------------------
# Show pages
set
wiki_component
[
im_wiki_home_component
]
set
wiki_component
[
im_wiki_home_component
]
# Get the list of currently existing Wiki installations
# Get the list of currently existing Wiki installations
set
wikis_sql
"
set
wikis_sql
"
select
select
...
@@ -84,6 +106,7 @@ if {0 == $ctr} {
...
@@ -84,6 +106,7 @@ if {0 == $ctr} {
append page_list
"<tr><td colspan=99>No Wiki Pages</td></tr>
\n
"
append page_list
"<tr><td colspan=99>No Wiki Pages</td></tr>
\n
"
}
}
append
page_list
"
append
page_list
"
</table>
</table>
"
"
...
...
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