Skip to content
Snippets Groups Projects
Commit 371168ab authored by Doug Green's avatar Doug Green
Browse files

yaff for drush plugin

parent 76677336
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,13 @@ define('SEVERITY_CRITICAL', 9);
function _coder_review_reviews() {
static $cache = array();
if (!$cache) {
$cache = function_exists('module_invoke_all') ? module_invoke_all('reviews') : coder_review_reviews();
// Always get the coder review.
$cache = coder_review_reviews();
// When Drupal is bootstrapped, also get all reviews.
if (function_exists('module_invoke_all')) {
$cache = array_merge($cache, module_invoke_all('reviews'));
}
}
return $cache;
}
......@@ -1430,7 +1436,7 @@ function _t($string, $args = array(), $options = array()) {
* @see l()
*/
function _l($text, $path, $options = array()) {
return function_exists('l') ? l($text, $path, $options) : "$text $path";
return _drush() ? "$text $path" : l($text, $path, $options);
}
/**
......
......@@ -258,8 +258,8 @@ function _drush_coder_git_path() {
*/
function drush_coder_review() {
// Bootstrap Drupal if it is available.
if (drush_conf_path(_DRUSH_BOOTSTRAP_SELECTED_URI)) {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
if (drush_conf_path(_drush_bootstrap_selected_uri()) && !function_exists('drupal_goto')) {
drush_bootstrap_to_phase(DRUSH_BOOTSTRAP_DRUPAL_LOGIN);
}
// Bootstrap enough of coder review to run.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment