Ticket #66 (closed defect: fixed)
Patch: Linker-Plugin - define files in configuration
| Reported by: | Niko <ns@…> | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin_Linker | Version: | 0.1 |
| Severity: | normal | Keywords: | linker patch |
| Cc: |
Description
Patch: define files in configuration
Doesn't require a scan.php, the files can be defined through config.Linker.files. (same syntax as scan.php returns)
Usage-Example:
config.Linker.backend = null; //switch off the backend, default is scan.php config.Linker.files = ['/file.html', [ [ '/dir', [ '/dir/file1.html', /dir/file2.html' ] ] ] ]; //same syntax as scan.php returns
There was allread a discussion about this: http://xinha.gogo.co.nz/punbb/viewtopic.php?id=49
imho it doesn't hurt to apply this patch, anyone who doesn't need it can just ignore the files-setting.
--- linker.js (Revision 38)
+++ linker.js (Arbeitskopie)
@@ -15,7 +15,8 @@
HTMLArea.Config.prototype.Linker =
{
- 'backend' : _editor_url + 'plugins/Linker/scan.php'
+ 'backend' : _editor_url + 'plugins/Linker/scan.php',
+ 'files' : null
}
@@ -310,7 +311,12 @@
if(this.files == false)
{
- HTMLArea._getback(linker.lConfig.backend, function(txt) { lDialog.files = eval(txt); lDialog._prepareDialog(); });
+ if(linker.lConfig.backend != null && linker.lConfig.backend != '') {
+ //get files from backend
+ HTMLArea._getback(linker.lConfig.backend, function(txt) { lDialog.files = eval(txt); lDialog._prepareDialog(); });
+ } else if(linker.lConfig.files != null) {
+ //get files from plugin-config
+ lDialog.files = linker.lConfig.files;
+ lDialog._prepareDialog();
+ }
return;
}
var files = this.files;
Change History
Note: See
TracTickets for help on using
tickets.
