bug fixes

This commit is contained in:
JT Smith 2005-02-23 05:03:24 +00:00
parent c34ab5e3f6
commit 54e2b5f8ea
5 changed files with 75 additions and 5 deletions

View file

@ -19,6 +19,9 @@
.header {
font-size: 30px;
}
.body {
background-color: #6974DE;
}
</style>
</head>

View file

@ -385,6 +385,7 @@ while (my $data = $sth->hashRef) {
$newNav{startPoint} = 1;
$newNav{assetsToInclude} = "pedigree";
}
$newAsset{assetSize} = length(join("",%newAsset).join("",%newNav).join("",%newWobject));
WebGUI::SQL->setRow("asset","assetId",\%newAsset,undef,$newNav{assetId});
WebGUI::SQL->setRow("wobject","assetId",\%newWobject,undef,$newNav{assetId});
WebGUI::SQL->setRow("Navigation","assetId",\%newNav,undef,$newNav{assetId});
@ -1390,6 +1391,7 @@ while (my $data = $sth->hashRef) {
$newAsset{groupIdView} = "7";
$newAsset{groupIdEdit} = "4";
$newAsset{className} = 'WebGUI::Asset::Template';
$newAsset{assetSize} = length($data->{template});
$newAsset{state} = 'published';
$newAsset{lastUpdated} = time();
$newAsset{parentId} = $tempRootId;
@ -1641,6 +1643,69 @@ $conf->write;
print "\tSetting user function style\n" unless ($quiet);
my $failsafestyle = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>^Page("title"); - WebGUI</title>
<tmpl_var head.tags>
<style type="text/css">
.menu {
position: absolute;
top: 50px;
left: 5px;
z-index: 10;
font-family: georgia, verdana, helvetica, arial, sans-serif;
color: white;
font-size: 11px;
}
.content {
position: absolute;
top: 50px;
left: 195px;
z-index: 10;
font-family: georgia, verdana, helvetica, arial, sans-serif;
color: white;
font-size: 13px;
}
.header {
position: absolute;
left: 5px;
top: 5px;
z-index: 10;
font-size: 30px;
font-family: georgia, verdana, helvetica, arial, sans-serif;
color: white;
}
.background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 5;
border: 0px;
}
body {
background-color: #6974DE;
}
</style>
</head>
<body>
^AdminBar;
<div class="header">^PageTitle;</div>
<div class="menu">^AssetProxy(flexMenu);</div>
<div class="content"><tmpl_var body.content>
<hr />
^LoginToggle; &nbsp; ^a(^@;); &nbsp; ^AdminToggle;
</div>
<img src="<tmpl_var session.config.extrasURL>/background.jpg" border="0" class="background" />
</body>
</html>
';
WebGUI::SQL->write("update template set template=".quote($failsafestyle)." where assetId='PBtmpl0000000000000060'");
my ($defaultPageId) = WebGUI::SQL->quickArray("select value from settings where name='defaultPage'");
my ($styleId) = WebGUI::SQL->quickArray("select styleTemplateId from wobject where assetId=".quote($defaultPageId));
WebGUI::SQL->write("insert into settings (name,value) values ('userFunctionStyleId',".quote($styleId).")");
@ -1750,8 +1815,8 @@ sub walkTree {
".quote($newParentId).", ".quote($pageLineage).", ".quote($className).",'published',".quote($page->{title}||"Untitled").",
".quote($page->{menuTitle}||"Untitled").", ".quote($pageUrl).", ".quote($page->{startDate}).", ".quote($page->{endDate}).",
".quote($page->{synopsis}).", ".quote($page->{newWindow}).", ".quote($page->{hideFromNavigation}).", ".quote($page->{ownerId}||'3').",
".quote($page->{groupIdView}||'7').", ".quote($page->{groupIdEdit}.'3').", ".quote($page->{encryptPage}).",
".length($page->{title}.$page->{menuTitle}.$page->{synopsis}.$page->{urlizedTitle}).", ".quote($page->{metaTags}).")");
".quote($page->{groupIdView}||'7').", ".quote($page->{groupIdEdit}||'3').", ".quote($page->{encryptPage}).",
".length(join("",%{$page})).", ".quote($page->{metaTags}).")");
if ($page->{redirectURL} ne "") {
WebGUI::SQL->write("insert into redirect (assetId, redirectUrl) values (".quote($pageId).",".quote($page->{redirectURL}).")");
} else {
@ -1785,7 +1850,7 @@ sub walkTree {
".quote($pageId).", ".quote($wobjectLineage).", ".quote($className).",'published',".quote($wobject->{title}||'Untitled').",
".quote($wobject->{title}||'Untitled').", ".quote($wobjectUrl).", ".quote($wobject->{startDate}).", ".quote($wobject->{endDate}).",
1, ".quote($ownerId||'3').", ".quote($groupIdView||'7').", ".quote($groupIdEdit||'3').", ".quote($page->{encryptPage}).",
".length($wobject->{title}.$wobject->{description}).")");
".length(join("",%{$wobject})).")");
WebGUI::SQL->write("update wobject set assetId=".quote($wobjectId).", styleTemplateId=".quote($page->{styleId}||'1').",
printableStyleTemplateId=".quote($page->{printableStyleId}||'1').", cacheTimeout=".quote($page->{cacheTimeout})
.", cacheTimeoutVisitor=".quote($page->{cacheTimeoutVisitor})." where wobjectId=".quote($wobject->{wobjectId}));

View file

@ -225,7 +225,7 @@ INSERT INTO template VALUES ('1','Default Page','<a href=\"<tmpl_var assetId>\">
INSERT INTO template VALUES ('1','File','<tmpl_if session.var.adminOn><tmpl_if controls><p><tmpl_var controls></p></tmpl_if></tmpl_if><a href=\"<tmpl_var fileUrl>\"><img src=\"<tmpl_var fileIcon>\" alt=\"<tmpl_var title>\" border=\"0\" /><tmpl_var filename></a>','FileAsset',1,1);
INSERT INTO template VALUES ('2','Image','<tmpl_if session.var.adminOn><tmpl_if controls><p><tmpl_var controls></p></tmpl_if></tmpl_if><img src=\"<tmpl_var fileUrl>\" <tmpl_var parameters> />','ImageAsset',1,1);
INSERT INTO template VALUES ('15','File Folder','<a name=\"<tmpl_var assetId>\"></a><tmpl_if session.var.adminOn>\r\n <p><tmpl_var controls></p>\r\n</tmpl_if>\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <p><tmpl_var description></p>\r\n</tmpl_if>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" class=\"content\">\r\n<tmpl_loop subfolder_loop>\r\n<tr>\r\n <td class=\"tableData\" valign=\"top\"><a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title></td>\r\n<td valign=\"top\" colspan=\"3\"><tmpl_var synopsis></td></tr>\r\n</tmpl_loop>\r\n<tmpl_loop file_loop>\r\n<tr>\r\n <td valign=\"top\" class=\"tableData\"><a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title></td>\r\n <td class=\"tableData\" valign=\"top\"><tmpl_var synopsis></td>\r\n <td class=\"tableData\" valign=\"top\"><tmpl_var synopsis></td>\r\n <td class=\"tableData\" valign=\"top\">^D(\"%z %Z\",<tmpl_var date.epoch>);</td>\r\n <td class=\"tableData\" valign=\"top\"><tmpl_var size></td>\r\n</tr>\r\n</tmpl_loop>\r\n\r\n</table>', 'Folder',1,1);
INSERT INTO template VALUES ('15','File Folder','<a name=\"<tmpl_var assetId>\"></a><tmpl_if session.var.adminOn>\r\n <p><tmpl_var controls></p>\r\n</tmpl_if>\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <p><tmpl_var description></p>\r\n</tmpl_if>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" class=\"content\">\r\n<tmpl_loop subfolder_loop>\r\n<tr>\r\n <td class=\"tableData\" valign=\"top\"><a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title></td>\r\n<td valign=\"top\" colspan=\"3\"><tmpl_var synopsis></td></tr>\r\n</tmpl_loop>\r\n<tmpl_loop file_loop>\r\n<tr>\r\n <td valign=\"top\" class=\"tableData\"><a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title></td>\r\n <td class=\"tableData\" valign=\"top\"><tmpl_var synopsis></td>\r\n <td class=\"tableData\" valign=\"top\">^D(\"%z %Z\",<tmpl_var date.epoch>);</td>\r\n <td class=\"tableData\" valign=\"top\"><tmpl_var size></td>\r\n</tr>\r\n</tmpl_loop>\r\n\r\n</table>', 'Folder',1,1);
alter table HttpProxy add column cookieJarStorageId varchar(22);
@ -334,3 +334,4 @@ update template set template='<a name=\"<tmpl_var assetId>\"></a>\r\n<tmpl_if se
delete from template where templateId='2' and namespace='IndexedSearch';
delete from template where templateId='3' and namespace='IndexedSearch';

View file

@ -1,6 +1,7 @@
assets = WebGUI::Asset::File::Image, \
WebGUI::Asset::File, \
WebGUI::Asset::Snippet, \
WebGUI::Asset::Template, \
WebGUI::Asset::Redirect, \
WebGUI::Asset::Wobject::Collaboration, \
WebGUI::Asset::Wobject::IndexedSearch, \

View file

@ -312,7 +312,7 @@ sub processRaw {
#-------------------------------------------------------------------
sub view {
my $self = shift;
return $self->get("template");
return $self->getParent->view;
}