<commit_before><?php
/**
 * Cetera CMS 3 
 * 
 * Информационной модуль "О системе". Показывает информацию о системе, лицензию и т.д.  
 *
 * @package CeteraCMS
 * @version $Id$
 * @copyright 2000-2010 Cetera labs (http://www.cetera.ru) 
 * @author unknown 
 **/
 
include('common_bo.php');


try {
    if (file_exists(WWWROOT.UPGRADE_SCRIPT)) unlink(WWWROOT.UPGRADE_SCRIPT);
    if (file_exists(WWWROOT.INSTALL_SCRIPT)) unlink(WWWROOT.INSTALL_SCRIPT);
} catch (\Exception $e) {}


if ($user->allowAdmin()) {
  
    if (!$application->getVar('no_update_check')) {
        try {
    		
    		$client = new \GuzzleHttp\Client();
    		$res = $client->get(DISTRIB_INFO, ['verify'=>false]);
            $info = json_decode( $res->getBody(), true);
    		
            $can_auto = is_writable(CMSROOT) && is_writable(WWWROOT);
        
            if (is_array($info)) {
            
                if (version_compare($info['version'], $application->getVersion()) > 0) {
                    $new_version = true;
                } 
				elseif ($can_auto && substr_count($application->getVersion(), 'beta') > 0) {
                    $rollback = true;
                }
                
                if (
                      $application->getVar('beta_versions') &&
                      $can_auto && 
                      is_array($info['beta']) && 
                      version_compare($info['beta']['version'], $application->getVersion()) > 0 &&
                      version_compare($info['beta']['version'], $info['version']) > 0
                   )
                {
                    $new_version_beta = true;
                }
                
            }
        
        } catch (\Exception $e) {}
    }
	
	  if ($application->getVar('setup_theme'))
		    $setup_theme = \Cetera\Server::getDefault()->getTheme()->name;
    
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:mpc>
<head>
    <style>
body {
    padding: 0px;
    background-color: window;
}

h1 {
    padding: 8px;
    font-size: 18px;
    color: inactivecaptiontext;<commit_msg>bugfix<commit_after><?php
/**
 * Cetera CMS 3 
 * 
 * Информационной модуль "О системе". Показывает информацию о системе, лицензию и т.д.  
 *
 * @package CeteraCMS
 * @version $Id$
 * @copyright 2000-2010 Cetera labs (http://www.cetera.ru) 
 * @author unknown 
 **/
 
include('common_bo.php');


try {
    if (file_exists(WWWROOT.UPGRADE_SCRIPT)) unlink(WWWROOT.UPGRADE_SCRIPT);
    if (file_exists(WWWROOT.INSTALL_SCRIPT)) unlink(WWWROOT.INSTALL_SCRIPT);
} catch (\Exception $e) {}


if ($user->allowAdmin()) {
  
    if (!$application->getVar('no_update_check')) {
        try {
    		
    		$client = new \GuzzleHttp\Client();
    		$res = $client->get(DISTRIB_INFO, ['verify'=>false]);
            $info = json_decode( $res->getBody(), true);
    		
            $can_auto = is_writable(CMSROOT) && is_writable(WWWROOT);
        
            if (is_array($info)) {
            
                if (version_compare($info['version'], $application->getVersion()) > 0) {
                    $new_version = true;
                } 
				elseif ($can_auto && substr_count($application->getVersion(), 'beta') > 0) {
                    $rollback = true;
                }
                
                if (
                      $application->getVar('beta_versions') &&
                      $can_auto && 
                      is_array($info['beta']) && 
                      version_compare($info['beta']['version'], $application->getVersion()) > 0 &&
                      version_compare($info['beta']['version'], $info['version']) > 0
                   )
                {
                    $new_version_beta = true;
                }
                
            }
        
        } catch (\Exception $e) {}
    }
	
	  if ($application->getVar('setup_theme') && \Cetera\Server::getDefault())
		    $setup_theme = \Cetera\Server::getDefault()->getTheme()->name;
    
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:mpc>
<head>
    <style>
body {
    padding: 0px;
    background-color: window;
}

h1 {
    padding: 8px;
    font-size: 18px;
    color: inactivecaptiontext;
{'fraction_non_alphanumeric': 0.15322388769926243, 'fraction_numerical': 0.009992862241256246, 'mean_word_length': 1.854039375424304, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7290669', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1333, 'n_words': 224}