/[drupal]/contributions/modules/jq/jq.admin.inc
ViewVC logotype

Diff of /contributions/modules/jq/jq.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.3, Wed Oct 1 01:27:33 2008 UTC revision 1.2.2.4, Wed Oct 1 02:02:09 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: jq.admin.inc,v 1.2.2.2 2008/05/04 19:06:16 aaron Exp $  // $Id: jq.admin.inc,v 1.2.2.3 2008/10/01 01:27:33 aaron Exp $
3    
4  /**  /**
5   *  The administration form. Allows an administrator to turn off specific plugins   *  The administration form. Allows an administrator to turn off specific plugins
# Line 77  function jq_settings_form() { Line 77  function jq_settings_form() {
77  function _jq_plugins($display_errors = FALSE, $log_errors = TRUE) {  function _jq_plugins($display_errors = FALSE, $log_errors = TRUE) {
78    $plugins = array();    $plugins = array();
79    
80    // Scan the '/plugins' and '/sites/example.com/files/plugins' directories for .js and .css files.    // Scan the '/plugins' and '/sites/example.com/plugins' directories for .js and .css files.
81    // If there are multiple plugins with the same filename in the directory, the LAST file read will be used.    // If there are multiple plugins with the same filename in the directory, the LAST file read will be used.
82    $files = drupal_system_listing('(\.js$|\.css$)', 'plugins', 'basename', 0);    $files = drupal_system_listing('(\.js$|\.css$)', 'plugins', 'basename', 0);
83    foreach ($files as $file) {    foreach ($files as $file) {
84      $plugins[$file->name] = array(      $plugins[$file->name]['name'] = $file->name;
85        'name' => $file->name,      $plugins[$file->name]['plugin'] = $file->name;
86        'plugin' => $file->name,      if (substr($file->filename, strripos($file->filename, '.') + 1) == 'js') {
87      );        $plugins[$file->name]['files']['js'][] = $file->filename;
     if (substr($filename, -1 * strripos($filename, '.')) == 'js') {  
       $plugins[$file->name]['files']['js'] = $file->filename;  
88      }      }
89      else {      else {
90        $plugins[$file->name]['files']['css'] = $file->filename;        $plugins[$file->name]['files']['css'][] = $file->filename;
91      }      }
92    }    }
93    

Legend:
Removed from v.1.2.2.3  
changed lines
  Added in v.1.2.2.4

  ViewVC Help
Powered by ViewVC 1.1.2