-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathetdoptimizer.php
More file actions
executable file
·49 lines (38 loc) · 1.04 KB
/
etdoptimizer.php
File metadata and controls
executable file
·49 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* @package ETD Optimizer
*
* @version 2.7.0
* @copyright Copyright (C) 2012-2017 ETD Solutions. Tous droits réservés.
* @license Apache Version 2 (https://raw.githubusercontent.com/jbanety/etdoptimizer/master/LICENSE.md)
* @author ETD Solutions http://www.etd-solutions.com
**/
// On s'assure d'avoir initialisé Composer
$autoload = realpath(dirname(__FILE__) . '/vendor/autoload.php');
if (!file_exists($autoload)) {
throw new \RuntimeException('Composer n\'est pas correctement installé, exécuter "composer install".');
}
include($autoload);
/*
* On détermine la bonne plateforme.
*/
$platform = '';
// Joomla
// ------------
if (defined('_JEXEC')) {
$platform = 'joomla';
}
// Prestashop
// ------------
elseif (defined('_CAN_LOAD_FILES_')) {
$platform = 'prestashop';
}
/*
* On charge le plugin si nécessaire.
*/
if (!empty($platform)) {
$path = realpath(dirname(__FILE__) . "/platforms/" . $platform . "/plugin.php");
if (file_exists($path)) {
require_once($path);
}
}