Ticket #1263 (closed feature: fixed)
_getScriptLocation cannot handle query string
| Reported by: | openlayers | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.6 Release |
| Component: | general | Version: | 2.5 |
| Keywords: | Cc: | john.pulles@… | |
| State: | Complete |
Description
When adding a javascript file using the drupal drupal_add_js function, the src parameter may get a query string to prevent caching. The _getScriptLocation function cannot handle this, because it assumes that the scriptName is at the end of the string. In case of a query string, it should use the position of the ? as the end. A patch is attached.
For example:
<script type="text/javascript" src="/drupal/sites/all/modules/mapclient/OpenLayers-2.5/lib/OpenLayers.js?f"></script>
This would make the OpenLayers code more robust, and would facilitate integration with a CMS like Drupal.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

