Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
5c1efebb
Commit
5c1efebb
authored
Sep 01, 2005
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor formatting and readability changes as requested by Jay.
parent
0025e057
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
15 deletions
+74
-15
wiki/usertemplate.in
wiki/usertemplate.in
+10
-6
wiki/webhometemplate.in
wiki/webhometemplate.in
+3
-3
wiki/wikiproxy.in
wiki/wikiproxy.in
+61
-6
No files found.
wiki/usertemplate.in
View file @
5c1efebb
This is your TWiki home page.
Feel free to customize it! If you ar
e
not familiar with the %WIKITOOLNAME% collaboration platform, please
visit %TWIKIWEB%.WelcomeGuest first. See the links at your left for
more information on how to write and create TWiki pages.
This is your TWiki home page.
If you are not familiar with th
e
%WIKITOOLNAME% collaboration platform, please visit
%TWIKIWEB%.WelcomeGuest first. See the links at your left for more
information on how to write and create TWiki pages.
__These are your Projects
/Groups
:__
__These are your Projects:__
<!-- Please leave this line here. Thanks! --!>
<br><br>
<font size=-2 color=grey>
__Permissions (leave these alone unless you know what you are doing, or ask us)__
* Set ALLOWTOPICVIEW =
* Set ALLOWTOPICCHANGE =
...
...
@@ -21,4 +25,4 @@ __Personal Preferences (details in %TWIKIWEB%.TWikiVariables)__
* Set EDITBOXHEIGHT = 17
* Default state of the __link__ check box in the attach file page:
* Set ATTACHLINKBOX =
</font>
wiki/webhometemplate.in
View file @
5c1efebb
...
...
@@ -11,14 +11,14 @@ information on how to write and create TWiki pages.
__This project wiki can be accessed externally as:__ [[%SCRIPTURL%/view/%WEB%][%SCRIPTURL%/view/%WEB%]]
%INCLUDE{"Emulab.GroupPermNotes"}%
__TWiki groups that are relevant to your Project/Group__
* Other members of your project: [[%MAINWEB%.%WEB%Group][%WEB%Group]]
* Members with project root privs: [[%MAINWEB%.%WEB%RootGroup][%WEB%RootGroup]]
%INCLUDE{"Emulab.GroupPermNotes"}%
__Site Tools of the <nop>%WEB% Web__
%INCLUDE{"%TWIKIWEB%.WebSiteTools"}%
...
...
wiki/wikiproxy.in
View file @
5c1efebb
...
...
@@ -112,6 +112,9 @@ elsif ($action eq "remap") {
elsif
(
$action
eq
"
fixproject
")
{
exit
(
FixWikiProject
(
@ARGV
));
}
elsif
(
$action
eq
"
fixuser
")
{
exit
(
FixWikiUser
(
@ARGV
));
}
else
{
die
("
*** $0:
\n
"
.
"
Do not know what to do with '
$action
'!
\n
");
...
...
@@ -549,6 +552,61 @@ sub FixWikiProject(@)
return
0
;
}
#
# Fix a wiki user home page,
#
sub
FixWikiUser
(@)
{
usage
()
if
(
@
_
!=
2
);
my
(
$user
,
$wikiname
,
$passwd
)
=
@_
;
chdir
("
$WIKIUSERDIR
")
or
fatal
("
Could not chdir to
$WIKIUSERDIR
");
if
(
!
system
("
egrep -q -s
"
.
"
'<!-- Please leave this line here'
${wikiname}
.txt
"))
{
return
0
;
}
system
("
cp -p
${USERTEMPLATE}
${wikiname}
.txt
")
==
0
or
fatal
("
Could not copy
${USERTEMPLATE}
to
${wikiname}
.txt
");
#
# Set the initial groups list to the user.
#
open
(
PREFS
,
"
${wikiname}
.txt
")
or
fatal
("
Could not open
${wikiname}
.txt for reading
");
while
(
<
PREFS
>
)
{
if
(
$_
=~
/^(.* Set ALLOWTOPIC.*)\r$/
||
$_
=~
/^(.* Set ALLOWTOPIC.*)$/
)
{
$data
.=
$
1
.
"
%MAINWEB%.
${wikiname}
\n
";
}
else
{
$data
.=
$_
;
}
}
close
(
PREFS
);
#
# Now write the file out.
#
open
(
PREFS
,
"
>
${wikiname}
.txt
")
or
fatal
("
Could not open
${wikiname}
.txt for writing
");
print
PREFS
$data
;
close
(
PREFS
);
#
# Check it in (locked).
#
CI
("
${wikiname}
.txt
",
"
FixWikiUser
$user
$wikiname
")
==
0
or
fatal
("
Could not ci
${wikiname}
.txt
");
return
0
;
}
#
# Fix a wiki group.
#
...
...
@@ -740,19 +798,16 @@ sub SetWikiGroups(@)
fatal
("
Could not open
${wikiuser}
.txt for reading
");
while
(
<
PREFS
>
)
{
if
(
$_
=~
/^
(__These are your Projects\/Groups:__)
.*$/
)
{
$data
.=
$
1
.
"
\n
";
if
(
$_
=~
/^
__These are your Projects
.*$/
)
{
$data
.=
"
__These are your Projects:__
\n
";
#
# Add a list of
groups.
# Add a list of
just the Projects.
#
foreach
my
$group
(
@groups
)
{
if
(
-
d
"
../
$group
")
{
$data
.=
"
\t
* [[
${group}
.WebHome][
${group}
]]
\n
";
}
else
{
$data
.=
"
\t
* [[%MAINWEB%.
${group}
Group][
${group}
Group]]
\n
";
}
}
#
...
...
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