<commit_before><?php

/**
 * A simple widget that just shows a link
 * to this website's blog RSS, with an RSS
 * icon.
 * 
 * @package blog
 */
class SubscribeRSSWidget extends Widget {
	
	static $db = array(
		'Title' => 'Varchar'
	);
	
	static $title = 'Subscribe via RSS';
	
	static $cmsTitle = 'Subscribe via RSS widget';
	
	static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.';

	/**
	 * Get the BlogHolder instance that this widget
	 * is located on.
	 *
	 * @return BlogHolder
	 */
	function getBlogHolder() {
		$page = Director::currentPage();
		
		if($page instanceof BlogHolder) {
			return $page;
		} elseif(($page instanceof BlogEntry) && ($page->getParent() instanceof BlogHolder)) {
			return $page->getParent();
		} else {
			return DataObject::get_one('BlogHolder');
		}
	}
	
	/**
	 * Return an absolute URL based on the BlogHolder<commit_msg>MINOR Removed useless $db array in SubscribeRSSWidget since it's not being used<commit_after><?php

/**
 * A simple widget that just shows a link
 * to this website's blog RSS, with an RSS
 * icon.
 * 
 * @package blog
 */
class SubscribeRSSWidget extends Widget {
	
	static $title = 'Subscribe via RSS';
	
	static $cmsTitle = 'Subscribe via RSS widget';
	
	static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.';

	/**
	 * Get the BlogHolder instance that this widget
	 * is located on.
	 *
	 * @return BlogHolder
	 */
	function getBlogHolder() {
		$page = Director::currentPage();
		
		if($page instanceof BlogHolder) {
			return $page;
		} elseif(($page instanceof BlogEntry) && ($page->getParent() instanceof BlogHolder)) {
			return $page->getParent();
		} else {
			return DataObject::get_one('BlogHolder');
		}
	}
	
	/**
	 * Return an absolute URL based on the BlogHolder
{'fraction_non_alphanumeric': 0.11794019933554817, 'fraction_numerical': 0.0, 'mean_word_length': 3.540201005025126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '3366668', 'n_tokens_mistral': 604, 'n_tokens_neox': 521, 'n_words': 195}