<commit_before><?php 
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $Id$
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

function CreateRSSFeed($projectid)
{
  // Checks
  if(!isset($projectid) || !is_numeric($projectid))
    {
    echo "Not a valid projectid!";
    return;
    }
  
  include('config.php');
  $db = mysql_connect("$CDASH_DB_HOST", "$CDASH_DB_LOGIN","$CDASH_DB_PASS");
  mysql_select_db("$CDASH_DB_NAME",$db);

  // Find the project name
  $project = mysql_query("SELECT public,name FROM project WHERE id='$projectid'");
  $project_array = mysql_fetch_array($project);
  $projectname = $project_array["name"];
  
  // Don't create RSS feed for private projects
  if($project_array["public"]!=1)
    {
    return;
    }

  $serverbase = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],"/"));
  $filename = $serverbase."/rss/SubmissionRSS".$projectname.".xml";

  if (!($fp = fopen($filename, 'w')))
   {
   echo "Cannot write file ".$filename;
   return;
   }
   
  $urlbase = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];<commit_msg>BUG: 6670 createRSS.php puts bad link path into the RSS feed items<commit_after><?php 
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $Id$
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

function CreateRSSFeed($projectid)
{
  // Checks
  if(!isset($projectid) || !is_numeric($projectid))
    {
    echo "Not a valid projectid!";
    return;
    }
  
  include('config.php');
  $db = mysql_connect("$CDASH_DB_HOST", "$CDASH_DB_LOGIN","$CDASH_DB_PASS");
  mysql_select_db("$CDASH_DB_NAME",$db);

  // Find the project name
  $project = mysql_query("SELECT public,name FROM project WHERE id='$projectid'");
  $project_array = mysql_fetch_array($project);
  $projectname = $project_array["name"];
  
  // Don't create RSS feed for private projects
  if($project_array["public"]!=1)
    {
    return;
    }

  $serverbase = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],"/"));
  $filename = $serverbase."/rss/SubmissionRSS".$projectname.".xml";

  if (!($fp = fopen($filename, 'w')))
   {
   echo "Cannot write file ".$filename;
   return;
   }
   
  $urlbase = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']);
{'fraction_non_alphanumeric': 0.22067714631197097, 'fraction_numerical': 0.0048367593712212815, 'mean_word_length': 4.328502415458937, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1592051', 'n_tokens_mistral': 1034, 'n_tokens_neox': 978, 'n_words': 236}