SERVERPATH(), $vars);}
/**
* Read Git Information
*
* @return array Returns Array with Git Information
*/
public static function getGitInfo(){
\LIB\lib_git::php();
$gits = array(array('title' => \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT), 'path' => \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)),
);//array('title' => 'Current SYSTEM Version', 'path' => \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)));
$result = '';
$i = 0;
while($i < count($gits)){
$git = $gits[$i];
try{
$repo = \GIT\Git::open($git['path']);
$git['git_project'] = $repo->run('ls-remote --get-url').'
';
$git['git_project'] .= nl2br(htmlentities($repo->run('log --date=relative --graph -3')));
$subs = explode("\n",$repo->run('config --file .gitmodules --get-regexp path'));
foreach($subs as $sub){
if($sub == ''){
continue;}
$gits[] = array('title' => $git['title'].'/'.explode('.',$sub)[1],
'path' => $git['path'].preg_replace('/\s+/', '', explode('path ',$sub)[1]).'/');
//echo $git['title'].'/'.explode('.',$sub)[1].' - '.$git['path'].preg_replace('/\s+/', '', explode('path ',$sub)[1]).'/
';
}
} catch (\Exception $ex) {
$git['git_project'] = 'Error: '.$git['path'].' '.$ex->getMessage();
}
$i++;
$result .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_git/tpl/saimod_sys_git_panel.tpl'))->SERVERPATH(), $git);
}
return $result;
}
/**
* Generate