public function AcsfInitCommands::testHtaccessIsPatched in Acquia Cloud Site Factory Connector 8.2
Determines whether htaccess allows access to our apc_rebuild.php script.
2 calls to AcsfInitCommands::testHtaccessIsPatched()
- AcsfInitCommands::initVerify in acsf_init/
src/ Commands/ AcsfInitCommands.php - Verifies that acsf-init was successfully run in the current version.
- AcsfInitCommands::patchHtaccess in acsf_init/
src/ Commands/ AcsfInitCommands.php - Patches the htaccess file to allow access to our apc_rebuild.php script.
File
- acsf_init/
src/ Commands/ AcsfInitCommands.php, line 713
Class
- AcsfInitCommands
- Provides drush commands to set up a codebase for Acquia Cloud Site Factory.
Namespace
Drush\CommandsCode
public function testHtaccessIsPatched() {
if (!file_exists($this
->getHtaccessPath()) || !($content = file_get_contents($this
->getHtaccessPath()))) {
// If the htaccess file does not exist or is empty, then it cannot forbid
// access to apc_rebuild.php, so we can consider this a pass, albeit a
// weird one.
return TRUE;
}
// If a customer was for some reason really sure that they did not
// want our line in their .htaccess file, then adding it verbatim, but
// commented-out would suffice.
return strpos($content, self::ACSF_HTACCESS_PATCH) !== FALSE;
}