added missing template

This commit is contained in:
JT Smith 2004-05-02 20:39:19 +00:00
parent 217a3396ec
commit 6e5af21ca4
3 changed files with 12 additions and 1 deletions

View file

@ -33,7 +33,7 @@
Dillon).
- Bugfix [ 927266 ] WG 6.0.1 Data Form Issue
- Fixed a problem where replacements weren't being applied to forum subjects.
- Fixed the edit controls on the USS.

View file

@ -36,6 +36,15 @@ while (my $data = $sth->hashRef) {
}
$sth->finish;
print "\tFixing submission controls.\n" unless ($quiet);
my $sth = WebGUI::SQL->read("select * from template where namespace in ('USS')");
while (my $data = $sth->hashRef) {
$data->{template} =~ s/\<tmpl_var submission\.controls\>/<tmpl_if session.var.adminOn><tmpl_var submission.controls><tmpl_else><tmpl_unless submission.currentUser>[<a href="<tmpl_var submission.edit.url>"><tmpl_var submission.edit.label><\/a>]<\/tmpl_unless><\/tmpl_if>/ig;
$data->{template} =~ s/\[<a href="\<tmpl_var submission\.edit\.url\>"\>\<tmpl_var submission\.edit\.label\>\<\/a\>\]/<tmpl_unless session.var.adminOn>[<a href="<tmpl_var submission.edit.url>"><tmpl_var submission.edit.label><\/a>]<\/tmpl_unless>/ig;
WebGUI::SQL->write("update template set template=".quote($data->{template})." where namespace=".quote($data->{namespace})." and templateId=".quote($data->{templateId}));
}
$sth->finish;
WebGUI::Session::close();

View file

@ -28,4 +28,6 @@ insert into international (internationalId,languageId,namespace,message,lastUpda
update international set message='A Web Services Client allows a user to query data from any SOAP server to which they have access. This wobject is in development status and should not be made accessible to un-trusted site administratores.<p></p>\n\n<b>SOAP URI/WSDL</b><br>\nFrom the SOAP::Lite manpage, \"URIs are just identifiers. They may look like URLs, but they are not guaranteed to point to anywhere and shouldn\'t be used as such pointers. URIs assume to be unique within the space of all XML documents, so consider them as unique identifiers and nothing else.\" If you specify a URI, you probably also need a proxy below. Alternatively, you can specify a WSDL file in place of a URI. This file refers to a real location at which a SOAP service description can be downloaded and used. For our purposes, the file must end in \".wsdl\" to be properly recognized. If you use a WSDL file, you probably don\'t need to specify a proxy.<p></p>\n\n<b>SOAP Proxy</b><br>\nThe SOAP proxy is the full name of the server and/or script that is listening for SOAP calls. For example:\n<code>http://mydomain.com/cgi-bin/soaplistener.pl</code><p></p>\n\n<b>SOAP Method/Call</b><br>\nThe SOAP method is the name of the function to be invoked by the SOAP server. Include any extra parameters in the SOAP Call Parameters field below.<p></p>\n\n<b>SOAP Call Parameters</b><br>\nIf your SOAP call requires any additional parameters, include them here as a valid perl hash, array or scalar. For example: <code>\'userid\' => \'12\', companyid => \'^FormParam(\"companyid\"); Whether you need to use scalar, hash or array is entirely dependent on what your SOAP service expects as input. Likewise, what you get back is entirely dependent on what the service deems to return.\'</code>.<p></p>\n\n<b>Execute by default?</b><br>\nLeave this set to yes unless your page is calling itself with additional parameters. You will probably know if/when you need to turn off default execution. To force execution when it has been disabled by default, pass a form variable \"targetWobjects\" specifying the name of the SOAP call to force execution.<p></p>\n\n<b>Template</b><br>\nChoose a layout for this SOAP client.<p></p>\n\n<b>Preprocess macros on query?</b><br>\nIf you\'re using WebGUI macros in your query you\'ll want to check this box.<p></p>\n\n<b>Pagination After</b><br>\nHow many rows should be displayed before splitting the results into separate pages? In other words, how many rows should be displayed per page?<p></p>\n\n<b>Pagination Variable</b><br>\nBecause a SOAP call can return complex data structures, you\'ll need to specify which named variable is to be paginated. If none is specified, no pagination will occur.<p></p>\n\n<b>Debug?</b><br>\nIf you want to display debugging and error messages on the page, check this box.<p></p>\n\n<b>Decode utf8?</b><br />\nThis option will only display if you have Data::Structure::Util installed. SOAP calls return utf8 strings even if they may not have utf8 characters within them. This converts utf8 characters to that there aren\'t collisions with any character sets specified in the page header. Deocing is turned off by default, but try turning it on if you see goofy gibberish, especially with the display of copyright symbols and the like.' where namespace='WSClient' and internationalId=71 and languageId=1;
INSERT INTO international VALUES (27,'WSClient',1,'Cache expires',1055349028,NULL);
delete from template where templateId=3 and namespace='USS/Submission';
INSERT INTO template VALUES (3,'Link','<h1><tmpl_var title></h1>\r\n\r\n<tmpl_if content>\r\n<p>\r\n<b>Link Description</b><br />\r\n<tmpl_var content>\r\n</p>\r\n</tmpl_if>\r\n\r\n<b>Link URL</b><br />\r\n<a href=\"<tmpl_var userDefined1.value>\"><tmpl_var userDefined1.value></a>\r\n\r\n<p>\r\n<a href=\"<tmpl_var back.url>\">List All Links</a>\r\n</p>\r\n\r\n\r\n<tmpl_if canEdit>\r\n<p>\r\n <a href=\"<tmpl_var edit.url>\">Edit</a>\r\n &middot;\r\n <a href=\"<tmpl_var delete.url>\"><tmpl_var delete.label></a>\r\n</p>\r\n</tmpl_if>\r\n\r\n<tmpl_if canChangeStatus>\r\n <p>\r\n<b>Status:</b> <tmpl_var status.status> ||\r\n <a href=\"<tmpl_var approve.url>\"><tmpl_var approve.label></a>\r\n &middot;\r\n <a href=\"<tmpl_var deny.url>\"><tmpl_var deny.label></a>\r\n </p>\r\n</tmpl_if>\r\n\r\n\r\n\r\n','USS/Submission',1,1);