MediaWiki master
ComposerVendorHtaccessCreator.php
Go to the documentation of this file.
1<?php
8namespace MediaWiki\Composer;
9
19
23 public static function onEvent() {
24 $fname = dirname( dirname( __DIR__ ) ) . "/vendor/.htaccess";
25 if ( file_exists( $fname ) ) {
26 // Already exists
27 return;
28 }
29
30 file_put_contents( $fname,
31 "Require all denied\n" .
32 "Satisfy All\n" );
33 }
34}
Creates a .htaccess in the vendor/ directory to prevent web access.
static onEvent()
Handle post-install-cmd and post-update-cmd hooks.
Copyright (C) 2017 Kunal Mehta legoktm@debian.org