merging 6.2.10 and 6.2.11 changes
This commit is contained in:
parent
486b96d94d
commit
d47830aceb
28 changed files with 139 additions and 59 deletions
|
|
@ -84,10 +84,10 @@ if ( grep /^style$/i, @tables ){
|
|||
my ($newStyleId) = WebGUI::SQL->quickArray("select max(templateId) from template where namespace='style'");
|
||||
if ($style->{styleId} > 0 && $style->{styleId} < 25) {
|
||||
$newStyleId = $style->{styleId};
|
||||
} elsif ($newStyleId > 999) {
|
||||
} elsif ($newStyleId > 9999) {
|
||||
$newStyleId++;
|
||||
} else {
|
||||
$newStyleId = 1000;
|
||||
$newStyleId = 10000;
|
||||
}
|
||||
my $newStyle = $session{setting}{docTypeDec}.'
|
||||
<html>
|
||||
|
|
@ -103,7 +103,7 @@ if ( grep /^style$/i, @tables ){
|
|||
';
|
||||
WebGUI::SQL->write("insert into template (templateId, name, template, namespace) values (".$newStyleId.",
|
||||
".quote($style->{name}).", ".quote($newStyle).", 'style')");
|
||||
WebGUI::SQL->write("update page set styleId=".$newStyleId." where styleId=".$style->{styleId});
|
||||
WebGUI::SQL->write("update page set styleId=".quote($newStyleId)." where styleId=".quote($style->{styleId}));
|
||||
WebGUI::SQL->write("update themeComponent set id=".$newStyleId.", type='template' where id=".$style->{styleId}." and type='style'");
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
@ -886,7 +886,8 @@ $replace{'t'} = {
|
|||
|
||||
my ($sth, $data, $code, $table, $column, %identifier);
|
||||
foreach $table (keys %dbFields){
|
||||
unless ($sth = WebGUI::SQL->read("SELECT * FROM $table")) {die "Cannot read from table $table ";}
|
||||
$sth = WebGUI::SQL->read("SELECT * FROM $table");
|
||||
#unless ($sth = WebGUI::SQL->read("SELECT * FROM $table")) {die "Cannot read from table $table ";}
|
||||
while ($data = $sth->hashRef){
|
||||
foreach $column (@{$dbFields{$table}{fields}}){
|
||||
$code = $data->{$column};
|
||||
|
|
|
|||
4
docs/upgrades/upgrade_6.2.10-6.2.11.sql
Normal file
4
docs/upgrades/upgrade_6.2.10-6.2.11.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
insert into webguiVersion values ('6.2.11','upgrade',unix_timestamp());
|
||||
update page set isSystem=0, parentId='0' where pageId='1';
|
||||
|
||||
|
||||
8
docs/upgrades/upgrade_6.2.9-6.2.10.sql
Normal file
8
docs/upgrades/upgrade_6.2.9-6.2.10.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
insert into webguiVersion values ('6.2.10','upgrade',unix_timestamp());
|
||||
update page set isSystem=1, parentId='0' where pageId='1';
|
||||
delete from template where templateId='1' and namespace='USS/Submission';
|
||||
INSERT INTO template VALUES ('1','Default Submission','<h1><tmpl_var title></h1>\n<table width=\"100%\" cellpadding=2 cellspacing=1 border=0>\n<tr><td valign=\"top\" class=\"tableHeader\" width=\"100%\">\n<b><tmpl_var user.label>:</b> <a href=\"<tmpl_var user.Profile>\"><tmpl_var user.username></a><br />\n<b><tmpl_var date.label>:</b> <tmpl_var date.human><br />\n<b><tmpl_var status.label>:</b> <tmpl_var status.status><br />\n<b><tmpl_var views.label>:</b> <tmpl_var views.count><br />\n</td>\n<td rowspan=\"2\" class=\"tableMenu\" nowrap=\"1\" valign=\"top\">\n\n<tmpl_if previous.more>\n <a href=\"<tmpl_var previous.url>\">«<tmpl_var previous.label></a><br />\n</tmpl_if>\n<tmpl_if next.more>\n <a href=\"<tmpl_var next.url>\"><tmpl_var next.label>»</a><br />\n</tmpl_if>\n<tmpl_if canEdit>\n <a href=\"<tmpl_var edit.url>\"><tmpl_var edit.label></a><br />\n <a href=\"<tmpl_var delete.url>\"><tmpl_var delete.label></a><br />\n</tmpl_if>\n<tmpl_if canChangeStatus>\n <a href=\"<tmpl_var approve.url>\"><tmpl_var approve.label></a><br />\n <a href=\"<tmpl_var deny.url>\"><tmpl_var deny.label></a><br />\n</tmpl_if>\n<tmpl_if canPost>\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a><br />\n</tmpl_if>\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a><br />\n<a href=\"<tmpl_var back.url>\"><tmpl_var back.label></a><br />\n\n</td> </tr><tr><td class=\"tableData\">\n<tmpl_if image.url>\n <img src=\"<tmpl_var image.url>\" border=\"0\"><p />\n</tmpl_if>\n<tmpl_var content><p />\n<tmpl_var attachment.box><br />\n\n</td></tr></table>\n\n<tmpl_var replies>','USS/Submission',1,1);
|
||||
delete from template where templateId='1' and namespace='Forum/Thread';
|
||||
INSERT INTO template VALUES ('1','Default Thread','<h1><tmpl_var forum.title></h1><div align=\"right\">\r\n<script language=\"JavaScript\" type=\"text/javascript\"> <!--\r\n function goLayout(){\r\n location = document.layout.layoutSelect.options[document.layout.layoutSelect.selectedIndex].value\r\n }\r\n //--> </script>\r\n\r\n <form name=\"layout\"><select name=\"layoutSelect\" size=\"1\" onChange=\"goLayout()\">\r\n <option value=\"<tmpl_var thread.layout.flat.url>\" <tmpl_if thread.layout.isFlat>selected=\"1\"</tmpl_if>><tmpl_var thread.layout.flat.label></option>\r\n <option value=\"<tmpl_var thread.layout.nested.url>\" <tmpl_if thread.layout.isNested>selected=\"1\"</tmpl_if>><tmpl_var thread.layout.nested.label></option>\r\n <option value=\"<tmpl_var thread.layout.threaded.url>\" <tmpl_if thread.layout.isThreaded>selected=\"1\"</tmpl_if>><tmpl_var thread.layout.threaded.label></option>\r\n </select> </form> \r\n</div>\r\n<tmpl_if thread.layout.isFlat>\r\n <tmpl_loop post_loop>\r\n <a name=\"<tmpl_var post.id>\"></a>\r\n <tmpl_if __ODD__>\r\n <div class=\"highlight\" <tmpl_if post.isCurrent>style=\"border: 4px dotted #aaaaaa; padding: 5px;\"</tmpl_if>>\r\n <tmpl_else>\r\n <div <tmpl_if post.isCurrent>style=\"border: 4px dotted #aaaaaa; padding: 5px;\"</tmpl_if>>\r\n </tmpl_if>\r\n <tmpl_var post.full>\r\n </div>\r\n </tmpl_loop>\r\n</tmpl_if>\r\n\r\n<tmpl_if thread.layout.isNested>\r\n <tmpl_loop post_loop>\r\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">\r\n <tr>\r\n <tmpl_loop post.indent_loop>\r\n <td width=\"20\"> </td>\r\n </tmpl_loop>\r\n <td>\r\n <a name=\"<tmpl_var post.id>\"></a>\r\n <tmpl_if __ODD__>\r\n <div class=\"highlight\" <tmpl_if post.isCurrent>style=\"border: 4px dotted #aaaaaa; padding: 5px;\"</tmpl_if>>\r\n <tmpl_else>\r\n <div <tmpl_if post.isCurrent>style=\"border: 4px dotted #aaaaaa; padding: 5px;\"</tmpl_if>>\r\n </tmpl_if>\r\n <tmpl_var post.full>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n </tmpl_loop>\r\n</tmpl_if>\r\n\r\n<tmpl_if thread.layout.isThreaded>\r\n <tmpl_var post.full>\r\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">\r\n <tr>\r\n <td class=\"tableHeader\"><tmpl_var thread.subject.label></td>\r\n <td class=\"tableHeader\"><tmpl_var thread.user.label></td>\r\n <td class=\"tableHeader\"><tmpl_var thread.date.label></td>\r\n </tr>\r\n <tmpl_loop post_loop>\r\n <tmpl_if post.isCurrent>\r\n <tr class=\"highlight\">\r\n <tmpl_else>\r\n <tr>\r\n </tmpl_if>\r\n <td class=\"tableData\"><tmpl_loop post.indent_loop> </tmpl_loop><a href=\"<tmpl_var post.url>\"><tmpl_var post.subject></a></td>\r\n <tmpl_if thread.root.user.isVisitor>\r\n <td class=\"tableData\"><tmpl_var post.user.name></td>\r\n <tmpl_else>\r\n <td class=\"tableData\"><a href=\"<tmpl_var post.user.profile>\"><tmpl_var post.user.name></a></td>\r\n </tmpl_if>\r\n <td class=\"tableData\"><tmpl_var post.date.value> @ <tmpl_var post.time.value></td>\r\n </tr>\r\n </tmpl_loop>\r\n </table>\r\n</tmpl_if>\r\n\r\n<p />\r\n<a href=\"<tmpl_var thread.list.url>\"><tmpl_var thread.list.label></a> •\r\n<a href=\"<tmpl_var thread.previous.url>\"><tmpl_var thread.previous.label></a> •\r\n<a href=\"<tmpl_var thread.next.url>\"><tmpl_var thread.next.label></a> \r\n<tmpl_if user.canPost>\r\n • <a href=\"<tmpl_var thread.new.url>\"><tmpl_var thread.new.label></a>\r\n <tmpl_if user.isModerator>\r\n •\r\n <tmpl_if thread.isSticky>\r\n <a href=\"<tmpl_var thread.unstick.url>\"><tmpl_var thread.unstick.label></a>\r\n <tmpl_else>\r\n <a href=\"<tmpl_var thread.stick.url>\"><tmpl_var thread.stick.label></a>\r\n </tmpl_if>\r\n •\r\n <tmpl_if thread.isLocked>\r\n <a href=\"<tmpl_var thread.unlock.url>\"><tmpl_var thread.unlock.label></a>\r\n <tmpl_else>\r\n <a href=\"<tmpl_var thread.lock.url>\"><tmpl_var thread.lock.label></a>\r\n </tmpl_if>\r\n </tmpl_if>\r\n</tmpl_if>\r\n<tmpl_unless user.isVisitor>\r\n •\r\n <tmpl_if user.isSubscribed>\r\n <a href=\"<tmpl_var thread.unsubscribe.url>\"><tmpl_var thread.unsubscribe.label></a>\r\n <tmpl_else>\r\n <a href=\"<tmpl_var thread.subscribe.url>\"><tmpl_var thread.subscribe.label></a>\r\n </tmpl_if>\r\n</tmpl_unless>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> · <tmpl_var pageList> · <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n\r\n<div align=\"center\">\r\n<a href=\"<tmpl_var callback.url>\">-=: <tmpl_var callback.label> :=-</a>\r\n</div>','Forum/Thread',1,1);
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue