<commit_before><?php
defined('C5_EXECUTE') or die("Access Denied.");

//Permissions Check
if($_GET['bID']) {
	$c = Page::getByID($_GET['cID']);
	$a = Area::get($c, $_GET['arHandle']);
		
	//edit survey mode
	$b = Block::getByID($_GET['bID'],$c, $a);
	
	$controller = new PageListBlockController($b);
	$rssUrl = $controller->getRssUrl($b);
	
	$bp = new Permissions($b);
	if( $bp->canRead() && $controller->rss && ($b->getBlockFilename() == 'blog_index.php' || $b->getBlockFilename() == 'blog_index')) {

		$cArray = $controller->getPages();
		$nh = Loader::helper('navigation');

		header('Content-type: text/xml');
		echo "<" . "?" . "xml version=\"1.0\"?>\n";

?>
		<rss version="2.0">
		  <channel>
			<title><?=$controller->rssTitle?></title>
			<link><?=BASE_URL.$rssUrl?></link>
			<description><?=$controller->rssDescription?></description> 
<?
		for ($i = 0; $i < count($cArray); $i++ ) {
			$cobj = $cArray[$i]; 
			$title = $cobj->getCollectionName(); ?>
			<item>
			  <title><?=htmlspecialchars($title);?></title>
			  <link>
				<?= BASE_URL.DIR_REL.$nh->getLinkToCollection($cobj) ?>		  
			  </link>
			  <description><![CDATA[
				<?php
				$a = new Area('Main');
				$a->disableControls();
				$a->display($cobj);
				?>
			  ]]></description>
			  <? /* <pubDate><?=$cobj->getCollectionDatePublic()?></pubDate>
			  Wed, 23 Feb 2005 16:12:56 GMT  */ ?>
			  <pubDate><?=date( 'D, d M Y H:i:s T',strtotime($cobj->getCollectionDatePublic())) ?></pubDate>
			</item>
		<? } ?>
     		 </channel>
		</rss>
		
<?	} else {  	
		$v = View::getInstance();
		$v->renderError('Permission Denied',"This page list doesn't use the custom blog template, or you don't have permission to access this RSS feed");
		exit;
	}
			
} else {
	echo "You don't have permission to access this RSS feed";
}
exit;






<commit_msg>fox subdir urls, added translation strings<commit_after><?php
defined('C5_EXECUTE') or die("Access Denied.");

//Permissions Check
if($_GET['bID']) {
	$c = Page::getByID($_GET['cID']);
	$a = Area::get($c, $_GET['arHandle']);
		
	//edit survey mode
	$b = Block::getByID($_GET['bID'],$c, $a);
	
	$controller = new PageListBlockController($b);
	$rssUrl = $controller->getRssUrl($b);
	
	$bp = new Permissions($b);
	if( $bp->canRead() && $controller->rss && ($b->getBlockFilename() == 'blog_index.php' || $b->getBlockFilename() == 'blog_index')) {

		$cArray = $controller->getPages();
		$nh = Loader::helper('navigation');

		header('Content-type: text/xml');
		echo "<" . "?" . "xml version=\"1.0\"?>\n";

?>
		<rss version="2.0">
		  <channel>
			<title><?=$controller->rssTitle?></title>
			<link><?=BASE_URL.$rssUrl?></link>
			<description><?=$controller->rssDescription?></description> 
<?
		for ($i = 0; $i < count($cArray); $i++ ) {
			$cobj = $cArray[$i]; 
			$title = $cobj->getCollectionName(); ?>
			<item>
			  <title><?=htmlspecialchars($title);?></title>
			  <link>
				<?= BASE_URL.$nh->getLinkToCollection($cobj) ?>		  
			  </link>
			  <description><![CDATA[
				<?php
				$a = new Area('Main');
				$a->disableControls();
				$a->display($cobj);
				?>
			  ]]></description>
			  <? /* <pubDate><?=$cobj->getCollectionDatePublic()?></pubDate>
			  Wed, 23 Feb 2005 16:12:56 GMT  */ ?>
			  <pubDate><?=date( 'D, d M Y H:i:s T',strtotime($cobj->getCollectionDatePublic())) ?></pubDate>
			</item>
		<? } ?>
     		 </channel>
		</rss>
		
<?	} else {  	
		$v = View::getInstance();
		$v->renderError(t('Permission Denied'), t("This page list doesn't use the custom blog template, or you don't have permission to access this RSS feed"));
		exit;
	}
			
} else {
	echo t("You don't have permission to access this RSS feed");
}
exit;







{'fraction_non_alphanumeric': 0.2329251700680272, 'fraction_numerical': 0.009795918367346938, 'mean_word_length': 3.774025974025974, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 2, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4146250', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1322, 'n_words': 258}