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

class DashboardScrapbookGlobalController extends Controller {

	public function view() { 
		
		$a = Area::get($this->getCollectionObject(), 'Global Scrapbook');
		if (!is_object($a)) {
			$a = Area::getOrCreate($this->getCollectionObject(), 'Global Scrapbook');
		}
		$html = Loader::helper('html');
		$this->addHeaderItem($html->css('ccm.filemanager.css'));
		$this->addHeaderItem($html->javascript('ccm.filemanager.js'));
		$this->addHeaderItem($html->javascript('tiny_mce_321/tiny_mce.js'));
		$this->addHeaderItem('<script type="text/javascript">$(function() { ccm_activateFileManager(\'DASHBOARD\'); });</script>');
		
		//make sure global scrapbook area exists 
		global $c;
		Area::getOrCreate($c,'Global Scrapbook');
	}
	
	public function delete(){
		$bID=intval($_REQUEST['bID']);
		$block=Block::getById($bID);  
		if($block){  //&& $block->getAreaHandle()=='Global Scrapbook'
			$block->delete(1);
		}
		$this->view();
	}
	
	public function rename_block(){<commit_msg>fixing global block tinymce reference<commit_after><?
defined('C5_EXECUTE') or die(_("Access Denied."));

class DashboardScrapbookGlobalController extends Controller {

	public function view() { 
		
		$a = Area::get($this->getCollectionObject(), 'Global Scrapbook');
		if (!is_object($a)) {
			$a = Area::getOrCreate($this->getCollectionObject(), 'Global Scrapbook');
		}
		$html = Loader::helper('html');
		$this->addHeaderItem($html->css('ccm.filemanager.css'));
		$this->addHeaderItem($html->javascript('ccm.filemanager.js'));
		$this->addHeaderItem($html->javascript('tiny_mce/tiny_mce.js'));
		$this->addHeaderItem('<script type="text/javascript">$(function() { ccm_activateFileManager(\'DASHBOARD\'); });</script>');
		
		//make sure global scrapbook area exists 
		global $c;
		Area::getOrCreate($c,'Global Scrapbook');
	}
	
	public function delete(){
		$bID=intval($_REQUEST['bID']);
		$block=Block::getById($bID);  
		if($block){  //&& $block->getAreaHandle()=='Global Scrapbook'
			$block->delete(1);
		}
		$this->view();
	}
	
	public function rename_block(){
{'fraction_non_alphanumeric': 0.20207743153918792, 'fraction_numerical': 0.0033050047214353163, 'mean_word_length': 5.857605177993528, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 31, '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': '5711160', 'n_tokens_mistral': 766, 'n_tokens_neox': 697, 'n_words': 111}