<commit_before><?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2013 osCommerce

  Released under the GNU General Public License
*/

  if (tep_session_is_registered('admin')) {
    $cl_box_groups = array();

    if ($dir = @dir(DIR_FS_ADMIN . 'includes/boxes')) {
      while ($file = $dir->read()) {
        if (!is_dir($dir->path . '/' . $file)) {
          if (substr($file, strrpos($file, '.')) == '.php') {
            if ( file_exists(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file) ) {
              include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file);
            }

            include($dir->path . '/' . $file);
          }
        }
      }
      $dir->close();
    }

    function sort_admin_boxes($a, $b) {
      return strcmp($a['heading'], $b['heading']);
    }

    usort($cl_box_groups, 'sort_admin_boxes');

    function sort_admin_boxes_links($a, $b) {
      return strcmp($a['title'], $b['title']);
    }

    foreach ( $cl_box_groups as $key => &$group ) {
      usort($group['apps'], 'sort_admin_boxes_links');
    }
?>

<div id="adminAppMenu">
<commit_msg>prefix the custom sort functions with tep_<commit_after><?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2013 osCommerce

  Released under the GNU General Public License
*/

  if (tep_session_is_registered('admin')) {
    $cl_box_groups = array();

    if ($dir = @dir(DIR_FS_ADMIN . 'includes/boxes')) {
      while ($file = $dir->read()) {
        if (!is_dir($dir->path . '/' . $file)) {
          if (substr($file, strrpos($file, '.')) == '.php') {
            if ( file_exists(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file) ) {
              include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file);
            }

            include($dir->path . '/' . $file);
          }
        }
      }
      $dir->close();
    }

    function tep_sort_admin_boxes($a, $b) {
      return strcmp($a['heading'], $b['heading']);
    }

    usort($cl_box_groups, 'tep_sort_admin_boxes');

    function tep_sort_admin_boxes_links($a, $b) {
      return strcmp($a['title'], $b['title']);
    }

    foreach ( $cl_box_groups as $key => &$group ) {
      usort($group['apps'], 'tep_sort_admin_boxes_links');
    }
?>

<div id="adminAppMenu">

{'fraction_non_alphanumeric': 0.18441452468380254, 'fraction_numerical': 0.0032639738882088943, 'mean_word_length': 2.538239538239538, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '3614857', 'n_tokens_mistral': 859, 'n_tokens_neox': 828, 'n_words': 154}