1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 19:44:09 +02:00

Git updates for plugins and themes when available.

This commit is contained in:
Cameron
2016-06-02 19:20:58 -07:00
parent 0109e91271
commit 6ef0868077
5 changed files with 103 additions and 25 deletions

View File

@@ -41,25 +41,8 @@ class _system_cron
if(is_dir(e_BASE.".git")) // Check it's a Git Repo
{
$return = $fl->gitPull();
$gitPath = defset('e_GIT','git'); // addo to e107_config.php to
// Change Dir.
$cmd = 'cd '.e_ROOT;
$mes->addDebug($cmd);
$text = `$cmd 2>&1`;
// Remove any local changes.
$cmd = $gitPath.' reset --hard';
$mes->addDebug($cmd);
$text .= `$cmd 2>&1`;
// Run Pull request
$cmd = $gitPath.' pull';
$mes->addDebug($cmd);
$text .= `$cmd 2>&1`;
$return = print_a($text,true);
$mes->addSuccess($return);
if(unlink(e_BASE."install.php"))