<commit_before><?php
class Component_page extends Component
{
  public function init() {}

  public function controller_page($args)
  {
    $vars["args"] = $args;
    return $this->GetComponentResponse("./page.tpl", $vars);
  }

  public function component_sizelog($args)
  {
    $pandora = PandoraLog::singleton();
    $session = SessionManager::singleton();
    
    $size = array();
    $size["timestamp"]            = time();
    $size["session_id"]           = $session->flsid;
    $size["fluid"]                = $session->fluid;
    $size["version"]              = $this->root->version;
    $size["width"]                = $args["width"];
    $size["height"]               = $args["height"];
    $size["result_view_id"]       = $args["result_view_id"];

    // add data
    $pandora->addData("sizes", $size);
    unset($size);<commit_msg>- Fixing sizelog (it now works when called from the js)<commit_after><?php
class Component_page extends Component
{
  public function init() {}

  public function controller_page($args)
  {
    $vars["args"] = $args;
    return $this->GetComponentResponse("./page.tpl", $vars);
  }

  public function controller_sizelog($args)
  {
    $pandora = PandoraLog::singleton();
    $session = SessionManager::singleton();
    
    $size = array();
    $size["timestamp"]            = time();
    $size["session_id"]           = $session->flsid;
    $size["fluid"]                = $session->fluid;
    $size["version"]              = $this->root->version;
    $size["width"]                = $args["width"];
    $size["height"]               = $args["height"];
    $size["result_view_id"]       = $args["result_view_id"];

    // add data
    $pandora->addData("sizes", $size);
    unset($size);
{'fraction_non_alphanumeric': 0.17714945181765723, 'fraction_numerical': 0.0, 'mean_word_length': 2.5975103734439835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '887968', 'n_tokens_mistral': 541, 'n_tokens_neox': 530, 'n_words': 97}