Skip to content

Commit

Permalink
Fix: translation system issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
quickapps committed Apr 23, 2012
1 parent 1a6fa33 commit ad41bee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 4 additions & 5 deletions QuickApps/Plugin/Node/Controller/ContentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ public function admin_translate($slug) {
'conditions' => array(
'Node.slug' => $slug,
'Node.language LIKE' => '___',
'Node.translation_of' => null
'OR' => array(
'Node.translation_of' => '',
'Node.translation_of IS NULL'
)
)
)
);
Expand Down Expand Up @@ -137,10 +140,6 @@ public function admin_translate($slug) {
)
);

if (!$node) {
$this->redirect('/admin/node/contents');
}

$this->set('translations', $translations);
$this->__setLangVar();
$this->setCrumb(
Expand Down
5 changes: 4 additions & 1 deletion QuickApps/Plugin/Node/Model/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ public function createTranslation($slug, $language, $new_title = false) {
'conditions' => array(
'Node.slug' => $slug,
'NOT' => array(
'Node.translation_of' => null
'OR' => array(
'Node.translation_of' => '',
'Node.translation_of IS NULL'
)
)
)
)
Expand Down

0 comments on commit ad41bee

Please sign in to comment.