<commit_before><?php
if (empty($modelName)) {
	$modelName = Inflector::singularize($this->name);
}
if (empty($photo)) {
	return;
}

$user_id = $this->Session->read('Auth.User.id');
if ($user_id == $photo['Album']['user_id']) {
	return;
}
$Rating = ClassRegistry::init('Givrate.Rating');
$isRated = $Rating->isRated($photo['Token']['token'], $user_id);
?>

<div class='rating-el'>
<?php
if (!empty($isRated)) {
	echo $this->Html->tag('span', 'Rated', array('class' => 'rated'));
} else {
	echo $this->Givrate->star($photo['Photo']['id'], $photo['Token']['token']);
}
?>
</div><commit_msg>adjust rate-action element Givrate for global<commit_after><?php
if (empty($modelName)) {
	$modelName = Inflector::singularize($this->name);
}

$Rating = ClassRegistry::init('Givrate.Rating');
$isRated = $Rating->isRated($modelName['Token']['token'], $user_id);
?>

<div class='rating-el'>
<?php
if (!empty($isRated)) {
	echo $this->Html->tag('span', 'Rated', array('class' => 'rated'));
} else {
	echo $this->Givrate->star($modelName[$modelName]['id'], $modelName['Token']['token']);
}
?>
</div>
{'fraction_non_alphanumeric': 0.26685133887349954, 'fraction_numerical': 0.0, 'mean_word_length': 7.46875, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, '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': '2202782', 'n_tokens_mistral': 402, 'n_tokens_neox': 396, 'n_words': 63}