MediaWiki master
ComposerVendorHtaccessCreator.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Composer;
22
32
36 public static function onEvent() {
37 $fname = dirname( dirname( __DIR__ ) ) . "/vendor/.htaccess";
38 if ( file_exists( $fname ) ) {
39 // Already exists
40 return;
41 }
42
43 file_put_contents( $fname, "Require all denied\n" );
44 }
45}
Creates a .htaccess in the vendor/ directory to prevent web access.
static onEvent()
Handle post-install-cmd and post-update-cmd hooks.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...