You are here

function search_api_drush_static in Search API 7

Does a static lookup to prevent Drush 4 from running twice.

Parameters

string $function: The Drush function being called.

Return value

bool TRUE if the function was already called in this Drush execution, FALSE otherwise.

See also

http://drupal.org/node/704848

11 calls to search_api_drush_static()
drush_search_api_clear in ./search_api.drush.inc
Clear an index.
drush_search_api_disable in ./search_api.drush.inc
Disable index(es).
drush_search_api_enable in ./search_api.drush.inc
Enable index(es).
drush_search_api_execute_tasks in ./search_api.drush.inc
Execute all pending tasks or all for a given server.
drush_search_api_index in ./search_api.drush.inc
Index items.

... See full list

File

./search_api.drush.inc, line 644
Drush commands for SearchAPI.

Code

function search_api_drush_static($function) {
  static $index = array();
  if (isset($index[$function])) {
    return TRUE;
  }
  $index[$function] = TRUE;
  return FALSE;
}