merging 5.4.4 changes
This commit is contained in:
parent
2b6d4a36fc
commit
6272369816
12 changed files with 1842 additions and 18 deletions
|
|
@ -25,21 +25,19 @@ my %smbError = (
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub authenticate {
|
||||
my ($userId, $password, $userData, $smb, $result);
|
||||
$userId = $_[0]->[0];
|
||||
my ($userId, $password, $userData, $smb, $result);
|
||||
$userId = $_[0]->[0];
|
||||
$password = $_[0]->[1];
|
||||
$userData = WebGUI::Authentication::getParams($userId, 'SMB');
|
||||
|
||||
$smb = Authen::Smb::authen($userData->{smbLogin}, $password, $userData->{smbPDC}, $userData->{smbBDC}, $userData->{smbDomain});
|
||||
if ($smb > 0) {
|
||||
$result = '<li>'. $smbError{$smb};
|
||||
} else {
|
||||
$result = 1;
|
||||
}
|
||||
|
||||
return $result;
|
||||
$userData = WebGUI::Authentication::getParams($userId, 'SMB');
|
||||
return "<li>No SMB username specfified." unless ($userData->{smbLogin});
|
||||
$smb = Authen::Smb::authen($userData->{smbLogin}, $password, $userData->{smbPDC}, $userData->{smbBDC}, $userData->{smbDomain});
|
||||
if ($smb > 0) {
|
||||
return '<li>'. $smbError{$smb};
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub adminForm {
|
||||
my $userData = WebGUI::Authentication::getParams($_[0], 'SMB');
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($tree, $temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp = '<div class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$tree = WebGUI::Navigation::tree($session{page}{pageId},$param[0]);
|
||||
} else {
|
||||
$tree = WebGUI::Navigation::tree($session{page}{pageId},1);
|
||||
}
|
||||
$temp .= WebGUI::Navigation::drawVertical($tree);
|
||||
$temp .= '</span>';
|
||||
$temp .= '</div>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ sub untar {
|
|||
chdir $self->getPath;
|
||||
my $temp = WebGUI::Node->new($node1,$node2);
|
||||
Archive::Tar->extract_archive($temp->getPath.$session{os}{slash}.$filename,1);
|
||||
WebGUI::ErrorHandler::warn(Archive::Tar->error) if (Archive::Tar->error);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -557,6 +557,9 @@ sub www_viewMessageLogMessage {
|
|||
if ($data{url} ne "") {
|
||||
$output .= '</a>';
|
||||
}
|
||||
unless ($data{message} =~ /\<div\>/ig || $data{message} =~ /\<br\>/ig || $data{message} =~ /\<p\>/ig) {
|
||||
$data{message} =~ s/\n/\<br\>/g;
|
||||
}
|
||||
$output .= '<br>'.$data{message}.'<p>';
|
||||
if ($data{url} ne "" && $data{status} eq 'pending') {
|
||||
$output .= '<a href="'.$data{url}.'">'.WebGUI::International::get(554).'</a> · ';
|
||||
|
|
|
|||
|
|
@ -92,7 +92,13 @@ sub _selectPositions {
|
|||
my ($templates, $output, $f, $key);
|
||||
$f = WebGUI::HTMLForm->new(1);
|
||||
$templates = WebGUI::Page::getTemplateList();
|
||||
$f->select("templateId",$templates,'',[$_[0]],'','','onChange="changeTemplatePreview(this.form.templateId.value)"');
|
||||
$f->selectList(
|
||||
-name=>"templateId",
|
||||
-options=>$templates,
|
||||
-value=>[$_[0]],
|
||||
-extras=>'onChange="changeTemplatePreview(this.form.templateId.value)"',
|
||||
-subtext=>' <a href="'.WebGUI::URL::page("op=listTemplates&namespace=Page").'">'.WebGUI::International::get(742).'</a>'
|
||||
);
|
||||
$output = '
|
||||
<script language="JavaScript">
|
||||
function checkBrowser(){
|
||||
|
|
|
|||
|
|
@ -353,6 +353,7 @@ sub www_importThemeValidate {
|
|||
$extracted->untar($filename);
|
||||
my $propertiesFile = WebGUI::Attachment->new("_theme.properties","temp",$subnode);
|
||||
my $theme = $propertiesFile->getHashref;
|
||||
my @themes = WebGUI::SQL->buildArray("select name from theme");
|
||||
my $f = WebGUI::HTMLForm->new;
|
||||
$f->hidden(
|
||||
-name=>"op",
|
||||
|
|
@ -384,7 +385,7 @@ sub www_importThemeValidate {
|
|||
);
|
||||
if ($theme->{webguiVersion} > $WebGUI::VERSION) {
|
||||
$output .= WebGUI::International::get(926);
|
||||
} elsif (0) {
|
||||
} elsif (isIn($theme->{name},@themes)) {
|
||||
$output .= WebGUI::International::get(925);
|
||||
} else {
|
||||
$output .= WebGUI::International::get(928);
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ sub drawTemplate {
|
|||
$template =~ s/\n//g;
|
||||
$template =~ s/\r//g;
|
||||
$template =~ s/\'/\\\'/g;
|
||||
$template =~ s/\<script.*?\>.*?\<\/script\>//gi;
|
||||
$template =~ s/\<table.*?\>/\<table cellspacing=0 cellpadding=3 width=100 height=80 border=1\>/ig;
|
||||
$template =~ s/\<tmpl_var\s+page\.position(\d+)\>/$1/ig;
|
||||
return $template;
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ sub www_view {
|
|||
|
||||
#if ($_[0]->get("followExternal")==0 && $proxiedUrl !~ /\Q$allowed_url/i) {
|
||||
if ($_[0]->get("followExternal")==0 &&
|
||||
$var{header} = "text/html";
|
||||
(URI->new($_[0]->get('proxiedUrl'))->host) ne (URI->new($proxiedUrl)->host) ) {
|
||||
return "<h1>You are not allowed to leave ".$_[0]->get("proxiedUrl")."</h1>";
|
||||
}
|
||||
|
|
@ -271,6 +272,7 @@ sub www_view {
|
|||
$p->DESTROY;
|
||||
|
||||
if ($var{content} =~ /<frame/gis) {
|
||||
$var{header} = "text/html";
|
||||
$var{content} = "<h1>HttpProxy: Can't display frames</h1>
|
||||
Try fetching it directly <a href='$proxiedUrl'>here.</a>";
|
||||
} else {
|
||||
|
|
@ -280,6 +282,7 @@ sub www_view {
|
|||
}
|
||||
}
|
||||
} else { # Fetching page failed...
|
||||
$var{header} = "text/html";
|
||||
$var{content} = "<b>Getting <a href='$proxiedUrl'>$proxiedUrl</a> failed</b>".
|
||||
"<p><i>GET status line: ".$response->status_line."</i>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ sub www_viewGradebook {
|
|||
return "" unless (WebGUI::Privilege::isInGroup($_[0]->get("groupToViewReports")));
|
||||
my ($output, $p, $users, $user);
|
||||
$output = '<h1>'.WebGUI::International::get(71,$_[0]->get("namespace")).'</h1>';
|
||||
$p = WebGUI::Paginator->new('func=viewGradebook&wid='.$_[0]->get("wobjectId"));
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('func=viewGradebook&wid='.$_[0]->get("wobjectId")));
|
||||
$p->setDataByQuery("select userId,username,ipAddress from Survey_response
|
||||
group by userId,username,ipAddress order by username,ipAddress");
|
||||
$users = $p->getPageData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue