Skip to content

Commit d334732

Browse files
author
delphidabbler
committed
Revise license statement attached to imported SWAG snippets
1 parent 18fec20 commit d334732

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

Src/SWAG.UImporter.pas

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* CodeSnip format and adds them to the database.
1010
}
1111

12-
// TODO -cDatabase: check BSD3URI const has valid license info
1312

1413
unit SWAG.UImporter;
1514

@@ -161,27 +160,20 @@ function TSWAGImporter.ExtraBoilerplate: IActiveText;
161160
sStatementPrefix = 'This snippet was imported from the ';
162161
sStatementLinkText = 'SWAG Pascal Archive';
163162
sStatementPostfix = '. ';
164-
sLicensePrefix = 'Unless stated otherwise this snippet is licensed under '
165-
+ 'the ';
166-
sLicenseLinkText = 'BSD 3-Clause License';
167-
sLicensePostfix = '.';
168-
const
169-
// URLs of web pages referenced from links in boilerplate
163+
sLicense = 'The code snippets in the archive pages are generally freeware or '
164+
+ 'public domain as defined by any accompanying comments and copyright '
165+
+ 'statements. Contact the author if in doubt.';
166+
// URL of web page referenced from links in boilerplate
170167
SWAGDBURI = 'https://github.com/delphidabbler/swag';
171-
BSD3URI = 'http://opensource.org/licenses/BSD-3-Clause';
172168
var
173-
// Active text attributes for links included in boilerplate
169+
// Active text attributes for link included in boilerplate
174170
SWAGDBURIAttr: IActiveTextAttrs;
175-
BSD3URIAttr: IActiveTextAttrs;
176171
begin
177172
if not Assigned(fExtraBoilerplate) then
178173
begin
179174
SWAGDBURIAttr := TActiveTextFactory.CreateAttrs(
180175
TActiveTextAttr.Create('href', SWAGDBURI)
181176
);
182-
BSD3URIAttr := TActiveTextFactory.CreateAttrs(
183-
TActiveTextAttr.Create('href', BSD3URI)
184-
);
185177
fExtraBoilerplate := TActiveTextFactory.CreateActiveText;
186178
fExtraBoilerplate.AddElem(
187179
TActiveTextFactory.CreateActionElem(ekPara, fsOpen)
@@ -202,19 +194,7 @@ function TSWAGImporter.ExtraBoilerplate: IActiveText;
202194
TActiveTextFactory.CreateTextElem(sStatementPostfix)
203195
);
204196
fExtraBoilerplate.AddElem(
205-
TActiveTextFactory.CreateTextElem(sLicensePrefix)
206-
);
207-
fExtraBoilerplate.AddElem(
208-
TActiveTextFactory.CreateActionElem(ekLink, BSD3URIAttr, fsOpen)
209-
);
210-
fExtraBoilerplate.AddElem(
211-
TActiveTextFactory.CreateTextElem(sLicenseLinkText)
212-
);
213-
fExtraBoilerplate.AddElem(
214-
TActiveTextFactory.CreateActionElem(ekLink, BSD3URIAttr, fsClose)
215-
);
216-
fExtraBoilerplate.AddElem(
217-
TActiveTextFactory.CreateTextElem(sLicensePostfix)
197+
TActiveTextFactory.CreateTextElem(sLicense)
218198
);
219199
fExtraBoilerplate.AddElem(
220200
TActiveTextFactory.CreateActionElem(ekPara, fsClose)

0 commit comments

Comments
 (0)