<commit_before><?
namespace Concrete\Core\Tree\Node\Type;
use Concrete\Core\Tree\Node\Node as TreeNode;
use Loader;
use Group as UserGroup;
class Group extends TreeNode {

	public function getPermissionResponseClassName() {
		return '\\Concrete\\Core\\Permission\\Response\\GroupTreeNodeResponse';
	}

	public function getPermissionAssignmentClassName() {
		return '\\Concrete\\Core\\Permission\\Assignment\\GroupTreeNodeAssignment';	
	}
	public function getPermissionObjectKeyCategoryHandle() {
		return 'group_tree_node';
	}

	public function getTreeNodeGroupID() {
		return $this->gID;
	}
	public function getTreeNodeGroupObject() {
		return UserGroup::getByID($this->gID);
	}
	public function getTreeNodeDisplayName() {
		if ($this->treeNodeParentID == 0) {
			return t('All Groups');
		}

		$g = UserGroup::getByID($this->gID);
		if (is_object($g)) {
			return t($g->getGroupName());
		}
	}

	public function loadDetails() {
		$db = Loader::db();
		$row = $db->GetRow('select * from TreeGroupNodes where treeNodeID = ?', array($this->treeNodeID));
		$this->setPropertiesFromArray($row);
	}

	public function move(TreeNode $newParent) {
		parent::move($newParent);
		$g = $this->getTreeNodeGroupObject();
		if (is_object($g)) {
			$g->rescanGroupPathRecursive();
		}
	}

	public static function getTreeNodeByGroupID($gID) {
		$db = Loader::db();
		$treeNodeID = $db->GetOne('select treeNodeID from TreeGroupNodes where gID = ?', array($gID));
		if ($treeNodeID) {
			$tn = TreeNode::getByID($treeNodeID);
			return $tn;
		}<commit_msg>Use getGroupDisplayName instead of getGroupName<commit_after><?
namespace Concrete\Core\Tree\Node\Type;
use Concrete\Core\Tree\Node\Node as TreeNode;
use Loader;
use Group as UserGroup;
class Group extends TreeNode {

	public function getPermissionResponseClassName() {
		return '\\Concrete\\Core\\Permission\\Response\\GroupTreeNodeResponse';
	}

	public function getPermissionAssignmentClassName() {
		return '\\Concrete\\Core\\Permission\\Assignment\\GroupTreeNodeAssignment';	
	}
	public function getPermissionObjectKeyCategoryHandle() {
		return 'group_tree_node';
	}

	public function getTreeNodeGroupID() {
		return $this->gID;
	}
	public function getTreeNodeGroupObject() {
		return UserGroup::getByID($this->gID);
	}
	public function getTreeNodeDisplayName() {
		if ($this->treeNodeParentID == 0) {
			return t('All Groups');
		}

		$g = UserGroup::getByID($this->gID);
		if (is_object($g)) {
			return t($g->getGroupDisplayName());
		}
	}

	public function loadDetails() {
		$db = Loader::db();
		$row = $db->GetRow('select * from TreeGroupNodes where treeNodeID = ?', array($this->treeNodeID));
		$this->setPropertiesFromArray($row);
	}

	public function move(TreeNode $newParent) {
		parent::move($newParent);
		$g = $this->getTreeNodeGroupObject();
		if (is_object($g)) {
			$g->rescanGroupPathRecursive();
		}
	}

	public static function getTreeNodeByGroupID($gID) {
		$db = Loader::db();
		$treeNodeID = $db->GetOne('select treeNodeID from TreeGroupNodes where gID = ?', array($gID));
		if ($treeNodeID) {
			$tn = TreeNode::getByID($treeNodeID);
			return $tn;
		}
{'fraction_non_alphanumeric': 0.14940686117345303, 'fraction_numerical': 0.0006412311638345624, 'mean_word_length': 4.965583173996176, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '2877723', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1019, 'n_words': 204}