Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.8.9 jp #98

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions DocDB/cgi/AddFiles
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: AddFiles
# Description: Adds downloaded files to the database and filesystem
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AddFilesForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: AddFilesForm
# Description: An entry form to add files to an existing document
Expand Down
7 changes: 2 additions & 5 deletions DocDB/cgi/AdministerElements.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,14 @@ sub AdministerActions (%) {
my $Form = $Params{-form} || "";
my $AddTransfer = $Params{-addTransfer} || $FALSE;

my %Action = ();
my @Action = ('New', 'Delete', 'Modify');

$Action{Delete} = "Delete";
$Action{New} = "New";
$Action{Modify} = "Modify";
if ($AddTransfer) {
$Action{Transfer} = "Transfer";
}
print FormElementTitle(-helplink => "admaction", -helptext => "Action");
print $query -> radio_group(-name => "admaction",
-values => \%Action, -default => "-",
-values => \@Action, -default => "-",
-onclick => "disabler_$Form();");
};

Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: AdministerForm
# Description: This single form provides a number of interfaces to admin
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AdministerHome
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

# Name: $RCSfile$
# Description: Group administrative actions into one page
#
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AuthorAdd
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: AuthorAdd
# Description: Adds an author into the DB list of authors.
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AuthorAddForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: A simple script to allow new author addition (no changes possible)
#
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/AuthorAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script is called by AdministerForm and does administration
# on Authors in the DB. AddAuthor is simpler and can only add
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/BulkCertificateInsert
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: Allows an administrator to create entries for certificate users in EmailUser
#
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/CertificateApplyForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Author Eric Vaandering ([email protected])

Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ConfirmTalkHint
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: Script to confirm a match between a talk entered in the agenda
# and a document
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/CustomListForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: CustomListForm
# Description: Allow users, admins, and meeting organizers to change how various
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DeleteConfirm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

# Name: $RCSfile$
# Description: Displays the document (or document and version)
# to be deleted and requests the admin password.
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DeleteDocument
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

# Name: $RCSfile$
# Description: This script is called by DeleteConfirm to actually delete
# the requested document, all associated entries in the DB,
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DisplayMeeting
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: DisplayMeeting
# Description: Displays talks for a meeting or just a session of a meeting
Expand Down
13 changes: 8 additions & 5 deletions DocDB/cgi/DocDBHelp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: DocDBHelp
# Description: Usually called as a pop-up, this looks up in docdb.hlp
Expand Down Expand Up @@ -54,15 +57,15 @@ my ($DefaultText, $DefaultTitle, $ProjectText, $ProjectTitle, $Action);

my $HelpXML = XMLin("DocDBHelp.xml");

$DefaultText = %{$HelpXML->{entry}{$helpterm}}->{text};
$DefaultTitle = %{$HelpXML->{entry}{$helpterm}}->{title};
$DefaultText = $HelpXML->{entry}{$helpterm}->{text};
$DefaultTitle = $HelpXML->{entry}{$helpterm}->{title};

if ($ProjectHelp) {
my $ProjectXML = XMLin("ProjectHelp.xml");

$ProjectText = %{$ProjectXML->{entry}{$helpterm}}->{text};
$ProjectTitle = %{$ProjectXML->{entry}{$helpterm}}->{title};
$Action = %{$ProjectXML->{entry}{$helpterm}}->{action};
$ProjectText = $ProjectXML->{entry}{$helpterm}->{text};
$ProjectTitle = $ProjectXML->{entry}{$helpterm}->{title};
$Action = $ProjectXML->{entry}{$helpterm}->{action};
}

# Remove line breaks and XML element tags
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DocDBInstructions
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: The instructions for DocDB. This is mostly HTML, but making
# it a script allows us to eliminate parts of it that we don't want
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DocTypeAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: DocTypeAdminister
# Description: This script is called by AdministerForm and does administration
Expand Down
5 changes: 5 additions & 0 deletions DocDB/cgi/DocumentAddForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: DocumentAddForm
# Description: The main form to add or modify documents or metadata
Expand Down Expand Up @@ -519,6 +522,7 @@ SecurityScroll(-addpublic => 'true',
-helplink => 'security',
-helptext => $SecurityText,
-multiple => $TRUE,
-permission=> 'CanView',
-default => \@SecurityDefaults);
print "</td>\n";
if ($EnhancedSecurity) {
Expand All @@ -527,6 +531,7 @@ if ($EnhancedSecurity) {
-helplink => 'modifygroups',
-helptext => 'Can Modify',
-multiple => $TRUE,
-permission=> 'CanCreate',
-default => \@ModifyDefaults);
print "</td>\n";
}
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/DocumentDatabase
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: DocumentDatabase
# Description: The Document Database homepage. Give the user various ways to
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/EditTalkInfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: ShowTalkNote
# Description: Usually called as a pop-up, this will look up the note for a talk
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/EmailAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: EmailAdminister
# Description: This script is called by EmailAdministerForm and does
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/EmailAdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: EmailAdministerForm
# Description: This script provides a form to administer users receiving
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/EmailLogin
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: The login form to a users e-mail notification account
#
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/EventAdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: EventAdministerForm
# Description: This single form provides interfaces to admin tools for
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ExternalDocDBAdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: ExternalDocDBAdministerForm
# Description: Allows the administrator to add knowledge of other DocDBs.
Expand Down
12 changes: 10 additions & 2 deletions DocDB/cgi/GroupAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: GroupAdminister
# Description: This script is called by GroupAdministerForm and does
Expand Down Expand Up @@ -64,10 +67,15 @@ my $NoPerm = $Untaint -> extract(-as_printable => "remove") || "";
my $RemoveChildren = $Untaint -> extract(-as_printable => "removesubs") || "";

if ($View) {$View = 1;} # Make sure they are in format MySQL is expecting
else {$View = 0;}
if ($Create) {$Create = 1;}
else {$Create = 0;}
if ($Admin) {$Admin = 1;}
else {$Admin = 0;}
if ($NoPerm) {$NoPerm = 1;}
else {$NoPerm = 0;}
if ($RemoveChildren) {$RemoveChildren = 1;}
else {$RemoveChildren = 0;}

$dbh = DBI->connect('DBI:mysql:'.$db_name.':'.$db_host,$Username,$Password);

Expand Down Expand Up @@ -241,8 +249,8 @@ if ($Action eq "Delete") { # Delete group
} elsif ($Action eq "New") { # Create new groups
push @ActionStack,"Adding a new group.";
my $GroupInsert = $dbh->prepare(
"insert into SecurityGroup (GroupID,Name,Description,CanCreate,CanAdminister,CanView,CanConfig) ".
"values (0,?,?,?,?,?,0)");
"insert into SecurityGroup (Name,Description,CanCreate,CanAdminister,CanView,CanConfig) ".
"values (?,?,?,?,?,0)");

$GroupInsert -> execute($Name,$Description,$Create,$Admin,$View);
$ParentID = $GroupInsert -> {mysql_insertid}; # Works with MySQL only
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/GroupAdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script provides a form to administer groups in
# the DocDB and shows the relationships between groups.
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/InstitutionAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script is called by AdministerForm and does administration
# on Institutions in the DB. This script adds, modifies and deletes
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/JournalAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script is called by AdministerForm and does administration
# on journals in the DB. This script adds, modifies and deletes
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/KeywordAdministerForm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: Add keywords or keyword groups to the keyword list
# The keyword list is used indirectly to lookup approved keywords
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/KeywordGroupAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script is called by KeywordAdministerForm and does administration
# on Keyword Groups in the DB. This script adds, modifies and deletes
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/KeywordListAdminister
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Description: This script is called by KeywordAdministerForm and does administration
# on the Keyword table in the DB.
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListAllMeetings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: ListAllMeetings
# Description: Generates a nice table of all meetings, either for viewing or modification
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListAuthors
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Author Eric Vaandering ([email protected])

Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListBy
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: $RCSfile$
# Description: Generate tables of document for various input parameters
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListEventsBy
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: ListEventsBy
# Description: This script lists events and sessions based on the topic(s) or
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListGroupUsers
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: EmailAdministerForm
# Description: This script provides a form to administer users receiving
Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListGroups
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Author Eric Vaandering ([email protected])

Expand Down
3 changes: 3 additions & 0 deletions DocDB/cgi/ListKeywords
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env perl

use lib ".";

#
# Name: ListKeywords
# Description: Lists the managed keywords.
Expand Down
Loading