mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
cli rebuild.php
This commit is contained in:
@@ -128,6 +128,15 @@ class Application
|
||||
$cronManager = new \Espo\Core\CronManager($this->container);
|
||||
$cronManager->run();
|
||||
}
|
||||
|
||||
public function runRebuild()
|
||||
{
|
||||
$auth = $this->getAuth();
|
||||
$auth->useNoAuth(true);
|
||||
|
||||
$dataManager = $this->getContainer()->get('dataManager');
|
||||
$dataManager->rebuild();
|
||||
}
|
||||
|
||||
public function isInstalled()
|
||||
{
|
||||
|
||||
13
rebuild.php
Normal file
13
rebuild.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$sapiName = php_sapi_name();
|
||||
|
||||
if (substr($sapiName, 0, 3) != 'cli') {
|
||||
die("cron can be run only via CLI");
|
||||
}
|
||||
|
||||
include "bootstrap.php";
|
||||
|
||||
$app = new \Espo\Core\Application();
|
||||
$app->runRebuild();
|
||||
|
||||
Reference in New Issue
Block a user