aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/backend.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-01-17 01:00:03 +0100
committerKevin Chabowski <kevin@kch42.de>2012-01-17 01:00:03 +0100
commit7b110db43af6992182efd8837d877a9d5d65595b (patch)
treeb5f17b53e9603074cce4067769612767bc67caaf /ratatoeskr/backend.php
parent6634d0daf32d26466eae1c9c41209ea75d3096c9 (diff)
downloadratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.tar.gz
ratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.tar.bz2
ratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.zip
Fixed a bug in the article editor.
If an article had content only in a language that is not the user's language, Ratatöskr had crashed.
Diffstat (limited to 'ratatoeskr/backend.php')
-rw-r--r--ratatoeskr/backend.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php
index 78ef83c..983fe2b 100644
--- a/ratatoeskr/backend.php
+++ b/ratatoeskr/backend.php
@@ -299,6 +299,14 @@ $backend_subactions = url_action_subactions(array(
}
}
+ if(!isset($article->title[$editlang]))
+ {
+ $langs_available = array();
+ foreach($article->title as $lang => $_)
+ $langs_available[] = $lang;
+ $editlang = $langs_available[0];
+ }
+
foreach(array(
"urlname" => "urlname",
"section" => "article_section",