<commit_before><?php
/**
 * sysGeneric.php
 *
 * ProcessMaker Open Source Edition
 * Copyright (C) 2004 - 2008 Colosa Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email <EMAIL>.
 *
 */

/**
 * sysGeneric - ProcessMaker Bootstrap
 * this file is used initialize main variables, redirect and dispatch all requests
 */

  // Defining the PATH_SEP constant, he we are defining if the the path separator symbol will be '\\' or '/'
  define('PATH_SEP', '/');

  // Defining the Home Directory
  $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
  $docuroot = explode(PATH_SEP , $realdocuroot);

  array_pop($docuroot);
  $pathhome = implode(PATH_SEP, $docuroot) . PATH_SEP;

  // try to find automatically the trunk directory where are placed the RBAC and Gulliver directories
  // in a normal installation you don't need to change it.
  array_pop($docuroot);
  $pathTrunk = implode(PATH_SEP, $docuroot) . PATH_SEP ;

  array_pop($docuroot);
  $pathOutTrunk = implode(PATH_SEP, $docuroot) . PATH_SEP ;

  define('PATH_HOME',     $pathhome);
  define('PATH_TRUNK',    $pathTrunk);
  define('PATH_OUTTRUNK', $pathOutTrunk);

  // Including these files we get the PM paths and definitions (that should be just one file.
  require_once $pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php';
  require_once PATH_CORE . 'classes' . PATH_SEP . 'class.system.php';

  // starting session
  session_start();

  $config = System::getSystemConfiguration();

  $e_all  = defined('E_DEPRECATED') ? E_ALL  & ~E_DEPRECATED : E_ALL;
  $e_all  = defined('E_STRICT')     ? $e_all & ~E_STRICT     : $e_all;
  $e_all  = $config['debug']        ? $e_all                 : $e_all & ~E_NOTICE;

  // Do not change any of these settings directly, use env.ini instead
  ini_set('display_errors', $config['debug']);
  ini_set('error_reporting', $e_all);
  ini_set('short_open_tag', 'On');
  ini_set('default_charset', "UTF-8");
  ini_set('memory_limit', $config['memory_limit']);
  ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
  ini_set('date.timezone', $config['time_zone']);
<commit_msg>enter Speedy<commit_after><?php
/**
 * sysGeneric.php
 *
 * ProcessMaker Open Source Edition
 * Copyright (C) 2004 - 2008 Colosa Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email <EMAIL>.
 *
 */

/**
 * sysGeneric - ProcessMaker Bootstrap
 * this file is used initialize main variables, redirect and dispatch all requests
 */

  // Defining the PATH_SEP constant, he we are defining if the the path separator symbol will be '\\' or '/'
  define('PATH_SEP', '/');

  // Defining the Home Directory
  $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
  $docuroot = explode(PATH_SEP , $realdocuroot);

  array_pop($docuroot);
  $pathhome = implode(PATH_SEP, $docuroot) . PATH_SEP;

  // try to find automatically the trunk directory where are placed the RBAC and Gulliver directories
  // in a normal installation you don't need to change it.
  array_pop($docuroot);
  $pathTrunk = implode(PATH_SEP, $docuroot) . PATH_SEP ;

  array_pop($docuroot);
  $pathOutTrunk = implode(PATH_SEP, $docuroot) . PATH_SEP ;

  define('PATH_HOME',     $pathhome);
  define('PATH_TRUNK',    $pathTrunk);
  define('PATH_OUTTRUNK', $pathOutTrunk);
  // Including these files we get the PM paths and definitions (that should be just one file.
  require_once $pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php';
  require_once PATH_CORE . 'classes' . PATH_SEP . 'class.system.php';

  // starting session
  session_start();

  $config = System::getSystemConfiguration();

  $e_all  = defined('E_DEPRECATED') ? E_ALL  & ~E_DEPRECATED : E_ALL;
  $e_all  = defined('E_STRICT')     ? $e_all & ~E_STRICT     : $e_all;
  $e_all  = $config['debug']        ? $e_all                 : $e_all & ~E_NOTICE;

  // Do not change any of these settings directly, use env.ini instead
  ini_set('display_errors', $config['debug']);
  ini_set('error_reporting', $e_all);
  ini_set('short_open_tag', 'On');
  ini_set('default_charset', "UTF-8");
  ini_set('memory_limit', $config['memory_limit']);
  ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
  ini_set('date.timezone', $config['time_zone']);

{'fraction_non_alphanumeric': 0.12021089630931459, 'fraction_numerical': 0.006678383128295255, 'mean_word_length': 3.910267471958585, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, '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': '3935071', 'n_tokens_mistral': 1906, 'n_tokens_neox': 1796, 'n_words': 591}