Development

Changeset 30093

You must first sign up to be able to contribute.

Changeset 30093

Show
Ignore:
Timestamp:
07/01/10 16:04:28 (3 years ago)
Author:
COil
Message:

[sfProjectAnalyserPlugin]
* Now a "false" parameter can be use to desactivate an alert (instead of putting a treshhold)
* Fxed missing module generic alerts call

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfProjectAnalyserPlugin/README

    r30092 r30093  
    1031031.0.0: 
    104104 
     105  * Allow to switch code length check to off, si parameter is set to false instead of a threshold 
    105106  * Analyse the layout and partials of an application - LV 
    106107  * Allow to parse custom actions files - LV 
  • plugins/sfProjectAnalyserPlugin/config/plugin_sfpa.yml

    r30084 r30093  
     1################ 
     2# HELP 
     3# 
     4# 1 - Set "max_code_length" to false if you don't want the code length check to be done 
     5# max_code_length: false 
     6# 
     7################ 
     8 
    19# This is the default configuation on the plugin 
    210default: 
     
    1523  # Module level settings 
    1624  module: 
     25    # Set to false, if you don't want to do this check 
    1726    max_actions_count:  20            # Raise an alert if number of actions of a module is beyond this threshold 
    1827 
  • plugins/sfProjectAnalyserPlugin/lib/objects/paSfComponent.class.php

    r30074 r30093  
    150150  protected function processAlert4001($global_config, $config) 
    151151  { 
    152     if ($this->code_length > $config['max_code_length']
     152    if ($config['max_code_length'] && ($this->code_length > $config['max_code_length'])
    153153    { 
    154154      $alert = new paAlert( 
  • plugins/sfProjectAnalyserPlugin/lib/objects/paSfModule.class.php

    r30092 r30093  
    171171    { 
    172172      $partial->process(); 
    173     }     
     173    } 
     174 
     175    $this->processAlerts(); 
    174176  } 
    175177 
     
    367369  { 
    368370    // Modules alerts 
    369     if (count($this->actions) > $config['max_actions_count']
     371    if ($config['max_actions_count'] && (count($this->actions) > $config['max_actions_count'])
    370372    { 
    371373      $alert = new paAlert( 
  • plugins/sfProjectAnalyserPlugin/lib/objects/paSfPartial.class.php

    r30084 r30093  
    113113  protected function processAlert6001($config) 
    114114  { 
    115     if ($this->code_length > $config['max_code_length']
     115    if ($config['max_code_length'] && ($this->code_length > $config['max_code_length'])
    116116    { 
    117117      $alert = new paAlert( 
  • plugins/sfProjectAnalyserPlugin/lib/objects/paSfTemplate.class.php

    r30084 r30093  
    6666  protected function processAlert7001($config) 
    6767  { 
    68     if ($this->code_length > $config['max_code_length']
     68    if ($config['max_code_length'] && ($this->code_length > $config['max_code_length'])
    6969    { 
    7070      $alert = new paAlert( 
  • plugins/sfProjectAnalyserPlugin/lib/task/sfProjectAnalyseTask.class.php

    r30091 r30093  
    413413  { 
    414414    $html  = ''; 
    415     $html .= ' &raquo; Plugin sponsored by <a href="http://www.sqltechnologies.com">SQL-Technologies</a><br />'; 
     415    //$html .= ' &raquo; Plugin sponsored by <a href="http://www.sqltechnologies.com">SQL-Technologies</a><br />'; 
    416416    $html .= ' &raquo; Generated the '. date('Y-m-d H:m:s'). ' in '. $this->getElapsedTime($this->started_at, $this->ended_at). ' second(s)'; 
    417417    $html .= '</body></html>';