summaryrefslogtreecommitdiffstats
path: root/source4/scripting/libjs/base.js
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining JavaScript code.Jelmer Vernooij2008-09-161-50/+0
|
* Remove unused libjs functions.Jelmer Vernooij2008-05-261-53/+0
| | | | (This used to be commit 657a87fecc2e79e3c3f66c551e392cc341bca8cf)
* Convert some more files to GPLv3.Andrew Kroeger2008-03-281-1/+1
| | | | (This used to be commit ebe5e8399422eb7e2ff4deb546338823e2718907)
* r17548: It is a good idea to commit the fix (from mkhl) before the test thatAndrew Bartlett2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shows the need for... Martin Kuhl writes: The ejs function `substitute_var' returns `undefined' when the first argument ends in a pattern that should be substituted. For that reason, the second assertion fails in the following test-case: ,---- | libinclude("base.js"); | | var obj = new Object(); | obj.FOO = "foo"; | obj.BAR = "bar"; | var str1 = "${FOO}:${BAR}"; | var str2 = "${FOO}:${BAR} "; // note the space after the brace | var sub1 = substitute_var(str1, obj); | var sub2 = substitute_var(str2, obj); | | assert(str1 + " " == str2); | assert(sub1 + " " == sub2); `---- The problem is that the function `split' returns a single-element array in both cases: a) the string to split doesn't contain the split pattern b) the string ends with the split pattern To work around this, the following patch tests this condition and returns `undefined' only if the string to split (`list[i]') really didn't contain a closing brace. (This used to be commit 8a6908200b1e459bc9067a9d1f9635185a7eee16)
* r11500: fixed a bug in the variable substition code using the new limit ↵Andrew Tridgell2007-10-101-1/+1
| | | | | | argument to split() (This used to be commit 25131efea8c1a2b0bfa7f999766ebcbab8fa8006)
* r8638: continue the trend of maknig our C functions true ejs objects by ↵Andrew Tridgell2007-10-101-0/+3
| | | | | | | | | | | | making the string functions into an object. To keep existing code working I have added: string_init(global); into base.js. That brings the functions into the global scope for our existing scripts (This used to be commit a978484738168b82441c4dc4f5f803d349769a4b)
* r8590: added server status utility functions for checking on the status of a ↵Andrew Tridgell2007-10-101-0/+11
| | | | | | | | | | | task via irpc - for stream tasks, returns the number of connections - for non-stream tasks, returns "RUNNING" For both, return "DISABLED" or "NOT RESPONDING" appropriately (This used to be commit 78d6303814382f7835212f5045f12180e396b540)
* r8355: - added a vsprintf() functionAndrew Tridgell2007-10-101-0/+8
| | | | | | - removed the --outputdir option from provision, as its not used any more (as ejs knows the real paths) (This used to be commit abbf9c703c17c2edc2d978dade3619a96c38d0d9)
* r8338: - added a substitute_var() js library function for doing hash drivenAndrew Tridgell2007-10-101-0/+29
| | | | | | | substitution of variables in strings - the js provision script now correctly processes provision.ldif (This used to be commit c2946003e06c4898ba0444cd0b69d3203753be94)
* r8318: added a bunch more ejs calls.Andrew Tridgell2007-10-101-1/+0
| | | | | | | | | getgr*() getpw*() strlower() strupper() IfaceList() (This used to be commit 1517ad490dd67302f38ab9dcd8a3b24b73b8d550)
* r8298: - started building a library of js routines in scripting/libjs/Andrew Tridgell2007-10-101-0/+53
- switched the existing test programs over to using the library - added install of js lib (This used to be commit 2a444dedbe44347268affc6458196f93ca7d372b)