| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | // Copyright Zikula Foundation, licensed MIT. |
||
| 25 | (function($) { |
||
| 26 | var defaultOptions = { |
||
| 27 | type: 'POST', |
||
| 28 | timeout: Zikula.Config.ajaxtimeout || 5000 |
||
| 29 | }; |
||
| 30 | if (Zikula.Config.sessionName) { |
||
| 31 | var sessionId = new RegExp(Zikula.Config.sessionName + '=(.*?)(;|$)').exec(document.cookie); |
||
| 32 | if (sessionId && sessionId[1]) { |
||
| 33 | defaultOptions.headers = { |
||
| 34 | 'X-ZIKULA-AJAX-TOKEN': sessionId[1] |
||
| 35 | }; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | $.ajaxSetup(defaultOptions); |
||
| 39 | })(jQuery); |
||
| 40 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.