| 68 |
* |
* |
| 69 |
* @return an array where key is file name and value is file path |
* @return an array where key is file name and value is file path |
| 70 |
* |
* |
| 71 |
* Example: array('color.js' => 'plugins/twolibrary/color.js') |
* Example: array('color.js' => 'sites/all/plugins/twolibrary/color.js') |
| 72 |
* |
* |
| 73 |
* If there are multiple plugins with the same filename in the directory, |
* If there are multiple plugins with the same filename in the directory, |
| 74 |
* the LAST file read will be used. |
* the LAST file read will be used. |
| 81 |
function jqp_scan_dir() { |
function jqp_scan_dir() { |
| 82 |
static $files; |
static $files; |
| 83 |
if (!isset($files)) { |
if (!isset($files)) { |
| 84 |
$files = drupal_system_listing('(\.js$|\.css$)', 'plugins', 'basename', 0); |
if ($cache = cache_get('jqp_plugins')) { |
| 85 |
|
$files = $cache->data; |
| 86 |
|
} |
| 87 |
|
else { |
| 88 |
|
$files = drupal_system_listing('(\.js$|\.css$)', 'plugins', 'basename', 0); |
| 89 |
|
cache_set('jqp_plugins', $files); |
| 90 |
|
} |
| 91 |
} |
} |
| 92 |
return $files; |
return $files; |
| 93 |
} |
} |