2b569322e7c355badf59112cc26b46c484dda925
Author: AD7six
Date: 2009-04-15 20:09:51 +0200
diff --git a/models/revision.php b/models/revision.php
index a58771d..98b58e1 100644
--- a/models/revision.php
+++ b/models/revision.php
@@ -461,12 +461,13 @@ class Revision extends AppModel {
function duplicateSubmission() {
$this->data[$this->alias];
$row = array(
+ 'lang' => $this->Node->language,
'node_id' => $this->data[$this->alias]['node_id'],
'title' => $this->data[$this->alias]['title'],
'content' => $this->data[$this->alias]['content'],
'status' => array('pending', 'current')
);
- return $this->hasAny($row);
+ return !$this->hasAny($row);
}
/**
* getId function
diff --git a/views/elements/contribute.ctp b/views/elements/contribute.ctp
index 5175820..faa000c 100644
--- a/views/elements/contribute.ctp
+++ b/views/elements/contribute.ctp
@@ -1,5 +1,6 @@
<?php
$translatorHelp = $html->link(__('more informations about translations', true), array('action' => 'view', 818));
+$data['Revision']['flags'] .= ';foo';
if (!$data['Revision']['id']) :
echo '<p class="contribute">';
echo sprintf(__('There is no translation yet for this section. Please help out and %1$s.', true),
@@ -28,5 +29,6 @@ elseif (strpos($data['Revision']['flags'], 'englishChanged') !== false) : ?>
echo $html->link(__('Compare the current text to the original', true), $url)
?></li>
</ul>
+ <p><?php echo $translatorHelp; ?></p>
</div>
<?php endif; ?>
\ No newline at end of file
