Skip to content

Instantly share code, notes, and snippets.

View drupler's full-sized avatar
🇬🇧

Rajeev Kumar drupler

🇬🇧
  • United Kingdom
View GitHub Profile
$entity_type = 'node';
$entity_id = mynodeid;
$table = apachesolr_get_indexer_table($entity_type);
$env_id = apachesolr_default_environment();
$query = db_select($table, 'aie')
->fields('aie')
->condition('aie.entity_id', $entity_id, '=');
if ($table == 'apachesolr_index_entities') {
<?php
/**
* Invokes a hook in all enabled modules that implement it.
*
* @param $hook
* The name of the hook to invoke.
* @param ...
* Arguments to pass to the hook.
*
* @return
# Protect files and directories from prying eyes.
RedirectMatch 404 "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$"
# Disallow various other files
RedirectMatch 404 (README\.txt|INSTALL\.txt|CHANGELOG\.txt|COPYRIGHT\.txt|INSTALL\.mysql\.txt|INSTALL\.pgsql\.txt|LICENSE\.txt|MAINTAINERS\.txt|UPGRADE\.txt)
# Disallow admin paths
Redirect 404 /admin
Redirect 404 /scripts
Redirect 404 /profile