Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

19 lines
715 B
PHP
Executable File

<?php
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../init.php');
include(dirname(__FILE__).'/pm_advancedsearch4.php');
if (php_sapi_name() != 'cli') {
if (isset($_GET['secure_key'])) {
$secureKey = (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? Configuration::getGlobalValue('PM_AS4_SECURE_KEY') : Configuration::get('PM_AS4_SECURE_KEY'));
if (!empty($secureKey) AND $secureKey === $_GET['secure_key']) {
$PM_AdvancedSearch4 = new PM_AdvancedSearch4();
$PM_AdvancedSearch4->cronTask();
echo 'Reindexation done';
}
}
} else {
$PM_AdvancedSearch4 = new PM_AdvancedSearch4();
$PM_AdvancedSearch4->cronTask();
echo 'Reindexation done via PHP Cli';
}