/[drupal]/contributions/modules/fasttoggle/fasttoggle.module
ViewVC logotype

Diff of /contributions/modules/fasttoggle/fasttoggle.module

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

revision 1.8.2.7, Sat Nov 8 11:24:54 2008 UTC revision 1.8.2.8, Sat Nov 8 11:38:19 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: fasttoggle.module,v 1.8.2.6 2008/11/08 11:09:20 timcn Exp $  // $Id: fasttoggle.module,v 1.8.2.7 2008/11/08 11:24:54 timcn Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 371  function fasttoggle_fasttoggle_labels($s Line 371  function fasttoggle_fasttoggle_labels($s
371  /**  /**
372   * Returns an array with labels for a given setting.   * Returns an array with labels for a given setting.
373   */   */
374  function _fasttoggle_get_label($label) {  function _fasttoggle_get_label($label, $style = NULL) {
375    static $labels;    static $labels = array();
376    
377    if ($labels == NULL) {    if (!isset($style)) {
378      $style = variable_get('fasttoggle_label_style', FASTTOGGLE_LABEL_STATUS);      $style = variable_get('fasttoggle_label_style', FASTTOGGLE_LABEL_STATUS);
379      $labels = module_invoke_all('fasttoggle_labels', $style);    }
380    
381      if (!isset($lables[$style])) {
382        $lables[$style] = module_invoke_all('fasttoggle_labels', $style);
383    
384      // Allow custom labels in settings.php.      // Allow custom labels in settings.php.
385      if ($style == FASTTOGGLE_LABEL_CUSTOM) {      if ($style == FASTTOGGLE_LABEL_CUSTOM) {
386        $labels = array_merge($labels, variable_get('fasttoggle_labels', array()));        $lables[$style] = array_merge($lables[$style], variable_get('fasttoggle_labels', array()));
387      }      }
388    }    }
389    
390    return $labels[$label];    return $lables[$style][$label];
391  }  }
392    
393    

Legend:
Removed from v.1.8.2.7  
changed lines
  Added in v.1.8.2.8

  ViewVC Help
Powered by ViewVC 1.1.2