|
|
|
|
@ -967,7 +967,7 @@ while (my ($id, $template, $namespace) = $sth->array) {
|
|
|
|
|
} elsif ($namespace eq "USS/Submission") {
|
|
|
|
|
$newNamespace = "Collaboration/Thread";
|
|
|
|
|
if ($template =~ /attachment\.box/ixsg) {
|
|
|
|
|
my $box = '<div><a href="<tmpl_var attachment.url>"><img src="<tmpl_var attachment.icon>" border="0"> <tmpl_var attachment.name></a></div>';
|
|
|
|
|
my $box = '<div><a href="<tmpl_var attachment.url>"><img src="<tmpl_var attachment.icon>" border="0" alt="<tmpl_var attachment.name>"> <tmpl_var attachment.name></a></div>';
|
|
|
|
|
$template =~ s/\<tmpl_var\s+attachment\.box\>/$box/ixsg;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1013,10 +1013,326 @@ while (my ($id, $template, $namespace) = $sth->array) {
|
|
|
|
|
$template =~ s/back\.url/collaboration.url/ixsg;
|
|
|
|
|
$template =~ s/submissions_loop/post_loop/ixsg;
|
|
|
|
|
$template = '<a name="<tmpl_var assetId>"></a> <tmpl_if session.var.adminOn> <p><tmpl_var controls></p> </tmpl_if>'.$template;
|
|
|
|
|
my $replies = '<a name="<tmpl_var assetId>"></a>
|
|
|
|
|
<tmpl_if session.var.adminOn>
|
|
|
|
|
<p><tmpl_var controls></p>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.postBorder {
|
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.postBorderCurrent {
|
|
|
|
|
border: 3px dotted black;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.postSubject {
|
|
|
|
|
border-bottom: 1px solid #cccccc;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
.postData {
|
|
|
|
|
border-bottom: 1px solid #cccccc;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
color: black;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
.postControls {
|
|
|
|
|
border-top: 1px solid #cccccc;
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
color: black;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
.postMessage {
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
.currentThread {
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
}
|
|
|
|
|
.threadHead {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
border-bottom: 1px solid #cccccc;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
color: black;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
.threadData {
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="float: left; width: 70%">
|
|
|
|
|
<h1><tmpl_var replies.label></h1>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 30%; float: left; text-align: right;">
|
|
|
|
|
<script language="JavaScript" type="text/javascript"> <!--
|
|
|
|
|
function goLayout(){
|
|
|
|
|
location = document.discussionlayout.layoutSelect.options[document.discussionlayout.layoutSelect.selectedIndex].value
|
|
|
|
|
}
|
|
|
|
|
//-->
|
|
|
|
|
</script>
|
|
|
|
|
<form name="discussionlayout">
|
|
|
|
|
<select name="layoutSelect" size="1" onChange="goLayout()">
|
|
|
|
|
<option value="<tmpl_var layout.flat.url>" <tmpl_if layout.isFlat>selected="1"</tmpl_if>><tmpl_var layout.flat.label></option>
|
|
|
|
|
<option value="<tmpl_var layout.nested.url>" <tmpl_if layout.isNested>selected="1"</tmpl_if>><tmpl_var layout.nested.label></option>
|
|
|
|
|
<option value="<tmpl_var layout.threaded.url>" <tmpl_if layout.isThreaded>selected="1"</tmpl_if>><tmpl_var layout.threaded.label></option>
|
|
|
|
|
</select>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tmpl_if layout.isThreaded>
|
|
|
|
|
<!-- begin threaded layout -->
|
|
|
|
|
<tmpl_loop post_loop>
|
|
|
|
|
<tmpl_unless isThreadRoot>
|
|
|
|
|
<tmpl_if isCurrent>
|
|
|
|
|
<div class="postBorder">
|
|
|
|
|
<a name="<tmpl_var assetId>"></a>
|
|
|
|
|
<div class="postSubject">
|
|
|
|
|
<tmpl_var title>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postData">
|
|
|
|
|
<div style="float: left; width: 50%;">
|
|
|
|
|
<b><tmpl_var user.label>:</b>
|
|
|
|
|
<tmpl_if user.isVisitor>
|
|
|
|
|
<tmpl_var username>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<br />
|
|
|
|
|
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<b><tmpl_var views.label>:</b> <tmpl_var views><br />
|
|
|
|
|
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
|
|
|
|
<tmpl_unless hasRated>
|
|
|
|
|
<tmpl_var rate.label> [ <a href="<tmpl_var rate.url.1>">1</a>, <a href="<tmpl_var rate.url.2>">2</a>, <a href="<tmpl_var rate.url.3>">3</a>, <a href="<tmpl_var rate.url.4>">4</a>, <a href="<tmpl_var rate.url.5>">5</a> ]
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
<br />
|
|
|
|
|
<tmpl_if user.isModerator>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status> [ <a href="<tmpl_var approve.url>"><tmpl_var approve.label></a> | <a href="<tmpl_var deny.url>"><tmpl_var deny.label></a> ]<br />
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<tmpl_if user.isPoster>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status><br />
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postMessage">
|
|
|
|
|
<tmpl_var content>
|
|
|
|
|
</div>
|
|
|
|
|
<tmpl_unless isLocked>
|
|
|
|
|
<div class="postControls">
|
|
|
|
|
<tmpl_if user.canReply>
|
|
|
|
|
<a href="<tmpl_var reply.url>">[<tmpl_var reply.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<tmpl_if user.canEdit>
|
|
|
|
|
<a href="<tmpl_var edit.url>">[<tmpl_var edit.label>]</a>
|
|
|
|
|
<a href="<tmpl_var delete.url>">[<tmpl_var delete.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</tmpl_loop>
|
|
|
|
|
<table style="width: 100%">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="threadHead"><tmpl_var subject.label></td>
|
|
|
|
|
<td class="threadHead"><tmpl_var user.label></td>
|
|
|
|
|
<td class="threadHead"><tmpl_var date.label></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tmpl_loop post_loop>
|
|
|
|
|
<tmpl_unless isThreadRoot>
|
|
|
|
|
<tr <tmpl_if isCurrent>class="currentThread"</tmpl_if>>
|
|
|
|
|
<td class="threadData"><tmpl_loop indent_loop> </tmpl_loop><a href="<tmpl_var url>"><tmpl_var title.short></a></td>
|
|
|
|
|
<td class="threadData"><tmpl_var username></td>
|
|
|
|
|
<td class="threadData"><tmpl_var dateSubmitted.human></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</tmpl_loop>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<!-- end threaded layout -->
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tmpl_if layout.isFlat>
|
|
|
|
|
<!-- begin flat layout -->
|
|
|
|
|
<tmpl_loop post_loop>
|
|
|
|
|
<tmpl_unless isThreadRoot>
|
|
|
|
|
<div class="postBorder<tmpl_if isCurrent>Current</tmpl_if>">
|
|
|
|
|
<a name="<tmpl_var assetId>"></a>
|
|
|
|
|
<div class="postSubject">
|
|
|
|
|
<tmpl_var title>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postData">
|
|
|
|
|
<div style="float: left; width: 50%">
|
|
|
|
|
<b><tmpl_var user.label>:</b>
|
|
|
|
|
<tmpl_if user.isVisitor>
|
|
|
|
|
<tmpl_var username>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<br />
|
|
|
|
|
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<b><tmpl_var views.label>:</b> <tmpl_var views><br />
|
|
|
|
|
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
|
|
|
|
<tmpl_unless hasRated>
|
|
|
|
|
<tmpl_var rate.label> [ <a href="<tmpl_var rate.url.1>">1</a>, <a href="<tmpl_var rate.url.2>">2</a>, <a href="<tmpl_var rate.url.3>">3</a>, <a href="<tmpl_var rate.url.4>">4</a>, <a href="<tmpl_var rate.url.5>">5</a> ]
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
<br />
|
|
|
|
|
<tmpl_if user.isModerator>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status> [ <a href="<tmpl_var approve.url>"><tmpl_var approve.label></a> | <a href="<tmpl_var deny.url>"><tmpl_var deny.label></a> ]<br />
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<tmpl_if user.isPoster>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status><br />
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postMessage">
|
|
|
|
|
<tmpl_var content>
|
|
|
|
|
</div>
|
|
|
|
|
<tmpl_unless isLocked>
|
|
|
|
|
<div class="postControls">
|
|
|
|
|
<tmpl_if user.canReply>
|
|
|
|
|
<a href="<tmpl_var reply.url>">[<tmpl_var reply.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<tmpl_if user.canEdit>
|
|
|
|
|
<a href="<tmpl_var edit.url>">[<tmpl_var edit.label>]</a>
|
|
|
|
|
<a href="<tmpl_var delete.url>">[<tmpl_var delete.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</tmpl_loop>
|
|
|
|
|
<!-- end flat layout -->
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tmpl_if layout.isNested>
|
|
|
|
|
<!-- begin nested layout -->
|
|
|
|
|
<tmpl_loop post_loop>
|
|
|
|
|
<tmpl_unless isThreadRoot>
|
|
|
|
|
<div style="margin-left: <tmpl_var depthX10>px;">
|
|
|
|
|
<div class="postBorder<tmpl_if isCurrent>Current</tmpl_if>">
|
|
|
|
|
<a name="<tmpl_var assetId>"></a>
|
|
|
|
|
<div class="postSubject">
|
|
|
|
|
<tmpl_var title>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postData">
|
|
|
|
|
<div style="float: left; width: 50%">
|
|
|
|
|
<b><tmpl_var user.label>:</b>
|
|
|
|
|
<tmpl_if user.isVisitor>
|
|
|
|
|
<tmpl_var username>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<br />
|
|
|
|
|
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<b><tmpl_var views.label>:</b> <tmpl_var views><br />
|
|
|
|
|
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
|
|
|
|
<tmpl_unless hasRated>
|
|
|
|
|
<tmpl_var rate.label> [ <a href="<tmpl_var rate.url.1>">1</a>, <a href="<tmpl_var rate.url.2>">2</a>, <a href="<tmpl_var rate.url.3>">3</a>, <a href="<tmpl_var rate.url.4>">4</a>, <a href="<tmpl_var rate.url.5>">5</a> ]
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
<br />
|
|
|
|
|
<tmpl_if user.isModerator>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status> [ <a href="<tmpl_var approve.url>"><tmpl_var approve.label></a> | <a href="<tmpl_var deny.url>"><tmpl_var deny.label></a> ]<br />
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<tmpl_if user.isPoster>
|
|
|
|
|
<b><tmpl_var status.label>:</b> <tmpl_var status><br />
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postMessage">
|
|
|
|
|
<tmpl_var content>
|
|
|
|
|
</div>
|
|
|
|
|
<tmpl_unless isLocked>
|
|
|
|
|
<div class="postControls">
|
|
|
|
|
<tmpl_if user.canReply>
|
|
|
|
|
<a href="<tmpl_var reply.url>">[<tmpl_var reply.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<tmpl_if user.canEdit>
|
|
|
|
|
<a href="<tmpl_var edit.url>">[<tmpl_var edit.label>]</a>
|
|
|
|
|
<a href="<tmpl_var delete.url>">[<tmpl_var delete.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</tmpl_loop>
|
|
|
|
|
<!-- end nested layout -->
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tmpl_if pagination.pageCount.isMultiple>
|
|
|
|
|
<div class="pagination" style="margin-top: 20px;">
|
|
|
|
|
[ <tmpl_var pagination.previousPage> | <tmpl_var pagination.pageList.upTo10> | <tmpl_var pagination.nextPage> ]
|
|
|
|
|
</div>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="margin-top: 20px;">
|
|
|
|
|
<tmpl_if user.isModerator>
|
|
|
|
|
<tmpl_if isSticky>
|
|
|
|
|
<a href="<tmpl_var unstick.url>">[<tmpl_var unstick.label>]</a>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var stick.url>">[<tmpl_var stick.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<tmpl_if isLocked>
|
|
|
|
|
<a href="<tmpl_var unlock.url>">[<tmpl_var unlock.label>]</a>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var lock.url>">[<tmpl_var lock.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
<tmpl_unless user.isVisitor>
|
|
|
|
|
<tmpl_if user.isSubscribed>
|
|
|
|
|
<a href="<tmpl_var unsubscribe.url>">[<tmpl_var unsubscribe.label>]</a>
|
|
|
|
|
<tmpl_else>
|
|
|
|
|
<a href="<tmpl_var subscribe.url>">[<tmpl_var subscribe.label>]</a>
|
|
|
|
|
</tmpl_if>
|
|
|
|
|
</tmpl_unless>
|
|
|
|
|
</div>';
|
|
|
|
|
$template =~ s/<tmpl_var\s+replies>/$replies/ixsg;
|
|
|
|
|
WebGUI::SQL->write("update template set template=".quote($template).", namespace=".quote($newNamespace)." where templateId=".quote($id)." and namespace=".quote($namespace));
|
|
|
|
|
}
|
|
|
|
|
$sth->finish;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "\tMigrating EventsCalendar templates\n" unless ($quiet);
|
|
|
|
|
my $sth = WebGUI::SQL->read("select templateId,template from template where namespace = 'EventsCalendar'");
|
|
|
|
|
while (my ($id, $template) = $sth->array) {
|
|
|
|
|
@ -1030,6 +1346,8 @@ while (my ($id, $template) = $sth->array) {
|
|
|
|
|
$sth->finish;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "\tConverting template system to asset tree\n" unless ($quiet);
|
|
|
|
|
WebGUI::SQL->write("update template set namespace='Layout' where namespace='page'");
|
|
|
|
|
WebGUI::SQL->write("alter table template add column assetId varchar(22) not null");
|
|
|
|
|
@ -1089,7 +1407,7 @@ WebGUI::SQL->write("alter table template drop column name");
|
|
|
|
|
WebGUI::SQL->write("delete from template where assetId is null or assetId = ''"); # protect ourselves from crap
|
|
|
|
|
WebGUI::SQL->write("alter table template add primary key (assetId)");
|
|
|
|
|
my @wobjectTypes = qw(Article Poll Survey WSClient DataForm Layout EventsCalendar Navigation HttpProxy IndexedSearch MessageBoard Product SQLReport SyndicatedContent Shortcut);
|
|
|
|
|
my @allWobjectTypes = (@wobjectTypes,@otherWobjects);
|
|
|
|
|
my @allWobjectTypes = (@wobjectTypes,@otherWobjects,'Folder');
|
|
|
|
|
print "\t\tMigrating wobject templates to new IDs\n" unless ($quiet);
|
|
|
|
|
foreach my $type (@allWobjectTypes) {
|
|
|
|
|
print "\t\t\t$type\n" unless ($quiet);
|
|
|
|
|
@ -1532,11 +1850,11 @@ sub walkTree {
|
|
|
|
|
WebGUI::SQL->write("update wobject set namespace='Navigation' where assetId=".quote($wobjectId));
|
|
|
|
|
} elsif ($wobject->{namespace} eq "FileManager") {
|
|
|
|
|
print "\t\t\tConverting File Manager ".$wobject->{wobjectId}." into File Folder\n" unless ($quiet);
|
|
|
|
|
WebGUI::SQL->write("update asset set className='WebGUI::Asset::Folder' where assetId=".quote($wobjectId));
|
|
|
|
|
WebGUI::SQL->write("update asset set className='WebGUI::Asset::Wobject::Folder' where assetId=".quote($wobjectId));
|
|
|
|
|
WebGUI::SQL->write("insert into Folder (assetId,templateId) values (".quote($wobjectId).", '15')");
|
|
|
|
|
WebGUI::SQL->write("update wobject set namespace='Folder' where wobjectId=".quote($wobject->{wobjectId}));
|
|
|
|
|
print "\t\t\tMigrating attachments for File Manager ".$wobject->{wobjectId}."\n" unless ($quiet);
|
|
|
|
|
my $sth = WebGUI::SQL->read("select * from FileManager_file where wobjectId=".quote($wobjectId)." order by sequenceNumber");
|
|
|
|
|
my $sth = WebGUI::SQL->read("select * from FileManager_file where wobjectId=".quote($wobject->{wobjectId})." order by sequenceNumber");
|
|
|
|
|
my $rank = 1;
|
|
|
|
|
while (my $data = $sth->hashRef) {
|
|
|
|
|
foreach my $field ("downloadFile","alternateVersion1","alternateVersion2") {
|
|
|
|
|
@ -1559,7 +1877,7 @@ sub walkTree {
|
|
|
|
|
WebGUI::SQL->write("insert into asset (assetId, parentId, lineage, className, state, title, menuTitle,
|
|
|
|
|
url, startDate, endDate, isHidden, ownerUserId, groupIdView, groupIdEdit, synopsis, assetSize
|
|
|
|
|
) values (".
|
|
|
|
|
quote($newId).", ".quote($wobjectId).", ".quote($wobjectLineage.sprintf("%06d",1)).",
|
|
|
|
|
quote($newId).", ".quote($wobjectId).", ".quote($wobjectLineage.sprintf("%06d",$rank)).",
|
|
|
|
|
'".$class."','published',".quote($data->{fileTitle}).", ".
|
|
|
|
|
quote($data->{fileTitle}).", ".quote(fixUrl($newId,$wobjectUrl.'/'.$data->{$field})).",
|
|
|
|
|
".quote($wobject->{startDate}).", ".quote($wobject->{endDate}).", 1, ".quote($ownerId).",
|
|
|
|
|
@ -1669,6 +1987,14 @@ sub walkTree {
|
|
|
|
|
lineage=>$threadLineage,
|
|
|
|
|
isHidden => 1
|
|
|
|
|
});
|
|
|
|
|
my $storageId;
|
|
|
|
|
if ($submission->{image}) {
|
|
|
|
|
$storageId = copyFile($submission->{image},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId});
|
|
|
|
|
copyFile('thumb-'.$submission->{image},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId},$storageId);
|
|
|
|
|
}
|
|
|
|
|
if ($submission->{attachment}) {
|
|
|
|
|
$storageId = copyFile($submission->{attachment},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId},$storageId);
|
|
|
|
|
}
|
|
|
|
|
WebGUI::SQL->setRow("Post","assetId",{
|
|
|
|
|
assetId=>$id,
|
|
|
|
|
threadId=>$id,
|
|
|
|
|
@ -1684,6 +2010,7 @@ sub walkTree {
|
|
|
|
|
userDefined3=>$submission->{userDefined3},
|
|
|
|
|
userDefined4=>$submission->{userDefined4},
|
|
|
|
|
userDefined5=>$submission->{userDefined5},
|
|
|
|
|
storageId=>$storageId,
|
|
|
|
|
rating=>0
|
|
|
|
|
},undef,$id);
|
|
|
|
|
my $threadSubscriptionGroup = WebGUI::Group->new("new");
|
|
|
|
|
@ -1740,13 +2067,6 @@ sub walkTree {
|
|
|
|
|
rating=>$post->{rating}
|
|
|
|
|
},undef,$postId);
|
|
|
|
|
$postRank++;
|
|
|
|
|
if ($submission->{image}) {
|
|
|
|
|
my $storageId = copyFile($submission->{image},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId});
|
|
|
|
|
copyFile('thumb-'.$submission->{image},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId},$storageId);
|
|
|
|
|
}
|
|
|
|
|
if ($submission->{attachment}) {
|
|
|
|
|
my $storageId = copyFile($submission->{attachment},$wobject->{wobjectId}.$session{os}{slash}.$submission->{USS_submissionId});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$posts->finish;
|
|
|
|
|
WebGUI::SQL->setRow("Thread","assetId",{
|
|
|
|
|
|