<commit_before><?php
Namespace Admin;
class AdminController extends Controller
{

	protected $footer = "View/Template/footer.php";
	private $template_edit = "editSite";
	private $template_editForm = "editArticleForm";
	private $template_addFile = "uploadFile";
	
	
	public function invoke()
	{
		$getVars = $_GET;
        $page = isset($getVars['action']) ? $getVars['action'] : 'empty';
		$article = new \ArticleEntity($this->database);
		
		if(!isset($_GET['action'])) 
		{
			$this->template = $this->template_edit;
			parent::invoke();
			
			$projectarry = $article->getAllArticles();
			foreach ($projectarry as $row)
			{
				$content = $article->htmlOut($row['content']);
				$projObj[] = $article->getArticleObject($row['articleId'], $row['category'],$row['title'], $content ,$row['tag'],$row['date'],$row['status']);
			}
				
			//create a new view and pass it our template
			$view = new AdminView($this->template,$this->footer, 0);
			$view->assign('proj' , $projObj);
		}
		elseif (isset($_GET['action']))
		{
			if ($page == 'alter')
			{
				if ($_POST['alter'] == 'Edit')
				{
					$this->template = $this->template_editForm;
					parent::invoke();
					
					$id = $_POST['articleId'];					
					$singleArticle = $article->getProjectDataToEdit($id);
					$singleArticleObj = $article->getArticleObject($singleArticle[0]['articleId'], $singleArticle[0]['category'], $singleArticle[0]['title'], $singleArticle[0]['content'], $singleArticle[0]['tag'], $singleArticle[0]['date'], $singleArticle[0]['status']);
					
					$title = $singleArticle[0]['title'];
					$files[] = $article->getIndividualProjectFiles($title);<commit_msg>remove call to function to convert HTML Number to readable html<commit_after><?php
Namespace Admin;
class AdminController extends Controller
{

	protected $footer = "View/Template/footer.php";
	private $template_edit = "editSite";
	private $template_editForm = "editArticleForm";
	private $template_addFile = "uploadFile";
	
	
	public function invoke()
	{
		$getVars = $_GET;
        $page = isset($getVars['action']) ? $getVars['action'] : 'empty';
		$article = new \ArticleEntity($this->database);
		
		if(!isset($_GET['action'])) 
		{
			$this->template = $this->template_edit;
			parent::invoke();
			
			$projectarry = $article->getAllArticles();
			foreach ($projectarry as $row)
			{
				$projObj[] = $article->getArticleObject($row['articleId'], $row['category'],$row['title'], $row['content'] ,$row['tag'],$row['date'],$row['status']);
			}
				
			//create a new view and pass it our template
			$view = new AdminView($this->template,$this->footer, 0);
			$view->assign('proj' , $projObj);
		}
		elseif (isset($_GET['action']))
		{
			if ($page == 'alter')
			{
				if ($_POST['alter'] == 'Edit')
				{
					$this->template = $this->template_editForm;
					parent::invoke();
					
					$id = $_POST['articleId'];					
					$singleArticle = $article->getProjectDataToEdit($id);
					$singleArticleObj = $article->getArticleObject($singleArticle[0]['articleId'], $singleArticle[0]['category'], $singleArticle[0]['title'], $singleArticle[0]['content'], $singleArticle[0]['tag'], $singleArticle[0]['date'], $singleArticle[0]['status']);
					
					$title = $singleArticle[0]['title'];
					$files[] = $article->getIndividualProjectFiles($title);
{'fraction_non_alphanumeric': 0.19933252427184467, 'fraction_numerical': 0.0054611650485436895, 'mean_word_length': 4.694300518134715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, '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': '6712469', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1010, 'n_words': 187}