Skip to content

Commit

Permalink
fixed path if piwik is installed as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Apr 9, 2014
1 parent 25c0675 commit 1ceb76c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions piwik.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@
/*
* Manually require needed vendor libraries, as composers autorequire would do too much
*/
require_once PIWIK_INCLUDE_PATH . '/vendor/mustangostang/spyc/Spyc.php';
require_once PIWIK_INCLUDE_PATH . '/vendor/piwik/device-detector/DeviceDetector.php';
if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) {
$vendorDirectory = PIWIK_INCLUDE_PATH . '/vendor';
} else {
$vendorDirectory = PIWIK_INCLUDE_PATH . '/../..';
}
require_once $vendorDirectory . '/mustangostang/spyc/Spyc.php';
require_once $vendorDirectory . '/piwik/device-detector/DeviceDetector.php';

session_cache_limiter('nocache');
@date_default_timezone_set('UTC');
Expand Down

0 comments on commit 1ceb76c

Please sign in to comment.