Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit 61550e8

Browse files
author
Grant Kinney
committed
Includes autoloaded components through composer
1 parent ae7d8dc commit 61550e8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
],
3939
"minimum-stability": "stable",
4040
"scripts": {
41-
"post-install-cmd": "cp config.ini.php vendor/piwik/piwik/config/"
41+
"post-install-cmd": "cp index.php vendor/piwik/piwik/ && cp config.ini.php vendor/piwik/piwik/config/"
4242
},
4343
"extra": {
4444
"installer-paths": {

index.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Copy to vendor/piwik/piwik and serve web root from there
4+
*/
5+
6+
// Autoload dependencies installed by composer
7+
require_once '../../autoload.php';
8+
9+
// Bootstrap piwik application
10+
// Duplicated from vendor/piwik/piwik/index.php
11+
if (!defined('PIWIK_DOCUMENT_ROOT')) {
12+
define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__));
13+
}
14+
if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
15+
require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php';
16+
}
17+
if (!defined('PIWIK_INCLUDE_PATH')) {
18+
define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);
19+
}
20+
21+
require_once PIWIK_INCLUDE_PATH . '/core/bootstrap.php';
22+
23+
if (!defined('PIWIK_PRINT_ERROR_BACKTRACE')) {
24+
define('PIWIK_PRINT_ERROR_BACKTRACE', false);
25+
}
26+
27+
require_once PIWIK_INCLUDE_PATH . '/core/dispatch.php';

0 commit comments

Comments
 (0)