<commit_before><?php
namespace application\nutsNBolts\controller\admin
{
	use application\nutsNBolts\base\AdminController;
	use application\nutsNBolts\plugin\plupload\ThumbnailMaker;
	use nutshell\core\exception\NutshellException;
	use nutshell\helper\ObjectHelper;
	
	class Settings extends AdminController
	{
		private $collectionID=null;
		
		public function index()
		{
			$this->show404();
			$renderRef='index';
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function nnb()
		{
			$this->addBreadcrumb('System','icon-wrench','settings');
			$this->addBreadcrumb('Nuts n Bolts Settings','icon-circle-blank','nnb');
			
			
			$renderRef='nnb';
			$this->view->setVar('extraOptions',array());
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function site()
		{
			$this->addBreadcrumb('System','icon-wrench','settings');
			$this->addBreadcrumb('Site Settings','icon-circle','site');
			$this->setContentView('admin/settings/siteSettings');
			
			if ($this->request->get('key'))
			{
				$keys	=$this->request->get('key');
				$values	=$this->request->get('value');
				$records=[];
				for ($i=0,$j=count($keys); $i<$j; $i++)
				{
					$records[]=
					[
						'label'	=>$keys[$i],
						'key'	=>$keys[$i],
						'value'	=>$values[$i],
					];
				}
				$this->model->SiteSettings->insertAll($records);
			}
			
			$settings=$this->model->SiteSettings->read();
			
			$this->view->setVar('settings',$settings);
			$renderRef='site';
			$this->view->setVar('extraOptions',array());
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function users($action=null,$id=null)
		{
			$this->addBreadcrumb('System Settings','icon-wrench','settings');
			$this->addBreadcrumb('Users','icon-user','users');
			switch ($action)
			{
				case 'add':<commit_msg>Added user feedback.<commit_after><?php
namespace application\nutsNBolts\controller\admin
{
	use application\nutsNBolts\base\AdminController;
	use application\nutsNBolts\plugin\plupload\ThumbnailMaker;
	use nutshell\core\exception\NutshellException;
	use nutshell\helper\ObjectHelper;
	
	class Settings extends AdminController
	{
		private $collectionID=null;
		
		public function index()
		{
			$this->show404();
			$renderRef='index';
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function nnb()
		{
			$this->addBreadcrumb('System','icon-wrench','settings');
			$this->addBreadcrumb('Nuts n Bolts Settings','icon-circle-blank','nnb');
			
			
			$renderRef='nnb';
			$this->view->setVar('extraOptions',array());
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function site()
		{
			$this->addBreadcrumb('System','icon-wrench','settings');
			$this->addBreadcrumb('Site Settings','icon-circle','site');
			$this->setContentView('admin/settings/siteSettings');
			
			if ($this->request->get('key'))
			{
				$keys	=$this->request->get('key');
				$values	=$this->request->get('value');
				$records=[];
				for ($i=0,$j=count($keys); $i<$j; $i++)
				{
					$records[]=
					[
						'label'	=>$keys[$i],
						'key'	=>$keys[$i],
						'value'	=>$values[$i],
					];
				}
				$this->model->SiteSettings->insertAll($records);
				$this->plugin->Notification->setSuccess('Settings saved.');
			}
			
			$settings=$this->model->SiteSettings->read();
			
			$this->view->setVar('settings',$settings);
			$renderRef='site';
			$this->view->setVar('extraOptions',array());
			$this->execHook('onBeforeRender',$renderRef);
			$this->view->render();
		}
		
		public function users($action=null,$id=null)
		{
			$this->addBreadcrumb('System Settings','icon-wrench','settings');
			$this->addBreadcrumb('Users','icon-user','users');
			switch ($action)
			{
				case 'add':
{'fraction_non_alphanumeric': 0.20641125879593433, 'fraction_numerical': 0.0020849622100599426, 'mean_word_length': 4.243169398907104, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 82, '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': '790459', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1284, 'n_words': 159}